/* ============================================================
   auth.css – Bejelentkezés + Regisztráció (egyoldalas, fül-váltós)
   Minden szín/token a base.css-ből jön → automatikusan dark-mode-kész.
   Az animáció a jóváhagyott "Kaszkádos élő beúszás" demót követi.
   Csak megjelenítés: a form-mezők és a logika változatlanok.
   ============================================================ */

.auth-page {
    min-height: calc(100vh - var(--header-h) - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px var(--page-pad);
}

.auth-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    padding: 38px 34px;
    width: 100%;
    max-width: 480px;
    box-shadow: var(--sh-lg);
}

.auth-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}

.auth-title {
    font-family: var(--fd);
    font-weight: 900;
    font-size: 28px;
    text-transform: uppercase;
    color: var(--text);
    text-align: center;
    margin-bottom: 6px;
    line-height: 1.1;
}

.auth-sub {
    font-size: 13px;
    color: var(--text-3);
    text-align: center;
    margin-bottom: 24px;
    line-height: 1.6;
}

/* ============================================================
   FÜL-KAPCSOLÓ – rugós, túllendülő arany jelölővel (mint a demóban)
   ============================================================ */
.auth-tabs {
    position: relative;
    display: flex;
    background: var(--surface-2);
    border-radius: var(--r-lg);
    padding: 5px;
    margin-bottom: 22px;
}

.auth-tabs__indicator {
    position: absolute;
    top: 5px;
    bottom: 5px;
    left: 5px;
    width: calc(50% - 5px);
    background: var(--gold);
    border-radius: calc(var(--r-lg) - 4px);
    box-shadow: 0 4px 12px rgba(var(--gold-rgb), .35);
    transition: transform .45s cubic-bezier(.34, 1.56, .64, 1);  /* rugós */
    will-change: transform;
}
.auth-card[data-auth-tab="register"] .auth-tabs__indicator {
    transform: translateX(100%);
}

.auth-tab {
    position: relative;
    z-index: 1;
    flex: 1;
    padding: 11px 8px;
    border: none;
    background: none;
    cursor: pointer;
    font-family: var(--fd);
    font-weight: 800;
    font-size: 13px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-3);
    transition: color .3s var(--ease);
}
.auth-tab.is-active { color: #fff; }
[data-theme="dark"] .auth-tab.is-active { color: #000; }

/* ============================================================
   PANELEK – abszolút egymáson, a magasság finoman morfol.
   A kaszkádos beúszást a JS vezérli (auth.js végi blokk),
   ezért itt nincs külön @keyframes.
   ============================================================ */
.auth-panels {
    position: relative;
    min-height: 220px;                       /* JS-előtti fallback; a JS pontosítja */
    transition: height .45s var(--ease);
}

.auth-panel {
    position: absolute;
    inset: 0 0 auto 0;
    width: 100%;
    opacity: 0;
    visibility: hidden;                      /* inaktív panel kikerül a tab-sorrendből */
    pointer-events: none;
}
.auth-panel.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* ============================================================
   HIBA / SIKER ÜZENETEK (közös, mindkét űrlaphoz)
   ============================================================ */
.auth-error {
    background: rgba(192,57,43,.09);
    border: 1px solid rgba(192,57,43,.25);
    border-radius: var(--r-sm);
    padding: 11px 14px;
    font-size: 13px;
    color: var(--red);
    margin-bottom: 16px;
    line-height: 1.5;
}
.auth-success {
    background: rgba(26,122,60,.09);
    border: 1px solid rgba(26,122,60,.25);
    border-radius: var(--r-sm);
    padding: 11px 14px;
    font-size: 13px;
    color: var(--green);
    margin-bottom: 16px;
    line-height: 1.5;
}

/* ============================================================
   FORM SEGÉD-ELRENDEZÉS
   ============================================================ */
.auth-form { display: flex; flex-direction: column; gap: 0; }

.auth-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.auth-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    flex-wrap: wrap;
    gap: 8px;
}

.auth-forgot {
    font-size: 12px;
    color: var(--gold);
    text-decoration: none;
    transition: var(--t);
}
.auth-forgot:hover { opacity: .75; }

/* Jelszó mező toggle */
.input-password-wrap { position: relative; }
.input-password-wrap .form-control { padding-right: 42px; }
.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-4);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: var(--t);
}
.password-toggle:hover { color: var(--gold); }

/* ============================================================
   ELVÁLASZTÓ + VÁLTÓ LINK
   ============================================================ */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    color: var(--text-4);
    font-size: 11px;
    font-family: var(--fm);
    letter-spacing: 1px;
    text-transform: uppercase;
}
.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.auth-switch {
    text-align: center;
    font-size: 13px;
    color: var(--text-3);
}
.auth-switch__link {
    color: var(--gold);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}
.auth-switch__link:hover { text-decoration: underline; }

/* ============================================================
   RESZPONZÍV
   ============================================================ */
@media (max-width: 520px) {
    .auth-card { padding: 28px 20px; }
    .auth-form-row { grid-template-columns: 1fr; }
}

/* ============================================================
   KEVESEBB MOZGÁS IGÉNY ESETÉN – animációk kikapcsolnak
   (a kaszkádot a JS is kihagyja ilyenkor)
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    .auth-tabs__indicator,
    .auth-panels,
    .auth-tab { transition: none; }
}
