/* ==========================================================================
   Sunday School Talent Fest pages only (/sunday-school/talent-fest/, its
   staff area), loaded by their own headers. Colours,
   type and spacing come from site.css tokens.
   ========================================================================== */

/* Competition chips — the same everywhere a student's competitions are listed.
   Squared corners so a long piece title wraps cleanly instead of ballooning. */
.tf-chips { display: flex; flex-wrap: wrap; gap: .3rem; }
.tf-chip {
  display: inline-block; max-width: 100%;
  padding: .2rem .55rem; border-radius: 6px;
  font-size: .8rem; font-weight: 600; line-height: 1.35;
  background: var(--navy-050); color: var(--navy-700);
  border: 1px solid var(--navy-100);
}
.tf-chip.is-group { background: var(--maroon-100); color: var(--maroon-700); border-color: #ecd0d4; }

.badge-status { white-space: nowrap; }
.tf-note { font-size: .84rem; color: var(--ink-faint); }

/* --------------------------------------------------------------------------
   Public pages
   -------------------------------------------------------------------------- */


.tf-hero { padding: clamp(3rem, 7vw, 5rem) 0; }
.tf-hero h1 { font-size: clamp(1.9rem, 1.3rem + 2.3vw, 2.9rem); }
.tf-hero-meta { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: .6rem; }
.tf-hero-meta li { display: flex; gap: .6rem; color: #dbe6f4; font-size: 1.02rem; }
.tf-hero-meta i { color: var(--gold-400); margin-top: .15rem; }
.tf-hero-meta strong { color: #fff; }
.tf-hero-cta p { color: #9db3d0; font-size: .9rem; }
.tf-hero-cta p.tf-hero-lede { color: #cfdbeb; font-size: .98rem; }
.tf-hero-cta a:not(.btn) { color: var(--gold-400); }

.tf-section-nav { background: var(--navy-050); border-bottom: 1px solid var(--line); }
.tf-section-nav nav { display: flex; gap: .25rem; overflow-x: auto; scrollbar-width: none; }
.tf-section-nav a {
  flex: none; padding: .8rem .9rem; font-size: .92rem; font-weight: 600;
  color: var(--navy-600); text-decoration: none; white-space: nowrap;
}
.tf-section-nav a:hover { color: var(--navy-800); background: var(--navy-100); }

.category-card .tf-card-note { font-size: .93rem; margin-bottom: .5rem; }

.tf-eligibility { width: 100%; }
.tf-eligibility th, .tf-eligibility td { padding: .9rem .75rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.tf-eligibility thead th {
  font-size: .72rem; letter-spacing: .09em; text-transform: uppercase;
  color: var(--navy-600); font-weight: 700; border-bottom-width: 2px;
}
.tf-eligibility tbody th { font-weight: 700; color: var(--navy-800); white-space: nowrap; width: 8rem; }
@media (max-width: 575.98px) {
  .tf-eligibility thead { display: none; }
  .tf-eligibility tbody th, .tf-eligibility tbody td { display: block; width: auto; }
  .tf-eligibility tbody th { border-bottom: 0; padding-bottom: .35rem; }
  .tf-eligibility tbody td { padding-top: 0; }
}

.tf-step-num {
  display: inline-grid; place-items: center; width: 2rem; height: 2rem;
  border-radius: 50%; background: var(--navy-700); color: #fff;
  font-weight: 700; font-size: .95rem; margin-bottom: .75rem;
}
.tf-step h3 { font-size: 1.08rem; margin-bottom: .4rem; }
.tf-step p { font-size: .93rem; margin: 0; }

/* --------------------------------------------------------------------------
   Tables that become one card per row on phones
   -------------------------------------------------------------------------- */

@media (max-width: 767.98px) {
  .tf-stack thead { display: none; }
  .tf-stack, .tf-stack tbody, .tf-stack tr { display: block; width: 100%; }
  .tf-stack tbody tr { padding: .9rem 1rem; border-bottom: 1px solid var(--line); }
  .tf-stack tbody tr:last-child { border-bottom: 0; }
  .tf-stack tbody th, .tf-stack tbody td {
    display: block; border: 0 !important; padding: .2rem 0 !important;
    text-align: left !important; max-width: none !important;
  }
  .tf-stack tbody th { font-size: 1.02rem; }
  .tf-stack td[data-label] { display: flex; gap: .75rem; align-items: baseline; }
  .tf-stack td[data-label]::before {
    content: attr(data-label); flex: 0 0 6.5rem;
    font-size: .7rem; letter-spacing: .08em; text-transform: uppercase;
    color: var(--ink-faint); font-weight: 700;
  }
  .tf-stack td[data-label] > * { min-width: 0; }
  .tf-stack td.tf-actions { padding-top: .6rem !important; }
  .tf-stack tbody tr:hover { background: none; }
  .tf-stack .reg-number { white-space: normal; }
}

@media (min-width: 768px) {
  .tf-stack tbody th[scope="row"] { min-width: 11rem; }
  .tf-stack th, .tf-stack td { padding-left: .75rem !important; padding-right: .75rem !important; }
}

.tf-actions { white-space: nowrap; }
.tf-actions .btn { padding: .35rem .8rem; }

/* --------------------------------------------------------------------------
   Payment page
   -------------------------------------------------------------------------- */

.tf-review-dl { font-size: .97rem; }
.tf-review-dl dt { font-weight: 400; color: var(--ink-faint); padding: .5rem 0 0; }
.tf-review-dl dd { padding: .5rem 0 0; margin: 0; }
@media (min-width: 576px) {
  .tf-review-dl dt, .tf-review-dl dd { padding: .55rem 0; border-bottom: 1px solid var(--line-soft); }
}

/* --------------------------------------------------------------------------
   Administration
   -------------------------------------------------------------------------- */

.tf-subnav {
  display: flex; gap: .25rem; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin;
  border-bottom: 1px solid var(--line); margin-bottom: 1.75rem;
}
.tf-subnav a {
  flex: none; display: inline-flex; align-items: center; gap: .4rem;
  padding: .6rem .9rem; margin-bottom: -1px;
  font-weight: 600; font-size: .93rem; color: var(--ink-soft);
  text-decoration: none; border-bottom: 3px solid transparent;
}
.tf-subnav a:hover { color: var(--navy-800); border-bottom-color: var(--navy-100); }
.tf-subnav a[aria-current="page"] { color: var(--navy-800); border-bottom-color: var(--gold-500); }

.tf-grade-bars .bar-row .bar-label { flex-basis: 5.5rem; }
@media (min-width: 992px) {
  .tf-comp-bars .bar-row .bar-label { flex-basis: 19rem; }
}

/* --------------------------------------------------------------------------
   Event Check-In
   -------------------------------------------------------------------------- */

.tf-ci-filters { display: flex; flex-wrap: wrap; gap: .4rem; }
.tf-ci-table td, .tf-ci-table th { vertical-align: middle; }
.tf-ci-table tr.tf-ci-done > * { background: var(--ok-100); }
.tf-ci-table tr.tf-ci-missing > * { background: var(--navy-050); }
.tf-ci-check { font-weight: 700; color: var(--ok-600); white-space: nowrap; }
.tf-ci-live { font-size: .85rem; color: var(--ink-faint); white-space: nowrap; align-self: center; }
.tf-ci-dot { display: inline-block; width: .6rem; height: .6rem; border-radius: 50%; background: var(--line); vertical-align: middle; }
.tf-ci-dot.is-live { background: var(--ok-600); }
.tf-ci-dot.is-down { background: var(--bad-600); }
.tf-ci-message { margin-bottom: 1rem; }

/* Registration: one registration, several attendees; the server's summary. */
.tf-attendee { border: 1px solid var(--line); border-radius: 12px; padding: 1rem 1.1rem 1.1rem; margin: 0 0 1rem; background: #fff; }
.tf-attendee-title { float: none; width: auto; font-size: 1rem; font-weight: 700; color: var(--navy-800); }
.tf-attendee .form-check-label strong { color: var(--navy-800); }
.tf-pricing { list-style: none; padding: 0; display: grid; gap: .4rem; }
.tf-summary { font-size: .95rem; }
.tf-summary th, .tf-summary td { padding: .55rem .5rem; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.tf-summary thead th { color: var(--ink-faint); font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
.tf-summary tfoot th { font-weight: 600; color: var(--ink-soft); }
.tf-summary .tf-summary-total th, .tf-summary .tf-summary-total td { font-weight: 700; color: var(--navy-800); border-top: 2px solid var(--line); }
.tf-totals th { font-weight: 600; color: var(--ink-soft); }
.tf-focus > * { background: var(--navy-050); }
.tf-attendee-edit { border: 1px solid var(--line-soft); border-radius: 10px; padding: .6rem .8rem; }
.tf-attendee-edit summary { cursor: pointer; font-weight: 600; color: var(--navy-800); }

/* Admin: Remove Attendee opens a small confirmation box beside the button. */
.tf-remove { display: inline-block; position: relative; }
.tf-remove > summary { list-style: none; display: inline-block; }
.tf-remove > summary::-webkit-details-marker { display: none; }
.tf-remove-box { position: absolute; right: 0; top: calc(100% + .35rem); z-index: 20; width: min(23rem, 86vw);
  background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: .9rem 1rem;
  font-size: .9rem; white-space: normal; }
.tf-attendee-fee { font-size: .92rem; color: var(--ink-soft); }
.tf-ci-with { font-size: .8rem; color: var(--ink-faint); }

/* Registrant Portal: summary, tabs, Live Updates, Event Guide; the policy pages. */
.tf-portal-tabs { border-bottom-color: var(--line); margin-top: .5rem; }
.tf-portal-tabs .nav-link { color: var(--ink-soft); font-weight: 600; }
.tf-portal-tabs .nav-link.active { color: var(--navy-800); border-top: 3px solid var(--gold-500); }
.tf-portal-pane { border-top-left-radius: 0; border-top-right-radius: 0; }
.tf-reg-switch { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.tf-add > summary { list-style: none; display: inline-block; }
.tf-add > summary::-webkit-details-marker { display: none; }
.tf-updates { display: grid; gap: .75rem; }
.tf-update { border: 1px solid var(--line-soft); border-left: 4px solid var(--navy-100); border-radius: 10px; padding: .75rem 1rem; }
.tf-update.is-important { border-left-color: var(--bad-600); background: #fff8f7; }
.tf-update-time { font-size: .8rem; color: var(--ink-faint); font-weight: 600; }
.tf-update p { margin-top: .25rem; }
.tf-schedule li { padding: .7rem 0; border-bottom: 1px solid var(--line-soft); }
.tf-schedule-time { font-weight: 700; color: var(--navy-800); white-space: nowrap; }
.tf-venue-map { border: 1px solid var(--line); border-radius: 10px; }
.tf-portal-foot { font-size: .92rem; }
.tf-policy h2 { margin-top: 1.5rem; color: var(--navy-800); }
.tf-policy h2:first-child { margin-top: 0; }
.tf-update-head { font-weight: 700; color: var(--navy-800); margin-top: .25rem; }
.tf-update-place { font-size: .92rem; color: var(--ink-soft); }
.tf-role-label { font-size: .82rem; color: var(--ink-soft); background: var(--navy-050); border: 1px solid var(--line); border-radius: 999px; padding: .15rem .65rem; white-space: nowrap; }
.tf-tv-fields { border-left: 3px solid var(--navy-100); padding-left: .75rem; margin-left: .2rem; }

/* Event Check-In: Scan QR Code and + Add Registration beside the search; the scanner panel
   (full screen on a phone or tablet, a large panel on a computer). */
.tf-ci-tools { display: flex; flex-wrap: wrap; gap: .6rem; }
.tf-ci-tools .btn { flex: 1 1 14rem; }
body.tf-scan-open { overflow: hidden; }
.tf-scan { position: fixed; inset: 0; z-index: 1080; background: rgba(8, 22, 41, .72); overflow-y: auto; padding: 1rem; }
.tf-scan-inner { max-width: 40rem; margin: 0 auto; background: var(--navy-800, #16385f); color: #fff; border-radius: 14px; padding: 1rem;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .35); }
.tf-scan-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .75rem; }
.tf-scan-head h2 { color: #fff; }
.tf-scan-view { position: relative; aspect-ratio: 4 / 3; background: #0b1f3a; border-radius: 10px; overflow: hidden; }
.tf-scan-view video { width: 100%; height: 100%; object-fit: cover; display: block; }
.tf-scan-frame { position: absolute; left: 50%; top: 50%; width: 62%; aspect-ratio: 1; transform: translate(-50%, -50%);
  border: 3px solid var(--gold-500, #e3b53c); border-radius: 14px; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .28); pointer-events: none; }
.tf-scan-idle { position: absolute; inset: auto 0 0 0; margin: 0; padding: .75rem 1rem; background: rgba(11, 31, 58, .85); font-size: .95rem; }
.tf-scan-buttons { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .75rem; }
.tf-scan-buttons .btn { flex: 1 1 auto; }
.tf-scan-status { min-height: 1.5rem; margin: .75rem 0 0; font-weight: 600; }
.tf-scan-status.is-good { color: #9be7a8; }
.tf-scan-status.is-bad { color: #ffb4a8; }
.tf-scan-card { background: #fff; color: var(--ink, #1b2430); border-radius: 10px; padding: 1rem; margin-top: .75rem; }
.tf-scan-dl { display: grid; grid-template-columns: max-content 1fr; gap: .2rem 1rem; margin: 0; font-size: .95rem; }
.tf-scan-dl dt { color: var(--ink-soft); font-weight: 600; }
.tf-scan-dl dd { margin: 0; }
.tf-scan-pay { margin-top: .75rem; padding: .6rem .75rem; background: var(--navy-050); border-radius: 8px; display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.tf-scan-person { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: .65rem 0; border-bottom: 1px solid var(--line-soft); }
.tf-scan-person.is-in { background: var(--ok-100); margin: 0 -.5rem; padding-left: .5rem; padding-right: .5rem; border-radius: 6px; }
.tf-scan-person .btn { flex: none; min-width: 7.5rem; }
.tf-scan-foot { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.tf-scan-foot > * { flex: 1 1 12rem; }
@media (max-width: 575.98px) {
  .tf-scan { padding: 0; }
  .tf-scan-inner { border-radius: 0; min-height: 100%; }
}

/* A registration's check-in QR code, with its reference. */
.tf-qr-box { display: flex; flex-wrap: wrap; gap: 1rem 1.25rem; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 1rem; }
.tf-qr-box svg { flex: none; border-radius: 6px; }
.tf-qr-box > div { flex: 1 1 16rem; }

/* The FAQ: native <details> disclosures, one per question. */
.tf-faq-toc { display: flex; flex-wrap: wrap; gap: .4rem .9rem; font-size: .92rem; }
.tf-faq-section { margin-bottom: 2rem; }
.tf-faq-section h2 { color: var(--navy-800); border-bottom: 2px solid var(--gold-500, #c9a227); padding-bottom: .35rem; margin-bottom: .75rem; }
.tf-faq { border: 1px solid var(--line-soft); border-radius: .5rem; background: #fff; margin-bottom: .5rem; }
.tf-faq > summary { cursor: pointer; padding: .8rem 2.4rem .8rem 1rem; font-weight: 600; color: var(--navy-800); position: relative; list-style: none; }
.tf-faq > summary::-webkit-details-marker { display: none; }
.tf-faq > summary::after { content: "+"; position: absolute; right: 1rem; top: .65rem; font-size: 1.25rem; color: var(--navy-700, #16385f); }
.tf-faq[open] > summary::after { content: "\2212"; }
.tf-faq > summary:focus-visible { outline: 3px solid var(--gold-500, #c9a227); outline-offset: 2px; border-radius: .5rem; }
.tf-faq-answer { padding: 0 1rem .9rem; color: var(--ink-soft); }
.tf-faq-help { border-left: 3px solid var(--gold-500, #c9a227); padding: .35rem 0 .35rem .85rem; }
