/*
 * Bloque F (24/11/2026) — inscripción del jugador y pestaña Inscripciones del panel.
 *
 * Complementa public/css/pb-cuadros.css (no lo sustituye): todo cuelga de .pbx
 * y usa sus variables (--pbx-ink, --pbx-ball, --pbx-line…). Prefijo pbf- para
 * no chocar con las piezas de otros bloques.
 *
 * Piezas:
 *   .pbf-overlay / .pbf-dialog   ventana propia (no depende del JS de Bootstrap:
 *                                el panel usa Bootstrap 4 y la zona del jugador el 5)
 *   .pbf-steps                   pasos del asistente de inscripción
 *   .pbf-opts / .pbf-opt         lista de opciones pulsables (categorías, compañeros)
 *   .pbf-chosen / .pbf-summary   lo ya elegido, con su botón «Cambiar»
 *   .pbf-cond / .pbf-check       condiciones de inscripción y su casilla
 *   .pbf-motivos                 motivos de cancelación de ejemplo
 *   .pbf-reg, .pbf-toggle…       listado de inscripciones del panel
 */

/* ---------- Ventana ---------- */
.pbf-overlay {
  position: fixed; inset: 0; z-index: 1060; overflow-y: auto; -webkit-overflow-scrolling: touch;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 24px 12px; background: rgba(34, 37, 42, .6);
}
.pbf-dialog {
  width: 100%; max-width: 560px; margin: auto 0; display: flex; flex-direction: column;
  background: #fff; border-radius: 10px; overflow: hidden; text-align: left;
  box-shadow: 0 24px 60px -20px rgba(34, 37, 42, .55);
}
.pbf-dialog-lg { max-width: 720px; }
.pbf-head { display: flex; align-items: flex-start; gap: 12px; padding: 16px 20px 14px; border-bottom: 2px solid var(--pbx-ink); }
.pbf-head > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.pbf-head h5 { margin: 0; font: 700 24px/1.05 var(--pbx-cond); text-transform: uppercase; letter-spacing: .02em; color: var(--pbx-ink); overflow-wrap: anywhere; }
.pbf-x { flex: none; width: 34px; height: 34px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 4px; background: transparent; color: var(--pbx-ink-2); font-size: 28px; line-height: 1; cursor: pointer; }
.pbf-x:hover { background: var(--pbx-surface-2); color: var(--pbx-ink); }
.pbf-body { padding: 16px 20px 20px; }
.pbf-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--pbx-line); background: #f7f7f4; }
.pbf-foot > div { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.pbf-x:focus-visible, .pbf-opt:focus-visible, .pbf-steps button:focus-visible, .pbf-motivo:focus-visible, .pbf-toggle:focus-visible, .pbf-name:focus-visible { outline: 2px solid var(--pbx-ink); outline-offset: 2px; }
.pbx .pbx-btn:disabled { opacity: .45; cursor: not-allowed; }
.pbx .pbx-btn.pbf-busy { opacity: .6; pointer-events: none; }
/* Confirmar una cancelación: rojo, como el resto de acciones de borrar. */
.pbx .pbx-btn.pbf-danger { background: var(--pbx-live); border-color: var(--pbx-live); color: #fff; }
.pbx .pbx-btn.pbf-danger:hover { background: #b92a23; border-color: #b92a23; }
a.pbx-btn { display: inline-block; text-decoration: none; }
a.pbx-btn:hover { text-decoration: none; }

/* ---------- Textos y campos ---------- */
.pbf-q { margin: 0 0 8px; font: 700 20px/1.1 var(--pbx-cond); text-transform: uppercase; letter-spacing: .03em; color: var(--pbx-ink); }
.pbf-gap { margin-top: 12px; }
.pbf-keep { padding: 9px 12px; border-left: 4px solid var(--pbx-ball); background: #f8fadc; color: var(--pbx-ink); max-width: none; }
.pbf-warn { padding: 9px 12px; border-left: 4px solid var(--pbx-live); background: var(--pbx-surface-2); color: var(--pbx-ink); max-width: none; }
.pbx-field.pbf-field-wide { max-width: none; flex: 1 1 100%; }
/* Un error dentro de un campo es un <span> hijo del <label>: sin esto hereda el
   estilo de la etiqueta (mayúsculas, gris) y no parece un error. */
.pbx-field > span.pbx-error { font: 500 13px/1.3 var(--pbx-text); letter-spacing: 0; text-transform: none; color: var(--pbx-live); }
/* pb-tema.css pone en mayúsculas pequeñas cualquier <label> que no sea .pbx-field;
   las opciones pulsables y la casilla de condiciones son texto normal. */
.pbx label.pbf-opt, .pbx label.pbf-check { font: 500 15px/1.3 var(--pbx-text) !important; letter-spacing: 0 !important; text-transform: none !important; color: var(--pbx-ink) !important; }
.pbx label.pbf-opt { margin: 0 !important; }
.pbx label.pbf-check { margin: 14px 0 0 !important; }
.pbx-input.pbf-area { height: auto; min-height: 92px; padding: 9px 10px; line-height: 1.4; resize: vertical; }
select.pbx-input { padding-right: 4px; }
.pbf-box { width: 20px; height: 20px; margin: 0; accent-color: var(--pbx-ink); cursor: pointer; vertical-align: middle; }
.pbf-block { margin: 16px 0 0; padding: 14px; border: 1px solid var(--pbx-line); border-radius: 8px; }
.pbf-block > .pbx-label { display: block; margin-bottom: 10px; }

/* ---------- Pasos del asistente ---------- */
.pbf-steps { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 0 0 18px; padding: 0; }
.pbf-steps li, .pbf-steps li > button { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }
.pbf-steps li { padding-top: 8px; border-top: 4px solid var(--pbx-line); color: var(--pbx-ink-3); }
.pbf-steps li > button { width: 100%; padding: 0; border: 0; background: transparent; color: inherit; cursor: pointer; text-align: left; }
.pbf-steps b { font: 700 18px/1 var(--pbx-cond); }
.pbf-steps span { font: 600 13px/1.1 var(--pbx-cond); letter-spacing: .07em; text-transform: uppercase; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.pbf-steps li.done { border-top-color: var(--pbx-ink); color: var(--pbx-ink-2); }
.pbf-steps li.done > button:hover { color: var(--pbx-ink); }
.pbf-steps li.now { border-top-color: var(--pbx-ball); color: var(--pbx-ink); }

/* ---------- Opciones pulsables ---------- */
.pbf-opts { display: flex; flex-direction: column; gap: 6px; }
.pbf-opts-scroll { max-height: 320px; overflow-y: auto; padding-right: 2px; }
.pbf-opt {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; margin: 0; padding: 9px 12px; text-align: left; cursor: pointer;
  background: var(--pbx-surface); color: var(--pbx-ink); border: 1.5px solid var(--pbx-line); border-radius: 6px;
  font: 500 15px/1.3 var(--pbx-text); transition: border-color .15s, background .15s;
}
.pbf-opt:hover { border-color: var(--pbx-ink-2); }
.pbf-opt input[type="radio"] { flex: none; width: 18px; height: 18px; margin: 0; accent-color: var(--pbx-ink); }
.pbf-opt:has(input:checked) { border-color: var(--pbx-ink); background: #f8fadc; }
.pbf-opt-main { flex: 1; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.pbf-opt-main small, .pbf-chosen small, .pbf-summary small { display: block; font-size: 13px; font-weight: 500; color: var(--pbx-ink-2); }
.pbf-opt .pbx-label { flex: none; white-space: nowrap; }

/* ---------- Lo ya elegido ---------- */
.pbf-chosen { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; margin: 0 0 16px; padding: 10px 12px; border-radius: 6px; background: var(--pbx-surface-2); }
.pbf-chosen > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pbf-chosen b { font-weight: 700; overflow-wrap: anywhere; }
.pbf-chosen-on { background: #f8fadc; box-shadow: inset 0 0 0 1.5px var(--pbx-ink); }
.pbf-summary { margin: 0; border-top: 1px solid var(--pbx-line); }
.pbf-summary > div { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto; align-items: center; gap: 6px 12px; padding: 10px 0; border-bottom: 1px solid var(--pbx-line); }
.pbf-summary dt { margin: 0; font: 600 12.5px/1.2 var(--pbx-cond); letter-spacing: .08em; text-transform: uppercase; color: var(--pbx-ink-2); }
.pbf-summary dd { margin: 0; font-weight: 600; color: var(--pbx-ink); overflow-wrap: anywhere; }

/* ---------- Horarios del asistente ---------- */
.pbf-slots-scroll { max-height: 380px; overflow-y: auto; border: 1px solid var(--pbx-line); border-radius: 6px; }
.pbf-slots-scroll .pbx-table th { position: sticky; top: 0; background: #fff; }
.pbf-slots-scroll .pbx-table td, .pbf-slots-scroll .pbx-table th { padding-left: 12px; padding-right: 12px; }
.pbf-slots-scroll .pbx-table td small { color: var(--pbx-ink-3); }
.pbf-slots-scroll .pbx-table tr.pbf-off td { background: var(--pbx-surface-2); color: var(--pbx-ink); font-weight: 600; }

/* ---------- Condiciones de inscripción ---------- */
.pbf-cond { margin: 16px 0 0; padding: 14px; border: 1.5px solid var(--pbx-ink); border-radius: 8px; }
.pbf-cond h6 { margin: 0 0 10px; font: 700 17px/1.15 var(--pbx-cond); letter-spacing: .04em; color: var(--pbx-ink); }
.pbf-cond p { margin: 0 0 10px; font-size: 14px; line-height: 1.5; color: var(--pbx-ink-2); }
.pbf-check { display: flex; align-items: flex-start; gap: 10px; margin: 14px 0 0; padding: 12px; border-radius: 6px; background: #f8fadc; cursor: pointer; }
.pbf-check .pbf-box { flex: none; margin-top: 1px; }
.pbf-check span { font-size: 14.5px; line-height: 1.45; font-weight: 600; color: var(--pbx-ink); }

/* ---------- Motivos de cancelación ---------- */
.pbf-motivos { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; }
.pbf-motivo { padding: 7px 10px; text-align: left; cursor: pointer; background: var(--pbx-surface-2); color: var(--pbx-ink); border: 1.5px solid transparent; border-radius: 4px; font: 500 13.5px/1.25 var(--pbx-text); }
.pbf-motivo:hover { border-color: var(--pbx-ink); }
.pbf-body > .pbx-label { display: block; margin-top: 14px; }

/* ---------- Pestaña Inscripciones del panel ---------- */
.pbf-insc .pbf-top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 16px; }
.pbf-insc .pbx-empty { margin-bottom: 14px; }
.pbf-insc .pbx-table { min-width: 860px; }
.pbf-insc .pbx-table.pbf-table-s { min-width: 560px; }
.pbf-insc .pbx-table.pbf-table-s td:nth-child(3) { white-space: nowrap; }
.pbf-insc .pbx-table td { vertical-align: middle; color: var(--pbx-ink); }
.pbf-insc .pbx-table tr:last-child td { border-bottom: 1px solid var(--pbx-line); }
/* Nombres, correos y teléfonos en una línea: en el móvil la tabla se desplaza
   dentro de .pbx-tscroll en vez de partir cada nombre en tres renglones. */
.pbf-insc .pbx-table td.l, .pbf-insc .pbx-table td.l .pbf-name { white-space: nowrap; }
.pbf-insc .pbx-table td.l.pbf-wrap { white-space: normal; overflow-wrap: anywhere; min-width: 220px; }
.pbf-posbox { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; }
.pbf-posbox .pbx-input { width: 58px; padding: 0 4px; text-align: center; }
.pbf-arrow { padding: 0 6px; border: 0; background: transparent; color: var(--pbx-ink-2); font-size: 12px; line-height: 1.2; cursor: pointer; }
.pbf-arrow:hover { color: var(--pbx-ink); }
.pbf-name { padding: 0; border: 0; background: transparent; cursor: pointer; text-align: left; font: 600 15px/1.3 var(--pbx-text); color: var(--pbx-ink); }
.pbf-name:hover { text-decoration: underline; text-decoration-color: var(--pbx-ink-3); text-underline-offset: 3px; }
.pbf-note-ico { display: inline-grid; place-items: center; min-width: 18px; height: 18px; margin-left: 6px; padding: 0 4px; border-radius: 3px; background: var(--pbx-ink); color: #fff; font: 700 11px/1 var(--pbx-cond); cursor: help; }
.pbf-toggle { padding: 6px 9px; border: 1.5px solid var(--pbx-line); border-radius: 4px; background: transparent; color: var(--pbx-ink-2); cursor: pointer; white-space: nowrap; font: 600 13px/1 var(--pbx-cond); letter-spacing: .06em; text-transform: uppercase; }
.pbf-toggle:hover { border-color: var(--pbx-ink); color: var(--pbx-ink); }
.pbf-toggle.on { background: var(--pbx-ball); border-color: var(--pbx-ball); color: var(--pbx-ball-ink); }
.pbf-tag { display: inline-block; padding: 5px 8px; border-radius: 4px; background: var(--pbx-surface-2); color: var(--pbx-ink-2); white-space: nowrap; font: 600 13px/1 var(--pbx-cond); letter-spacing: .05em; text-transform: uppercase; }
.pbf-tag.on { background: var(--pbx-ink); color: #fff; }
.pbx-input.pbf-talla { width: auto; min-width: 84px; height: 32px; font-size: 14px; }
.pbf-acts { white-space: nowrap; }
.pbf-acts .pbx-btn { margin: 2px; }
/* Tercera fila de cada pareja: quién la inscribió y qué condiciones aceptó. */
.pbf-insc .pbx-table tr.pbf-reg td { padding: 6px 8px 9px; text-align: left; font-size: 13px; color: var(--pbx-ink-2); background: #f7f7f4; border-bottom: 2px solid var(--pbx-ink-3); }
.pbf-insc .pbx-table tr.pbf-reg b { color: var(--pbx-ink); font-weight: 600; }

@media (max-width: 640px) {
  .pbf-overlay { padding: 0; align-items: stretch; }
  .pbf-dialog { max-width: none; min-height: 100%; margin: 0; border-radius: 0; }
  .pbf-head, .pbf-body, .pbf-foot { padding-left: 14px; padding-right: 14px; }
  .pbf-head h5 { font-size: 21px; }
  .pbf-steps span { font-size: 11.5px; letter-spacing: .04em; }
  .pbf-summary > div { grid-template-columns: minmax(0, 1fr) auto; }
  .pbf-summary dt { grid-column: 1 / -1; }
  .pbf-foot > div:last-child { flex: 1 1 100%; justify-content: space-between; }
  .pbf-opt .pbx-label { white-space: normal; text-align: right; max-width: 40%; }
}

/* ---------- Accesibilidad (revisión 24/11/2026) ---------- */
.pbf-arrow { min-width: 28px; min-height: 24px; }
.pbf-note-txt { display: block; margin-top: 3px; font-size: 12.5px; line-height: 1.35; color: var(--pbx-ink-2); white-space: normal; max-width: 260px; }
.pbf-note-txt b { font-weight: 600; color: var(--pbx-ink); }
.pbf-horas { display: inline-block; text-align: left; }
.pbf-horas > summary { cursor: pointer; list-style: none; }
.pbf-horas > summary::-webkit-details-marker { display: none; }
.pbf-horas > span { display: block; margin-top: 4px; font-size: 12.5px; line-height: 1.35; color: var(--pbx-ink-2); white-space: normal; max-width: 220px; }
.pbf-fin-nota { margin: 8px 0 0; }
