/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

 @charset "UTF-8";

/* Base visibility */
.modal-dialog {
    visibility: hidden;
}

.modal-dialog .modal-dialog-content {
    min-width: auto !important;
    min-height: auto !important;
    max-width: max-content;
    max-height: max-content;
    overflow: visible;
}

div.wicket-modal {
    position: relative;
    z-index: 20001;
    visibility: visible;
    background-color: var(--gs-body-bg) !important;
    display: flex;
    flex-direction: column;
    border-radius: var(--gs-border-radius);
    box-shadow: var(--gs-box-shadow);
}

/* Header/caption */
div.wicket-modal div.w_caption {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: grab;
    border: 1px solid var(--gs-border-color);
    padding: 0.5rem;
    border-top-left-radius: var(--gs-border-radius);
    border-top-right-radius: var(--gs-border-radius);
}

div.wicket-modal h3.w_captionText {
    margin: 0 0 0 3px;
    overflow: hidden;
    white-space: nowrap;
    user-select: none;
    color: var(--gs-emphasis-color);
    font-size: 12px;
    font-weight: bold;
}

.flex-grow {
    flex-grow: 1;
}

div.wicket-modal .titleTextDiv {
    overflow: hidden;
}

div.wicket-modal .close {
    padding-right:3px;
    width: 13px;
}

div.wicket-modal a.w_close {
    z-index: 1;
}

div.wicket-modal .close svg {
    height: 16px;
    fill: var(--gs-secondary);
}

div.wicket-modal .close svg:hover {
    fill: var(--gs-primary);
}

/* Body/content */
div.wicket-modal div.w_content_container {
    color: var(--gs-body-color);
    position: relative;
    width: 100%;
    height: max-content;
    padding: 0.5rem;
}

div.wicket-modal div.w_content_1 {
    margin-right: 10px;
    cursor: auto;
}

div.wicket-modal div.w_content_2 {
    cursor: default;
    display: flex;
    overflow: auto;
    border: 1px solid var(--gs-border-color);
    border-top: 0px;
    flex: 1;
    min-height: 0;
    border-bottom-left-radius: var(--gs-border-radius);
    border-bottom-right-radius: var(--gs-border-radius);
}

div.wicket-modal div.w_content_3 {
    padding: 2px;
    flex-grow: 100;
}

div.wicket-modal div.w_content {
    padding: 2px;
    position: relative;
    height: 100%;
}

/* Resize control */
div.modal-dialog .resize-icon {
    position: absolute;
    right: 0;
    bottom: 0;
    cursor: nwse-resize;
    visibility: visible;
    z-index: 10;
}

/* Help modal */
.help p,
.help ol,
.help ul {
    color: var(--gs-dark-text-emphasis);
}
.help ol li {
    display: list-item;
}

@media screen and (max-width: 768px) {
    div.modal-dialog {
        left: 0 !important;
    }
    div.wicket-modal {
        width: 100vw !important;
    }
}