/**
 * ASN Overtime Live Score Widget — styling
 *
 * Matches the Overtime product's OWN visual identity (padel_admin.html /
 * padel_spectator.html), not the generic asiansports.com theme:
 *   bpaBlack #111111, bpaGrey #2A2A2A, bpaGreen #B5CAAF, bpaWhite #FBFCFB
 *   Heading font: Poppins (bold, uppercase, tracking-wide)
 *   Body font: Questrial
 * Sharp corners throughout (asiansports.com page chrome uses no border-radius
 * on structural blocks), no rounded pill/card shapes.
 *
 * Score layout mirrors padel_spectator.html's own per-team card pattern
 * (team name header + SETS/GAMES/PTS block) rather than a compact table,
 * so it reads as a genuine mini Overtime scoreboard and fills the vertical
 * space next to the player naturally instead of floating as a small box.
 */

.asn-overtime-widget {
  font-family: 'Questrial', Lato, sans-serif;
}

.asn-overtime-widget.asn-ov-hidden {
  display: none !important;
}

.asn-ov-card {
  background: #111111;
  border: 1px solid #2A2A2A;
  border-top: 3px solid #B5CAAF;
  border-radius: 0;
  padding: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* Logo header lockup: ASN icon + OVERTIME wordmark, same pairing used on
   the Overtime dashboard header itself. */
.asn-ov-logo-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid #2A2A2A;
  flex: 0 0 auto;
}

.asn-ov-logo-icon {
  height: 20px;
  width: auto;
  flex-shrink: 0;
}

.asn-ov-logo-divider {
  width: 1px;
  height: 16px;
  background: rgba(251, 252, 251, 0.25);
  flex-shrink: 0;
}

.asn-ov-logo-word {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #FBFCFB;
}

/* Score/Stats tab toggle: same footprint, swaps content only. Mirrors the
   plain-text, sharp-edged link style already used elsewhere on the
   Overtime dashboard (e.g. the "View Archive" button pattern) rather than
   introducing a new rounded-pill UI element. */
.asn-ov-tabs {
  display: flex;
  border-bottom: 1px solid #2A2A2A;
  flex: 0 0 auto;
}

.asn-ov-tab {
  flex: 1 1 50%;
  background: transparent;
  border: none;
  border-right: 1px solid #2A2A2A;
  padding: 9px 8px;
  font-family: 'Poppins', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(251, 252, 251, 0.45);
  cursor: pointer;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.asn-ov-tab:last-child {
  border-right: none;
}

.asn-ov-tab:hover {
  color: rgba(251, 252, 251, 0.75);
}

.asn-ov-tab--active {
  color: #111111;
  background: #B5CAAF;
}

.asn-ov-tab--active:hover {
  color: #111111;
}

.asn-ov-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
}

.asn-ov-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.asn-ov-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.asn-ov-dot--live {
  background: #B5CAAF;
  box-shadow: 0 0 0 0 rgba(181, 202, 175, 0.6);
  animation: asn-ov-pulse 1.6s infinite;
}

.asn-ov-dot--off {
  background: #6b6b6b;
}

@keyframes asn-ov-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(181, 202, 175, 0.55); }
  70%  { box-shadow: 0 0 0 6px rgba(181, 202, 175, 0); }
  100% { box-shadow: 0 0 0 0 rgba(181, 202, 175, 0); }
}

.asn-ov-label {
  font-family: 'Poppins', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #B5CAAF;
  text-transform: uppercase;
}

.asn-ov-event {
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #FBFCFB;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: 2px;
  line-height: 1.3;
}

.asn-ov-round {
  font-size: 11px;
  color: rgba(251, 252, 251, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 18px;
}

/* Per-team scoreboard card, mirrors padel_spectator.html's team block */
.asn-ov-teams {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1 1 auto;
}

.asn-ov-team-card {
  border: 1px solid #2A2A2A;
  padding: 14px;
}

.asn-ov-team-name {
  font-family: 'Poppins', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #FBFCFB;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.3;
  margin-bottom: 12px;
  word-break: break-word;
}

.asn-ov-stat-row {
  display: flex;
  align-items: flex-end;
  gap: 18px;
}

.asn-ov-stat {
  text-align: left;
}

.asn-ov-stat-value {
  font-family: 'Poppins', sans-serif;
  font-size: 30px;
  font-weight: 700;
  color: #FBFCFB;
  line-height: 1;
}

.asn-ov-stat-value--dim {
  color: rgba(251, 252, 251, 0.35);
}

.asn-ov-stat-label {
  font-family: 'Poppins', sans-serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(251, 252, 251, 0.4);
  text-transform: uppercase;
  margin-top: 4px;
}

/* Stats comparison panel (Stats tab) -- same footprint as the score view,
   compact two-column comparison rows instead of team cards. */
.asn-ov-stats-panel {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

.asn-ov-stats-teams-head {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  padding-bottom: 10px;
  margin-bottom: 8px;
  border-bottom: 1px solid #2A2A2A;
}

.asn-ov-stats-team-abbr {
  font-family: 'Poppins', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #B5CAAF;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asn-ov-stats-team-abbr:last-child {
  text-align: right;
}

.asn-ov-stats-vs {
  font-family: 'Poppins', sans-serif;
  font-size: 9px;
  font-weight: 700;
  color: rgba(251, 252, 251, 0.3);
  letter-spacing: 0.08em;
}

.asn-ov-stat-compare-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-top: 1px solid #2A2A2A;
}

.asn-ov-stat-compare-row:first-of-type {
  border-top: none;
}

.asn-ov-stat-compare-value {
  font-family: 'Poppins', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #FBFCFB;
  text-align: center;
}

.asn-ov-stat-compare-row .asn-ov-stat-compare-value:first-child {
  text-align: left;
}

.asn-ov-stat-compare-row .asn-ov-stat-compare-value:last-child {
  text-align: right;
}

.asn-ov-stat-compare-label {
  font-family: 'Poppins', sans-serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: rgba(251, 252, 251, 0.4);
  text-transform: uppercase;
  text-align: center;
  white-space: nowrap;
}

/* Desktop: sit beside the player, stretch to match its full height so it
   reads as one broadcast-graphics unit instead of a small box floating
   next to a much taller player.
   The player-wrapper's internal videojs elements are position:absolute
   (aspect-ratio padding-box trick), so it has ~0 intrinsic content width
   -- as a flex child it MUST get an explicit flex-basis/min-width or it
   collapses to 0 instead of filling available space. */
@media (min-width: 992px) {
  .asn-ov-player-wrap {
    display: flex;
    align-items: stretch;
    gap: 0;
  }

  .asn-ov-player-wrap > .player-wrapper {
    flex: 1 1 0%;
    min-width: 0;
  }

  .asn-overtime-widget {
    flex: 0 0 320px;
    max-width: 320px;
  }
}

/* Mobile / tablet: stack below the player, full width */
@media (max-width: 991.98px) {
  .asn-overtime-widget {
    margin-top: 0;
  }
}
