/*
 * Odds2Win shared chrome, 2026-11-18
 * Canonical styling for header, navigation and footer on ALL templates.
 * This file intentionally contains no article, prediction, home-card or SEO rules.
 * Kept in the theme so a WP database/Additional CSS restore cannot erase it.
 */
:root { --o2w-chrome-green: #237b3c; }

/* Identical brand band, menu typography and footer on every route. */
body .o2w-band { background-color: var(--o2w-chrome-green) !important; }
body nav.navbar[aria-label="Main navigation"] .nav-link {
  font-size: 14.5px; font-weight: 650; line-height: 1.4;
}
body footer h2 { font-size: 25px; line-height: 1.2; }
body footer h3.h6 {
  font-size: 16px; font-weight: 800; letter-spacing: .015em;
  line-height: 1.4; color: #e7eee9 !important;
}
body footer p.small,
body footer ul.nav.small .nav-link,
body footer .small { font-size: 14px; line-height: 1.55; }
body footer .text-secondary,
body footer ul.nav.small .nav-link.text-secondary { color: #d3ded5 !important; }
body footer ul.nav.small .nav-link:hover,
body footer ul.nav.small .nav-link:focus-visible {
  color: #fff !important; text-decoration: underline; text-underline-offset: 3px;
}
body footer .o2w-home-footer-details > summary { display: none; }
body footer .o2w-home-footer-details > .row { margin-left: 0; margin-right: 0; }

/* Top ticker stays readable across templates. */
body > div.bg-dark[data-bs-theme="dark"] > .container.small {
  font-size: 13px; line-height: 1.45;
}
body > div.bg-dark[data-bs-theme="dark"] .text-white-50 { color: #dae4dd !important; }

/* Desktop hubs: same spacing and drop-down on home and internal pages. */
@media (min-width: 992px) {
  body .o2w-band > .container {
    display: flex; flex-wrap: nowrap !important;
    align-items: center; justify-content: space-between; gap: 18px !important;
  }
  body .o2w-band > .container > a:first-child { flex: 0 0 auto; min-width: 0; }
  body .o2w-band .o2w-home-desktop-hubs { flex: 1 1 640px; min-width: 0; margin-left: auto; }
  body .o2w-band .o2w-home-hubs-primary {
    display: flex; flex-wrap: wrap; justify-content: flex-end;
    align-items: center; gap: 8px !important;
  }
  body .o2w-band .o2w-home-hubs-primary > a.btn,
  body .o2w-band .o2w-home-hubs-more > summary {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 36px; padding: 8px 11px; font-size: 14px;
    line-height: 1.25; font-weight: 750; text-decoration: none;
  }
  body .o2w-band .o2w-home-hubs-primary > .badge {
    padding: 8px 11px; font-size: 12.5px; line-height: 1.2;
  }
  body .o2w-band .o2w-home-hubs-more {
    position: relative; z-index: 30; color: #153b26;
  }
  body .o2w-band .o2w-home-hubs-more > summary {
    list-style: none; cursor: pointer; white-space: nowrap;
    background: #fff; color: #16462c; border: 1px solid #cde3d0; border-radius: 999px;
  }
  body .o2w-band .o2w-home-hubs-more > summary::-webkit-details-marker { display: none; }
  body .o2w-band .o2w-home-hubs-more > summary::after {
    content: "⌄"; margin-left: 8px; font-size: 16px; font-weight: 900;
  }
  body .o2w-band .o2w-home-hubs-more[open] > summary::after { transform: rotate(180deg); }
  body .o2w-band .o2w-home-hubs-more > summary:hover,
  body .o2w-band .o2w-home-hubs-more[open] > summary {
    background: #eff6ef; border-color: #91bb9c;
  }
  body .o2w-band .o2w-home-hubs-more > summary:focus-visible {
    outline: 3px solid #c62828; outline-offset: 3px;
  }
  body .o2w-band:has(.o2w-home-hubs-more[open]) { position: relative; z-index: 1040; }
  body .o2w-band .o2w-home-hubs-more-panel {
    position: absolute; top: calc(100% + 10px); right: 0; z-index: 31;
    width: 360px; max-width: min(360px, 94vw); padding: 16px;
    background: #fff; color: #1b3c29; border: 1px solid #d4e5d7;
    border-radius: 12px; box-shadow: 0 12px 32px rgba(9,33,16,.2);
  }
  body .o2w-band .o2w-home-hubs-more:not([open]) > .o2w-home-hubs-more-panel { display: none !important; }
  body .o2w-band .o2w-home-hubs-more[open] > .o2w-home-hubs-more-panel { display: block; }
  body .o2w-band .o2w-home-hubs-more-panel strong {
    display: block; margin: 3px 0 9px; color: #213e2c;
    font-size: 14px; line-height: 1.4;
  }
  body .o2w-band .o2w-home-hubs-more-grid {
    display: grid; grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 7px; margin: 0 0 13px;
  }
  body .o2w-band .o2w-home-hubs-more-grid:last-child { margin-bottom: 0; }
  body .o2w-band .o2w-home-hubs-more-grid a {
    display: flex; align-items: center; min-height: 40px;
    padding: 8px 10px; color: #1d5130; background: #f4faf5;
    border: 1px solid #e1ece3; border-radius: 7px;
    font-size: 14px; font-weight: 700; line-height: 1.35; text-decoration: none;
  }
  body .o2w-band .o2w-home-hubs-more-grid a:hover,
  body .o2w-band .o2w-home-hubs-more-grid a:focus-visible {
    color: #fff; background: #1a7339; border-color: #1a7339;
  }
}

/*
 * Mobile offcanvas in a sticky navbar:
 * Bootstrap backdrop is attached to body at z-index 1040. A nested offcanvas
 * cannot escape a sticky parent with z-index 1020. Raise that parent ONLY while
 * the offcanvas is visible; otherwise keep ordinary page stacking unchanged.
 */
@media (max-width: 991.98px) {
  body > div.bg-dark[data-bs-theme="dark"] { display: none !important; }
  body .o2w-band { padding-top: 0 !important; padding-bottom: 0 !important; }
  body .o2w-band > .container {
    display: flex !important; flex-wrap: wrap !important;
    align-items: center; justify-content: space-between;
    min-height: 66px; padding-top: 8px; padding-bottom: 8px; gap: 10px !important;
  }
  body .o2w-band > .container > a:first-child {
    display: flex !important; align-items: center; min-width: 0; margin: 0;
    position: relative; z-index: 5; touch-action: manipulation;
  }
  body .o2w-band > .container > a:first-child > img {
    display: block; width: auto; height: 44px; max-width: min(205px, 54vw);
    pointer-events: none;
  }
  body .o2w-band > .container > a:first-child > div { display: none !important; }
  body .o2w-home-menu-launch {
    display: inline-flex !important; align-items: center; justify-content: center;
    gap: 8px; min-height: 44px; padding: 8px 12px;
    border: 1px solid #b7e1bd; border-radius: 9px;
    color: #fff; background: #1b7a38;
    font-size: 14px; font-weight: 800; line-height: 1.3;
    white-space: nowrap; touch-action: manipulation; cursor: pointer;
  }
  body .o2w-home-menu-launch .bi { font-size: 18px; }
  body .o2w-home-menu-launch:focus-visible {
    outline: 3px solid #fff; outline-offset: 3px;
  }
  body nav.navbar[aria-label="Main navigation"] {
    position: static !important; z-index: auto; min-height: 0;
    height: 0; padding: 0 !important; border: 0 !important;
    background: transparent !important;
  }
  body nav.navbar[aria-label="Main navigation"] > .container {
    min-height: 0; height: 0; padding: 0 !important;
  }
  body nav.navbar[aria-label="Main navigation"] > .container > .navbar-brand,
  body nav.navbar[aria-label="Main navigation"] > .container > .navbar-toggler {
    display: none !important;
  }
  body:has(#mainNav.show) nav.navbar[aria-label="Main navigation"],
  body:has(#mainNav.showing) nav.navbar[aria-label="Main navigation"] {
    position: relative !important; z-index: 1080 !important;
  }
  body #mainNav.offcanvas {
    z-index: 1085 !important; height: 100dvh;
    max-width: min(390px, 92vw); background: #212529;
  }
  body .offcanvas-backdrop { z-index: 1060 !important; }
  body #mainNav .offcanvas-header {
    position: sticky; top: 0; z-index: 2;
    background: #212529; min-height: 64px;
  }
  body #mainNav .btn-close { min-width: 44px; min-height: 44px; touch-action: manipulation; }
  body #mainNav .offcanvas-body {
    overflow-x: hidden; overflow-y: auto; overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch; padding-bottom: max(32px, env(safe-area-inset-bottom));
  }
  body #mainNav .navbar-nav { width: 100%; flex-direction: column; gap: 0 !important; }
  body #mainNav .nav-link {
    display: flex; align-items: center; justify-content: space-between;
    min-height: 46px; padding: 11px 12px; font-size: 15px;
    color: #f1f5f2; touch-action: manipulation;
  }
  body #mainNav .dropdown-menu {
    position: static !important; inset: auto !important;
    transform: none !important; float: none !important;
    width: 100%; max-width: 100%; margin: 4px 0 10px;
    padding: 5px; background: #fff; border-radius: 9px;
    border: 1px solid #d8e7dc; box-shadow: none !important;
  }
  body #mainNav .dropdown-menu:not(.show) { display: none !important; }
  body #mainNav .dropdown-menu.show { display: block !important; }
  body #mainNav .dropdown-item {
    white-space: normal; overflow-wrap: anywhere; min-height: 44px;
    display: flex; align-items: center; padding: 9px 12px;
    color: #1b3e2a; font-size: 14px; font-weight: 650;
  }
  body #mainNav .dropdown-item:focus-visible { outline: 3px solid #2e9e41; }
  body .o2w-band .d-lg-none.w-100 { min-width: 0; }
  body .o2w-band .o2w-scroll {
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  body .o2w-band .o2w-scroll::-webkit-scrollbar { display: none; }
}
@media (max-width: 767.98px) {
  body footer { padding-top: 26px !important; }
  body footer .o2w-home-footer-details {
    margin: 12px 0 19px; border: 1px solid #52645b;
    background: #26332d; border-radius: 10px; overflow: hidden;
  }
  body footer .o2w-home-footer-details > summary {
    display: flex; align-items: center; justify-content: space-between;
    min-height: 50px; padding: 13px 15px;
    color: #fff; font-weight: 800; font-size: 15px;
    cursor: pointer; list-style: none;
  }
  body footer .o2w-home-footer-details > summary::-webkit-details-marker { display: none; }
  body footer .o2w-home-footer-details > summary span { font-size: 20px; }
  body footer .o2w-home-footer-details[open] > summary span { transform: rotate(45deg); }
  body footer .o2w-home-footer-details > .row { margin: 0; padding: 12px; }
}
@media (max-width: 359.98px) {
  body .o2w-band > .container > a:first-child > img { height: 40px; max-width: 151px; }
  body .o2w-home-menu-launch { padding: 8px; gap: 5px; font-size: 12px; }
}

/* The red Today's Predictions hub is intentional and sitewide.
   Do not scope it to body.home, as that made it disappear elsewhere. */
body .o2w-band a.o2w-primary-hub.btn {
  --bs-btn-bg: #c62828;
  --bs-btn-border-color: #b92329;
  --bs-btn-color: #fff;
  --bs-btn-hover-bg: #a51f24;
  --bs-btn-hover-border-color: #a51f24;
  --bs-btn-hover-color: #fff;
  background-color: #c62828 !important;
  border-color: #b92329 !important;
  color: #fff !important;
  font-weight: 800;
}
body .o2w-band a.o2w-primary-hub.btn:hover,
body .o2w-band a.o2w-primary-hub.btn:focus-visible {
  background-color: #a51f24 !important;
  border-color: #a51f24 !important;
  color: #fff !important;
}
body .o2w-band a.o2w-primary-hub.btn:focus-visible {
  outline: 3px solid #ffe28a;
  outline-offset: 2px;
}
