/*---------------------------------------
    TabelSkor supplementary styles
    Small additive utility classes layered on top of the Betlio theme
    (style.css) for informational scorecenter views that have no
    direct equivalent in the original betting template.
---------------------------------------*/

.ts-list-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  background-color: var(--card-bg);
  border-radius: 12px;
  padding: 12px 16px;
  color: #fff;
}

.ts-list-row:hover {
  color: #fff;
}

.ts-icon-btn {
  height: 54px;
  width: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50px;
  border: 1px solid gray;
  color: #fff;
  font-size: 1.2rem;
  transition-duration: 300ms;
}

.ts-icon-btn:hover {
  background-color: #7462ec;
}

.ts-box-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.ts-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background-color: var(--card-bg);
  border-radius: 10px;
  padding: 14px 12px;
  color: #fff;
}

.ts-section-label {
  color: var(--text-color);
  font-size: 0.85rem;
  margin-bottom: 8px;
}

/*---------------------------------------
    Match row (status | teams | star)
---------------------------------------*/

.ts-league-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 2px;
  color: var(--heading-color, #fff);
}

.ts-league-header__logo {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
}

.ts-league-header__text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.ts-league-header__name {
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ts-league-header__sub {
  font-size: 0.75rem;
  color: var(--muted-text, #96a9de);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ts-league-header__chevron {
  flex-shrink: 0;
  color: var(--muted-text, #96a9de);
  font-size: 0.85rem;
}

.matchboard .match-card.ts-match-row {
  display: flex !important;
  align-items: stretch;
  padding: 0;
  overflow: hidden;
}

.ts-match-row__link {
  display: flex;
  align-items: stretch;
  flex: 1;
  min-width: 0;
  color: inherit;
  padding: 12px 4px 12px 12px;
}

.ts-match-row__status {
  flex: 0 0 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ts-match-row__status-text {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--heading-color, #fff);
  line-height: 1.1;
  text-align: center;
}

.ts-match-row__status-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  line-height: 1.1;
  text-align: center;
}

.ts-match-row__status-date {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted-text, #96a9de);
  white-space: nowrap;
}

.ts-match-row__status-time {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--heading-color, #fff);
  white-space: nowrap;
}

.ts-match-row__divider {
  width: 1px;
  align-self: stretch;
  margin: 4px 10px;
  background: rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
}

.ts-match-row__teams {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: center;
}

.ts-match-row__team {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.ts-match-row__name {
  flex: 1;
  min-width: 0;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--heading-color, #fff);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ts-match-row__score {
  flex: 0 0 1.5rem;
  text-align: right;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--heading-color, #fff);
  font-variant-numeric: tabular-nums;
}

.ts-match-fav {
  flex: 0 0 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: var(--muted-text, #96a9de);
  padding: 0;
  cursor: pointer;
  font-size: 1.15rem;
  line-height: 1;
}

.ts-match-fav:hover,
.ts-match-fav:focus-visible {
  color: #f5c518;
  outline: none;
}

.ts-match-fav.is-active,
.ts-match-fav[aria-pressed="true"] {
  color: #f5c518;
}

.ts-filter-select {
  background-color: var(--input-box);
  color: #fff;
  border: none;
  border-radius: 6px;
}

.ts-filter-select:focus {
  outline: none;
  color: #fff;
  background-color: var(--input-box);
}

.ts-divider {
  border-color: rgba(255, 255, 255, 0.08) !important;
}

.ts-live-dot {
  font-size: 0.55rem;
  animation: ts-pulse 1.2s infinite;
}

@keyframes ts-pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}

.ts-event-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}

.ts-highlight-thumb {
  max-height: 180px;
  object-fit: cover;
  display: block;
}

.ts-highlight-play {
  cursor: pointer;
  display: block;
}

.ts-highlight-play-icon {
  font-size: 2.5rem;
  pointer-events: none;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}

.ts-highlight-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 220px;
  border: 0;
  display: block;
  background: #000;
}

/*---------------------------------------
    Standings table — readable on dark theme
---------------------------------------*/

.ts-standings-table {
  --bs-table-color: #fff;
  --bs-table-bg: transparent;
  --bs-table-border-color: rgba(255, 255, 255, 0.08);
  --bs-table-striped-color: #fff;
  --bs-table-hover-color: #fff;
  color: #fff;
}

.ts-standings-table > :not(caption) > * > * {
  color: inherit;
  background-color: transparent;
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.ts-standings-table thead th {
  color: var(--text-color, #d4ddf4);
  font-weight: 500;
  white-space: nowrap;
}

.ts-standings-table tbody td {
  color: #fff;
  vertical-align: middle;
}

.ts-standings-table tbody tr + tr td {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.ts-standings-table .text-blue {
  color: var(--primary, #1e9bf1) !important;
}

.ts-standings-table .dark-text {
  color: var(--text-color, #d4ddf4) !important;
}

/*---------------------------------------
    News page — responsive overrides
---------------------------------------*/

.ts-news {
  overflow-x: clip;
  max-width: 100%;
}

.ts-news .search-box {
  gap: 8px;
}

.ts-news-search-field {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.ts-news-search-field input {
  width: 100%;
  min-width: 0;
}

.ts-news-slider-wrap {
  overflow: hidden;
  margin-right: -12px;
  padding-right: 12px;
}

.ts-news .news-slider {
  overflow: visible;
}

.ts-news .news-card {
  min-width: 0;
  width: 100%;
  overflow: hidden;
  height: 100%;
}

.ts-news-card-link {
  display: block;
  color: inherit;
  height: 100%;
}

.ts-news .news-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}

.ts-news-card-title {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 0.75rem;
  font-size: 1.05rem;
  font-weight: 500;
  color: #fff;
  line-height: 1.35;
}

.ts-news-meta {
  white-space: nowrap;
  flex-shrink: 0;
  font-size: 0.85rem;
}

.ts-news .latest-news-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.ts-news .latest-news {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: 15px;
  min-width: 0;
  min-height: 160px;
}

.ts-news .latest-news img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  border-radius: 15px;
}

.ts-news .latest-news .content {
  right: 8px;
  z-index: 1;
  color: #fff;
}

.ts-news .latest-news .content h6 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: #fff;
  font-size: 0.95rem;
  line-height: 1.3;
  padding-right: 4px;
}

.ts-news .latest-news .content .dark-text {
  color: rgba(255, 255, 255, 0.75) !important;
  font-size: 0.8rem;
}

.ts-news .news-card-2 {
  align-items: stretch;
  overflow: hidden;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}

.ts-news .news-card-2 img {
  width: 110px;
  min-width: 110px;
  height: 110px;
  object-fit: cover;
  flex-shrink: 0;
}

.ts-news-card-2-body {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.ts-news .news-card-2 h6 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: #fff;
  line-height: 1.35;
}

.bottom-navigation .single-nav span {
  font-size: 0.62rem;
  text-align: center;
  line-height: 1.1;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0 1px;
}

@media (min-width: 576px) {
  .ts-news .news-card img {
    height: 190px;
  }

  .ts-news .latest-news-container {
    grid-template-columns: 1.4fr 1fr;
    grid-template-rows: 1fr 1fr;
  }

  .ts-news .ts-latest-lead {
    grid-row: 1 / span 2;
  }

  .ts-news .ts-latest-lead img,
  .ts-news .ts-latest-side img {
    height: 100%;
    min-height: 120px;
  }

  .ts-news .ts-latest-lead,
  .ts-news .ts-latest-side {
    min-height: 0;
    height: 100%;
  }

  .ts-news .news-card-2 img {
    width: 140px;
    min-width: 140px;
    height: 120px;
  }
}

@media (min-width: 768px) {
  .ts-news-card-title {
    font-size: 1.2rem;
  }

  .bottom-navigation .single-nav span {
    font-size: 0.7rem;
  }
}

/* Home / global search field */
.search-box .ts-news-search-field {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.search-box .ts-news-search-field input {
  width: 100%;
  min-width: 0;
}

/* Search results news cards (outside .news page) */
.ts-search-news-card {
  display: flex;
  align-items: stretch;
  overflow: hidden;
  min-width: 0;
  text-decoration: none;
  color: inherit;
  background-color: var(--card-bg);
  border-radius: 10px;
}

.ts-search-news-card img {
  width: 110px;
  min-width: 110px;
  height: 110px;
  object-fit: cover;
  flex-shrink: 0;
  border-radius: 10px;
}

.ts-search-news-card h6 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: #fff;
  line-height: 1.35;
}

@media (min-width: 576px) {
  .ts-search-news-card img {
    width: 140px;
    min-width: 140px;
    height: 120px;
  }
}

/*---------------------------------------
    Theme toggle + light mode palette
---------------------------------------*/

:root,
[data-theme="dark"] {
  --heading-color: #ffffff;
  --surface-border: rgba(255, 255, 255, 0.08);
  --nav-bg: #1c203b;
  --nav-text: #a0a9bc;
  --muted-text: #96a9de;
  --link-hover: #ffffff;
}

[data-theme="light"] {
  --body-color: #eef1f8;
  --text-color: #4a5568;
  --card-bg: #ffffff;
  --input-box: #e4e9f2;
  --match-bg: #ffffff;
  --dark-bg: #ffffff;
  --border-color: #b8c4d9;
  --heading-color: #1a2035;
  --surface-border: rgba(26, 32, 53, 0.1);
  --nav-bg: #ffffff;
  --nav-text: #6b7280;
  --muted-text: #6b7280;
  --link-hover: #1a2035;
}

.ts-theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--muted-text);
  line-height: 1;
  cursor: pointer;
  transition: color 200ms ease, background-color 200ms ease;
}

.ts-theme-toggle:hover,
.ts-theme-toggle:focus-visible {
  color: var(--primary);
  background-color: rgba(30, 155, 241, 0.12);
  outline: none;
}

.ts-theme-icon {
  font-size: 1rem;
}

[data-theme="dark"] .ts-theme-icon-light {
  display: inline-block;
}

[data-theme="dark"] .ts-theme-icon-dark {
  display: none;
}

[data-theme="light"] .ts-theme-icon-light {
  display: none;
}

[data-theme="light"] .ts-theme-icon-dark {
  display: inline-block;
}

[data-theme="light"] body {
  color: var(--heading-color);
}

[data-theme="light"] h1,
[data-theme="light"] h2,
[data-theme="light"] h3,
[data-theme="light"] h4,
[data-theme="light"] h5,
[data-theme="light"] h6 {
  color: var(--heading-color);
}

[data-theme="light"] .dark-text {
  color: var(--muted-text) !important;
}

[data-theme="light"] a:hover {
  color: var(--link-hover);
}

[data-theme="light"] .search-box input,
[data-theme="light"] .search-box input:focus {
  color: var(--heading-color);
}

[data-theme="light"] .search-box input::placeholder {
  color: var(--muted-text);
}

[data-theme="light"] .matchboard .nav .nav-link {
  color: var(--heading-color);
  border-color: var(--border-color);
}

[data-theme="light"] .matchboard .nav .nav-link.active {
  color: #ffffff;
  border-color: #5633b4;
}

[data-theme="light"] .matchboard .match-card .card-inner-border {
  border-bottom-color: var(--surface-border);
}

[data-theme="light"] .matchboard .match-card .score-btn,
[data-theme="light"] .matchboard .match-card .score-btn-red,
[data-theme="light"] .matchboard .match-card .score-btn-green {
  color: var(--heading-color);
  border-color: var(--border-color);
}

[data-theme="light"] .matchboard .match-card .score-btn-green,
[data-theme="light"] .matchboard .match-card .score-btn-red {
  color: #ffffff;
}

[data-theme="light"] .bottom-navigation {
  background-color: var(--nav-bg);
  box-shadow: 0 -2px 12px rgba(26, 32, 53, 0.08);
}

[data-theme="light"] .bottom-navigation .single-nav span {
  color: var(--nav-text);
}

[data-theme="light"] .ts-list-row,
[data-theme="light"] .ts-list-row:hover,
[data-theme="light"] .ts-box {
  color: var(--heading-color);
}

[data-theme="light"] .ts-icon-btn {
  color: var(--heading-color);
  border-color: var(--border-color);
}

[data-theme="light"] .ts-filter-select,
[data-theme="light"] .ts-filter-select:focus {
  color: var(--heading-color);
}

[data-theme="light"] .ts-divider {
  border-color: var(--surface-border) !important;
}

[data-theme="light"] .ts-standings-table {
  --bs-table-color: var(--heading-color);
  --bs-table-striped-color: var(--heading-color);
  --bs-table-hover-color: var(--heading-color);
  --bs-table-border-color: var(--surface-border);
  color: var(--heading-color);
}

[data-theme="light"] .ts-standings-table tbody td {
  color: var(--heading-color);
}

[data-theme="light"] .ts-standings-table tbody tr + tr td {
  border-top-color: var(--surface-border);
}

[data-theme="light"] .ts-news-card-title,
[data-theme="light"] .ts-news .latest-news .content,
[data-theme="light"] .ts-news .latest-news .content h6,
[data-theme="light"] .ts-news .news-card-2 h6,
[data-theme="light"] .ts-search-news-card h6 {
  color: var(--heading-color);
}

[data-theme="light"] .ts-news .latest-news .content .dark-text {
  color: var(--muted-text) !important;
}

[data-theme="light"] .matchboard .bet-card,
[data-theme="light"] .matchboard .bet-card-2,
[data-theme="light"] .matchboard .match-card,
[data-theme="light"] .matchboard .match-card-sm {
  box-shadow: 0 1px 4px rgba(26, 32, 53, 0.06);
}

[data-theme="light"] .ts-league-header {
  color: var(--heading-color);
}

[data-theme="light"] .ts-league-header__logo {
  background: rgba(26, 32, 53, 0.06);
}

[data-theme="light"] .ts-match-row__divider {
  background: var(--surface-border, #d8deed);
}

[data-theme="light"] .ts-match-row__status-text,
[data-theme="light"] .ts-match-row__status-time,
[data-theme="light"] .ts-match-row__name,
[data-theme="light"] .ts-match-row__score {
  color: var(--heading-color);
}

[data-theme="light"] .ts-match-row__status-date {
  color: var(--muted-text);
}

[data-theme="light"] .ts-match-fav {
  color: var(--muted-text);
}

[data-theme="light"] .matchboard .game {
  border-color: var(--border-color);
  color: var(--heading-color);
}

[data-theme="light"] ::-webkit-scrollbar-track {
  background: #e4e9f2;
}

[data-theme="light"] ::-webkit-scrollbar-thumb {
  background: #b8c4d9;
}

[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
  background: #96a9de;
}

.ts-team-logo {
  flex-shrink: 0;
}

.ts-brand {
  text-decoration: none;
}

.ts-brand-logo {
  display: block;
  height: 36px;
  width: auto;
  max-width: min(220px, 52vw);
}

/*---------------------------------------
    Bootstrap pagination — dark theme
---------------------------------------*/

.ts-pagination {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
}

.ts-pagination nav {
  width: 100%;
}

.ts-pagination .pagination {
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 0;
}

/* Mobile prev/next: push Next to the right */
.ts-pagination .d-sm-none .pagination {
  width: 100%;
  justify-content: space-between;
}

.ts-pagination .page-link {
  background-color: var(--card-bg);
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--text-color, #d4ddf4);
  min-width: 2.25rem;
  text-align: center;
  border-radius: 8px !important;
  margin: 0;
}

.ts-pagination .page-link:hover,
.ts-pagination .page-link:focus {
  background-color: rgba(30, 155, 241, 0.18);
  border-color: var(--primary, #1e9bf1);
  color: #fff;
  z-index: 1;
}

.ts-pagination .page-item.active .page-link {
  background-color: var(--primary, #1e9bf1);
  border-color: var(--primary, #1e9bf1);
  color: #fff;
}

.ts-pagination .page-item.disabled .page-link {
  background-color: var(--card-bg);
  border-color: rgba(255, 255, 255, 0.08);
  color: var(--muted-text, #96a9de);
  opacity: 0.65;
}

.ts-pagination .small.text-muted {
  color: var(--muted-text, #96a9de) !important;
}

[data-theme="light"] .ts-pagination .page-link {
  background-color: var(--card-bg);
  border-color: var(--surface-border);
  color: var(--heading-color);
}

[data-theme="light"] .ts-pagination .page-link:hover,
[data-theme="light"] .ts-pagination .page-link:focus {
  background-color: rgba(30, 155, 241, 0.12);
  color: var(--heading-color);
}

[data-theme="light"] .ts-pagination .page-item.disabled .page-link {
  background-color: var(--input-box);
  border-color: var(--surface-border);
  color: var(--muted-text);
}

