/* Copa Jalisco — ROL DE JUEGO (fixtures). Traducción de screens.jsx > FixturesScreen.
 * Depende de styles.css + site.css. Reutiliza .cj-tag / .cj-section de home.css. */

.cj-page { max-width: 1100px; margin: 0 auto; padding: 40px 24px 64px; }
.cj-page__head { margin-bottom: 22px; }
.cj-page__title { font-family: var(--font-display); text-transform: uppercase; font-size: clamp(2rem, 4vw, 2.75rem); line-height: 1.02; letter-spacing: 0.005em; color: var(--text-strong); margin: 6px 0 0; }
.cj-page__sub { font-family: var(--font-sans); font-size: var(--text-base); color: var(--text-muted); margin-top: 6px; }

/* ---- filtros ---- */
.cj-rol-filters { border-top: 1px solid var(--border); padding-top: 18px; }

/* filas de selección (categoría / grupo) — compartido por equipos/rol/estadística */
.cj-filter-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.cj-filter-row .cj-filter-lbl { flex-shrink: 0; width: 74px; }
.cj-filter-row .cj-chip-scroll { margin-bottom: 0; flex: 1; min-width: 0; }
@media (max-width: 620px) {
  .cj-filter-row { align-items: flex-start; flex-direction: column; gap: 6px; }
  .cj-filter-row .cj-filter-lbl { width: auto; }
  .cj-filter-row .cj-chip-scroll { width: 100%; }
}
.cj-filter-lbl { font-family: var(--font-sans); font-size: var(--text-2xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-subtle); margin-right: 4px; }
.cj-chip-scroll { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 14px; }
.cj-gchip {
  flex-shrink: 0; cursor: pointer; height: 34px; padding: 0 14px; border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong); background: var(--surface-card); color: var(--text-body);
  font-family: var(--font-sans); font-size: var(--text-sm); font-weight: 600; white-space: nowrap;
  display: inline-flex; align-items: center; text-decoration: none;
}
.cj-gchip:hover { text-decoration: none; }
.cj-gchip.is-active { border: 2px solid var(--brand); background: var(--brand); color: #fff; }
.cj-jtabs { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 22px; }

/* barra "mostrando" */
.cj-rol-info { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; padding: 10px 16px; border-radius: var(--radius-md); background: var(--royal-50); border: 1px solid var(--royal-100); }
.cj-rol-info span { font-family: var(--font-sans); font-size: var(--text-sm); color: var(--text-body); }
.cj-rol-info b { color: var(--text-strong); }

/* ---- bloques por jornada ---- */
.cj-rol-jornada { margin-bottom: 26px; }
.cj-rol-jtitle { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; }
.cj-rol-jtitle span { font-family: var(--font-display); font-size: 19px; color: var(--text-strong); text-transform: uppercase; letter-spacing: 0.02em; }
.cj-rol-jtitle .rule { flex: 1; height: 1px; background: var(--border); }

.cj-panel-scroll { overflow-x: auto; }
.cj-rol-group + .cj-rol-group { border-top: 8px solid var(--bg-subtle); }
.cj-rol-grouphead { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 18px; background: var(--royal-800); font-family: var(--font-sans); font-size: var(--text-2xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: #fff; }
.cj-rol-grouphead__j { flex-shrink: 0; background: var(--gold-400); color: var(--ink-900); border-radius: var(--radius-pill); padding: 2px 10px; letter-spacing: 0.04em; }

/* fila / cabecera de columnas */
.cj-rol-head, .cj-rol-row {
  display: grid; grid-template-columns: 96px 1fr 180px 96px; gap: 12px; min-width: 620px;
  align-items: center; padding: 11px 18px;
}
.cj-rol-head { background: var(--bg-subtle); border-bottom: 1px solid var(--border); }
.cj-rol-head span { font-family: var(--font-sans); font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-subtle); }
.cj-rol-head .c-status, .cj-rol-row .c-status { text-align: center; justify-self: center; }
.cj-rol-row { border-bottom: 1px solid var(--divider); }
.cj-rol-row:last-child { border-bottom: none; }

.cj-rol-date { display: flex; flex-direction: column; }
.cj-rol-date b { font-family: var(--font-mono); font-size: var(--text-sm); font-weight: 700; color: var(--text-strong); }
.cj-rol-date span { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--text-muted); }

.cj-rol-matchup { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; min-width: 0; }
.cj-rol-team { display: flex; align-items: center; gap: 8px; min-width: 0; }
.cj-rol-team--home { justify-content: flex-end; }
.cj-rol-team a { font-family: var(--font-sans); font-size: var(--text-sm); font-weight: 600; color: var(--text-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none; }
.cj-rol-team a:hover { color: var(--brand); text-decoration: underline; }
.cj-rol-team.is-win a { font-weight: 800; }
.cj-rol-logo { width: 34px; height: 34px; flex-shrink: 0; object-fit: contain; }
.cj-rol-logo--ph { display: inline-flex; align-items: center; justify-content: center; color: var(--slate-400); }

.cj-rol-score { font-family: var(--font-mono); font-weight: 700; font-size: var(--text-base); color: var(--text-strong); background: var(--slate-100); border-radius: 6px; padding: 4px 10px; white-space: nowrap; text-align: center; }
.cj-rol-score .sep { color: var(--text-subtle); margin: 0 3px; }
.cj-rol-score .pen { font-size: var(--text-xs); color: var(--text-muted); }
.cj-rol-vs { font-family: var(--font-display); font-size: 14px; color: var(--text-subtle); padding: 0 6px; text-align: center; }
.cj-rol-wo { display: block; text-align: center; margin-top: 3px; font-family: var(--font-sans); font-size: 9px; color: var(--warning); }

.cj-rol-venue { display: flex; align-items: center; gap: 6px; min-width: 0; font-family: var(--font-sans); font-size: var(--text-xs); color: var(--text-muted); }
.cj-rol-venue i { color: var(--royal-500); flex-shrink: 0; }
.cj-rol-venue a, .cj-rol-venue span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: inherit; text-decoration: none; }
.cj-rol-venue a:hover { color: var(--brand); text-decoration: underline; }

.cj-rol-status { font-family: var(--font-sans); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; padding: 4px 10px; border-radius: var(--radius-pill); white-space: nowrap; }
.cj-rol-status--jugado    { background: var(--success-bg); color: var(--success); }
.cj-rol-status--normal    { background: var(--info-bg);    color: var(--info); }
.cj-rol-status--pendiente { background: var(--warning-bg); color: var(--gold-800); }
.cj-rol-status--cancelado { background: var(--danger-bg);  color: var(--danger); }

.cj-rol-empty { padding: 40px; text-align: center; color: var(--text-muted); font-family: var(--font-sans); font-size: var(--text-sm); }

/* ---- picker de categoría (liguilla) ---- */
.cj-catgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-top: 8px; }
.cj-catcard {
  display: flex; align-items: center; gap: 14px; padding: 20px; width: 100%; text-align: left; cursor: pointer;
  background: var(--surface-card); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-card);
  font-family: var(--font-sans); transition: box-shadow var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out);
}
.cj-catcard:hover { border-color: var(--brand); box-shadow: var(--shadow-md); }
.cj-catcard__icon { width: 46px; height: 46px; border-radius: var(--radius-md); background: var(--royal-50); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--royal-600); }
.cj-catcard__name { font-weight: 800; font-size: var(--text-lg); color: var(--text-strong); }
.cj-catcard__sub { font-size: var(--text-xs); color: var(--text-muted); margin-top: 2px; }
.cj-catcard__go { margin-left: auto; color: var(--slate-400); }

/* ---- toolbar (botón imprimir) ---- */
.cj-rol-toolbar { display: flex; justify-content: flex-end; margin-bottom: 14px; }
.cj-print-btn {
  display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 16px;
  border-radius: var(--radius-pill); border: 1.5px solid var(--border-strong); background: var(--surface-card);
  cursor: pointer; font-family: var(--font-sans); font-weight: 700; font-size: var(--text-sm); color: var(--text-strong);
}
.cj-print-btn:hover { border-color: var(--brand); color: var(--brand); }
.cj-print-btn i { color: var(--royal-600); }
.cj-print-btn:hover i { color: var(--brand); }

/* ============================================================ MODAL de impresión */
.cj-modal { position: fixed; inset: 0; z-index: 300; background: rgba(12,16,36,0.78); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); display: none; align-items: center; justify-content: center; padding: 24px; }
.cj-modal.is-open { display: flex; animation: cj-fade 0.18s var(--ease-out); }
@keyframes cj-fade { from { opacity: 0; } to { opacity: 1; } }
.cj-modal__card { width: min(460px, 100%); background: var(--surface-card); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); }
.cj-modal__head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.cj-modal__icon { width: 38px; height: 38px; border-radius: 10px; background: var(--royal-50); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--royal-600); }
.cj-modal__title { font-family: var(--font-sans); font-weight: 800; font-size: var(--text-lg); color: var(--text-strong); flex: 1; }
.cj-modal__close { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface-card); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; color: var(--text-body); }
.cj-modal__close:hover { background: var(--bg-subtle); }
.cj-modal__body { padding: 20px; }
.cj-modal__tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.cj-modal__tab { flex: 1; height: 38px; border-radius: var(--radius-pill); border: 1px solid var(--border-strong); background: var(--surface-card); color: var(--text-body); cursor: pointer; font-family: var(--font-sans); font-weight: 700; font-size: var(--text-sm); }
.cj-modal__tab.is-active { border: 2px solid var(--brand); background: var(--brand); color: #fff; }
.cj-modal__pane { display: none; flex-direction: column; gap: 14px; }
.cj-modal__pane.is-active { display: flex; }
.cj-field { display: flex; flex-direction: column; }
.cj-field label { font-family: var(--font-sans); font-size: var(--text-2xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-subtle); margin-bottom: 6px; }
.cj-field select, .cj-field input {
  height: 42px; padding: 0 12px; border-radius: var(--radius-md); border: 1px solid var(--field-border);
  background: var(--field-bg); font-family: var(--font-sans); font-size: var(--text-sm); color: var(--text-strong); outline: none; width: 100%;
}
.cj-field select:focus, .cj-field input:focus { border-color: var(--field-focus); box-shadow: var(--ring); }
.cj-field-row { display: flex; gap: 12px; }
.cj-field-row .cj-field { flex: 1; }
.cj-modal__actions { display: flex; gap: 10px; margin-top: 8px; }
.cj-mbtn { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; border-radius: var(--radius-pill); cursor: pointer; font-family: var(--font-sans); font-weight: 700; font-size: var(--text-sm); border: none; }
.cj-mbtn--primary { background: var(--brand); color: #fff; }
.cj-mbtn--primary:hover { background: var(--brand-strong); }
.cj-mbtn--ghost { background: transparent; color: var(--text-strong); border: 1.5px solid var(--border-strong); }
.cj-mbtn--ghost:hover { border-color: var(--brand); color: var(--brand); }
