/* ═══════════════════════════════════════════════════════════════════════════
   AUTH OVERLAY — Full-page auth screen
   Replaces the old small modal card with a brand-consistent full-page sheet.
═══════════════════════════════════════════════════════════════════════════ */

.auth-overlay {
    position: fixed;
    inset: 0;
    z-index: 2100;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    background: rgba(8, 5, 3, 0.97);
    overflow-y: auto;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    /* opacity/visibility are browser-default (1/visible); .modal-hidden overrides them */
}

/* Specificity bump: ensure .modal-hidden wins when both classes are present */
.auth-overlay.modal-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.auth-overlay-scroll {
    width: 100%;
    min-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 20px;
    box-sizing: border-box;
}

.auth-overlay-card {
    position: relative;
    width: 100%;
    max-width: 400px;
    background: #1a0f08;
    border: 1px solid rgba(197, 160, 89, 0.2);
    border-radius: 16px;
    padding: 32px 28px 28px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    box-shadow: 0 32px 100px rgba(0,0,0,0.7);
}

.auth-overlay-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(240, 237, 232, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    padding: 0;
}

.auth-overlay-close:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-main);
}

/* Brand header */
.auth-brand-header {
    text-align: center;
    padding: 4px 16px 0;
}

.auth-brand-glyph {
    font-family: 'Noto Serif', serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: 0.12em;
    line-height: 1;
    margin-bottom: 6px;
}

.auth-brand-sub {
    font-size: 0.68rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(240, 237, 232, 0.3);
    margin: 0;
}

/* Tab bar */
.auth-tab-bar {
    display: flex;
    background: rgba(0, 0, 0, 0.35);
    border-radius: 9px;
    padding: 3px;
    gap: 2px;
}

.auth-tab {
    flex: 1;
    padding: 9px 12px;
    border-radius: 7px;
    background: transparent;
    border: none;
    color: rgba(240, 237, 232, 0.4);
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.auth-tab.auth-tab-active,
.auth-tab[aria-selected="true"] {
    background: rgba(197, 160, 89, 0.14);
    color: var(--gold);
}

.auth-tab:hover:not(.auth-tab-active):not([aria-selected="true"]) {
    color: var(--text-main);
}

/* OAuth provider list — scales to any number of providers */
.auth-oauth-list {
    display: flex;
    flex-direction: row;
    gap: 10px;
    margin-top: 4px;
}

.auth-oauth-list .oauth-btn {
    flex: 1;
    justify-content: center;
    font-size: 0.82rem;
    padding: 10px 12px;
}

.oauth-btn {
    width: 100%;
    padding: 11px 16px;
    border-radius: 9px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background 0.12s, border-color 0.12s;
    text-align: left;
}

.oauth-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.22);
}

.oauth-btn:active:not(:disabled) { transform: scale(0.99); }

.oauth-btn:disabled {
    cursor: not-allowed;
    pointer-events: none;
    filter: grayscale(0.18) contrast(1.05);
    opacity: 0.75;
}

/* Google gets a white background to match brand guidelines */
.oauth-google {
    background: #fff;
    border-color: transparent;
    color: #3c4043;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0,0,0,0.22);
}

.oauth-google:hover:not(:disabled) {
    background: #f5f5f5 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

/* Facebook brand colours */
.oauth-facebook { border-color: rgba(24, 119, 242, 0.25); }

.oauth-soon-badge {
    margin-left: auto;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(197, 160, 89, 0.65);
    background: rgba(197, 160, 89, 0.1);
    border: 1px solid rgba(197, 160, 89, 0.2);
    border-radius: 4px;
    padding: 2px 6px;
    flex-shrink: 0;
}

/* Divider */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(240, 237, 232, 0.18);
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.07);
}

/* Form panels (sign-in / forgot / register) */
.auth-form-panel {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.auth-panel-hidden { display: none; }

.auth-input {
    width: 100%;
    box-sizing: border-box;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    padding: 11px 14px;
    outline: none;
    transition: border-color 0.15s;
}

.auth-input:focus { border-color: rgba(197, 160, 89, 0.5); }

.auth-input::placeholder { color: rgba(240, 237, 232, 0.3); }

.auth-forgot-row { text-align: right; margin-top: -4px; }

.auth-text-btn {
    background: none;
    border: none;
    color: rgba(197, 160, 89, 0.6);
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    cursor: pointer;
    padding: 0;
    transition: color 0.15s;
}

.auth-text-btn:hover { color: var(--gold); }

.auth-error {
    font-size: 0.73rem;
    color: #e07070;
    min-height: 14px;
    margin: -4px 0 0;
}

.auth-note {
    font-size: 0.75rem;
    color: rgba(197, 160, 89, 0.65);
    text-align: center;
    min-height: 14px;
    margin: 0;
}

.auth-panel-desc {
    font-size: 0.8rem;
    color: rgba(240, 237, 232, 0.45);
    margin: 0;
    line-height: 1.5;
}

/* ── Forgot password page ─────────────────────────────────── */
.auth-forgot-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
    padding: 8px 0 18px;
}

.auth-forgot-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(197, 160, 89, 0.06);
    border: 1px solid rgba(197, 160, 89, 0.18);
    color: var(--gold);
    margin-bottom: 6px;
}

.auth-forgot-title {
    font-family: 'Noto Serif', serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
}

.auth-forgot-desc {
    font-size: 0.8rem;
    color: rgba(240, 237, 232, 0.45);
    line-height: 1.5;
    max-width: 260px;
    margin: 0;
}

.auth-note-success {
    color: rgba(100, 210, 130, 0.85) !important;
    font-weight: 600;
}

.auth-submit-btn {
    width: 100%;
    padding: 13px 16px;
    border-radius: 8px;
    background: var(--dragon-red);
    border: none;
    color: #fff;
    font-family: 'Noto Serif', serif;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
}

.auth-submit-btn:hover:not(:disabled) { background: #d44232; }
.auth-submit-btn:active:not(:disabled) { transform: scale(0.98); }
.auth-submit-btn:disabled { opacity: 0.38; cursor: not-allowed; }

/* Compliance checkboxes */
.auth-compliance {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.auth-check-row {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 0.77rem;
    color: rgba(240, 237, 232, 0.6);
    line-height: 1.45;
}

.auth-checkbox {
    width: 14px;
    height: 14px;
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: var(--gold);
    cursor: pointer;
}

.auth-link {
    color: var(--gold);
    text-decoration: none;
    opacity: 0.85;
}

.auth-link:hover { opacity: 1; text-decoration: underline; }

.auth-required {
    color: #e07070;
    font-size: 0.75em;
}
