/* «Fichas de tiradores» (js/views/shooter-cards/): the club's catalog of
   shooters without the app. A list with a search box and one compact form.
   Built on the shared classes (.input, .form-group, .acta-catf, buttons);
   only the layout lives here. */

/* The view scrolls in its `.cv-scroll` (the trio in toggles-footer-and-view-scroll.css):
   that is what keeps the Save bar stuck at the top. */
.tfi-section { padding-top: 4px; }

/* The licence search and the alphabet stay pinned at the top of the view's
   scroller while the results move (Santi, 2026-11-20). The section's 4 px of
   top padding are covered so no row peeks above it. */
.tfi-fijo {
  position: sticky; top: -4px; z-index: var(--z-sticky);
  margin: -4px 0 0; padding: 4px 0 2px; background: var(--bg);
}

/* Licence search: the field and its button. */
.tfi-barra { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; }
.tfi-barra .input { flex: 1 1 auto; min-width: 0; }
.tfi-barra button { flex: 0 0 auto; width: auto; min-height: 44px; padding: 0 14px; }

/* One row per card: name on top, licence and year below. */
.tfi-lista { display: flex; flex-direction: column; gap: 8px; }
.tfi-fila {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  width: 100%; min-height: 56px; padding: 10px 14px;
  background: var(--card); border: 1px solid var(--border); border-radius: 10px;
  color: var(--text); font-family: inherit; text-align: left; cursor: pointer;
}
.tfi-fila:hover { border-color: var(--accent); }
.tfi-fila:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tfi-fila-nom { font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }
.tfi-fila-sub { font-size: 13px; color: var(--muted); }
/* The alphabet: one row that scrolls sideways, a 44 px key per letter. */
.tfi-letras {
  display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; margin-bottom: 8px;
  -webkit-overflow-scrolling: touch;
}
/* ⛔ NO SCROLL SNAP here (Santi, 2026-11-20: «it takes five or six swipes»):
   snapping to each 44 px letter stopped every fling at the next letter. */
.tfi-letra {
  flex: 0 0 44px; height: 44px;
  background: var(--card); border: 1px solid var(--border); border-radius: 10px;
  color: var(--text); font-family: inherit; font-size: 16px; font-weight: 600; cursor: pointer;
}
.tfi-letra:hover { border-color: var(--accent); }
.tfi-letra:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tfi-letra[aria-pressed="true"] { border: 2px solid var(--accent); background: var(--accent-dim); }

/* The form: a single column on phones, side by side from a tablet up. */
.tfi-grid2, .tfi-grid3 { display: grid; grid-template-columns: minmax(0, 1fr); column-gap: 10px; }
@media (min-width: 600px) {
  .tfi-grid2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tfi-grid3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.tfi-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tfi-pick { min-width: 0; }
.tfi-pick-btn {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  min-height: 44px; min-width: 0; text-align: left; font-family: inherit; cursor: pointer;
}
.tfi-pick-btn svg { flex: 0 0 auto; }
.tfi-pick-txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tfi-err { color: var(--warn); font-size: 13px; line-height: 1.5; margin: 6px 0 0; }

/* Phase 2: the mark of a shooter card in «Gestionar inscripciones», and the
   results list of the card chooser (a modal, so it scrolls on its own). */
.tfi-ins-marca {
  display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase;
  color: var(--muted); border: 1px solid var(--border); border-radius: 6px; padding: 1px 6px;
}
/* The card chooser of «Gestionar inscripciones»: full screen, above that
   screen because it opens after it (js/ui/layers.js). */
/* An app layer (`.modal-overlay`, opened with `openModal`): shown only while
   `.open`, full screen instead of a sheet rising from below. */
.modal-overlay.tfi-elegir-ov {
  position: fixed; inset: 0; z-index: var(--z-modal); flex-direction: column; align-items: stretch;
  background: var(--bg); color: var(--text); padding-top: env(safe-area-inset-top, 0px);
}
.tfi-elegir-cab {
  display: flex; align-items: center; gap: 12px; padding: 10px 16px;
  border-bottom: 1px solid var(--border); background: var(--surface);
}
.tfi-elegir-cab button { flex: 0 0 auto; width: auto; min-height: 44px; padding: 0 14px; }
.tfi-elegir-titulo { flex: 1 1 auto; min-width: 0; font-size: 16px; font-weight: 600; }
.tfi-elegir-cuerpo { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 12px 16px 24px; }
/* Whose form it is when several cards are registered in a row. */
.prf-quien { margin: -8px 0 14px; font-size: 16px; font-weight: 600; color: var(--text); overflow-wrap: anywhere; }

/* ── Choosing several cards (card-multi-chooser.js, 2026-11-18) ──────────
   The top block never scrolls: a line of buttons only («Cancelar», «?»,
   «Inscribir (N)»), then the title and the count. Only the list scrolls. */
.tfi-elegir-fijo { flex: 0 0 auto; background: var(--surface); border-bottom: 1px solid var(--border); }
.tfi-elegir-fijo .tfi-elegir-cab { border-bottom: 0; }
/* A button never squeezes another: they shrink with an ellipsis instead. */
.tfi-elegir-fijo .tfi-elegir-cab button { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tfi-elegir-cab .btn-primary:disabled { opacity: .5; cursor: not-allowed; }
.tfi-elegir-cuerpo { overscroll-behavior: contain; }
.tfi-sel { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 0 16px 10px; }
.tfi-sel .tfi-elegir-titulo { flex: 0 1 auto; overflow-wrap: anywhere; }
.tfi-sel-cuenta { flex: 0 0 auto; font-size: 14px; color: var(--muted); }
/* A row that toggles: the mark is a box that fills with a tick, plus the
   border and background — never the colour alone. */
.tfi-fila.tfi-fila-sel { flex-direction: row; align-items: center; gap: 12px; }
.tfi-fila-txt { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tfi-marca {
  flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border: 2px solid var(--border); border-radius: 6px; color: transparent;
}
.tfi-marca-ico { width: 18px; height: 18px; }
.tfi-fila-sel[aria-pressed="true"] { border: 2px solid var(--accent); background: var(--accent-dim); }
.tfi-fila-sel[aria-pressed="true"] .tfi-marca { border-color: var(--accent); background: var(--accent); color: var(--bg); }
/* Already registered: the «Inscrito» chip instead of the box, and dimmed; a
   tap only says so. */
.tfi-fila-ya { cursor: default; }
.tfi-fila-ya .tfi-fila-txt { opacity: .6; }
.tfi-ya { flex: 0 0 auto; }
.tfi-letra:disabled { opacity: .35; cursor: default; }
/* In the chooser the letters stay in sight while the list scrolls: with a
   small club's whole list they are its index. */
.tfi-elegir-cuerpo .tfi-letras { position: sticky; top: -12px; z-index: 1; background: var(--bg); padding-top: 12px; }
@media (prefers-reduced-motion: no-preference) {
  .tfi-fila-sel, .tfi-marca { transition: background-color .15s ease, border-color .15s ease; }
}

/* Save / Cancel are the house `.form-actions` bar, stuck at the top
   (css/main/buttons-and-sheets.css). The «Opciones» tab (card-options.js,
   Santi 2026-11-21): one numbered block per option, its title, one line of
   what it does, and its own button and messages inside; removing the member
   last, apart, outlined in the danger colour. */
.tfi-opciones { display: flex; flex-direction: column; gap: 12px; }
.tfi-opc { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.tfi-opc-t { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 16px; font-weight: 700; color: var(--text); }
.tfi-opc-n {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--accent); color: var(--accent); font-size: 14px; font-weight: 700;
}
.tfi-opc-d { margin: 0; font-size: 14px; line-height: 1.45; color: var(--muted); }
.tfi-opc .tfi-wa, .tfi-opc .tfi-susp { margin: 4px 0 0; }
.tfi-opc .tfi-wa-btn, .tfi-opc .tfi-susp .btn-secondary { width: 100%; }
.tfi-opc-peligro { margin-top: 12px; border-color: var(--danger); }
.tfi-opc-peligro .tfi-opc-n { border-color: var(--danger); color: var(--danger); }
.tfi-borrar .btn-danger { min-height: 44px; width: 100%; }

/* A suspended member's card opens under a red block: icon, «suspended» in
   words, then cause, since when and who. Never the colour alone. */
.tfi-susp-aviso {
  display: flex; align-items: flex-start; gap: 12px; margin: 0 0 12px; padding: 12px 14px;
  border: 1px solid var(--alerta); border-left-width: 4px; border-radius: 10px;
  background: var(--alerta-dim); color: var(--text);
}
.tfi-susp-aviso-ico { display: flex; flex: 0 0 auto; color: var(--alerta); padding-top: 1px; }
.tfi-susp-aviso-ico svg { width: 22px; height: 22px; }
.tfi-susp-aviso-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tfi-susp-aviso-t { color: var(--alerta); font-size: 16px; font-weight: 700; }
.tfi-susp-aviso-d { font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; }

/* A member linked with TiroLog (Documentos/plan-socios-zona.md): a small
   label on the row, never colour alone (it carries its word). */
.tfi-etq {
  display: inline-block; margin-left: 6px; padding: 1px 8px;
  border: 1px solid var(--accent); border-radius: 999px;
  color: var(--accent); font-size: 12px; font-weight: 600; line-height: 18px;
}
.tfi-vinc-info { margin-bottom: 12px; }
/* The card's fields. Disabled for a linked member (their profile is the only
   way to change them): the controls read as such, the layout doesn't move. */
.tfi-campos { margin: 0; padding: 0; border: 0; min-width: 0; }
.tfi-campos:disabled .input, .tfi-campos:disabled button { opacity: .7; cursor: default; }

/* «Mi QR»: what a shooter misses to become a member, with the way to fix it. */
.miqr-faltan { max-width: 360px; width: 100%; font-size: 13px; line-height: 1.5; }
.miqr-faltan-btn { margin-top: 8px; min-height: 44px; width: 100%; }

/* A suspended member: the label says it in words, the colour only backs it. */
.tfi-etq-susp { border-color: var(--danger); color: var(--danger); }
.tfi-susp { display: flex; flex-direction: column; gap: 8px; }
.tfi-susp .btn-secondary { min-height: 44px; }

/* «Resumen» (Documentos/plan-socios-zona.md): twelve monthly columns, each
   with its figure on top and the month below; the height is the data. */
.sres-meses { display: flex; align-items: flex-end; gap: 4px; height: 150px; padding-top: 8px; }
.sres-mes { flex: 1 1 0; min-width: 0; height: 100%; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.sres-mes-n { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.sres-mes-bar { flex: 1 1 auto; width: 100%; max-width: 28px; display: flex; align-items: flex-end; background: var(--border); border-radius: 6px; overflow: hidden; }
.sres-mes-bar > span { display: block; width: 100%; background: var(--accent); border-radius: 6px 6px 0 0; }
.sres-mes-l { font-size: 11px; color: var(--muted); text-transform: capitalize; }
.sres-ult { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.sres-ult:last-child { border-bottom: none; }
.sres-ult-nom { font-weight: 600; overflow-wrap: anywhere; }
.sres-ult-f { color: var(--muted); font-size: 13px; white-space: nowrap; }

/* «Suspendidos»: one row per member, the lift button under its text (beside
   it, the house button squeezed the name into a narrow column). */
.susp-buscar { margin-bottom: 12px; }
.susp-fila {
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 10px 14px;
  background: var(--card); border: 1px solid var(--border); border-radius: 10px;
}
.susp-fila-txt { width: 100%; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.susp-levantar { width: auto; min-height: 44px; padding: 6px 14px; font-size: 13px; }

/* The linking code by WhatsApp (Santi, 2026-11-21; js/views/shooter-cards/
   card-whatsapp.js and cards-list-wa.js). A generic message icon, never a
   brand's logo. Sent and valid in green, expired in grey; the green is never
   alone: the line or the icon's name says it too. */
.tfi-wa { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.tfi-wa-btn, .tfi-wa-sig-btn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.tfi-wa-btn svg, .tfi-wa-sig-btn svg { width: 20px; height: 20px; flex: 0 0 auto; }
.tfi-wa-estado { margin: 0; font-size: 14px; color: var(--muted); }
.tfi-wa-estado.tfi-wa-vigente { color: var(--success); }
.tfi-wa-marca { display: inline-flex; vertical-align: middle; margin-left: 6px; }
.tfi-wa-marca svg { width: 16px; height: 16px; }
.tfi-wa-marca.tfi-wa-vigente { color: var(--success); }
.tfi-wa-marca.tfi-wa-caducado { color: var(--muted); }
/* The second switch, pinned next to «Incompletos» (44 px + the 8 px gap).
   Two classes: css/members-import.css loads later and its amber would win. */
.tfi-inc-sw.tfi-wa-sw { left: 52px; }
.tfi-inc-sw.tfi-wa-sw:hover { border-color: var(--success); }
.tfi-inc-sw.tfi-wa-sw[aria-pressed="true"] { border-color: var(--success); background: var(--success); color: var(--bg); }
.tfi-wa-sw:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tfi-wa-sig { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.tfi-wa-sig-btn { width: 100%; min-height: 48px; }
.tfi-wa-sig-n { margin: 0; font-size: 13px; color: var(--muted); text-align: center; }
.sres-wa-ir { width: 100%; min-height: 44px; margin-top: 8px; }
