/* livetennis.io live widgets — co-styled with site.css tokens */

.lt-w {
  font-family: var(--sans, system-ui, sans-serif);
  color: var(--text, #0A1626);
  background: var(--bg-card, #fff);
  border: 1px solid var(--line-soft, rgba(11,42,74,0.10));
  border-radius: var(--radius, 14px);
  box-shadow: var(--shadow-1, 0 1px 2px rgba(14,15,12,0.04));
  padding: 16px 18px;
  margin: 12px 0;
}
.lt-w--err {
  color: var(--text-mute, #6B7C95);
  font-size: 13px;
  text-align: center;
  padding: 14px;
}

.lt-w__head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line-faint, rgba(11,42,74,0.05));
}
.lt-w__title {
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.01em;
}
.lt-w__meta {
  margin-left: auto;
  font-size: 11px;
  color: var(--text-mute, #6B7C95);
  font-variant-numeric: tabular-nums;
}

.lt-w__pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.lt-w__pill--live {
  background: var(--live, #E63946);
  color: #fff;
}
.lt-w__pill--live::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  margin-right: 2px;
  animation: lt-pulse 1.4s ease-in-out infinite;
}
@keyframes lt-pulse { 0%,100% { opacity: 1 } 50% { opacity: 0.4 } }

.lt-w__list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.lt-w__row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 2fr) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-faint, rgba(11,42,74,0.05));
  font-size: 13px;
}
.lt-w__row:last-child { border-bottom: 0; }

@media (max-width: 640px) {
  .lt-w__row { grid-template-columns: 1fr; gap: 4px; }
}

.lt-w__tour {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.lt-w__chip {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  width: max-content;
}
.lt-w__chip--atp { background: var(--hard, #1E5BB8); color: #fff; }
.lt-w__chip--wta { background: var(--clay, #B84A2C); color: #fff; }
.lt-w__chip--challenger { background: #4f6075; color: #fff; }
.lt-w__chip--itf { background: #6b7c95; color: #fff; }
.lt-w__chip--qual { background: #8a96aa; color: #fff; }
.lt-w__chip--other { background: #b5bec9; color: #1a2538; }
.lt-w__where {
  font-size: 11px;
  color: var(--text-mute, #6B7C95);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lt-w__match {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}
.lt-w__player {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 14ch;
}
.lt-w__player.is-serving::before {
  content: "•";
  color: var(--ball-deep, #C9DC2A);
  margin-right: 3px;
  font-size: 14px;
}
.lt-w__vs { color: var(--text-faint, #9DABBF); font-size: 11px; }

.lt-w__score {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  font-variant-numeric: tabular-nums;
}
.lt-w__sets { font-weight: 700; }
.lt-w__status { font-size: 10px; color: var(--text-mute, #6B7C95); text-transform: uppercase; letter-spacing: 0.05em; }

.lt-w__badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
}
.lt-w__badge--upcoming { background: var(--bg-elev, #F2F4F7); color: var(--text-dim, #3D506B); }
.lt-w__badge--live     { background: var(--live, #E63946); color: #fff; }
.lt-w__badge--final    { background: var(--ink, #0A1626); color: var(--ball, #E8F94E); }

/* rankings */
.lt-w__list--rank { counter-reset: r; }
.lt-w__row--rank {
  grid-template-columns: 50px minmax(0,2fr) minmax(0,1.2fr) minmax(0,1fr) 32px;
}
.lt-w__rank { font-weight: 800; font-variant-numeric: tabular-nums; }
.lt-w__country { font-size: 12px; color: var(--text-dim, #3D506B); }
.lt-w__pts { font-variant-numeric: tabular-nums; font-size: 12px; color: var(--text-dim, #3D506B); text-align: right; }
.lt-w__arrow { text-align: center; font-size: 12px; }
.lt-w__arrow--up   { color: var(--grass, #4F8A38); }
.lt-w__arrow--down { color: var(--live, #E63946); }
.lt-w__arrow--flat { color: var(--text-faint, #9DABBF); }

.lt-w__empty {
  padding: 18px;
  text-align: center;
  color: var(--text-mute, #6B7C95);
  font-size: 13px;
}

/* ──────────────────────────────────────────────
   v5 · Live-now table widget (paper-toned, aligned)
   ────────────────────────────────────────────── */
.lt-w-live {
  background: var(--paper, #FAF6EE);
  border: 1px solid var(--line, rgba(15,27,45,0.10));
  border-left: 4px solid var(--live, #E63946);
  border-radius: 14px;
  padding: 14px 16px 6px;
  box-shadow: 0 1px 3px rgba(15,27,45,0.05);
}
.lt-w-live .lt-w__head {
  margin-bottom: 4px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line-soft, rgba(15,27,45,0.08));
}
.lt-w-live .lt-w__title {
  font-size: 13.5px; font-weight: 700;
  color: var(--ink, #0F1B2D);
  letter-spacing: -0.01em;
}
.lt-w-live .lt-w__meta {
  font-size: 11px;
  color: var(--text-mute, #6B7C95);
  font-weight: 500;
}

table.lt-w__lt-table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
  margin: 0;
}
table.lt-w__lt-table tr.lt-w__match-head td {
  padding: 12px 0 6px;
  border-bottom: 0;
}
table.lt-w__lt-table tr.lt-w__match-head .lt-w__head-cell {
  display: flex; align-items: center; gap: 10px;
  flex-wrap: wrap;
  font-size: 11px; font-weight: 600;
  color: var(--text-mute, #6B7C95);
  letter-spacing: 0.01em;
}
table.lt-w__lt-table .lt-w__chip {
  display: inline-flex; align-items: center;
  height: 18px; padding: 0 7px;
  border-radius: 4px;
  font-size: 10px; font-weight: 800;
  letter-spacing: 0.08em;
}
table.lt-w__lt-table .lt-w__chip--atp { background: var(--ink, #0F1B2D); color: var(--ball, #EBE150); }
table.lt-w__lt-table .lt-w__chip--wta { background: var(--clay, #C26B3A); color: #fff; }
table.lt-w__lt-table .lt-w__where {
  font-size: 11.5px; font-weight: 500;
  color: var(--text-mute, #6B7C95);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 100%; min-width: 0; flex: 1 1 auto;
}
table.lt-w__lt-table .lt-w__match-head .lt-w__status {
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.10em; text-transform: uppercase;
  padding: 2px 8px; border-radius: 4px;
  background: rgba(230,57,70,0.10);
  color: var(--live, #E63946);
  border: 1px solid rgba(230,57,70,0.30);
  white-space: nowrap;
}

table.lt-w__lt-table tr.lt-w__player-row td {
  padding: 7px 0;
  border-top: 1px solid var(--line-soft, rgba(15,27,45,0.06));
}
table.lt-w__lt-table tr.lt-w__player-row:first-of-type td { border-top: 0; }
table.lt-w__lt-table tr.lt-w__match-head + tr.lt-w__player-row td { border-top: 0; }

table.lt-w__lt-table .lt-w__name-cell {
  display: flex; align-items: center; gap: 8px;
  width: 100%; min-width: 0;
}
table.lt-w__lt-table tr.lt-w__player-row .lt-w__name-cell {
  padding-right: 12px;
}
table.lt-w__lt-table .lt-w__serve-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: transparent; flex-shrink: 0;
  display: inline-block;
}
table.lt-w__lt-table tr.is-serving .lt-w__serve-dot {
  background: var(--ball-deep, #C9DC2A);
  box-shadow: 0 0 0 2px rgba(201,220,42,0.18);
}
table.lt-w__lt-table .lt-w__name {
  font-size: 14px; font-weight: 600;
  color: var(--ink, #0F1B2D);
  letter-spacing: -0.01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 100%;
}
table.lt-w__lt-table tr.is-serving .lt-w__name {
  font-weight: 700;
}

table.lt-w__lt-table td.lt-w__set {
  width: 36px;
  padding: 7px 4px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text-dim, #3D506B);
}
table.lt-w__lt-table td.lt-w__set.is-won {
  color: var(--ink, #0F1B2D);
  font-weight: 800;
}
table.lt-w__lt-table td.lt-w__set--empty {
  color: var(--text-faint, rgba(15,27,45,0.25));
}

[data-theme="dark"] .lt-w-live {
  background: rgba(255,255,255,0.03);
  border-color: rgba(255,255,255,0.08);
}
[data-theme="dark"] .lt-w-live .lt-w__title { color: #FFFFFF; }
[data-theme="dark"] .lt-w-live .lt-w__meta { color: rgba(255,255,255,0.65); }
[data-theme="dark"] table.lt-w__lt-table .lt-w__name { color: #FFFFFF; }
[data-theme="dark"] table.lt-w__lt-table tr.lt-w__player-row td { border-color: rgba(255,255,255,0.06); color: #FFFFFF; }
[data-theme="dark"] table.lt-w__lt-table td.lt-w__set.is-won { color: #FFFFFF; }
[data-theme="dark"] table.lt-w__lt-table td.lt-w__set { color: rgba(255,255,255,0.55); }
[data-theme="dark"] table.lt-w__lt-table td.lt-w__set--empty { color: rgba(255,255,255,0.22); }
[data-theme="dark"] table.lt-w__lt-table .lt-w__chip--atp { background: #FFFFFF; color: #0F1842; }
[data-theme="dark"] table.lt-w__lt-table .lt-w__match-head .lt-w__head-cell { color: rgba(255,255,255,0.65); }
[data-theme="dark"] table.lt-w__lt-table .lt-w__match-head .lt-w__where { color: rgba(255,255,255,0.85); }

@media (max-width: 720px) {
  table.lt-w__lt-table .lt-w__name { font-size: 13px; }
  table.lt-w__lt-table td.lt-w__set { width: 28px; font-size: 13px; }
  table.lt-w__lt-table .lt-w__match-head .lt-w__where { font-size: 11px; }
}

/* ───── Live widget: per-match "Watch live" CTA row ───── */
table.lt-w__lt-table tr.lt-w__cta-row td.lt-w__cta-cell {
  padding: 8px 12px 16px;
  border-bottom: 1px solid rgba(15,27,45,0.10);
}
table.lt-w__lt-table tr.lt-w__cta-row + tr.lt-w__match-head td {
  padding-top: 14px;
}
.lt-w__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 999px;
  background: var(--accent, #1FD082);
  color: #0F1B2D;
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
  line-height: 1;
  box-shadow: 0 1px 0 rgba(15,27,45,0.06);
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
}
.lt-w__cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(31,208,130,0.30);
  filter: brightness(1.05);
}
.lt-w__cta:focus-visible {
  outline: 2px solid #0F1B2D;
  outline-offset: 2px;
}
.lt-w__cta-icon {
  display: inline-block;
  font-size: 11px;
  line-height: 1;
  transform: translateY(0.5px);
}
.lt-w__cta-text { font-weight: 800; }
.lt-w__cta-sub  { font-weight: 500; opacity: 0.78; font-size: 12px; }
.lt-w__cta-arr  { font-weight: 700; margin-left: 2px; }

[data-theme="dark"] table.lt-w__lt-table tr.lt-w__cta-row td.lt-w__cta-cell {
  border-bottom-color: rgba(255,255,255,0.08);
}
[data-theme="dark"] .lt-w__cta {
  background: #1FD082;
  color: #0F1B2D;
}

/* /live/ page — empty state when no matches in play */
.live-empty {
  padding: 32px 20px;
  text-align: center;
  background: rgba(15,27,45,0.02);
  border-radius: 12px;
}
.live-empty__title { font-size: 16px; font-weight: 700; margin: 0 0 4px; }
.live-empty__sub   { font-size: 14px; opacity: 0.65; margin: 0; }
[data-theme="dark"] .live-empty { background: rgba(255,255,255,0.03); }

@media (max-width: 720px) {
  .lt-w__cta { padding: 8px 12px; font-size: 12px; }
  .lt-w__cta-sub { display: none; }   /* tighten on mobile */
  table.lt-w__lt-table tr.lt-w__cta-row td.lt-w__cta-cell { padding: 8px 10px 14px; }
}

/* ============================================================
   COMPACT MATCH CARDS (live-now overhaul, 2026-05)
   Replaces lt-w__match-head / lt-w__player-row / lt-w__cta-row
   ============================================================ */
.lt-matches { display:flex; flex-direction:column; gap:12px; }

.lt-match {
  background: var(--surface, #fff);
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(15,27,45,.06), 0 4px 14px rgba(15,27,45,.04);
  overflow: hidden;
}

.lt-match__head {
  display:flex; align-items:center; gap:10px;
  padding: 10px 14px;
  font-size: 12px;
}
.lt-match__where {
  flex:1; min-width:0;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
  opacity:.75;
}
.lt-match__status {
  text-transform:uppercase; letter-spacing:.04em;
  font-weight:700; opacity:.6; font-size:11px;
}

.lt-watch {
  display:inline-flex; align-items:center; gap:6px;
  height:30px; padding: 0 12px;
  background: var(--ink, #0F1B2D);
  color: #fff;
  border-radius: 999px;
  font-size: 12px; font-weight: 700;
  text-decoration:none;
  transition: transform .12s, box-shadow .12s;
}
.lt-watch:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15,27,45,.18);
}
.lt-watch__icon {
  font-size: 9px;
  line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: rgba(255,255,255,.18);
  color: inherit;
  flex-shrink: 0;
}
[data-theme="dark"] .lt-watch__icon { background: rgba(15,24,66,.10); }

.lt-match__row {
  display:grid;
  grid-template-columns: 16px minmax(0,1fr) repeat(var(--sets,2), 32px);
  align-items:center;
  gap: 8px;
  padding: 9px 14px;
  border-top: 1px solid rgba(15,27,45,.06);
  font-size: 14px;
}
.lt-match__row.is-serving .lt-pname { font-weight: 700; }
.lt-serve { width:8px; height:8px; border-radius:50%; background:transparent; }
.lt-serve.is-on { background: #F4C20D; }
.lt-pname { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.lt-mset {
  text-align:center;
  font-variant-numeric: tabular-nums;
  opacity:.55; font-weight:600;
}
.lt-mset.is-won { opacity:1; color: var(--ink, #0F1B2D); font-weight:800; }
.lt-mset--empty { opacity:.2; }

.lt-chip {
  font-size: 10px; font-weight:800; letter-spacing:.04em;
  padding: 3px 8px; border-radius:6px;
  text-transform:uppercase;
}
.lt-chip--atp { background: #0F1B2D; color:#fff; }
.lt-chip--wta { background: #E91E63; color:#fff; }
.lt-chip--challenger { background: rgba(15,27,45,.08); color: #0F1B2D; }
.lt-chip--itf { background: rgba(15,27,45,.05); color: #0F1B2D; opacity:.85; }

[data-theme="dark"] .lt-match { background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.07); box-shadow: 0 1px 0 rgba(0,0,0,.3), 0 6px 18px rgba(0,0,0,.28); }
[data-theme="dark"] .lt-match__row { border-top-color: rgba(255,255,255,.06); }
[data-theme="dark"] .lt-match__head { color: rgba(255,255,255,.85); }
[data-theme="dark"] .lt-mset { color: rgba(255,255,255,.55); }
[data-theme="dark"] .lt-mset.is-won { color: #FFFFFF; font-weight: 800; }
/* Explicit hex — in dark mode --paper/--ink both resolve to navy, so the
   variables collapse to navy-on-navy. Force light pill with dark ink. */
[data-theme="dark"] .lt-watch { background: #FFFFFF; color: #0F1842; }
[data-theme="dark"] .lt-watch:hover { background: #EAF1F8; color: #0F1842; }
[data-theme="dark"] .lt-chip--atp { background: #FFFFFF; color: #0F1842; }
[data-theme="dark"] .lt-chip--wta { background: #E91E63; color: #FFFFFF; }
[data-theme="dark"] .lt-chip--challenger,
[data-theme="dark"] .lt-chip--itf { background: rgba(255,255,255,.12); color: #FFFFFF; }

@media (max-width:720px){
  /* Keep the geo-aware brand label visible on mobile. Per livetennis house
     rule: 'Watch now button that takes user to brand which shows the stream
     by geo' — the brand name (Stake.us / bet365 / Stake.com) MUST be visible
     so the user knows where the click leads. We compress the where-text
     instead, and let the live card header wrap to a second line if needed. */
  .lt-watch{ padding:0 10px; height:28px; font-size:11.5px; }
  .lt-match__head{
    flex-wrap: wrap;
    row-gap: 6px;
    padding: 9px 12px;
  }
  .lt-match__where{
    flex: 1 1 100%;
    order: 5;
    margin-top: 2px;
    font-size: 11px;
  }
  .lt-match__status{ font-size: 10px; }
  .lt-match__row{
    padding:8px 12px;
    font-size:13px;
    grid-template-columns: 12px minmax(0,1fr) repeat(var(--sets,2), 26px);
  }
}
@media (max-width: 380px){
  /* Very narrow phones: drop brand name to save room, keep icon + 'Watch'. */
  .lt-watch__label{
    max-width: 60px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }
}

/* bet365 regulatory disclaimer — small grey text under live-card watch CTA */
.lt-match__disclaimer {
  padding: 8px 14px 10px;
  border-top: 1px solid rgba(15,27,45,.04);
  font-size: 10.5px;
  line-height: 1.45;
  color: rgba(15,27,45,.55);
  font-weight: 500;
}
[data-theme="dark"] .lt-match__disclaimer {
  border-top-color: rgba(255,255,255,.05);
  color: rgba(255,255,255,.45);
}
@media (max-width: 720px) {
  .lt-match__disclaimer { padding: 7px 12px 9px; font-size: 10px; }
}
