/* Shared green/charcoal theme. Loaded only by sport, country, team and match pages. */
:root {
  --rb-sport-accent: #2fae90;
  --rb-sport-accent-dark: #087b5a;
  --rb-sport-bg: #151a18;
  --rb-sport-surface: #29302e;
  --rb-sport-surface-raised: #343d3a;
  --rb-sport-border: #51635d;
  --rb-sport-text: #f4f8f6;
  --rb-sport-muted: #c3ccc8;
}

html {
  min-height: 100%;
  background: #14231d !important;
}

body {
  min-height: 100vh;
  background: #1b2822 !important;
  background-image: none !important;
  color: var(--rb-sport-text) !important;
}

/* Keep the green sport canvas continuous behind every page shell and while scrolling. */
body.appSidebarVisible,
app-root,
.app-main-content,
.main-content-wrapper,
.dashboard-wrapper,
.dash-container,
.sx-sport-page-wrap,
.sport-page,
.live-sport-page,
.country-content,
#dynamic-content-area {
  background-color: #1b2822 !important;
  background-image: none !important;
}

app-root,
.app-main-content,
.main-content-wrapper,
.dashboard-wrapper,
.dash-container,
.sx-sport-page-wrap,
.sport-page,
.live-sport-page,
.country-content,
#dynamic-content-area {
  min-height: 100%;
}

@media (max-width: 1024px) {
  /* The navigation is injected after the page loads, so it must be themed here globally. */
  .rb-mobile-footer,
  nav.rb-mobile-footer[data-rb-mobile-footer] {
    background: linear-gradient(180deg, #3a4742 0%, #26332e 100%) !important;
    border-color: rgba(99, 151, 134, .82) !important;
    box-shadow: 0 -12px 34px rgba(0, 0, 0, .34), 0 0 22px rgba(47, 174, 144, .16) !important;
  }

  .rb-mobile-footer a.active,
  .rb-mobile-footer a:active,
  .rb-mobile-footer button[aria-expanded="true"] {
    background: rgba(47, 174, 144, .20) !important;
    border-color: rgba(83, 212, 174, .46) !important;
  }
}

/* Shared sport-page surfaces, controls and result tiles. */
.sport-page, .live-sport-page, .sx-sport-page-wrap,
.team-page, .match-page, .category-section, .countries-grid,
.country-content, .country-live-summary, .continent-accordion {
  color: var(--rb-sport-text) !important;
}

.sport-page .rb-top-slider-container, .sport-page .rb-custom-slider,
.sx-sport-page-wrap .rb-live-line-shell, .team-slider,
.team-page, .match-page, .category-section, .country-content {
  background-color: var(--rb-sport-bg) !important;
}

.team-profile, .team-section, .team-fixture, .related-team,
.match-loading, .match-error, .match-hero, .match-panel,
.market-card, .market-option, .country-link-card, .continent-accordion,
.country-search, .country-search-results, .rb-standings,
.rb-standings-row, .rb-standings-head {
  background: var(--rb-sport-surface) !important;
  border-color: var(--rb-sport-border) !important;
  color: var(--rb-sport-text) !important;
  box-shadow: none !important;
}

.team-section h2, .match-panel h2,
.team-actions a, .match-back, .country-search-input:focus {
  background: linear-gradient(180deg, #45c7a6, #168e70) !important;
  border-color: var(--rb-sport-accent) !important;
  color: #fff !important;
}

/* Country-page expansion uses the same restrained selected-tab control. */
.country-load-more {
  background: #345348 !important;
  border-color: #6fa18f !important;
  color: #ffffff !important;
  box-shadow: none !important;
}
.country-load-more:hover {
  background: #3b5a4f !important;
  border-color: #83b3a2 !important;
}

.team-profile p, .team-fixture .middle, .match-meta,
.match-score span, .team-empty, .placeholder-text,
.country-team-count, .country-live-count, .rb-standings-note {
  color: var(--rb-sport-muted) !important;
}

.team-fixture .odds, .market-option b, .match-score b,
.country-live-count.is-live b {
  color: var(--rb-sport-accent) !important;
}

.market-option, .team-widget, .rb-live-tracker-odds-grid button,
.rb-live-line-market-btn, .match-countdown span {
  background: var(--rb-sport-surface) !important;
  border-color: rgba(47, 174, 144, .7) !important;
  color: var(--rb-sport-text) !important;
}

.market-option:hover, .team-actions a:hover, .match-back:hover,
.country-link-card:hover, .related-team:hover {
  border-color: var(--rb-sport-accent) !important;
  box-shadow: 0 0 0 1px rgba(47, 174, 144, .28) !important;
}

/* Legacy standalone team page. */
.team-container {
  background: linear-gradient(180deg, var(--rb-sport-surface-raised), var(--rb-sport-bg)) !important;
  border-color: var(--rb-sport-border) !important;
  color: var(--rb-sport-text) !important;
}
.country-badge { background: var(--rb-sport-surface) !important; color: var(--rb-sport-accent) !important; }
.players-section { border-color: var(--rb-sport-border) !important; }
.back-btn { color: var(--rb-sport-accent) !important; border-color: var(--rb-sport-accent) !important; }
.back-btn:hover { background: var(--rb-sport-accent) !important; color: #fff !important; }
