﻿/* =========================================================
   Solentx Modal System (Global Standard)
   Works with Blazor + Bootstrap without conflicts
   ========================================================= */

/* ===== Overlay ===== */
.st-overlay,
.modal-backdrop.show {
    background: rgba(2, 6, 23, 0.75) !important;
    backdrop-filter: blur(6px);
    z-index: 1040;
}

/* ===== Core Modal Container ===== */
.st-modal,
.modal-content.st-modal {
    background: var(--st-panel-strong);
    border: 1px solid var(--st-border);
    border-radius: 18px;
    box-shadow: 0 32px 90px rgba(0,0,0,.75);
    color: var(--st-text);
    overflow: hidden;
    backdrop-filter: blur(10px);
}

    /* Kill Bootstrap defaults inside Solentx modal */
    .st-modal .modal-header,
    .st-modal .modal-body,
    .st-modal .modal-footer {
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
    }

    /* ===== Header ===== */
    .st-modal-header,
    .st-modal .modal-header {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 12px;
        padding: 16px 20px;
        border-bottom: 1px solid rgba(255,255,255,0.12);
    }

    .st-modal-title,
    .st-modal .modal-title {
        font-weight: 950;
        letter-spacing: .01em;
        color: #fff;
        font-size: 1.05rem;
        margin: 0;
    }

.st-modal-subtitle {
    margin-top: 4px;
    color: var(--st-muted);
    font-size: .9rem;
    font-weight: 700;
}

/* ===== Body ===== */
.st-modal-body,
.st-modal .modal-body {
    padding: 18px 20px;
}

/* ===== Footer ===== */
.st-modal-footer,
.st-modal .modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 20px;
    border-top: 1px solid rgba(255,255,255,0.12);
}

/* ===== Inputs inside modals ===== */
.st-modal .form-control,
.st-modal .form-select,
.st-modal .st-input,
.st-modal .st-select {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.18);
    color: #fff;
    border-radius: 12px;
    font-weight: 800;
    height: 42px;
}

    .st-modal .form-control::placeholder {
        color: rgba(234,242,255,0.55);
        font-weight: 700;
    }

    .st-modal .form-control:focus,
    .st-modal .form-select:focus {
        border-color: var(--st-blue);
        box-shadow: 0 0 0 4px rgba(56,189,248,0.18);
        background: rgba(255,255,255,0.08);
    }

/* ===== Close Button (FIXED X) ===== */
.st-modal .btn-close,
.st-modal-close {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.16);
    background: rgba(255,255,255,0.06);
    color: #fff;
    opacity: 1 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 950;
    cursor: pointer;
    transition: all .12s ease;
    filter: none !important;
}

/* Remove Bootstrap SVG icon */
.st-modal .btn-close {
    background-image: none !important;
}

    /* Replace icon with X */
    .st-modal .btn-close::before {
        content: "✕";
        font-size: 1rem;
        line-height: 1;
    }

    .st-modal .btn-close:hover,
    .st-modal-close:hover {
        background: rgba(255,255,255,0.14);
        border-color: rgba(56,189,248,0.55);
        transform: translateY(-1px);
    }

/* ===== Modal Sizes ===== */
.st-modal-sm {
    max-width: 420px;
}

.st-modal-md {
    max-width: 720px;
}

.st-modal-lg {
    max-width: 980px;
}

/* ===== Animation (premium feel) ===== */
.modal.fade .modal-dialog {
    transform: translateY(10px) scale(.98);
    transition: all .15s ease-out;
}

.modal.show .modal-dialog {
    transform: translateY(0) scale(1);
}