/* Rebuilt livescore styles - clean single-source file */

:root {
  --ls-radius: 12px;
  --ls-bg-dark-1: rgba(33, 46, 57, 0.94);
  --ls-bg-dark-2: rgba(24, 34, 44, 0.94);
  --ls-bg-light-1: #f5f8fb;
  --ls-bg-light-2: #eaf0f6;
  --ls-border-dark: rgba(255, 255, 255, 0.08);
  --ls-border-light: rgba(17, 24, 39, 0.10);
}

#lsToolbar {
  display: flex;
  align-items: center;
  width: 100%;
  margin: 0 0 12px;
  padding: 8px;
  position: sticky;
  top: var(--ls-toolbar-top, 48px);
  z-index: 24;
  border-radius: var(--ls-radius);
  background: linear-gradient(180deg, var(--ls-bg-dark-1) 0%, var(--ls-bg-dark-2) 100%);
  border: 1px solid var(--ls-border-dark);
  box-shadow: 0 8px 20px rgba(0,0,0,0.25);
}
[data-theme="light"] #lsToolbar {
  background: linear-gradient(180deg, var(--ls-bg-light-1) 0%, var(--ls-bg-light-2) 100%);
  border-color: var(--ls-border-light);
}

#lsToolbar .ls-toolbar-left {
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;
  overflow: visible;
  border-radius: 10px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.07);
}
[data-theme="light"] #lsToolbar .ls-toolbar-left {
  background: rgba(17,24,39,0.06);
  border-color: rgba(17,24,39,0.10);
}

#lsToolbar .ctrl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 0;
  min-width: 0;
  min-height: 44px;
  height: 44px;
  gap: 6px;
  padding: 0 14px;
  border: 0;
  border-right: 1px solid rgba(255,255,255,0.08);
  border-radius: 0;
  background: transparent;
  color: rgba(237,245,255,0.82);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .2px;
  white-space: nowrap;
  cursor: pointer;
  transition: background .16s ease, color .16s ease;
}
#lsToolbar .ctrl-btn:last-child { border-right: 0; }
#lsToolbar .ctrl-btn:hover {
  background: rgba(255,255,255,0.06);
  color: #fff;
}
#lsToolbar .ctrl-btn.active,
#lsToolbar .ctrl-btn.active:hover {
  background: linear-gradient(180deg, #34d399 0%, #10b981 100%);
  color: #06281f;
}
#lsToolbar .ctrl-btn i { font-size: 11px; }
#lsToolbar .ctrl-btn.muted { opacity: .72; }

#lsToolbar .sound-control-wrap {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  display: flex;
}
#lsToolbar .sound-control-wrap > .ctrl-btn {
  width: 100%;
  border-right: 0;
}
#lsToolbar .sound-tab-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 0 12px;
  min-width: 96px;
}
#lsToolbar .sound-tab-btn .sound-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  flex: 0 0 auto;
}
#lsToolbar .sound-tab-btn .sound-icon-wrap i {
  font-size: 15px;
}
#lsToolbar .sound-tab-btn .sound-mini-range {
  position: static;
  flex: 1 1 auto;
  min-width: 0;
  height: 18px;
  margin: 0;
  appearance: none;
  background: transparent;
  cursor: pointer;
}
#lsToolbar .sound-tab-btn .sound-mini-range::-webkit-slider-runnable-track {
  height: 3px;
  border-radius: 999px;
  background: rgba(255,255,255,0.35);
}
#lsToolbar .sound-tab-btn .sound-mini-range::-webkit-slider-thumb {
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 0;
  margin-top: -5.5px;
  background: #10b981;
}
#lsToolbar .sound-tab-btn.muted .sound-mini-range::-webkit-slider-thumb {
  background: #94a3b8;
}
#lsToolbar .sound-tab-btn .sound-mini-range::-moz-range-track {
  height: 3px;
  border-radius: 999px;
  background: rgba(255,255,255,0.35);
}
#lsToolbar .sound-tab-btn .sound-mini-range::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 0;
  background: #10b981;
}
#lsToolbar .sound-tab-btn.muted .sound-mini-range::-moz-range-thumb {
  background: #94a3b8;
}

[data-theme="light"] #lsToolbar .ctrl-btn {
  color: #334155;
  border-right-color: rgba(17,24,39,0.10);
}
[data-theme="light"] #lsToolbar .ctrl-btn:hover {
  background: rgba(17,24,39,0.06);
  color: #0f172a;
}
[data-theme="light"] #lsToolbar .ctrl-btn.active,
[data-theme="light"] #lsToolbar .ctrl-btn.active:hover {
  color: #053b2d;
}
[data-theme="light"] #lsToolbar .sound-tab-btn .sound-mini-range::-webkit-slider-runnable-track {
  background: rgba(15,23,42,0.25);
}
[data-theme="light"] #lsToolbar .sound-tab-btn .sound-mini-range::-moz-range-track {
  background: rgba(15,23,42,0.25);
}

#lsToolbar .ctrl-btn.live-btn .live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #00ff9d;
  box-shadow: 0 0 0 0 rgba(0,255,157,.65);
  animation: livePulse 1.2s infinite;
}
@keyframes livePulse {
  0% { box-shadow: 0 0 0 0 rgba(0,255,157,.70); }
  70% { box-shadow: 0 0 0 7px rgba(0,255,157,0); }
  100% { box-shadow: 0 0 0 0 rgba(0,255,157,0); }
}

/* Mobile behavior */
@media (max-width: 991px) {
  #lsToolbar {
    padding: 0;
    border-radius: 12px;
  }
  #lsToolbar .ctrl-btn {
    min-height: 48px;
    height: 48px;
    padding: 0 8px;
    font-size: 10px;
  }
  #lsToolbar .sound-tab-btn .sound-mini-range {
    height: 18px;
  }
  .livescore-container { min-height: auto; }
}

/* League header */
.league-title-mini {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  margin-top: 10px;
  border-left: 3px solid var(--primary);
  border-radius: 6px 6px 0 0;
  background: rgba(60,80,90,0.58);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
}
.league-title-mini:first-child { margin-top: 0; }
[data-theme="light"] .league-title-mini {
  background: #c2c5ca;
  color: #3d5259;
}
.league-title-mini .league-name { flex: 0 1 auto; }
.league-title-mini .league-flag-wrap { display: inline-flex; align-items: center; }
.league-title-mini .league-logo-img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  border-radius: 3px;
  margin: 0;
  padding: 0;
  background: rgba(255,255,255,0.08);
}
[data-theme="light"] .league-title-mini .league-logo-img { background: rgba(0,0,0,0.06); }
.league-title-mini .fav-star {
  cursor: pointer;
  font-size: 13px;
  color: rgba(255,255,255,0.30);
  transition: transform .15s ease, color .15s ease;
}
[data-theme="light"] .league-title-mini .fav-star { color: rgba(0,0,0,0.28); }
.league-title-mini .fav-star:hover { color: #f39c12; transform: scale(1.15); }
.league-title-mini .fav-star.active { color: #f39c12; }

/* Match rows */
.livescore-container { overflow-x: hidden; min-height: clamp(580px, 62vh, 900px); }
.livescore-container > .loading { min-height: clamp(360px, 42vh, 560px); display: flex; flex-direction: column; justify-content: center; }
.match-row {
  display: grid;
  grid-template-columns: 24px 52px minmax(0,1fr) 74px minmax(0,1fr) 48px;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
  padding: 8px 8px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.match-row > div { min-width: 0; }
.match-row:nth-child(odd) { background: rgba(255,255,255,0.04); }
.match-row:nth-child(even) { background: rgba(255,255,255,0.02); }
.match-row.finished { background: rgba(40,167,69,0.05) !important; }
.match-row.finished:nth-child(odd) { background: rgba(40,167,69,0.08) !important; }
.match-row:hover { background: rgba(83,111,118,0.15); }
[data-theme="light"] .match-row:nth-child(odd) { background: rgba(0,0,0,0.06); }
[data-theme="light"] .match-row:nth-child(even) { background: #fff; }
[data-theme="light"] .match-row.finished { background: rgba(40,167,69,0.07) !important; }
[data-theme="light"] .match-row.finished:nth-child(odd) { background: rgba(40,167,69,0.10) !important; }

.match-row .match-fav { text-align: left; }
.match-row .match-fav .fav-star {
  cursor: pointer;
  font-size: 12px;
  color: rgba(255,255,255,0.22);
}
[data-theme="light"] .match-row .match-fav .fav-star { color: rgba(0,0,0,0.22); }
.match-row .match-fav .fav-star.active,
.match-row .match-fav .fav-star:hover { color: #f39c12; }

.match-row .time-status {
  font-size: 11px;
  font-weight: 700;
  text-align: left;
  white-space: nowrap;
}
.match-row .time-status .scheduled { color: #9fc0ca; }
[data-theme="light"] .match-row .time-status .scheduled { color: #27444d; }
.match-row .time-status .live-badge { color: #7dffb4; }
.match-row .time-status .ht-badge { color: #ffd166; }
.match-row .time-status .ft-badge { color: rgba(255,255,255,0.78); }
[data-theme="light"] .match-row .time-status .live-badge { color: #0a6a36; }
[data-theme="light"] .match-row .time-status .ht-badge { color: #8f5300; }
[data-theme="light"] .match-row .time-status .ft-badge { color: #5b6773; }

.rc-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #c0392b;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    min-width: 15px;
    height: 15px;
    padding: 0 3px;
    border-radius: 3px;
    line-height: 1;
    flex-shrink: 0;
    position: relative;
    cursor: default;
}
/* Tooltip handled via JS (#rc-tip) to avoid overflow:hidden clipping */
.rc-badge[data-tip] { cursor: default; }

.match-row .team-home,
.match-row .team-away {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.match-row .team-home { justify-content: flex-end; padding-right: 14px; }
.match-row .team-away { justify-content: flex-start; padding-left: 14px; }
.match-row .team-name {
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
  font-size: 13px;
}
.match-row .team-home .team-name { text-align: right; }
.match-row .red-card-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 14px;
  height: 14px;
  padding: 0 4px;
  border-radius: 3px;
  background: #e74c3c;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  flex-shrink: 0;
}
.team-logo {
  width: 25px;
  height: 25px;
  object-fit: contain;
  flex-shrink: 0;
}

.match-row .score-center {
  display: flex;
  align-items: center;
  justify-content: center;
}
.match-row .score-center .score-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  gap: 2px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 16px;
  font-weight: 700;
  color: inherit;
  white-space: nowrap;
}
.match-row .score-center .score-box.finished { color: #ffffff; }
[data-theme="light"] .match-row .score-center .score-box.finished { color: #b8860b; }
.match-row .score-center .score-box.live { color: #2ecc71; }
.match-row .score-center .score-box.halftime { color: #f39c12; }
[data-theme="light"] .match-row .score-center .score-box.live { color: #16a34a; }
[data-theme="light"] .match-row .score-center .score-box.halftime { color: #f39c12; }
.match-row .score-center .score-box.not-started {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary-light);
}
[data-theme="light"] .match-row .score-center .score-box.not-started { color: var(--primary-dark); }
.match-row .score-center .score-box .score-num {
  display: inline-block;
  min-width: 10px;
  text-align: center;
}
.match-row .score-center .score-box .score-num.blink-goal {
  animation: scoreBlinkGoal .5s step-start 10;
}
@keyframes scoreBlinkGoal {
  0%,49% { opacity: 1; color: inherit; transform: scale(1); }
  50%,100% { opacity: .14; color: #f1c40f; transform: scale(1.08); }
}

.match-row .team-home.goal-side,
.match-row .team-away.goal-side {
  border-radius: 8px;
  animation: goalSideFlash 1.6s ease-in-out 1;
}
@keyframes goalSideFlash {
  0%,100% { background: transparent; }
  25%,75% { background: rgba(241,196,15,.22); }
  50% { background: rgba(241,196,15,.36); }
}

.match-row .ht-score {
  text-align: center;
  font-size: 11px;
  color: rgba(255,255,255,0.55);
  white-space: nowrap;
}
[data-theme="light"] .match-row .ht-score { color: #666; }

/* Compact mobile layout (single-line rows, no horizontal scroll) */
html.ls-mobile .league-title-mini {
  justify-content: flex-start !important;
  text-align: left !important;
  padding: 7px 6px !important;
  gap: 6px !important;
  font-size: 12px !important;
}
html.ls-mobile .league-title-mini .fav-star {
  margin-left: 0 !important;
  font-size: 11px !important;
}

html.ls-mobile .match-row {
  grid-template-columns: 18px 36px minmax(0,1fr) 56px minmax(0,1fr) !important;
  padding: 6px 2px !important;
  overflow: hidden !important;
}
html.ls-mobile .match-row > div:nth-child(1) { grid-column: 1; }
html.ls-mobile .match-row > div:nth-child(2) { grid-column: 2; }
html.ls-mobile .match-row > div:nth-child(3) { grid-column: 3; }
html.ls-mobile .match-row > div:nth-child(4) { grid-column: 4; }
html.ls-mobile .match-row > div:nth-child(5) { grid-column: 5; }
html.ls-mobile .match-row > div:nth-child(6) { display: none; }

html.ls-mobile .match-row .time-status {
  font-size: 10px !important;
  padding-left: 2px !important;
}
html.ls-mobile .match-row .team-home,
html.ls-mobile .match-row .team-away {
  gap: 3px !important;
  padding: 0 !important;
}
html.ls-mobile .match-row .team-home { justify-content: flex-end !important; }
html.ls-mobile .match-row .team-away { justify-content: flex-start !important; }
html.ls-mobile .match-row .team-name {
  font-size: 11px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}
html.ls-mobile .match-row .red-card-badge {
  min-width: 12px;
  height: 12px;
  padding: 0 3px;
  font-size: 9px;
}
html.ls-mobile .match-row .team-home .team-name { text-align: right !important; }
html.ls-mobile .team-logo {
  width: 18px !important;
  height: 18px !important;
}
html.ls-mobile .match-row .score-center .score-box {
  width: 100% !important;
  max-width: 100% !important;
  font-size: 11px !important;
}
html.ls-mobile .match-row .match-fav {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  padding-left: 3px !important;
}
html.ls-mobile .match-row .match-fav .fav-star {
  font-size: 11px !important;
  color: rgba(90,100,112,.95) !important;
}
html.ls-mobile .match-row .match-fav .fav-star.active { color: #f39c12 !important; }

/* CTA */
.cb-cta {
  margin: 18px 0;
  padding: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  background: rgba(255,255,255,0.03);
}
.cb-cta__title {
  margin-bottom: 6px;
  font-size: 16px;
  font-weight: 700;
}
.cb-cta__text {
  margin-bottom: 10px;
  line-height: 1.4;
  font-size: 14px;
  opacity: .9;
}
.cb-cta__btn {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.16);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.cb-cta__btn:hover { opacity: .92; }
[data-theme="light"] .cb-cta {
  border-color: rgba(0,0,0,0.12);
  background: rgba(0,0,0,0.03);
}
