/* Sign-up and login (Features/Accounts): the character beside the form. */

.auth {
    display: grid;
    gap: var(--space-4);
    max-width: 920px;
    margin: 0 auto;
}
.auth-side {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
    flex-wrap: wrap;
}
.auth-side .auth-mascot { width: 96px; height: auto; order: -1; }
.auth-bubble { font-size: 1.05rem; }
/* Phones: the character stands beside the bubble, so the tail points to it. */
@media (max-width: 899px) {
    .auth-side { flex-wrap: nowrap; justify-content: flex-start; }
    .auth-bubble.bubble--bottom::after { bottom: auto; top: calc(50% - 7px); inset-inline-start: -9px; transform: rotate(135deg); }
}
.auth-perks { display: none; list-style: none; margin: 0; padding: 0; }
.auth-card { width: 100%; padding: 24px 20px; }
.auth-card h1 { font-size: var(--fs-xl); margin-bottom: 4px; }

.form-step {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: var(--space-5) 0 var(--space-3);
    padding-bottom: 6px;
    border-bottom: 2px dashed var(--border);
    font-family: var(--font-title);
    font-size: 1.1rem;
}
.form-step:first-of-type { margin-top: var(--space-3); }
.form-step-num {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--on-primary);
    font-size: .95rem;
    box-shadow: 0 3px 0 var(--primary-edge);
}
.auth-card form .btn[type="submit"] { margin-top: var(--space-2); }

@media (min-width: 900px) {
    .auth { grid-template-columns: .8fr 1fr; align-items: start; gap: var(--space-6); padding-top: var(--space-5); }
    .auth-side {
        position: sticky;
        top: 24px;
        flex-direction: column;
        padding-top: var(--space-6);
    }
    .auth-side .auth-mascot { width: 200px; order: 0; }
    .auth-perks { display: grid; gap: 10px; margin-top: var(--space-3); }
    .auth-perks li {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 10px 14px;
        border: 2px solid var(--border);
        border-radius: 14px;
        background: var(--surface);
        box-shadow: 0 3px 0 var(--edge);
        font-weight: 500;
    }
    .auth-perks .icon { color: var(--accent-text); }
    .auth-card { padding: 32px 32px 28px; margin: 0; }
}

/* Sign-up in 3 steps (js/auth.js): progress dots, one fieldset per step, back and next. */
tbm-auth { display: block; }
.su-step { min-width: 0; margin: 0; padding: 0; border: 0; animation: su-in .35s var(--ease-out) both; }
.su-step .form-step { width: 100%; padding-inline: 0; }
.su-dots { display: flex; gap: 8px; margin: var(--space-3) 0 0; padding: 0; list-style: none; }
.su-dots li {
    flex: 1;
    height: 8px;
    border-radius: var(--radius-pill);
    background: var(--surface-3);
    font-size: 0;
}
.su-dots li.is-done { background: var(--primary); }
.su-dots li.is-now { background: var(--accent); box-shadow: 0 0 10px color-mix(in srgb, var(--accent) 60%, transparent); }
.su-nav { display: flex; gap: 10px; margin-top: var(--space-2); }
.su-nav .btn { flex: 1; }
.su-nav .btn[data-su-back] { flex: 0 1 auto; }
.su-preview { margin: 0 0 var(--space-4); padding: 12px; border: 2px dashed var(--border); border-radius: var(--radius); background: var(--surface-2); }
.su-preview-title { margin: 0 0 8px; color: var(--text-muted); font-size: var(--fs-sm); }
@keyframes su-in { from { opacity: 0; transform: translateX(-16px); } }

/* Password with an eye button */
.pw-field { position: relative; display: block; }
/* The password is typed left to right, so the eye sits on the right in both directions. */
.pw-field input { padding-right: 52px; }
.pw-eye {
    position: absolute;
    top: 50%;
    right: 4px;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin-top: -22px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
}
.pw-eye:hover { background: var(--surface-3); color: var(--text); }
.pw-eye[aria-pressed="false"] .pw-eye-slash { display: none; }
.auth-forgot { margin: var(--space-3) 0 0; text-align: center; }
.auth-forgot a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 500; }
.su-preview .lb-row { grid-template-columns: 2rem 36px minmax(0, 1fr) auto; gap: 6px; min-height: 52px; padding: 6px 8px; }
.su-preview .lb-av { width: 36px; height: 36px; }

/* The third device screen: the two devices, each with its remove button. */
.auth-devices { list-style: none; margin: var(--space-4) 0 var(--space-3); padding: 0; display: grid; gap: var(--space-3); }
.auth-device {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-2);
    box-shadow: 0 3px 0 var(--edge);
}
.auth-device-icon { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--primary-soft); color: var(--link); }
.auth-device-text { flex: 1 1 160px; min-width: 0; display: grid; gap: 2px; }
.auth-device-text b { overflow-wrap: anywhere; }
.auth-device-text .muted { font-size: var(--fs-sm); }
.auth-card form .auth-device .btn[type="submit"] { margin-top: 0; width: auto; flex: 1 1 100%; }
@media (min-width: 600px) { .auth-card form .auth-device .btn[type="submit"] { flex: none; } }
