/*
 * beach-volley.css — live Beach Volley (3vs3) results page
 * (/sports-festival/beach-volley/). Linked inline from the page body. Reuses
 * the site design tokens (--heading-color, --accent-color, --surface-color,
 * --heading-font, --default-font); only adds the three result zones. Rendered
 * client-side by assets/js/beach-volley-results.js.
 */

/* --- Status bar ----------------------------------------------------------- */
.bv-status-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 16px;
  padding: 12px 18px;
  border-radius: 12px;
  background: var(--surface-color);
  box-shadow: 0 2px 14px rgba(15, 23, 42, 0.06);
}
.bv-status-title {
  margin: 0;
  font-family: var(--heading-font);
  font-size: 18px;
  font-weight: 700;
  color: var(--heading-color);
  flex: 1 1 auto;
}
.bv-updated,
.bv-error-pill {
  font-size: 13px;
  border-radius: 999px;
  padding: 4px 12px;
  white-space: nowrap;
}
.bv-updated {
  color: var(--heading-color);
  background: color-mix(in srgb, var(--heading-color), transparent 90%);
}
.bv-error-pill {
  color: #b54708;
  background: color-mix(in srgb, #db8a33, transparent 86%);
}

/* --- Shared card + section titles ----------------------------------------- */
.bv-pool-card,
.bv-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);
}
.bv-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 pools section. */
.bv-teamref {
  color: inherit;
  cursor: pointer;
  text-decoration: underline dotted color-mix(in srgb, currentColor, transparent 60%);
  text-underline-offset: 2px;
}
.bv-teamref:hover,
.bv-teamref:focus {
  color: var(--accent-color);
  text-decoration-color: var(--accent-color);
}

/* --- Zone A: pools & teams ------------------------------------------------ */
.bv-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. */
.bv-team:target {
  animation: bv-team-flash 2.2s ease;
  border-radius: 8px;
}
@keyframes bv-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) {
  .bv-team:target { animation: none; outline: 2px solid var(--accent-color); }
}
.bv-team:first-of-type {
  border-top: 0;
  padding-top: 0;
}
.bv-team-name {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 700;
  color: var(--default-color);
  display: flex;
  align-items: center;
  gap: 8px;
}
.bv-team-name::before {
  content: "";
  width: 4px;
  height: 16px;
  border-radius: 2px;
  background: var(--accent-color);
  flex: 0 0 auto;
}
.bv-roster {
  list-style: none;
  margin: 0;
  padding: 0 0 0 12px;
  display: grid;
  gap: 3px;
}
.bv-roster li {
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--default-color);
}
.bv-role {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--heading-color);
  margin-right: 4px;
}
.bv-role.is-sub {
  color: #6b7280;
}

/* --- Zone B: standings tables -------------------------------------------- */
.bv-standings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.bv-standings-table th {
  font-size: 11px;
  font-weight: 600;
  color: #6b7280;
  text-align: center;
  padding: 4px 6px;
}
.bv-standings-table th:first-child {
  text-align: left;
}
.bv-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;
}
.bv-standings-table td:first-child {
  text-align: left;
  font-weight: 500;
}
.bv-standings-table tr.is-leader td {
  background: color-mix(in srgb, var(--accent-color), transparent 90%);
  font-weight: 700;
  color: var(--heading-color);
}
.bv-standings-table tr.is-leader td:first-child {
  border-left: 3px solid var(--accent-color);
}
.bv-leader-trophy {
  margin-left: 4px;
}

/* Per-pool group match scores, under each standings table. */
.bv-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;
}
.bv-fix {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.bv-fix .t-a {
  text-align: left;
}
.bv-fix .t-b {
  text-align: right;
}
.bv-fix .t-a.win,
.bv-fix .t-b.win {
  font-weight: 700;
  color: var(--heading-color);
}
.bv-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);
}
.bv-fix .sc b {
  color: var(--accent-color);
  font-weight: 700;
  white-space: nowrap;
}
.bv-fix-detail {
  display: block;
  color: #9aa3af;
  font-weight: 400;
  font-size: 11px;
}
.bv-fix .sc.pending {
  color: #9aa3af;
  font-weight: 500;
  font-size: 12px;
}

/* --- Zone B2: match schedule / programme --------------------------------- */
.bv-sched-wrap {
  display: grid;
  gap: 16px;
}
.bv-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);
}
.bv-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%);
}
.bv-sched-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.bv-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%);
}
.bv-sched-row:first-child {
  border-top: 0;
}
.bv-st-when {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.bv-st-time {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--default-color);
}
.bv-st-stage {
  font-size: 11px;
  color: #9aa3af;
}
.bv-st-match {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
}
.bv-st-match .t {
  flex: 1;
  font-size: 14px;
}
.bv-st-match .t.a {
  text-align: right;
}
.bv-st-match .t.b {
  text-align: left;
}
.bv-st-match .t.win {
  font-weight: 700;
  color: var(--heading-color);
}
.bv-st-match .t.pend {
  color: #9aa3af;
  font-style: italic;
}
.bv-st-score {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  padding: 0 6px;
}
.bv-st-score b {
  font-weight: 700;
  color: var(--accent-color);
  white-space: nowrap;
}
.bv-st-vs {
  color: #9aa3af;
  padding: 0 6px;
}
.bv-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). */
.bv-st-badge.up {
  background: #eceff3;
  color: #64748b;
}
/* Σε εξέλιξη — green with a pulsing dot (happening now). */
.bv-st-badge.live {
  background: #dcfce7;
  color: #15803d;
}
.bv-st-badge.live::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  animation: bv-pulse 1.4s ease-in-out infinite;
}
/* Τελικό — brand blue (result is in). */
.bv-st-badge.done {
  background: color-mix(in srgb, var(--heading-color), transparent 82%);
  color: var(--heading-color);
}
@keyframes bv-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.65); }
}
@media (prefers-reduced-motion: reduce) {
  .bv-st-badge.live::before { animation: none; }
}
@media (max-width: 575px) {
  .bv-sched-row {
    grid-template-columns: 52px 1fr;
    row-gap: 4px;
  }
  .bv-st-badge {
    grid-column: 2;
    justify-self: start;
  }
}

/* --- Zone C: knockout bracket -------------------------------------------- */
.bv-bracket-cols {
  display: flex;
  gap: 28px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}
.bv-round {
  display: flex;
  flex-direction: column;
  gap: 20px;
  justify-content: center;
  min-width: 250px;
}
.bv-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;
}
.bv-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);
}
.bv-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%);
}
.bv-match-head {
  font-size: 12px;
  color: #9aa3af;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.bv-side {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 0;
  font-size: 15px;
}
.bv-side + .bv-side {
  border-top: 1px dashed color-mix(in srgb, var(--heading-color), transparent 86%);
}
.bv-side-name {
  color: var(--default-color);
}
.bv-side.is-winner .bv-side-name {
  color: var(--heading-color);
  font-weight: 700;
}
.bv-side .bv-score {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: #6b7280;
  min-width: 1.6em;
  text-align: right;
}
.bv-side.is-winner .bv-score {
  color: var(--accent-color);
}
.bv-placeholder .bv-side-name {
  color: #9aa3af;
  font-style: italic;
}
.bv-champion {
  text-align: center;
  margin: 22px 0 0;
  font-family: var(--heading-font);
  font-size: 18px;
  font-weight: 700;
  color: var(--accent-color);
}

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

/* --- Responsive ---------------------------------------------------------- */
@media (min-width: 992px) {
  /* A subtle connector between the two semis and the final. */
  .bv-bracket-cols {
    align-items: stretch;
  }
  .bv-round--final {
    justify-content: center;
  }
}
@media (max-width: 575px) {
  .bv-status-title {
    font-size: 16px;
    flex: 1 1 100%;
  }
  .bv-round {
    min-width: 0;
    width: 100%;
  }
  .bv-bracket-cols {
    gap: 16px;
  }
}
