/*
    Magic-link and two-factor screens.

    An addition to login.css, never a replacement — the shell, card, inputs, submit button and
    dividers all still come from there, and everything below reuses its design tokens
    (--gold, --navy-deep, --slate, --stone, --ink, --warm-white, --error). The only reason this
    file exists is that login.css has no code-box, no notice block and no recovery-code list, and
    growing it with rules that only three pages use would make the page every customer loads carry
    CSS none of them need.
*/

/* ── Notices ──────────────────────────────────────────────────────────────────────────── */

.tf-notice {
    border-radius: var(--radius-sm, 8px);
    padding: 12px 15px;
    font-size: 13px;
    line-height: 1.55;
    margin-bottom: 18px;
}

.tf-notice--info {
    background: #EEF3F9;
    border: 1px solid #C6D6E8;
    color: #1B3E63;
}

.tf-notice--warn {
    background: #F3EFE6;
    border: 1px solid #E0D3B4;
    color: #7A5A1E;
}

.tf-notice--error {
    background: #FBEDED;
    border: 1px solid #F0C4C4;
    color: #8C2626;
}

.tf-notice strong {
    font-weight: 600;
    word-break: break-word;
}

/* ── The [ _ _ _ _ _ _ ] code box ─────────────────────────────────────────────────────── */

.tf-code {
    display: flex;
    gap: 8px;
    justify-content: space-between;
    margin-bottom: 6px;
}

.tf-code__box {
    width: 100%;
    max-width: 52px;
    aspect-ratio: 3 / 4;
    padding: 0;
    border: 1px solid var(--stone);
    border-radius: var(--radius-sm, 8px);
    background: #fff;
    color: var(--ink);

    /* Tabular figures so the boxes do not shift between a 1 and a 0. */
    font-family: inherit;
    font-size: 22px;
    font-variant-numeric: tabular-nums;
    text-align: center;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.tf-code__box:focus {
    outline: none;
    border-color: var(--navy-deep);
    box-shadow: 0 0 0 3px rgba(13, 27, 50, .08);
}

.tf-code__box:disabled {
    background: var(--warm-white);
    cursor: not-allowed;
}

.tf-code.is-invalid .tf-code__box {
    border-color: var(--error);
}

/* Six 52px boxes stop fitting below ~360px; let them shrink rather than overflow the card. */
@media (max-width: 380px) {
    .tf-code {
        gap: 5px;
    }

    .tf-code__box {
        font-size: 18px;
    }
}

/* ── Recovery code entry ──────────────────────────────────────────────────────────────── */

.tf-recovery-input {
    /* A recovery code is read off a printout character by character. */
    letter-spacing: .14em;
    text-align: center;
    text-transform: uppercase;
    font-variant-numeric: tabular-nums;
    padding-left: 16px;
}

/* ── Secondary actions ───────────────────────────────────────────────────────────────── */

.tf-alt {
    text-align: center;
    margin: 16px 0 0;
    font-size: 13px;
    color: var(--slate);
}

.tf-linkbtn {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    font-weight: 500;
    color: var(--gold-deep);
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}

.tf-linkbtn:hover {
    color: var(--navy-deep);
}

.tf-linkbtn:disabled {
    opacity: .55;
    cursor: not-allowed;
}

/* ── "Check your email" illustration ─────────────────────────────────────────────────── */

.tf-envelope {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin: 0 0 18px;
    border-radius: 50%;
    background: #F3EFE6;
    color: var(--gold-deep);
}

/* ── Full-width secondary button, matching .lg-submit's geometry ─────────────────────── */

.tf-secondary {
    width: 100%;
    background: #fff;
    border: 1px solid var(--stone);
    color: var(--ink);
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    padding: 12px 20px;
    border-radius: var(--radius-sm, 8px);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: background 150ms ease, border-color 150ms ease;
    text-decoration: none;
}

.tf-secondary:hover {
    background: var(--warm-white);
    border-color: var(--navy-deep);
}

.tf-spacer {
    height: 10px;
}
