/* ═══════════════════════════════════════════════════════════
   AUTH.CSS — Login / Register Modal
   ═══════════════════════════════════════════════════════════ */

/* ── Overlay ──────────────────────────────────────────────── */
#auth-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(2, 8, 19, 0.6); /* --bg but translucent */
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s var(--spring);
    overflow-y: auto;
}

#auth-modal-overlay.open {
    opacity: 1;
    pointer-events: all;
}

/* ── Modal (Luxury Glass) ────────────────────────────────────────────────── */
.auth-modal {
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(0, 0, 0, 0.3);
    border-right: 1px solid rgba(0, 0, 0, 0.2);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05),
                0 40px 80px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(40px);
    border-radius: 4px;
    width: 100%;
    max-width: 560px;
    padding: 3rem 3rem 2.5rem;
    position: relative;
    animation: slideDown 0.6s var(--spring);
    margin: auto;
}

/* ── 2-column row inside form ─────────────────────────────── */
.auth-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 1rem;
}

@media (max-width: 500px) {
    .auth-form-row { grid-template-columns: 1fr; }
}

@keyframes slideDown {
    from { transform: translateY(40px) scale(0.98); opacity: 0; }
    to   { transform: translateY(0) scale(1);     opacity: 1; }
}

.auth-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.4rem;
    cursor: pointer;
    line-height: 1;
    padding: 0.25rem 0.5rem;
    transition: color var(--transition);
}

.auth-modal-close:hover { color: var(--magenta-bloom); }

/* ── Label + headline ─────────────────────────────────────── */
.auth-modal-label {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--golden-orange);
    margin-bottom: 0.5rem;
}

.auth-modal h2 {
    font-size: 1.6rem;
    margin-bottom: 0.25rem;
}

.auth-modal-sub {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 1.75rem;
    line-height: 1.6;
}

/* ── Tabs ─────────────────────────────────────────────────── */
.auth-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border-soft);
    margin-bottom: 1.75rem;
}

.auth-tab {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.6rem 1.2rem;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color var(--transition), border-color var(--transition);
}

.auth-tab.active {
    color: var(--golden-orange);
    border-bottom-color: var(--golden-orange);
}

/* ── Form shared ──────────────────────────────────────────── */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.auth-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0;
}

.auth-form .form-label {
    font-family: var(--font-mono);
    font-size: 0.70rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.auth-form .form-input {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--white);
    padding: 0.85rem 1rem;
    font-family: var(--font-display);
    font-size: 1rem;
    outline: none;
    border-radius: 4px !important;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}

.auth-form .form-input:focus {
    background: rgba(0, 0, 0, 0.4);
    border-color: var(--golden-orange);
    box-shadow: 0 0 0 1px var(--golden-orange), 0 5px 15px rgba(212, 175, 55, 0.1);
}

.auth-form .form-input::placeholder {
    color: rgba(255, 255, 255, 0.2);
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

.auth-form .form-error {
    color: var(--magenta-bloom);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    min-height: 1rem;
}

.auth-hint {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.auth-hint a {
    color: var(--blue-bell);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.auth-form .btn-checkout {
    margin-top: 0.5rem;
    width: 100%;
    justify-content: center;
}

.auth-switch {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 1rem;
}

.auth-switch button {
    background: none;
    border: none;
    color: var(--blue-bell);
    font-family: var(--font-mono);
    font-size: 0.68rem;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
    padding: 0;
}

/* ── Header user area ─────────────────────────────────────── */
.header-auth-area {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-user-pill {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    max-width: 22ch;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.header-login-btn {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--golden-orange);
    background: rgba(240, 162, 2, 0.08);
    border: 1px solid rgba(240, 162, 2, 0.3);
    padding: 0.35rem 0.9rem;
    cursor: pointer;
    transition: background var(--transition), border-color var(--transition);
    text-decoration: none;
    display: inline-block;
}

.header-login-btn:hover {
    background: rgba(240, 162, 2, 0.15);
    border-color: var(--golden-orange);
}
