/* Where to watch — Sureno section. Scoped to .watch. */

.watch {
  height: 100%;
  overflow: auto;
  color: var(--text, #0f172a);
  background: transparent;
  font-family: var(--font-sans, "IBM Plex Sans", "Segoe UI", sans-serif);
  font-size: 15px;
  line-height: 1.45;
  scrollbar-width: thin;
  scrollbar-color: var(--text-muted, #94a3b8) transparent;
}

.watch *,
.watch *::before,
.watch *::after {
  box-sizing: border-box;
}

.watch button,
.watch a {
  font: inherit;
  color: inherit;
}

.watch-section {
  max-width: 1120px;
  margin: 0 auto;
  padding: 22px 22px 48px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.watch-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.watch-title {
  margin: 0;
  font-family: var(--font-display, "Sora", "IBM Plex Sans", sans-serif);
  font-size: 1.7rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.watch-lead {
  margin: 6px 0 0;
  max-width: 42rem;
  color: var(--text-secondary, #475569);
  font-size: 0.95rem;
}

.watch-updated {
  margin: 0;
  color: var(--text-muted, #64748b);
  font-size: 0.85rem;
}

.watch-refresh {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--border-strong, rgba(15, 23, 42, 0.14));
  border-radius: var(--radius-md, 12px);
  background: var(--bg-surface, #fff);
  color: var(--accent-text, #1e40af);
  font-weight: 600;
  cursor: pointer;
}

.watch-refresh:hover {
  background: var(--bg-hover, rgba(15, 23, 42, 0.04));
}

.watch-refresh:disabled {
  opacity: 0.55;
  cursor: default;
}

.watch-refresh-icon {
  width: 16px;
  height: 16px;
  display: block;
}

.watch-leagues,
.watch-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.watch-toolbar {
  justify-content: space-between;
}

.watch-chip,
.watch-mine,
.watch-segment-btn,
.watch-close {
  cursor: pointer;
}

.watch-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 4px 12px 4px 6px;
  border: 1px solid var(--border, rgba(15, 23, 42, 0.1));
  border-radius: var(--radius-full, 999px);
  background: var(--bg-surface, #fff);
  color: var(--text, #0f172a);
  font-weight: 600;
}

.watch-chip[aria-pressed="true"] {
  background: var(--accent-soft, rgba(37, 99, 235, 0.1));
  border-color: color-mix(in srgb, var(--accent, #2563eb) 42%, var(--border, transparent));
  color: var(--accent-text, #1e40af);
}

.watch-mark {
  width: 28px;
  height: 28px;
  display: block;
  flex: none;
}

.watch-mark-nfl { color: #0f3d2e; }
.watch-mark-nba { color: #1d428a; }
.watch-mark-mlb { color: #0c2340; }
.watch-mark-epl { color: #3d195b; }
.watch-mark-nhl { color: #111827; }

.watch-segment {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border-radius: 12px;
  background: var(--bg-surface-3, #f1f3f5);
}

.watch-segment-btn,
.watch-mine,
.watch-close {
  min-height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text-secondary, #475569);
  font-weight: 600;
}

.watch-segment-btn[aria-pressed="true"] {
  background: var(--bg-surface, #fff);
  color: var(--text, #0f172a);
  box-shadow: var(--shadow-sm, 0 1px 2px rgba(15, 23, 42, 0.06));
}

.watch-mine {
  border: 1px solid var(--border, rgba(15, 23, 42, 0.1));
  background: var(--bg-surface, #fff);
}

.watch-mine[aria-pressed="true"] {
  background: var(--warning-soft, rgba(217, 119, 6, 0.12));
  border-color: color-mix(in srgb, var(--warning, #d97706) 45%, transparent);
  color: #9a3412;
}

.watch-errors {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.watch-errors[hidden] {
  display: none;
}

.watch-errors li {
  margin: 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--danger-soft, rgba(220, 38, 38, 0.1));
  color: var(--danger, #b91c1c);
  font-size: 0.92rem;
}

.watch-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.watch-layout.has-detail {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
}

.watch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
  min-width: 0;
}

.watch-grid.is-refreshing {
  opacity: 0.72;
}

.watch-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  grid-template-rows: auto auto auto auto;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border, rgba(15, 23, 42, 0.08));
  border-radius: 16px;
  background: var(--bg-surface, #fff);
  box-shadow: var(--shadow-sm, 0 1px 2px rgba(15, 23, 42, 0.05));
  min-width: 0;
}

.watch-photo,
.watch-detail-photo {
  display: block;
  overflow: hidden;
  background: var(--accent, #2f7a74);
}

.watch-photo.is-solid,
.watch-detail-photo.is-solid { background: var(--accent, #2f7a74); }

.watch-open > .watch-photo {
  grid-column: 1 / -1;
  grid-row: 1;
  height: 156px;
}

.watch-photo-img,
.watch-detail-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.watch-detail-photo {
  height: 180px;
  border-radius: 12px;
}

.watch-card.is-live {
  box-shadow: inset 3px 0 0 #9f1239, var(--shadow-sm, 0 1px 2px rgba(15, 23, 42, 0.05));
}

.watch-card.is-selected {
  border-color: var(--accent, #2563eb);
  box-shadow: 0 0 0 1px var(--accent, #2563eb);
}

.watch-card.is-live.is-selected {
  box-shadow: inset 3px 0 0 #9f1239, 0 0 0 1px var(--accent, #2563eb);
}

.watch-open {
  grid-column: 1 / -1;
  grid-row: 1 / -1;
  display: grid;
  grid-template-columns: subgrid;
  grid-template-rows: subgrid;
  align-items: center;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  z-index: 1;
}

.watch-open:hover {
  background: var(--bg-hover, rgba(15, 23, 42, 0.04));
}

.watch-open > .watch-kicker {
  grid-column: 1;
  grid-row: 1;
}

.watch-open > .watch-side.is-away {
  grid-column: 1;
  grid-row: 2;
}

.watch-open > .watch-side.is-home {
  grid-column: 1;
  grid-row: 3;
}

.watch-open > .watch-foot {
  grid-column: 1;
  grid-row: 4;
}

.watch-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 12px 12px 4px 14px;
}

.watch-league-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary, #475569);
}

.watch-pill {
  margin-left: auto;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.watch-pill.is-live {
  color: #9f1239;
  background: rgba(159, 18, 57, 0.1);
}

.watch-pill.is-upcoming {
  color: var(--accent-text, #1e40af);
  background: var(--accent-soft, rgba(37, 99, 235, 0.1));
}

.watch-pill.is-final {
  color: var(--text-secondary, #475569);
  background: var(--bg-surface-3, #f1f3f5);
}

.watch-side,
.watch-detail-team {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 6px 8px 6px 14px;
}

.watch-logo-frame {
  width: 48px;
  height: 48px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.watch-logo-frame.is-large {
  width: 72px;
  height: 72px;
  border-radius: 16px;
}

.watch-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  display: block;
}

.watch-logo-frame.is-large .watch-logo {
  width: 60px;
  height: 60px;
}

.watch-logo-fallback {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #334155;
}

.watch-team-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.watch-team-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

.watch-team-meta {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-muted, #64748b);
  font-size: 0.78rem;
}

.watch-score {
  margin-left: auto;
  min-width: 1.6ch;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 1.25rem;
  text-align: right;
}

.watch-score.is-large {
  font-size: 1.6rem;
}

.watch-score.is-winner {
  color: var(--success, #047857);
}

.watch-score[hidden] {
  display: none;
}

.watch-foot {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px 14px 14px;
  min-width: 0;
}

.watch-footnote {
  color: var(--text-secondary, #475569);
  font-size: 0.88rem;
}

.watch-where {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: baseline;
}

.watch-where-label,
.watch-kicker-label {
  color: var(--text-muted, #64748b);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.watch-where-value {
  font-weight: 600;
}

.watch-where-value.is-missing,
.watch-missing {
  color: var(--text-secondary, #475569);
  font-weight: 500;
}

.watch-card > .watch-star {
  z-index: 2;
  align-self: center;
  justify-self: center;
}

.watch-card > .watch-star.is-away {
  grid-column: 2;
  grid-row: 2;
}

.watch-card > .watch-star.is-home {
  grid-column: 2;
  grid-row: 3;
}

.watch-star {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text-muted, #94a3b8);
  cursor: pointer;
}

.watch-star:hover,
.watch-star:focus-visible {
  background: var(--bg-hover, rgba(15, 23, 42, 0.05));
  color: #b45309;
}

.watch-star[aria-pressed="true"] {
  color: #b45309;
}

.watch-star-icon {
  width: 18px;
  height: 18px;
  display: block;
}

.watch-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 28px 18px;
  border: 1px dashed var(--border-strong, rgba(15, 23, 42, 0.16));
  border-radius: 16px;
  background: var(--bg-surface, #fff);
  color: var(--text-secondary, #475569);
  text-align: center;
}

.watch-skeleton {
  min-height: 148px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.watch-skeleton-bar {
  display: block;
  height: 14px;
  border-radius: 7px;
  background: var(--bg-surface-3, #e8eaed);
}

.watch-skeleton-bar:nth-child(1) { width: 42%; }
.watch-skeleton-bar:nth-child(2) { height: 40px; width: 86%; }
.watch-skeleton-bar:nth-child(3) { width: 58%; }

.watch-detail {
  position: sticky;
  top: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--border, rgba(15, 23, 42, 0.08));
  border-radius: 16px;
  background: var(--bg-elevated, #fff);
  box-shadow: var(--shadow-md, 0 8px 24px rgba(15, 23, 42, 0.08));
}

.watch-detail[hidden] {
  display: none;
}

.watch-detail-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.watch-detail-top .watch-kicker {
  padding: 0;
  flex: 1;
}

.watch-close {
  flex: none;
  border: 1px solid var(--border, rgba(15, 23, 42, 0.1));
  background: var(--bg-surface, #fff);
  color: var(--text, #0f172a);
}

.watch-detail-title {
  margin: 0;
  font-family: var(--font-display, "Sora", "IBM Plex Sans", sans-serif);
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.watch-detail-when {
  margin: -4px 0 0;
  color: var(--text-secondary, #475569);
}

.watch-detail-teams {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.watch-detail-team {
  padding: 8px;
  border-radius: 12px;
  background: var(--bg-surface-2, #f8f9fb);
}

.watch-venue,
.watch-missing {
  margin: 0;
}

.watch-venue {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.watch-broadcasts h4,
.watch-radio h4 {
  margin: 0 0 8px;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted, #64748b);
}

.watch-net-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.watch-net {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.watch-net-name,
.watch-net-link {
  font-weight: 600;
}

.watch-net-link {
  color: var(--accent, #2563eb);
  text-decoration: underline;
  text-underline-offset: 2px;
  width: fit-content;
}

.watch-net-meta {
  color: var(--text-muted, #64748b);
  font-size: 0.8rem;
}

.watch-radio {
  margin-top: 14px;
}

.watch-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.watch button:focus-visible,
.watch a:focus-visible {
  outline: 2px solid var(--accent, #2563eb);
  outline-offset: 2px;
}

.watch-open:focus-visible {
  outline-offset: -3px;
}

[data-theme="dark"] .watch-pill.is-live {
  color: #fda4af;
  background: rgba(253, 164, 175, 0.14);
}

[data-theme="dark"] .watch-card.is-live {
  box-shadow: inset 3px 0 0 #fb7185, var(--shadow-sm, 0 1px 2px rgba(0, 0, 0, 0.3));
}

[data-theme="dark"] .watch-card.is-live.is-selected {
  box-shadow: inset 3px 0 0 #fb7185, 0 0 0 1px var(--accent, #3b82f6);
}

[data-theme="dark"] .watch-mine[aria-pressed="true"],
[data-theme="dark"] .watch-star[aria-pressed="true"],
[data-theme="dark"] .watch-star:hover {
  color: #fbbf24;
}

[data-theme="dark"] .watch-logo-fallback {
  color: #334155;
}

@media (max-width: 860px) {
  .watch-layout.has-detail {
    grid-template-columns: 1fr;
  }

  .watch-detail {
    position: static;
    order: -1;
  }

  .watch-section {
    padding: 16px 14px 36px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .watch *,
  .watch *::before,
  .watch *::after {
    animation: none !important;
    transition: none !important;
  }
}

@media (prefers-contrast: more) {
  .watch-card,
  .watch-chip,
  .watch-detail,
  .watch-empty {
    border-color: currentColor;
  }
}
