/* ========================================
   BLOCK 2: Page-Specific CSS (pvi-2fa-setup)
   (this page only — extracted to pvi-2fa-setup.css at deploy)
   ======================================== */

.tf-enroll-state[hidden] { display: none !important; }

/* Returning-user, code-only view. The engine drops the literal `hidden` into
   the <<pair_steps_hidden>> attribute slot on the Step 1 and Step 2 .tf-step
   divs. Nothing sets `display` on .tf-step, so this rule is belt-and-braces
   over the UA [hidden] rule; the pairing steps collapse cleanly and Step 3
   (the verify form) keeps showing. */
.tf-step[hidden] { display: none; }

/* Step 3 keeps its form in the code-only view but drops its numbered label —
   a lone "3" pip under the "Enter the code…" header reads as a broken page.
   The author rule is REQUIRED here (unlike .tf-step above): .tf-step-label
   sets display:flex, which outranks the UA [hidden] rule, so the bare
   attribute would silently do nothing. Gated by <<pair_steps_hidden>>. */
.tf-step-label[hidden] { display: none; }

/* Header swaps between the first-time "Set Up…" block and the returning-user
   "Enter the code…" block. Engine gates each with pair_steps_hidden /
   code_head_hidden (exactly one resolves to `hidden`). */
.tf-head-text[hidden] { display: none; }

.tf-wrap { min-height: calc(100vh - 12rem); display: flex; align-items: center; justify-content: center; padding: 2rem 1rem; }

.tf-card {
    width: 100%; max-width: 460px;
    background-color: var(--white);
    border: 1px solid var(--mid-grey);
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .12);
    overflow: hidden;
}

.tf-head {
    background-color: var(--dark-grey); color: var(--light-grey);
    padding: 1.4rem 1.6rem 1.25rem; text-align: center;
    border-bottom: 4px solid var(--dull-blue);
}
.tf-head .tf-lock-big { font-size: 2.4rem; line-height: 1; margin-bottom: .35rem; display: block; }
.tf-head h2 { margin: 0 0 .25rem; font-size: 1.4rem; font-weight: 600; color: var(--light-grey); }
.tf-head .tf-sub { font-size: .88rem; margin: 0; color: var(--light-grey); opacity: .85; }

.tf-body { padding: 1.5rem 1.6rem 1.3rem; }

.tf-step { margin-bottom: 1.35rem; }
.tf-step:last-of-type { margin-bottom: .25rem; }
.tf-step-label {
    display: flex; align-items: center; gap: .5rem;
    font-size: .82rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em;
    color: var(--mid-grey); margin-bottom: .55rem;
}
.tf-step-num {
    flex-shrink: 0; width: 1.4rem; height: 1.4rem; border-radius: 50%;
    background-color: var(--dull-blue); color: var(--white);
    font-size: .82rem; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.tf-step-help { font-size: .82rem; color: var(--mid-grey); line-height: 1.4; margin: 0 0 .65rem; }

.tf-qr-wrap { display: flex; justify-content: center; padding: .35rem 0 .25rem; }
.tf-qr { width: 200px; height: 200px; border: 1px solid var(--light-grey); border-radius: 6px; padding: 8px; background-color: var(--white); image-rendering: pixelated; }

.tf-secret {
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 1rem; letter-spacing: .08em; text-align: center; color: var(--dark-grey);
    background-color: var(--surface); border: 1px dashed var(--mid-grey); border-radius: 4px;
    padding: .6rem .5rem; word-break: break-all;
}

.tf-field { margin-bottom: 0; }
.tf-input.is-code {
    width: 100%; padding: .65rem .5rem;
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 1.5rem; letter-spacing: .5em; text-align: center;
    border: 1px solid var(--mid-grey); border-radius: 4px; background-color: var(--white); color: var(--dark-grey);
}
.tf-input.is-code:focus { outline: none; border-color: var(--dull-blue); box-shadow: 0 0 0 2px var(--focus-ring-blue); }

.tf-error {
    background-color: var(--dull-red-bg); border: 1px solid var(--dull-red); color: var(--dull-red);
    border-radius: 4px; padding: .65rem .85rem; font-size: .9rem; margin-bottom: 1.05rem; display: none;
}
.tf-error.is-shown { display: block; }

.tf-submit {
    width: 100%; background-color: var(--green); color: var(--white); border: none; border-radius: 4px;
    padding: .75rem 1rem; font-size: 1rem; font-weight: 600; cursor: pointer;
    transition: background-color .15s, transform .05s; margin-top: 1.1rem;
}
.tf-submit:hover { background-color: var(--green-hover); }
.tf-submit:active { transform: translateY(1px); }
.tf-submit:disabled { background-color: var(--mid-grey); cursor: not-allowed; }

.tf-recovery-intro { font-size: .9rem; line-height: 1.45; color: var(--dark-grey); margin: 0 0 1rem; }
.tf-recovery-warn {
    background-color: var(--amber-warn-bg); border: 1px solid var(--amber-warn); color: var(--amber-warn-text);
    border-radius: 4px; padding: .6rem .8rem; font-size: .85rem; line-height: 1.4; margin: 0 0 1.1rem;
}
.tf-codes-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .55rem .9rem; margin: 0 0 1.2rem; }
.tf-code {
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 1.05rem; letter-spacing: .05em; text-align: center; color: var(--dark-grey);
    background-color: var(--surface); border: 1px solid var(--light-grey); border-radius: 4px; padding: .5rem .25rem;
}

.tf-saved-confirm { display: flex; align-items: flex-start; gap: .55rem; font-size: .9rem; color: var(--dark-grey); cursor: pointer; line-height: 1.4; }
.tf-saved-confirm input { flex-shrink: 0; margin: .15rem 0 0; }

.tf-foot {
    background-color: var(--light-grey); padding: .8rem 1.6rem; text-align: center;
    font-size: .8rem; color: var(--dark-grey); border-top: 1px solid var(--mid-grey);
}
.tf-foot strong { color: var(--dull-blue); }

@media (max-width: 480px) {
    .tf-card { border-radius: 6px; }
    .tf-head { padding: 1.1rem 1.2rem 1rem; }
    .tf-body { padding: 1.25rem 1.2rem 1.1rem; }
    .tf-foot { padding: .7rem 1.2rem; }
    .tf-input.is-code { letter-spacing: .35em; font-size: 1.3rem; }
    .tf-codes-grid { grid-template-columns: 1fr; }
}
