/* TCS Deportes — tablas y partidos. Todo bajo .tcs-dep para no chocar con el tema.
   Re-tematizar: sobrescribir las variables de .tcs-dep. */
.tcs-dep {
  --tcs-ink: #12162b;
  --tcs-muted: #8a90a6;
  --tcs-line: #e8ebf3;
  --tcs-stripe: #f3f5fb;
  --tcs-accent: #3d58b8;
  --tcs-live: #f0432d;
  --tcs-card: #fff;
  --tcs-shadow: 0 6px 20px rgba(60, 80, 140, .08);
  box-sizing: border-box;
  max-width: 800px;
  margin: 0 auto 32px;
  color: var(--tcs-ink);
  font-family: inherit;
  font-size: 15px;
  line-height: 1.35;
  container-type: inline-size;
  -webkit-font-smoothing: antialiased;
}
.tcs-dep *, .tcs-dep *::before, .tcs-dep *::after { box-sizing: border-box; }
/* Red de seguridad: si el shortcode quedó guardado dentro de <code> en la página, el navegador reinserta <code> dentro de nuestros bloques
   y el tema les pone fondo gris y fuente monoespaciada. Aquí se neutraliza para que el diseño no se rompa. */
.tcs-dep code { display: contents; background: none; border: 0; padding: 0; color: inherit; font: inherit; position: static; }
/* Sin fuentes propias: todo hereda la tipografía que use el tema (el tema puede fijarla en table/td/button/select) */
.tcs-dep table, .tcs-dep caption, .tcs-dep th, .tcs-dep td, .tcs-dep ul, .tcs-dep li, .tcs-dep h3, .tcs-dep h4, .tcs-dep a, .tcs-dep span, .tcs-dep div, .tcs-dep label, .tcs-dep button, .tcs-dep select, .tcs-dep option { font-family: inherit; }
.tcs-dep img { margin: 0; max-width: none; height: auto; border: 0; background: none; }
.tcs-dep ul { margin: 0; padding: 0; list-style: none; }
.tcs-dep li { margin: 0; padding: 0; }
.tcs-dep .tcs-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.tcs-dep .tcs-logo { width: 40px; height: 40px; object-fit: contain; flex: none; }
.tcs-dep .tcs-dep__title { margin: 0 0 12px; font-size: 20px; font-weight: 800; text-align: left; color: var(--tcs-ink); }
.tcs-dep__empty { color: var(--tcs-muted); text-align: center; padding: 24px 0; }

/* ================= Tabla de posiciones ================= */
.tcs-dep .tcs-dep__scroll { overflow-x: auto; padding: 12px 12px 8px; border: 1px solid var(--tcs-line); border-radius: 18px; background: var(--tcs-card); box-shadow: var(--tcs-shadow); margin-bottom: 12px; }
.tcs-dep .tcs-t { width: 100%; margin: 0; border: 0; border-collapse: separate; border-spacing: 0 4px; background: transparent; font-size: 14px; font-variant-numeric: tabular-nums; }
.tcs-dep .tcs-t .tcs-t__c { position: relative; padding: 0 4px; border: 0; text-align: center; vertical-align: middle; background: transparent; color: var(--tcs-ink); font-size: inherit; font-weight: 600; line-height: 1.2; }
.tcs-dep .tcs-t thead .tcs-t__c { height: 32px; font-size: 12px; font-weight: 700; color: var(--tcs-muted); }
.tcs-dep .tcs-t tbody .tcs-t__c { height: 48px; }
.tcs-dep .tcs-t tbody tr:nth-child(odd) .tcs-t__c { background: var(--tcs-stripe); }
.tcs-dep .tcs-t tbody .tcs-t__c:first-child { border-radius: 12px 0 0 12px; }
.tcs-dep .tcs-t tbody .tcs-t__c:last-child { border-radius: 0 12px 12px 0; }
.tcs-dep .tcs-t .tcs-t__rk { width: 44px; padding-left: 10px; text-align: left; color: var(--tcs-muted); font-weight: 700; }
.tcs-dep .tcs-t tbody .tcs-t__rk::before { content: ""; position: absolute; left: 0; top: 50%; width: 4px; height: 26px; margin-top: -13px; border-radius: 0 4px 4px 0; background: var(--tcs-z, transparent); }
.tcs-dep .tcs-t .tcs-t__team { width: 100%; padding: 0 8px; text-align: left; }
.tcs-dep .tcs-t .tcs-t__tm { display: flex; align-items: center; gap: 12px; min-width: 0; }
.tcs-dep .tcs-t .tcs-t__tm .tcs-logo { width: 28px; height: 28px; }
.tcs-dep .tcs-t .tcs-t__name { font-weight: 700; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tcs-dep .tcs-t .tcs-t__n { width: 38px; min-width: 38px; }
.tcs-dep .tcs-t .tcs-t__pts { width: 52px; font-weight: 800; color: var(--tcs-accent); }
.tcs-dep .tcs-t thead .tcs-t__pts { color: var(--tcs-accent); }
.tcs-dep .tcs-t .tcs-t__form { width: 1%; white-space: nowrap; padding: 0 14px 0 8px; text-align: right; }
.tcs-dep .tcs-forms { display: inline-flex; gap: 4px; }
.tcs-dep .tcs-f { display: block; width: 8px; height: 8px; border-radius: 50%; background: #cbd5e1; }
.tcs-dep .tcs-f--w { background: #22c55e; } .tcs-dep .tcs-f--l { background: #ef4444; }

/* columnas según el ancho del contenedor (no de la pantalla) */
@container (max-width: 680px) { .tcs-dep .tcs-opt2 { display: none; } .tcs-dep .tcs-t tbody .tcs-t__pts { border-radius: 0 12px 12px 0; padding-right: 10px; } }
@container (max-width: 500px) {
  .tcs-dep .tcs-opt { display: none; }
  .tcs-dep .tcs-dep__scroll { padding: 8px 8px 4px; border-radius: 16px; }
  .tcs-dep .tcs-t { font-size: 13px; }
  .tcs-dep .tcs-t tbody .tcs-t__c { height: 44px; }
  .tcs-dep .tcs-t .tcs-t__rk { width: 36px; padding-left: 8px; }
  .tcs-dep .tcs-t .tcs-t__team { padding: 0 6px; }
  .tcs-dep .tcs-t .tcs-t__tm { gap: 8px; }
  .tcs-dep .tcs-t .tcs-t__tm .tcs-logo { width: 26px; height: 26px; }
  .tcs-dep .tcs-t .tcs-t__n { width: 32px; min-width: 32px; }
  .tcs-dep .tcs-t .tcs-t__pts { width: 40px; }
}
@supports not (container-type: inline-size) {
  @media (max-width: 680px) { .tcs-dep .tcs-opt2 { display: none; } }
  @media (max-width: 500px) { .tcs-dep .tcs-opt { display: none; } }
}

/* zonas */
.tcs-dep .tcs-z-semi    { --tcs-z: #16a34a; }
.tcs-dep .tcs-z-cuartos { --tcs-z: #86efac; }
.tcs-dep .tcs-z-ucl     { --tcs-z: #2563eb; }
.tcs-dep .tcs-z-uel     { --tcs-z: #f97316; }
.tcs-dep .tcs-z-uecl    { --tcs-z: #14b8a6; }
.tcs-dep .tcs-z-desc    { --tcs-z: #ef4444; }
.tcs-dep ul.tcs-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; margin: 0; padding: 4px 8px 0; list-style: none; }
.tcs-dep ul.tcs-legend > li.tcs-legend__item { display: flex; align-items: center; gap: 8px; margin: 0; padding: 0; border: 0; min-height: 18px; list-style: none; line-height: 18px; background: none; }
.tcs-dep ul.tcs-legend > li.tcs-legend__item::before, .tcs-dep ul.tcs-legend > li.tcs-legend__item::after { content: none; display: none; }
.tcs-dep .tcs-legend__dot { display: block; flex: none; width: 10px; height: 10px; margin: 0; padding: 0; border-radius: 3px; background: var(--tcs-z); }
.tcs-dep .tcs-legend__txt { display: block; margin: 0; padding: 0; font-size: 12px; font-weight: 600; line-height: 18px; color: var(--tcs-muted); }

/* ================= Navegador de jornadas ================= */
.tcs-dep .tcs-nav { display: flex; align-items: center; gap: 4px; max-width: 420px; margin: 0 auto 8px; padding: 5px; border: 1px solid var(--tcs-line); border-radius: 999px; background: var(--tcs-card); box-shadow: var(--tcs-shadow); }
.tcs-dep .tcs-nav__btn { display: grid; place-items: center; flex: none; width: 44px; height: 44px; padding: 0; margin: 0; border: 0; border-radius: 50%; background: transparent; color: var(--tcs-ink); cursor: pointer; text-decoration: none; transition: background .15s, transform .1s; -webkit-appearance: none; appearance: none; }
.tcs-dep .tcs-nav__btn:hover:not([aria-disabled="true"]) { background: var(--tcs-stripe); }
.tcs-dep .tcs-nav__btn:active:not([aria-disabled="true"]) { transform: scale(.94); }
.tcs-dep .tcs-nav__btn[aria-disabled="true"] { opacity: .3; cursor: default; pointer-events: none; }
.tcs-dep .tcs-nav__sel { position: relative; flex: 1; min-width: 0; }
.tcs-dep .tcs-nav__sel select { width: 100%; height: 44px; margin: 0; padding: 0 40px 0 20px; border: 0; border-radius: 999px; background: var(--tcs-accent); color: #fff; font: inherit; font-size: 15px; font-weight: 700; text-align: center; text-align-last: center; cursor: pointer; -webkit-appearance: none; appearance: none; box-shadow: 0 6px 14px rgba(61, 88, 184, .35); }
.tcs-dep .tcs-nav__sel select option { color: var(--tcs-ink); background: #fff; }
.tcs-dep .tcs-nav__chev { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); pointer-events: none; color: #fff; }
.tcs-dep .tcs-nav__btn:focus-visible, .tcs-dep .tcs-nav__sel select:focus-visible, .tcs-dep .tcs-nav__now:focus-visible { outline: 2px solid var(--tcs-accent); outline-offset: 2px; }
.tcs-dep .tcs-nav__now { display: block; margin: 0 auto; padding: 6px 12px; border: 0; background: none; color: var(--tcs-accent); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.tcs-dep .tcs-nav__now[hidden] { display: none; }

/* ================= Partidos ================= */
.tcs-dep .tcs-rounds { min-height: 120px; transition: opacity .15s; }
.tcs-dep .tcs-rounds.is-loading { opacity: .4; pointer-events: none; }
.tcs-dep .tcs-day { margin: 22px 4px 10px; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--tcs-muted); text-align: left; }
.tcs-dep .tcs-list { display: flex; flex-direction: column; gap: 12px; }
.tcs-dep .tcs-livebox { margin: 0 0 18px; }
.tcs-dep .tcs-livebox:empty { display: none; }
.tcs-dep .tcs-day--live { display: flex; align-items: center; gap: 8px; margin-top: 0; color: var(--tcs-live); }
.tcs-dep .tcs-day--live .tcs-dot { background: var(--tcs-live); }
.tcs-dep .tcs-m__round { text-align: center; font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--tcs-accent); }
.tcs-dep .tcs-m { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 18px 28px 20px; border: 1px solid var(--tcs-line); border-radius: 18px; background: var(--tcs-card); box-shadow: var(--tcs-shadow); }
.tcs-dep .tcs-m.is-live { padding-top: 26px; }
.tcs-dep .tcs-m__venue { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--tcs-muted); text-align: center; }
.tcs-dep .tcs-m__venue svg { flex: none; }
.tcs-dep .tcs-m__row { display: grid; grid-template-columns: minmax(0, 1fr) 112px minmax(0, 1fr); align-items: center; column-gap: 16px; }
.tcs-dep .tcs-m__team { display: flex; align-items: center; gap: 14px; min-width: 0; font-size: 17px; font-weight: 700; }
.tcs-dep .tcs-m__team--home { justify-content: flex-end; text-align: right; }
.tcs-dep .tcs-m__team--away { justify-content: flex-start; text-align: left; }
.tcs-dep .tcs-m__name { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; line-height: 1.2; }
.tcs-dep .tcs-m.is-done .tcs-m__team { font-weight: 500; color: var(--tcs-muted); }
.tcs-dep .tcs-m.is-done .tcs-m__team.is-win { font-weight: 800; color: var(--tcs-ink); }
.tcs-dep .tcs-m__mid { display: flex; flex-direction: column; align-items: center; gap: 2px; font-variant-numeric: tabular-nums; }
.tcs-dep .tcs-m__center { font-size: 24px; font-weight: 800; letter-spacing: -.01em; white-space: nowrap; }
.tcs-dep .tcs-m__center.is-muted { color: var(--tcs-muted); }
.tcs-dep .tcs-m__sub { font-size: 12px; font-weight: 700; color: var(--tcs-muted); }
.tcs-dep .tcs-m__goals { display: grid; grid-template-columns: minmax(0, 1fr) 112px minmax(0, 1fr); align-items: start; column-gap: 16px; padding-top: 10px; border-top: 1px dashed var(--tcs-line); font-size: 12.5px; line-height: 1.35; color: var(--tcs-muted); }
.tcs-dep .tcs-m__gl { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.tcs-dep .tcs-m__gl--home { align-items: flex-end; text-align: right; }
.tcs-dep .tcs-m__gl--away { align-items: flex-start; text-align: left; }
.tcs-dep .tcs-m__gball { justify-self: center; margin-top: 1px; opacity: .6; }
.tcs-dep .tcs-g__n { font-weight: 600; color: var(--tcs-ink); }
.tcs-dep .tcs-g__m { font-variant-numeric: tabular-nums; white-space: nowrap; }
.tcs-dep .tcs-rc { display: inline-block; width: 8px; height: 11px; margin: 0 5px -1px 0; border-radius: 2px; background: #d92d20; }
/* Liga con TV: partido a la izquierda y canales (logos en fila) a la derecha; el grupo va centrado y sin hueco de más */
.tcs-dep .tcs-m.has-tv { --tcs-tv-w: 128px; --tcs-pt: 18px; flex-direction: row; align-items: stretch; justify-content: center; gap: 8px; padding-left: 20px; padding-right: 20px; }
.tcs-dep .tcs-m.has-tv.is-live { --tcs-pt: 26px; }
.tcs-dep .tcs-m__main { position: relative; flex: 0 1 470px; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 12px; }   /* el partido, centrado verticalmente */
.tcs-dep .tcs-m.has-tv .tcs-live { top: calc(-1 * var(--tcs-pt) - 11px); }
.tcs-dep .tcs-m__tv { flex: 0 0 var(--tcs-tv-w); box-sizing: border-box; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; }   /* mismo ancho con o sin canales: el marcador no cambia de sitio entre tarjetas */
.tcs-dep .tcs-m__tv:not(:empty) { border-left: 1px dashed var(--tcs-line); }
.tcs-dep .tcs-tv__lbl { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--tcs-muted); }
.tcs-dep .tcs-tv__list { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; }
.tcs-dep .tcs-tv__ch { display: inline-flex; align-items: center; justify-content: center; max-width: 100%; text-decoration: none; border-radius: 8px; transition: transform .12s, opacity .12s; }
.tcs-dep a.tcs-tv__ch:hover { transform: translateY(-1px); opacity: .85; }
.tcs-dep a.tcs-tv__ch:focus-visible { outline: 2px solid var(--tcs-accent); outline-offset: 3px; }
.tcs-dep .tcs-tv__img { display: block; height: 32px; width: auto; max-width: 84px; object-fit: contain; border-radius: 8px; }
.tcs-dep .tcs-tv__txt { padding: 4px 10px; border-radius: 8px; background: var(--tcs-accent); color: #fff; font-size: 12px; font-weight: 700; white-space: nowrap; }
.tcs-dep .tcs-m__sub.is-warn { color: #b45309; }
.tcs-dep .tcs-m.is-live .tcs-m__sub { color: var(--tcs-live); }
.tcs-dep .tcs-live { position: absolute; top: -11px; left: 50%; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 6px; padding: 4px 14px; border-radius: 999px; background: var(--tcs-live); color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; box-shadow: 0 4px 10px rgba(240, 67, 45, .4); }
.tcs-dep .tcs-dot { display: block; width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: tcs-pulse 1.6s ease-in-out infinite; }
@keyframes tcs-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }

/* Tarjeta estrecha con TV: los canales pasan debajo del marcador, centrados */
@container (max-width: 640px) {
  .tcs-dep .tcs-m.has-tv { flex-direction: column; justify-content: flex-start; gap: 12px; }
  .tcs-dep .tcs-m__main { flex: none; }
  .tcs-dep .tcs-m__tv { flex: none; flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 8px 12px; padding: 0; }
  .tcs-dep .tcs-m__tv:empty { display: none; }
  .tcs-dep .tcs-m__tv:not(:empty) { padding: 10px 0 0; border-left: 0; border-top: 1px dashed var(--tcs-line); }
}
@container (max-width: 520px) {
  .tcs-dep .tcs-m { padding: 14px 14px 16px; border-radius: 16px; gap: 10px; }
  .tcs-dep .tcs-m.is-live { padding-top: 22px; }
  .tcs-dep .tcs-m.has-tv { padding-left: 14px; padding-right: 14px; }
  .tcs-dep .tcs-m.has-tv, .tcs-dep .tcs-m.has-tv.is-live { --tcs-pt: 14px; }
  .tcs-dep .tcs-m.has-tv.is-live { --tcs-pt: 22px; }
  .tcs-dep .tcs-m__venue { font-size: 12px; }
  .tcs-dep .tcs-m__row { grid-template-columns: minmax(0, 1fr) 84px minmax(0, 1fr); column-gap: 8px; }
  .tcs-dep .tcs-m__goals { grid-template-columns: minmax(0, 1fr) 84px minmax(0, 1fr); column-gap: 8px; font-size: 12px; }
  /* Móvil: escudo arriba y nombre debajo (más ancho para el nombre, sin cortarlo) y sin negrita */
  .tcs-dep .tcs-m__row { align-items: start; }
  .tcs-dep .tcs-m__team { flex-direction: column; align-items: center; justify-content: flex-start; text-align: center; gap: 6px; font-size: 13px; font-weight: 500; }
  .tcs-dep .tcs-m__team--home { flex-direction: column-reverse; justify-content: flex-end; }   /* en el HTML el nombre del local va antes del escudo */
  .tcs-dep .tcs-m__name { overflow-wrap: break-word; word-break: normal; }
  .tcs-dep .tcs-m__mid { min-height: 36px; justify-content: center; }   /* marcador alineado con la altura del escudo */
  .tcs-dep .tcs-logo { width: 36px; height: 36px; }
  .tcs-dep .tcs-m__center { font-size: 20px; }
  .tcs-dep .tcs-nav { max-width: none; }
}

/* ================= Estados de carga y error ================= */
.tcs-dep .tcs-err { margin: 12px 0 0; padding: 12px 14px; border: 1px solid #fecaca; border-radius: 12px; background: #fef2f2; color: #991b1b; font-size: 14px; text-align: center; }
.tcs-dep .tcs-err[hidden] { display: none; }
.tcs-dep .tcs-err button { margin-left: 6px; padding: 0; border: 0; background: none; color: inherit; font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; }
@keyframes tcs-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.tcs-dep .tcs-round { animation: tcs-in .18s ease-out; }
@media (prefers-reduced-motion: reduce) {
  .tcs-dep .tcs-dot, .tcs-dep .tcs-round { animation: none; }
  .tcs-dep .tcs-nav__btn, .tcs-dep .tcs-rounds { transition: none; }
}

/* ================= Cabecera de liga ================= */
.tcs-dep.tcs-dep--hero { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 36px 20px 30px; border-radius: 24px; text-align: center; color: #fff; background: linear-gradient(160deg, #1b2a73 0%, var(--tcs-accent) 100%); box-shadow: var(--tcs-shadow); background-size: cover; background-position: center; }
.tcs-dep .tcs-hero__logo { display: grid; place-items: center; width: 96px; height: 96px; margin-bottom: 10px; border-radius: 50%; background: #fff; box-shadow: 0 10px 28px rgba(8, 14, 50, .35); }
.tcs-dep .tcs-hero__logo img { width: 62px; height: 62px; object-fit: contain; }
.tcs-dep .tcs-hero__name { margin: 0; padding: 0; font-size: 24px; font-weight: 800; line-height: 1.15; letter-spacing: -.01em; color: #fff; text-align: center; }
.tcs-dep .tcs-hero__meta { margin: 0; padding: 0; font-size: 14px; font-weight: 600; color: rgba(255, 255, 255, .78); text-align: center; }
@container (max-width: 500px) { .tcs-dep .tcs-hero__name { font-size: 21px; } }
.tcs-dep.tcs-dep--hero { margin-bottom: 16px; }
.tcs-dep + br { display: none; }   /* wpautop agrega <br> entre shortcodes consecutivos */

/* ===== Tabla "sobrepuesta" a la cabecera (hoja que sube sobre el hero) =====
   Usa el combinador ~ porque wpautop puede intercalar un <br> entre los shortcodes. */
.tcs-dep.tcs-dep--hero { padding-bottom: 76px; }
.tcs-dep--hero ~ .tcs-dep.tcs-dep--table { position: relative; z-index: 1; margin-top: -60px; }
.tcs-dep--hero ~ .tcs-dep.tcs-dep--table::before { content: ""; position: absolute; z-index: 2; top: 10px; left: 50%; width: 44px; height: 4px; margin-left: -22px; border-radius: 4px; background: #d8dce8; }
.tcs-dep--hero ~ .tcs-dep.tcs-dep--table .tcs-dep__scroll { padding-top: 30px; border-radius: 28px 28px 18px 18px; border-color: transparent; box-shadow: 0 -10px 30px rgba(20, 30, 90, .18), var(--tcs-shadow); }
/* (@media y no @container: estos elementos SON los contenedores, una consulta de contenedor no puede estilizarlos) */
@media (max-width: 520px) {
  .tcs-dep.tcs-dep--hero { padding: 28px 16px 64px; border-radius: 20px; }
  .tcs-dep--hero ~ .tcs-dep.tcs-dep--table { margin-top: -52px; }
  .tcs-dep--hero ~ .tcs-dep.tcs-dep--table .tcs-dep__scroll { padding-top: 28px; border-radius: 24px 24px 16px 16px; }
}
