/* ============================================================
   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;
}

/* ============================================================
   REGISZTRÁCIÓ UTÁN – „NÉZD MEG A LEVELED” KÁRTYA (2026.10)
   A regisztrációs panelben, az űrlap helyén (auth.js: renderVerifyCard).
   Arany jelvény lüktető gyűrűvel és lebegő borítékkal; a megerősítés
   pillanatában (.is-done) zöldre vált, és kirajzolódik a pipa.
   ============================================================ */
.verify-card {
    text-align: center;
    padding: 4px 2px 2px;
}
.verify-card > * { animation: verifyIn .55s cubic-bezier(.34, 1.56, .64, 1) both; }
.verify-card > :nth-child(2) { animation-delay: .06s; }
.verify-card > :nth-child(3) { animation-delay: .12s; }
.verify-card > :nth-child(4) { animation-delay: .18s; }
.verify-card > :nth-child(5) { animation-delay: .24s; }
.verify-card > :nth-child(6) { animation-delay: .30s; }
.verify-card > :nth-child(7) { animation-delay: .36s; }
.verify-card > :nth-child(8) { animation-delay: .42s; }
@keyframes verifyIn {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: none; }
}

.verify-card__badge {
    position: relative;
    width: 84px;
    height: 84px;
    margin: 4px auto 18px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: var(--gold);
    background: var(--gold-dim);
    border: 1.5px solid rgba(var(--gold-rgb), .45);
    box-shadow: var(--sh-gold);
    transition: color .4s var(--ease), background .4s var(--ease), border-color .4s var(--ease), box-shadow .4s var(--ease);
}
.verify-card__pulse {
    position: absolute;
    inset: -1.5px;
    border-radius: 50%;
    border: 1.5px solid rgba(var(--gold-rgb), .55);
    animation: verifyPulse 2.4s ease-out infinite;
    pointer-events: none;
}
@keyframes verifyPulse {
    0%   { transform: scale(1);    opacity: .8; }
    100% { transform: scale(1.55); opacity: 0; }
}
.verify-card__mail,
.verify-card__check {
    grid-area: 1 / 1;
    width: 38px;
    height: 38px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.verify-card__mail {
    animation: verifyFloat 3.2s ease-in-out infinite;
    transition: opacity .3s var(--ease), transform .4s var(--ease);
}
@keyframes verifyFloat {
    50% { transform: translateY(-3px) rotate(-3deg); }
}
.verify-card__check {
    stroke-width: 2.6;
    stroke-dasharray: 22;
    stroke-dashoffset: 22;
    opacity: 0;
}

.verify-card__title {
    font-family: var(--fd);
    font-weight: 900;
    font-size: 24px;
    letter-spacing: .3px;
    text-transform: uppercase;
    color: var(--text);
    margin: 0 0 8px;
    line-height: 1.15;
}
.verify-card__text {
    font-size: 14px;
    color: var(--text-2);
    line-height: 1.6;
    margin: 0 0 10px;
}
.verify-card__email {
    display: inline-block;
    max-width: 100%;
    overflow-wrap: anywhere;
    font-family: var(--fm);
    font-size: 13px;
    font-weight: 700;
    color: var(--gold);
    background: var(--gold-dim);
    border: 1px dashed rgba(var(--gold-rgb), .5);
    border-radius: var(--r-sm);
    padding: 7px 12px;
    margin: 0 0 14px;
}
.verify-card__wait {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-size: 12px;
    color: var(--text-3);
    margin: 4px 0 18px;
}
.verify-card__wait span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--gold);
    animation: verifyDot 1.2s ease-in-out infinite;
}
.verify-card__wait span:nth-child(2) { animation-delay: .15s; }
.verify-card__wait span:nth-child(3) { animation-delay: .30s; }
.verify-card__wait em { font-style: normal; margin-left: 6px; }
@keyframes verifyDot {
    0%, 80%, 100% { transform: scale(.55); opacity: .35; }
    40%           { transform: scale(1);   opacity: 1; }
}
.verify-card__btn { margin-bottom: 14px; }
.verify-card__hint {
    font-size: 12px;
    color: var(--text-3);
    line-height: 1.55;
    margin: 0;
}

/* Megerősítve – a belépés előtti pillanat */
.verify-card.is-done .verify-card__badge {
    color: var(--green);
    background: rgba(26, 122, 60, .10);
    border-color: rgba(26, 122, 60, .45);
    box-shadow: 0 0 22px rgba(26, 122, 60, .25);
}
.verify-card.is-done .verify-card__pulse {
    border-color: rgba(26, 122, 60, .55);
    animation-duration: 1.1s;
}
.verify-card.is-done .verify-card__mail {
    opacity: 0;
    transform: scale(.4);
    animation: none;
}
.verify-card.is-done .verify-card__check {
    opacity: 1;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset .5s var(--ease) .15s, opacity .15s;
}
.verify-card.is-done .verify-card__email,
.verify-card.is-done .verify-card__more,
.verify-card.is-done .verify-card__wait,
.verify-card.is-done .verify-card__btn,
.verify-card.is-done .verify-card__hint { display: none; }

/* ============================================================
   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; }
    .verify-card > *,
    .verify-card__pulse,
    .verify-card__mail,
    .verify-card__wait span { animation: none; }
}
