/* 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);
}

/* Keep quick menu + toolbar fixed */
.header-bottom-slot { display: none !important; }
.nav-menu {
  position: fixed !important;
  left: var(--ls-fixed-left, 0px) !important;
  right: var(--ls-fixed-right, 0px) !important;
  top: var(--ls-nav-top, 0px) !important;
  z-index: 1001 !important;
  margin: 0 !important;
  background: #223138 !important;
  border-bottom: 1px solid rgba(255,255,255,0.14) !important;
  box-shadow: 0 6px 14px rgba(0,0,0,0.22) !important;
}
[data-theme="light"] .nav-menu {
  background: #dbe4e8 !important;
  border-bottom-color: rgba(0,0,0,0.10) !important;
  box-shadow: 0 5px 12px rgba(0,0,0,0.08) !important;
}

#lsToolbar {
  display: flex;
  align-items: center;
  width: 100%;
  margin: 0;
  padding: 8px;
  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);
  position: fixed !important;
  left: var(--ls-fixed-left, 0px) !important;
  right: var(--ls-fixed-right, 0px) !important;
  top: var(--ls-toolbar-top, 48px) !important;
  z-index: 1000 !important;
}
[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: hidden;
  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;
  height: 30px;
  gap: 6px;
  padding: 0 12px;
  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; }

[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;
}

#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); }
}

/* Top spacing (prevent overlap with sticky bars) */
.content-area { padding-top: calc(var(--ls-content-pad, 72px) + 8px) !important; }

/* Desktop behavior */
@media (min-width: 992px) {
  .nav-menu { display: none !important; }
  #lsToolbar {
    width: auto !important;
    top: calc(var(--ls-toolbar-top, 48px) + 8px) !important;
  }
  .content-area { padding-top: calc(var(--ls-content-pad, 72px) + 10px) !important; }
}

/* Mobile behavior */
@media (max-width: 991px) {
  .nav-menu {
    top: var(--ls-nav-top, 50px) !important;
    left: 0 !important;
    right: 0 !important;
  }
  #lsToolbar {
    padding: 0;
    border-radius: 12px;
    top: calc(var(--ls-nav-top, 50px) + var(--ls-nav-height, 42px)) !important;
    left: 0 !important;
    right: 0 !important;
  }
  #lsToolbar .ctrl-btn {
    height: 28px;
    padding: 0 8px;
    font-size: 10px;
  }
  .content-area { padding-top: calc(var(--ls-content-pad, 72px) + 56px) !important; }
}

/* 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: 1; }
.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; }
.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: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; }

.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: var(--primary-light); }
.match-row .time-status .live-badge { color: #2ecc71; }
.match-row .time-status .ht-badge { color: #f39c12; }
.match-row .time-status .ft-badge { color: rgba(255,255,255,0.78); }
[data-theme="light"] .match-row .time-status .ft-badge { color: #5b6773; }

.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.live { color: #2ecc71; }
[data-theme="light"] .match-row .score-center .score-box.live { color: #1f9d55; }
.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);
}
