/*
 * soccer-cup-live.css — live Psara Soccer Cup coverage sections
 * (/soccer-cup/#live). Linked inline from the page body. Reuses the site
 * design tokens (--heading-color, --accent-color, --surface-color,
 * --heading-font, --default-font); adds the four live zones (groups & teams,
 * group standings, match schedule, semis + final). Rendered client-side by
 * assets/js/soccer-cup-live.js.
 */

/* --- Status bar (#live) --------------------------------------------------- */
.sc-status-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 16px;
  padding: 12px 18px;
  border-radius: 12px;
  /* Neutral tint that stays visible on both the plain and the alternated
     section backgrounds (the section-title heading covers the bar's title). */
  background: color-mix(in srgb, var(--default-color), transparent 94%);
}
/* Collapse the empty bar until a status pill actually shows. */
.sc-status-bar:not(:has(> :not([hidden]))) {
  display: none;
}
.sc-updated,
.sc-error-pill {
  font-size: 13px;
  border-radius: 999px;
  padding: 4px 12px;
  white-space: nowrap;
}
.sc-updated {
  color: var(--heading-color);
  background: color-mix(in srgb, var(--heading-color), transparent 90%);
}
.sc-error-pill {
  color: #b54708;
  background: color-mix(in srgb, #db8a33, transparent 86%);
}
.sc-champion {
  margin: 14px 0 0;
  text-align: center;
  font-family: var(--heading-font);
  font-size: 18px;
  font-weight: 700;
  color: var(--accent-color);
}

/* --- Shared card + section titles ----------------------------------------- */
.sc-pool-card,
.sc-table-card {
  height: 100%;
  background: var(--surface-color);
  border: 1px solid color-mix(in srgb, var(--heading-color), transparent 86%);
  border-radius: 14px;
  padding: 16px 18px;
  box-shadow: 0 2px 14px rgba(15, 23, 42, 0.05);
}
.sc-pool-title {
  margin: 0 0 12px;
  font-family: var(--heading-font);
  font-size: 17px;
  font-weight: 700;
  color: var(--heading-color);
  padding-bottom: 8px;
  border-bottom: 2px solid color-mix(in srgb, var(--accent-color), transparent 78%);
}

/* Clickable team name → jumps to its roster card in the groups section. */
.sc-teamref {
  color: inherit;
  cursor: pointer;
  text-decoration: underline dotted color-mix(in srgb, currentColor, transparent 60%);
  text-underline-offset: 2px;
}
.sc-teamref:hover,
.sc-teamref:focus {
  color: var(--accent-color);
  text-decoration-color: var(--accent-color);
}

/* --- Zone A: groups & teams ----------------------------------------------- */
.sc-team {
  padding: 10px 0;
  border-top: 1px solid color-mix(in srgb, var(--heading-color), transparent 90%);
  scroll-margin-top: calc(var(--header-height, 120px) + 14px);
}
/* Brief flash when navigated to via a team link. */
.sc-team:target {
  animation: sc-team-flash 2.2s ease;
  border-radius: 8px;
}
@keyframes sc-team-flash {
  0%, 15% {
    background: color-mix(in srgb, var(--accent-color), transparent 80%);
    box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent-color), transparent 90%);
  }
  100% {
    background: transparent;
    box-shadow: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .sc-team:target { animation: none; outline: 2px solid var(--accent-color); }
}
.sc-team:first-of-type {
  border-top: 0;
  padding-top: 0;
}
.sc-team-name {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 700;
  color: var(--default-color);
  display: flex;
  align-items: center;
  gap: 8px;
}
.sc-team-name::before {
  content: "";
  width: 4px;
  height: 16px;
  border-radius: 2px;
  background: var(--accent-color);
  flex: 0 0 auto;
}
.sc-roster {
  list-style: none;
  margin: 0;
  padding: 0 0 0 12px;
  display: grid;
  gap: 3px;
}
.sc-roster li {
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--default-color);
}
.sc-role {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--heading-color);
  margin-right: 4px;
}
.sc-role.is-coach {
  color: #6b7280;
}

/* --- Zone B: standings tables --------------------------------------------- */
.sc-standings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.sc-standings-table th {
  font-size: 11px;
  font-weight: 600;
  color: #6b7280;
  text-align: center;
  padding: 4px 6px;
}
.sc-standings-table th:first-child {
  text-align: left;
}
.sc-standings-table td {
  padding: 8px 6px;
  text-align: center;
  border-top: 1px solid color-mix(in srgb, var(--heading-color), transparent 90%);
  font-variant-numeric: tabular-nums;
}
.sc-standings-table td:first-child {
  text-align: left;
  font-weight: 500;
}
/* Points column: the standings' decider, always emphasised. */
.sc-standings-table td.sc-pts {
  font-weight: 700;
  color: var(--heading-color);
}
.sc-standings-table tr.is-leader td {
  background: color-mix(in srgb, var(--accent-color), transparent 90%);
  font-weight: 700;
  color: var(--heading-color);
}
.sc-standings-table tr.is-leader td:first-child {
  border-left: 3px solid var(--accent-color);
}
.sc-leader-trophy {
  margin-left: 4px;
}

/* Per-group match scores, under each standings table. */
.sc-fixtures {
  list-style: none;
  margin: 12px 0 0;
  padding: 12px 0 0;
  border-top: 1px solid color-mix(in srgb, var(--heading-color), transparent 88%);
  display: grid;
  gap: 7px;
}
.sc-fix {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.sc-fix .t-a {
  text-align: left;
}
.sc-fix .t-b {
  text-align: right;
}
.sc-fix .t-a.win,
.sc-fix .t-b.win {
  font-weight: 700;
  color: var(--heading-color);
}
.sc-fix .sc {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
  padding: 1px 8px;
  color: var(--default-color);
}
.sc-fix .sc b {
  color: var(--accent-color);
  font-weight: 700;
  white-space: nowrap;
}
.sc-fix .sc.pending {
  color: #9aa3af;
  font-weight: 500;
  font-size: 12px;
}

/* --- Zone B2: match schedule / programme ---------------------------------- */
.sc-sched-wrap {
  display: grid;
  gap: 16px;
}
.sc-sched-day {
  background: var(--surface-color);
  border: 1px solid color-mix(in srgb, var(--heading-color), transparent 86%);
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 2px 14px rgba(15, 23, 42, 0.05);
}
.sc-day-title {
  margin: 0 0 8px;
  font-family: var(--heading-font);
  font-size: 16px;
  font-weight: 700;
  color: var(--heading-color);
  padding-bottom: 8px;
  border-bottom: 2px solid color-mix(in srgb, var(--accent-color), transparent 78%);
}
.sc-sched-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.sc-sched-row {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 9px 2px;
  border-top: 1px solid color-mix(in srgb, var(--heading-color), transparent 90%);
}
.sc-sched-row:first-child {
  border-top: 0;
}
.sc-st-when {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.sc-st-time {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--default-color);
}
.sc-st-stage {
  font-size: 11px;
  color: #9aa3af;
}
.sc-st-match {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
}
.sc-st-match .t {
  flex: 1;
  font-size: 14px;
}
.sc-st-match .t.a {
  text-align: right;
}
.sc-st-match .t.b {
  text-align: left;
}
.sc-st-match .t.win {
  font-weight: 700;
  color: var(--heading-color);
}
.sc-st-match .t.pend {
  color: #9aa3af;
  font-style: italic;
}
.sc-st-score {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  padding: 0 6px;
}
.sc-st-score b {
  font-weight: 700;
  color: var(--accent-color);
  white-space: nowrap;
}
.sc-st-vs {
  color: #9aa3af;
  padding: 0 6px;
}
.sc-st-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 999px;
  padding: 3px 10px;
  white-space: nowrap;
}
/* Προσεχώς — neutral gray (low emphasis, not started). */
.sc-st-badge.up {
  background: #eceff3;
  color: #64748b;
}
/* Σε εξέλιξη — green with a pulsing dot (happening now). */
.sc-st-badge.live {
  background: #dcfce7;
  color: #15803d;
}
.sc-st-badge.live::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  animation: sc-pulse 1.4s ease-in-out infinite;
}
/* Τελικό — brand blue (result is in). */
.sc-st-badge.done {
  background: color-mix(in srgb, var(--heading-color), transparent 82%);
  color: var(--heading-color);
}
@keyframes sc-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.65); }
}
@media (prefers-reduced-motion: reduce) {
  .sc-st-badge.live::before { animation: none; }
}
@media (max-width: 575px) {
  .sc-sched-row {
    grid-template-columns: 52px 1fr;
    row-gap: 4px;
  }
  .sc-st-badge {
    grid-column: 2;
    justify-self: start;
  }
}

/* --- Zone C: semis + final ------------------------------------------------ */
.sc-bracket-cols {
  display: flex;
  gap: 28px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}
.sc-round {
  display: flex;
  flex-direction: column;
  gap: 20px;
  justify-content: center;
  min-width: 250px;
}
.sc-round-title {
  font-family: var(--heading-font);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6b7280;
  text-align: center;
  margin: 0 0 2px;
}
.sc-match {
  background: var(--surface-color);
  border: 1px solid color-mix(in srgb, var(--heading-color), transparent 84%);
  border-radius: 12px;
  padding: 10px 14px;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.06);
}
.sc-match--final {
  border-color: color-mix(in srgb, var(--accent-color), transparent 55%);
  box-shadow: 0 4px 18px color-mix(in srgb, var(--accent-color), transparent 84%);
}
.sc-match-head {
  font-size: 12px;
  color: #9aa3af;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.sc-side {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 0;
  font-size: 15px;
}
.sc-side + .sc-side {
  border-top: 1px dashed color-mix(in srgb, var(--heading-color), transparent 86%);
}
.sc-side-name {
  color: var(--default-color);
}
.sc-side.is-winner .sc-side-name {
  color: var(--heading-color);
  font-weight: 700;
}
.sc-side .sc-score {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: #6b7280;
  min-width: 1.6em;
  text-align: right;
}
.sc-side.is-winner .sc-score {
  color: var(--accent-color);
}
.sc-placeholder .sc-side-name {
  color: #9aa3af;
  font-style: italic;
}

/* --- Skeleton / empty ----------------------------------------------------- */
.sc-skeleton,
.sc-empty {
  color: #9aa3af;
  font-size: 14px;
  text-align: center;
  padding: 18px 0;
}

/* --- Responsive ----------------------------------------------------------- */
@media (min-width: 992px) {
  .sc-bracket-cols {
    align-items: stretch;
  }
  .sc-round--final {
    justify-content: center;
  }
}
@media (max-width: 575px) {
  /* Eight standings columns on a phone: slimmer type + paddings. */
  .sc-standings-table {
    font-size: 12.5px;
  }
  .sc-standings-table th {
    padding: 4px 3px;
  }
  .sc-standings-table td {
    padding: 8px 4px;
  }
  .sc-round {
    min-width: 0;
    width: 100%;
  }
  .sc-bracket-cols {
    gap: 16px;
  }
}
