/* ==========================================================================
   Product page — Block 06: what it shows, per sport.
   Sport tabs + one big LED screen that cycles 4 screens (live, big moment,
   standings, next game) + a list of those screens (click to jump).
   Data + rendering in pdp-sports.js.
   ========================================================================== */

.psports {
  padding: 96px var(--gutter);
  background: var(--c-ink);
  color: #fff;
}

.psports__inner { max-width: 1160px; margin: 0 auto; }

.psports__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px 32px;
  margin-bottom: 36px;
}

.psports__head .eyebrow { color: var(--c-accent); }
.psports__head .display { font-size: clamp(44px, 5.5vw, 80px); }
.psports__head .display em { font-style: normal; color: var(--c-accent); }

/* sport tabs (same look as the homepage league tabs, dark) */
.psports__tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.psports__tab {
  height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.6);
  font: 700 13px/1 var(--font-body);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: background-color 0.2s, color 0.2s;
}

.psports__tab:hover { color: #fff; }
.psports__tab[aria-selected="true"] { background: var(--c-accent); color: var(--c-accent-ink); }

/* ---------- layout ---------- */

.psports__body {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 24px;
  align-items: stretch;
}

/* ---------- the big LED screen ---------- */

.psports__device {
  display: grid;
  place-items: center;
}

.psports__panel {
  width: 100%;
  aspect-ratio: 2 / 1;
  padding: 2.4%;
  border-radius: 12px;
  background: #0e0e0e;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12), 0 24px 50px rgba(0, 0, 0, 0.55);
}

.lscreen {
  --u: 1cqw;                        /* text sizes scale with the screen width */
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  padding: 4.5% 5%;
  overflow: hidden;
  border-radius: 4px;
  container-type: inline-size;
  background: radial-gradient(circle, #1f1f1f 0 1.1px, transparent 1.5px) 0 0 / 4px 4px, #000;
  color: #fff;
  font-family: "Silkscreen", var(--font-mono);
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

/* dot-matrix mask */
.lscreen::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, transparent 0 1.3px, #000 1.8px) 0 0 / 4px 4px;
  pointer-events: none;
}

.lscreen__row { display: flex; align-items: center; justify-content: space-between; gap: 4%; }
.lscreen__row--mid { justify-content: center; gap: 4%; }
.lscreen__sm { font-size: calc(var(--u) * 5); color: #c8c8c8; }
.lscreen__md { font-size: calc(var(--u) * 7); }
.lscreen__lg { font-size: calc(var(--u) * 7.5); text-shadow: 0 0 calc(var(--u) * 2) rgba(255, 255, 255, 0.45); }
.lscreen__team { color: var(--team); text-shadow: 0 0 calc(var(--u) * 2) var(--team); }
.lscreen__volt { color: var(--c-accent); }

/* big moment: flashing word */
.lscreen__alert {
  font-size: var(--alert, calc(var(--u) * 14));
  color: var(--team, var(--c-accent));
  text-shadow: 0 0 calc(var(--u) * 3) var(--team, var(--c-accent));
  animation: lscreen-flash 0.6s steps(2) 3;
}

@keyframes lscreen-flash { 50% { opacity: 0.15; } }

/* standings rows */
.lscreen__table { display: grid; gap: 7%; }
.lscreen__table .lscreen__row { justify-content: flex-start; gap: 6%; }
.lscreen__table .lscreen__row span:last-child { margin-left: auto; }
.lscreen__table .is-you { color: var(--c-accent); }

/* screen change: quick fade like the panel refreshing */
.lscreen__content { display: contents; }
.lscreen.is-changing > * { opacity: 0; }
.lscreen > * { transition: opacity 0.18s; }

/* ---------- list of screens ---------- */

.psports__list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.psports__item {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 14px;
  width: 100%;
  padding: 18px 20px;
  overflow: hidden;
  border-radius: 16px;
  background: #161616;
  text-align: left;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  transition: background-color 0.2s, box-shadow 0.2s;
}

.psports__item:hover { background: #1c1c1c; }

.psports__num {
  grid-row: 1 / 3;
  font-family: var(--font-display);
  font-size: 28px;
  line-height: 1;
  color: rgba(255, 255, 255, 0.3);
  transition: color 0.2s;
}

.psports__item h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 400;
  line-height: 1.1;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.2s;
}

.psports__item p { margin: 0; font-size: 13px; line-height: 1.45; color: rgba(255, 255, 255, 0.5); }

.psports__item[aria-current="true"] { box-shadow: inset 0 0 0 2px var(--c-accent); }
.psports__item[aria-current="true"] .psports__num { color: var(--c-accent); }
.psports__item[aria-current="true"] h3 { color: #fff; }

/* timer bar along the bottom of the current item */
.psports__item::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: 100%;
  background: var(--c-accent);
  transform: scaleX(0);
  transform-origin: left;
}

.psports.is-running .psports__item[aria-current="true"]::after {
  animation: psports-timer var(--dwell, 3.5s) linear forwards;
}

@keyframes psports-timer { to { transform: scaleX(1); } }

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .psports { padding: 64px var(--gutter); }
  .psports__body { grid-template-columns: 1fr; }
  .psports__list { grid-template-columns: 1fr 1fr; }
  .psports__item { padding: 14px; grid-template-columns: 1fr; }
  .psports__num { grid-row: auto; font-size: 22px; }
  .psports__item h3 { font-size: 16px; }
  .psports__item p { display: none; }
  /* finer LED dots + slightly bigger small text, so it stays readable when small */
  .lscreen { background: radial-gradient(circle, #1f1f1f 0 0.8px, transparent 1.1px) 0 0 / 2.5px 2.5px, #000; }
  .lscreen::after { background: radial-gradient(circle, transparent 0 0.9px, #000 1.25px) 0 0 / 2.5px 2.5px; }
  .lscreen__sm { font-size: calc(var(--u) * 6); }
  .psports__tabs { width: 100%; justify-content: space-between; }
  .psports__tab { flex: 1; padding: 0 8px; font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  .lscreen__alert { animation: none; }
  .psports.is-running .psports__item[aria-current="true"]::after { animation: none; }
}
