/* The legacy .context-bar styles lived here. They've been replaced
   by the shared ribbon component (shared/_ribbon) + .tournament-hero
   on every screen that used them — see Phase 7 of the boletería
   redesign. */


/* ────────── Tournament hero (show / fixture / ranking / predict) ────────── */
.tournament-hero {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}
.tournament-hero.-compact { margin-bottom: 18px; }
.tournament-hero__icon {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(10, 219, 198, 0.18), rgba(10, 219, 198, 0.05));
  border: 1px solid rgba(10, 219, 198, 0.3);
  color: var(--accent);
  box-shadow: 0 4px 14px var(--green-glow);
}
.tournament-hero__icon > svg,
.tournament-hero__icon > img { width: 60%; height: 60%; object-fit: contain; }
.tournament-hero__main { flex: 1; min-width: 0; }
.tournament-hero__title {
  font-family: var(--font-scoreboard);
  font-size: clamp(32px, 6vw, 50px);
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 1;
  color: var(--ink-bright);
  margin: 0 0 4px;
}
.tournament-hero__title .muted { color: var(--muted); font-weight: inherit; }
.tournament-hero__meta {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-2);
}


/* ────────── Participate CTA (show, usuario no inscripto) ────────── */
.tournament-participate {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px;
  margin-bottom: 18px;
  background: linear-gradient(180deg, var(--card), var(--card-2));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.tournament-participate__lead {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-soft);
}
.tournament-participate__lead strong { color: var(--accent); font-weight: 600; }
.tournament-participate > form { margin: 0; }


/* ────────── CTA principal de palpitar (show) ──────────
   Acceso destacado a la acción central del torneo. Las sub-secciones
   (Fixture / Tabla / Salas) viven en las tabs de la página (tournament-nav),
   ya no en tiles que duplicaban la navegación del sidebar. */
.qa-primary {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px;
  margin-bottom: 24px;
  border-radius: 16px;
  text-decoration: none;
  color: var(--accent-ink);
  /* Teal más profundo (menos neón) + glow suave: antes el bloque teal saturado
     competía con el premio dorado. Sigue siendo el CTA primario. */
  background: linear-gradient(135deg, var(--accent-2), color-mix(in srgb, var(--accent-2) 78%, #04211e));
  box-shadow: 0 6px 18px rgba(6, 182, 164, 0.16);
  transition: transform 180ms, box-shadow 180ms;
  overflow: hidden;
}
.qa-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(6, 182, 164, 0.22); }
/* Barra de progreso de pálpitos cargados, al pie del CTA. */
.qa-primary:has(.qa-primary__prog) { padding-bottom: 19px; }
.qa-primary__prog {
  position: absolute;
  left: 15px; right: 15px; bottom: 8px;
  height: 4px;
  border-radius: var(--radius-pill);
  background: rgba(42, 30, 0, 0.18);
  overflow: hidden;
}
.qa-primary__prog > span {
  display: block;
  height: 100%;
  border-radius: var(--radius-pill);
  background: rgba(42, 30, 0, 0.55);
}
.qa-primary__ic {
  flex: 0 0 auto;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px;
  background: rgba(42, 30, 0, 0.16);
}
.qa-primary__main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.qa-primary__name { font-size: 17px; font-weight: 700; }
.qa-primary__sub { font-size: 12px; font-weight: 600; opacity: 0.78; margin-top: 1px; }
.qa-primary__go { font-size: 22px; font-weight: 700; line-height: 1; }

/* Feed list — upcoming matches with your status (boletería) */
.feed-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-2);
  overflow: hidden;
}
.feed-match {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-bottom: 1px dashed var(--line);
  text-decoration: none;
  color: inherit;
  transition: background 150ms;
}
.feed-list > .feed-match:last-child { border-bottom: 0; }
a.feed-match:hover { background: rgba(255, 255, 255, 0.018); }
/* Partido en vivo: borde coral vibrante a la izquierda + tinte sutil. */
.feed-match.-live {
  border-left: 3px solid var(--coral);
  padding-left: 11px;
  background: color-mix(in srgb, var(--coral) 7%, transparent);
  box-shadow: inset 0 0 22px -14px var(--coral);
}

.feed-match > .time {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  min-width: 110px;
}
.feed-match > .teams {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  font-size: 14px;
  min-width: 0;
}
.feed-match > .teams > .home-name,
.feed-match > .teams > .away-name {
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.feed-match > .teams > .home-name { text-align: right; }
.feed-match > .teams > .away-name { text-align: left; }
/* Nombre cortado: tappable para ver el completo (name_tooltip_controller). */
.feed-match > .teams > .home-name.is-truncated,
.feed-match > .teams > .away-name.is-truncated {
  cursor: pointer;
  text-decoration: underline dotted var(--muted);
  text-underline-offset: 2px;
}
.feed-match > .teams > .home-badge,
.feed-match > .teams > .away-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
/* Escudos de la fila fina en desktop: el :md (28px) del helper queda chico al
   lado del marcador. Mobile ya los sube a 40px en su propio media query, así
   que esto solo aplica de 560px para arriba. */
@media (min-width: 560px) {
  .feed-match > .teams > .home-badge .cl-logo,
  .feed-match > .teams > .away-badge .cl-logo { width: 36px; height: 36px; }
}
.feed-match > .teams > .vs {
  flex-shrink: 0;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--muted);
  letter-spacing: 0.1em;
  padding: 0 4px;
}
.feed-match > .teams > .score {
  flex-shrink: 0;
  font-family: var(--font-scoreboard);
  font-size: 17px;
  letter-spacing: 0.04em;
  color: var(--ink);
  padding: 0 4px;
}
.feed-match > .teams > .score.-live { color: var(--coral); }

.feed-match > .pick {
  flex-shrink: 0;
  text-align: right;
}
.feed-match > .pick .status.-done {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green);
}
.feed-match > .pick .action {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}
.feed-match > .pick .status.-time {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.feed-match > .pick .status.-live {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--coral);
}

/* Mobile (≤559px): layout "matchup". Reordena el MISMO markup de .teams
   (sin nodos extra): escudos a los lados + marcador/vs al centro arriba, y
   los nombres debajo, centrados y hasta 2 líneas — así dejan de truncarse.
   Meta (fecha) arriba y estado (hora/Final/vivo) abajo, ambos centrados. */
@media (max-width: 559px) {
  .feed-match { flex-direction: column; align-items: stretch; gap: 8px; }

  .feed-match > .time { justify-content: center; min-width: 0; }
  .feed-match > .pick { text-align: center; }

  .feed-match > .teams {
    grid-template-columns: 1fr auto 1fr;
    grid-template-rows: auto auto;
    column-gap: 8px;
    row-gap: 7px;
    justify-items: center;
  }
  .feed-match > .teams > .home-badge { grid-area: 1 / 1; }
  .feed-match > .teams > .score,
  .feed-match > .teams > .vs         { grid-area: 1 / 2; align-self: center; }
  .feed-match > .teams > .away-badge { grid-area: 1 / 3; }

  /* Escudos un poco más grandes para el efecto "matchup". */
  .feed-match > .teams > .home-badge .cl-logo,
  .feed-match > .teams > .away-badge .cl-logo { width: 40px; height: 40px; }
  .feed-match > .teams > .score { font-size: 24px; }

  /* Nombres abajo, centrados, hasta 2 líneas (sin ellipsis de una sola línea). */
  .feed-match > .teams > .home-name,
  .feed-match > .teams > .away-name {
    grid-row: 2;
    text-align: center;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.2;
    text-decoration: none;
  }
  .feed-match > .teams > .home-name { grid-column: 1; }
  .feed-match > .teams > .away-name { grid-column: 3; }
}

/* (Older .feed-match > .pick > .status / .action button styles
   removed — boletería treatment lives in the
   .feed-match > .pick .status / .action descendant rules above.) */


/* ────────── Action card — split variant (Salas: Ver + Crear) ──────────
   La card sigue siendo un contenedor con la misma estética que las
   otras 3, pero agrupa dos links: el body lleva al listado, y el CTA
   inferior abre el form para crear sala. */
.action-card.action-card--split {
  padding: 0;
}
.action-card.action-card--split > .action-card__body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 18px 12px;
  text-decoration: none;
  color: inherit;
  flex: 1;
}
.action-card.action-card--split > .action-card__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0 14px 14px;
  padding: 9px 14px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.02);
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 150ms, color 150ms, background 150ms;
}
.action-card.action-card--split > .action-card__cta:hover {
  border-color: var(--accent);
  background: rgba(10, 219, 198, 0.08);
  color: var(--accent);
}
.action-card.action-card--split > .action-card__cta > svg { color: inherit; }

/* En la variante con pozo activo, el CTA lleva acento dorado de base */
.action-card.-rooms-premium.action-card--split > .action-card__cta {
  border-color: rgba(10, 219, 198, 0.45);
  background: rgba(10, 219, 198, 0.05);
  color: var(--accent);
}
.action-card.-rooms-premium.action-card--split > .action-card__cta:hover {
  background: rgba(10, 219, 198, 0.12);
  border-style: solid;
}


/* ────────── Resumen del torneo en 2 columnas (show) ──────────
   Mobile: una sola columna (partidos y luego la tabla debajo). Desktop:
   partidos a la izquierda y la tabla de posiciones al costado, sticky, para
   no tener que scrollear hasta el fondo para verla. */
.tdetail-grid { display: block; }
.tdetail-grid__main { min-width: 0; }
/* La tabla de posiciones del Resumen solo aporta como sidebar en desktop; en
   mobile quedaba enterrada al final y duplicaba el tab Tabla → oculta. */
.tdetail-grid__side { display: none; }

/* Se divide en 2 columnas recién con espacio real (≥900px): así la tabla del
   costado nunca queda tan angosta que un nombre largo ("Geronimo Errante") se
   parta en dos líneas. Por debajo va a una columna, con la tabla a ancho
   completo. */
@media (min-width: 900px) {
  .tdetail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(380px, 0.95fr);
    gap: 24px;
    align-items: start;
  }
  .tdetail-grid__side {
    display: block;
    margin-top: 0;
    position: sticky;
    top: 64px;
  }
}

/* En la tabla del Resumen, nombre sobre @usuario (no en la misma línea) para
   que un nombre largo no se corte. Scopeado: el ranking completo y las salas
   mantienen su layout inline. */
.tdetail-grid__side .leaderboard-table .user > .user-cell > .meta {
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
}
/* Vista compacta: ocultamos Aciertos/Pálpitos (las stats completas están en la
   pestaña Tabla), así el nombre se queda con casi todo el ancho de la card. */
.tdetail-grid__side .leaderboard-table .hide-mobile { display: none; }
