/* Shared typography for all five shortcode views; never style the host theme. */
:is(#schedule-app, #result-app, #standing-app, #livescore-app)[data-xls-view],
.xls-dialog {
  --xls-font-text: 'XLS Roboto', Arial, sans-serif;
  --xls-font-number: 'XLS Barlow', 'XLS Roboto', Arial, sans-serif;
  font-family: var(--xls-font-text);
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings: 'lnum' 1, 'tnum' 1;
  letter-spacing: normal;
}

[data-xls-view] .api-sport {
  --as-primary-font: var(--xls-font-text);
  font-family: var(--xls-font-text);
  --as-filter-tags-top-country-font-family: var(--xls-font-text);
  --as-filter-league-item-font-family: var(--xls-font-text);
  --as-dropdown-toggle-font-family: var(--xls-font-text);
  --as-filter-calendar-mx-input-wrapper-input-font-family: var(--xls-font-number);
  --as-vs-match-item-date-before-font-family: var(--xls-font-number);
  --as-match-label-font-family: var(--xls-font-number);
  --as-match-label-corner-font-family: var(--xls-font-number);
  --as-match-label-corner-font-size: 14px;
  --as-match-label-corner-font-weight: 600;
  --as-match-ht-font-family: var(--xls-font-number);
}

:is(#schedule-app, #result-app, #standing-app, #livescore-app) :is(
  button, input, select, .as-match__team--name, .as-standing__table-text,
  .as-filter-country-top, .xls-loading, .xls-empty, .xls-meta,
  .xls-promotions, .als-team, .als-sort, .als-filter, .als-updated
),
.xls-dialog :is(p, label, select, button, details) {
  font-family: var(--xls-font-text);
}

/* Defeat legacy per-brand numeric fonts without touching icon-font elements. */
:is(#schedule-app, #result-app, #standing-app, #livescore-app) :is(
  .as-match__time, .as-match__label-item, .as-ht-btn, .as-score-detail,
  .as-score-vs__num, .as-score-vs__num span, .as-score-vs__num b,
  .as-standing__table-column, .xls-date-visible, .xls-native-date,
  .xls-odds-values, .xls-odds-values b, .xls-market-grid small,
  .als-meta, .als-state, .als-score, .als-score strong, .als-score b,
  .als-score small, .als-red, .als-stats, .als-prices, .als-price-head,
  .als-date input
),
.xls-dialog :is(.xls-odds-values, .xls-odds-values b, td, th) {
  font-family: var(--xls-font-number) !important;
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings: 'lnum' 1, 'tnum' 1;
  letter-spacing: normal;
}

:is(#schedule-app, #result-app) .as-match__team--name,
#livescore-app .als-team {
  font-weight: 700;
}
#livescore-app .als-team { font-family: var(--xls-font-number); }
#livescore-app .als-meta,
#livescore-app .als-state,
#livescore-app .als-stats,
#livescore-app .als-price-head {
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
}
#livescore-app .als-meta { white-space: nowrap; }
#livescore-app .als-score {
  font-size: 20px;
  line-height: 28px;
  font-weight: 700;
}
#livescore-app .als-score strong { font-weight: 700; }
#livescore-app .als-prices {
  font-size: 15px;
  line-height: 22px;
  font-weight: 700;
}

/* Larger, bolder text throughout the other shortcode views. */
:is(#schedule-app, #result-app, #standing-app)[data-xls-view] {
  color: #fff;
  font-size: 15px;
  font-weight: 600;
}
:is(#schedule-app, #result-app) .as-match__team--name {
  font-size: 16px;
  line-height: 24px;
  color: #fff;
}
:is(#schedule-app, #result-app) :is(.as-match__time, .as-match__label-item, .as-ht-btn) {
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
}
:is(#schedule-app, #result-app) .as-match__time .as-match__label-item {
  color: #fff;
  font-weight: 700;
}
:is(#schedule-app, #result-app) .as-score-vs__num span {
  font-size: 20px;
  line-height: 28px;
  font-weight: 700;
}
:is(#schedule-app, #result-app) .as-score-vs__num {
  font-size: 20px;
  line-height: 28px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 76px;
  min-height: 32px;
  padding: 2px;
  gap: 4px;
  border-radius: 5px;
  background: linear-gradient(130deg, #1553ef -6.25%, #0c3089 24.62%, #0c1a4c 70.73%);
}
:is(#schedule-app, #result-app) .as-score-vs__num :is(span, b) {
  color: #fff !important;
}
#standing-app :is(.as-standing__table-column, .as-standing__table-text) {
  font-size: 14px;
  line-height: 22px;
  font-weight: 600;
}
.xls-dialog :is(.xls-odds-values, .xls-odds-values b) {
  font-size: 16px;
  line-height: 24px;
  font-weight: 700;
}

/* Results: league and kickoff share one compact row. */
#result-app .xls-result-meta {
  display:flex;align-items:center;gap:8px;min-width:0;width:100%;
}
#result-app .xls-result-league {
  display:flex;align-items:center;gap:6px;min-width:0;flex:1;
}
#result-app .xls-result-league img {width:24px;height:24px;object-fit:contain;flex-shrink:0}
#result-app .xls-result-league strong {
  font-family:var(--xls-font-number);font-size:16px;line-height:24px;
  color:#fff;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
#result-app .xls-result-meta .as-match__label {flex-shrink:0;gap:4px;margin:0}
#result-app .xls-result-meta .as-match__label-item {
  color:#fff;font-size:14px;line-height:20px;font-weight:700;padding:2px 5px;
}
#result-app .xls-result-meta .as-match__label-item:last-child {font-size:12px}
#result-app .as-match__video-highlight {display:none!important}
@media(min-width:992px) {
  #result-app .as-match__item--wrap {
    display:grid;grid-template-columns:330px minmax(0,1fr) 60px 90px 60px;
    gap:8px;align-items:center;padding:10px;min-height:60px;
  }
  #result-app .as-match__item--wrap > * {width:auto;min-width:0;margin:0;padding:0}
  #result-app .as-match__scores {gap:8px}
}
@media(max-width:991.98px) {
  #result-app .as-match__sm {width:100%;padding:0;margin:0 0 6px;flex-wrap:wrap;gap:6px}
  #result-app .as-match__sm > .as-match__label {margin:0;justify-content:flex-end;width:100%}
  #result-app .xls-result-meta .as-match__label-item {font-size:12px;padding:2px 4px}
  #result-app .xls-result-meta .as-match__label-item:last-child {font-size:11px}
  #result-app .xls-result-league strong {font-size:14px;line-height:22px}
}

/* Compact market cards, shared by inline previews and match dialogs. */
:is(#schedule-app, #result-app) .xls-live {
  color: #ff4848;
  font-size: 14px;
  line-height: 20px;
  font-weight: 700;
  white-space: nowrap;
}
.xls-market-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  align-items: start;
}
.xls-market-grid > div {
  min-width: 0;
  padding: 8px 10px;
  line-height: 1.3;
}
.xls-market-grid .xls-market-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}
.xls-market-grid strong {
  font-family: var(--xls-font-number);
  font-size: 18px;
  line-height: 22px;
  font-weight: 700;
}
.xls-market-grid small {
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  color: #c2c8ca;
  margin: 2px 0 4px;
}
.xls-market-grid .xls-market-status {
  margin: 0;
  font-size: 10px;
  line-height: 16px;
  white-space: nowrap;
  padding: 0 4px;
  border-radius: 3px;
  background: #41494a;
}
.xls-market-grid .xls-odds-values {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
}
.xls-market-grid .xls-odds-values,
.xls-market-grid .xls-odds-values b {
  font-size: 18px;
  line-height: 24px;
  font-weight: 700;
}
.xls-market-grid .xls-odds-values b:nth-child(2) { text-align: center; }
.xls-market-grid .xls-odds-values b:last-child { text-align: right; }
.xls-market-grid .xls-odds-values > span {
  grid-column: 1 / -1;
  font-size: 13px;
  font-weight: 600;
}
.xls-odds-preview { padding: 8px 10px; }
@media (max-width: 768px) {
  .xls-market-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .xls-market-grid > div { padding: 7px 8px; }
  .xls-market-grid strong { font-size: 16px; line-height: 22px; }
  .xls-market-grid .xls-market-status { padding: 0 3px; }
  .xls-odds-preview { padding: 6px; }
}

@media (max-width: 991.98px) {
  #livescore-app .als-meta,
  #livescore-app .als-state,
  #livescore-app .als-stats { font-size: 12px; line-height: 18px; }
  #livescore-app .als-score { font-size: 18px; }
  #livescore-app .als-prices { font-size: 14px; }
  #livescore-app .als-score small { font-size: 10px; line-height: 12px; }
  :is(#schedule-app, #result-app) .as-match__team--name { font-size: 14px; line-height: 22px; }
  :is(#schedule-app, #result-app) .as-match__team--name {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    overflow-wrap: anywhere;
    line-height: 18px;
  }
  :is(#schedule-app, #result-app) .as-match__label-item { font-size: 12px; line-height: 18px; }
  [data-xls-view] .api-sport { --as-match-label-corner-font-size: 12px; }
}
