/*************************************************************
 *
 * Modal overlay and window
 *
 *************************************************************/
.modal-overlay {
    cursor: default;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-index-modal-overlay);
    backdrop-filter: blur(2px);
}

.modal-overlay.no-cover {
    width: fit-content;
    height: fit-content;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: transparent;
}

.modal-window {
    display: flex;
    flex-direction: column;
    position: absolute;
    width: 500px;
    overflow: hidden;
    z-index: var(--z-index-modal);
    border-radius: 8px;
    border: 1px solid var(--border);
    background: linear-gradient(160deg, #0d0e1a 0%, #090a14 100%);
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(201, 148, 58, 0.05), inset 0 1px 0 rgba(201, 148, 58, 0.07);
}

.modal-window::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 5%, rgba(212, 82, 26, 0.5) 25%, rgba(201, 148, 58, 0.65) 50%, rgba(74, 173, 168, 0.4) 75%, transparent 95%);
}

/*************************************************************
 *
 * Title and close icon
 *
 *************************************************************/

.modal-actions-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 18px;
    height: 52px;
    background: rgba(255, 255, 255, 0.018);
    position: relative;
    z-index: 2;
}

.modal-actions-bar::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    border-radius: 8px 0 0 0;
}

.modal-window.common .modal-actions-bar::before {
    background: linear-gradient(180deg, var(--ember), rgba(200, 88, 26, 0.2));
    box-shadow: 0 0 8px rgba(200, 88, 26, 0.35);
}

.modal-actions-bar::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 2%, rgba(201, 148, 58, 0.22) 15%, rgba(201, 148, 58, 0.35) 50%, rgba(201, 148, 58, 0.22) 85%, transparent 98%);
}

.modal-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Cinzel', serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: var(--cream);
    text-transform: uppercase;
    flex: 1;
}


.modal-actions-bar .close-icon {
    cursor: pointer;
    width: 26px;
    height: 26px;
    border-radius: 4px;
    flex-shrink: 0;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--mist-dim);
    font-size: 12px;
    transition: all 0.2s;
}

.modal-actions-bar .close-icon:hover {
    border-color: var(--border-hover);
    color: var(--cream);
    background: rgba(201, 148, 58, 0.06);
}

.modal-window .modal-actions-bar .drag-indicator {
    height: 100%;
    cursor: move;
}

/*************************************************************
 *
 * Content
 *
 *************************************************************/

.modal-content {
    padding: 8px 16px;
    color: var(--cream);
    font-size: 14px;
    min-height: 50px;
    flex: 1;
}

.modal-content.no-padding {
    padding: 0;
}

.modal-content p {
    font-size: 14px;
    color: var(--mist);
    line-height: 1.65;
    margin-bottom: 16px;
}

.modal-buttons {
    padding: 13px 0;
    text-align: right;
    display: flex;
    gap: 8px;
    justify-content: end;
}

.modal-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border) 20%, var(--border) 80%, transparent);
    margin-top: 20px;
}