/* =========================================================
   Stargrave – Modals
   Datei: /public/css/modals.css
   ========================================================= */

/* -------------------------
   Overlay Grundstruktur
------------------------- */

.sgModal {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: none; /* wird per JS auf flex gesetzt */
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.sgModal[aria-hidden="false"] {
    display: flex;
}

.sgModal__backdrop {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 10% 0%, rgba(74, 242, 255, 0.26), transparent 60%),
        radial-gradient(circle at 90% 100%, rgba(192, 140, 255, 0.26), transparent 65%),
        rgba(1, 2, 6, 0.92);
    backdrop-filter: blur(10px);
}

/* -------------------------
   Panel
------------------------- */

.sgModal__panel {
    position: relative;
    z-index: 1;
    width: min(460px, 100%);
    /* kein max-height, Panel darf normal wachsen */
    border-radius: 24px;
    padding: 18px 20px 18px;
    background:
        radial-gradient(circle at 0% 0%, rgba(74, 242, 255, 0.22), transparent 58%),
        radial-gradient(circle at 100% 100%, rgba(192, 140, 255, 0.24), transparent 68%),
        linear-gradient(150deg, rgba(5, 9, 22, 0.98), rgba(2, 4, 11, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow:
        0 26px 80px rgba(0, 0, 0, 0.95),
        0 0 40px rgba(74, 242, 255, 0.32);
    display: flex;
    flex-direction: column;
    gap: 14px;
    overflow: visible;
}

/* dezente Innen-Trennung */
.sgModal__panel::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 1px solid rgba(255, 255, 255, 0.06);
    pointer-events: none;
}

/* -------------------------
   Header
------------------------- */

.sgModal__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sgModal__eyebrow {
    font-size: 0.68rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(180, 195, 232, 0.86);
    margin-bottom: 3px;
}

.sgModal__title {
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(240, 245, 255, 0.98);
}

.sgModal__subtitle {
    margin-top: 4px;
    font-size: 0.8rem;
    line-height: 1.5;
    color: rgba(195, 207, 240, 0.9);
}

/* -------------------------
   Tabs (Leiste unter dem Header)
------------------------- */

.sgTabs {
    margin-top: 4px;
    margin-bottom: 2px;
}

/* -------------------------
   Body
------------------------- */

.sgModal__body {
    margin-top: 10px;
    padding-right: 2px;
    /* kein eigener Scroll, kein max-height */
    overflow: visible;
}

/* Abstand zwischen Formularteilen im Modal */
.sgAuthPane .sgForm {
    margin-top: 10px;
    display: grid;
    gap: 10px;
}

/* Hinweise im Body */

.sgModalHint {
    font-size: 0.8rem;
    color: rgba(190, 205, 238, 0.9);
    margin-bottom: 4px;
}

/* Passwort vergessen Button */

.sgForgotBtn {
    margin-top: 6px;
    font-size: 0.8rem;
    align-self: flex-start;
}

/* -------------------------
   Bottom/Hinweis
------------------------- */

.sgModalBottom,
.sgModal__bottom,
.sgModalNote,
.sgModal__note {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.75rem;
    color: rgba(185, 198, 232, 0.88);
}

/* -------------------------
   Animation (leicht)
------------------------- */

@keyframes sgModalFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.sgModal__panel {
    animation: sgModalFadeIn 0.18s ease-out;
}

/* -------------------------
   Responsive
------------------------- */

@media (max-width: 480px) {
    .sgModal {
        padding: 8px;
        align-items: flex-start;    /* oben ansetzen */
        justify-content: center;
        overflow-y: auto;          /* komplette Seite darf scrollen */
    }

    .sgModal__panel {
        width: 100%;
        border-radius: 18px;
        padding: 14px 13px 15px;
        margin-top: 12px;
    }

    .sgModal__subtitle {
        font-size: 0.78rem;
    }
}
