/* Blocksy owns the header layout and tagline. Ajax Search Pro's native
   settings style the desktop field hosted in Blocksy's HTML element.
   Phone/tablet panel branding and search styling are scoped below. */

/* Self-hosted Latin subset, SIL OFL 1.1; see ../fonts/OFL.txt. */
@font-face {
  font-family: "Montserrat";
  src: url("../fonts/montserrat-latin-700.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  /* Briefly wait for the preloaded font instead of flashing a narrower byline. */
  font-display: block;
}

#header .site-description,
#offcanvas .sr-panel-tagline,
#search-modal .sr-panel-tagline,
#footer .sr-footer-tagline { font-family: "Montserrat", sans-serif; }

.sr-search-brand,
.sr-search-advanced,
.sr-offcanvas-brand > .sr-panel-tagline { display: none; }

/* Native settings own header size, weight, colour and letter spacing.
   The local family is set here to avoid Blocksy's Google Fonts loader. */
#header .site-description { white-space: nowrap; }

/* Phones and tablets: Blocksy's search modal, which Ajax Search Pro instance 1
   already fills. The field moves from the vertical centre to the top so the
   live results list is not behind the keyboard, and the box takes the site's
   field styling. */
@media (max-width: 999.98px) {
  #offcanvas .sr-offcanvas-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  #offcanvas .sr-offcanvas-brand > .site-logo-container { margin: 0; }

  /* Line above the native Button (Advanced Search) under the sports. */
  #offcanvas [data-id="button"] {
    align-self: stretch;
    border-top: 1px solid #e1e5eb;
  }

  #offcanvas .sr-panel-tagline,
  #search-modal .sr-panel-tagline {
    display: block;
    margin: 0;
    font-size: 11px;
    font-weight: 700;
    line-height: 14px;
    color: #1b4db1;
    letter-spacing: 0.05483em;
    white-space: nowrap;
  }

  #search-modal .sr-search-brand {
    position: absolute;
    /* Blocksy's animated content begins after its 32px actions row. */
    top: -22px;
    left: 16px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    pointer-events: none;
  }

  #search-modal .sr-search-brand > img {
    display: block;
    width: auto;
    height: 20px;
    max-width: none;
  }

  #search-modal .sr-panel-tagline { color: #fff; letter-spacing: 0.05326em; }

  /* Widths mirror Ajax Search Pro's box width settings (420px, 92% to 640px); 0.8px is its border. */
  #search-modal .sr-search-advanced {
    display: flex;
    justify-content: flex-end;
    width: 420px;
    margin: 0 auto;
    padding-right: 0.8px;
    font-size: 13px;
    font-weight: 600;
    line-height: 18px;
  }

  #search-modal .sr-search-advanced a {
    padding: 12px 0;
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 3px;
    outline-color: #fff;
  }

  /* Live results moved into the panel by fixture-time.js: in the flow under
     the box, above Advanced Search, at the box's width. */
  #search-modal .asp_r_1 {
    position: static !important;
    width: 420px !important;
    margin: 12px auto 0 !important;
  }

  #search-modal .ct-panel-content {
    position: relative;
    justify-content: flex-start !important;
    padding-top: 64px !important;
  }

  #search-modal div[id*="ajaxsearchpro"] .probox {
    display: flex !important;
    align-items: center !important;
    min-height: 44px !important;
    height: 44px !important;
    margin: 0 !important;
    padding: 0 4px 0 14px !important;
    border: 0 !important;
    border-radius: 8px !important;
    background: #fff !important;
  }

  #search-modal div[id*="ajaxsearchpro"] .proinput,
  #search-modal div[id*="ajaxsearchpro"] .proinput input {
    min-height: 44px !important;
    height: 44px !important;
  }

  #search-modal div[id*="ajaxsearchpro"] .proinput input {
    padding-top: 0 !important;
    padding-left: 0 !important;
    font-size: 16px !important;
    /* ASP removes the focused outline; animating it on blur flashes dark edges. */
    transition-property: color, border-color, background-color;
  }

  #search-modal div[id*="ajaxsearchpro"] .proinput input::placeholder {
    color: #6b7280 !important;
    opacity: 1;
  }

  #search-modal div[id*="ajaxsearchpro"] .promagnifier {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 auto !important;
    align-self: center !important;
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  #search-modal div[id*="ajaxsearchpro"] .promagnifier .innericon {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
  }

  #search-modal div[id*="ajaxsearchpro"] .promagnifier svg {
    display: block !important;
    width: 18px !important;
    height: 18px !important;
  }
}

@media (min-width: 690px) and (max-width: 999.98px) {
  /* The native tablet actions row is 42px; the brand still starts at y=10. */
  #search-modal .sr-search-brand { top: -32px; }
}

@media (max-width: 640px) {
  #search-modal .sr-search-advanced { width: 92%; }
  #search-modal .asp_r_1 { width: 92% !important; }
}
/* Blocksy keeps the sports menu; V3 scrolls it instead of collapsing items. */
#header a:focus-visible { outline: 2px solid #1b4db1; outline-offset: 2px; }
#header .sr-menu-empty:not(.current-menu-item) > a,
#offcanvas .sr-menu-empty:not(.current-menu-item) > a,
#footer .menu-sports-container .sr-menu-empty:not(.current-menu-item) > a { color: #6b7280; }
#header-menu-1 { overflow-x: auto; overflow-y: hidden; scrollbar-width: none; padding: 4px; margin: -4px; height: calc(100% + 8px); }
/* Fit the list inside the focus-ring padding instead of inheriting the outer height. */
#header-menu-1 > .menu { height: 100%; }
#header-menu-1::-webkit-scrollbar { display: none; }
#header [data-row] > .ct-container { width: calc(100% - 80px); }
@media (max-width: 999.98px) {
  #header [data-row] > .ct-container { width: calc(100% - 32px); }
}

/* Shared byline under the opted-in footer logo; native widgets own the copy. */
#footer .sr-footer-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3.5px;
}
#footer .sr-footer-logo { margin: 0; line-height: 0; }
#footer .sr-footer-tagline {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  line-height: 14px;
  color: #1b4db1;
  letter-spacing: 0.05452em;
  white-space: nowrap;
}

/* Reuse the native Sports menu in the existing two-column footer area. */
#footer .menu-sports-container > ul { display: block; columns: 2; column-gap: 2em; font-size: 14px; }
#footer .menu-sports-container > ul > li { break-inside: avoid; margin: 0; }
#footer .menu-sports-container .menu-item-home { display: none; }
#footer .menu-sports-container .current-menu-item > a { color: #1b4db1; }

/* Extend Blocksy's existing home link across the logo and native tagline. */
#header .site-branding { position: relative; }
#header .site-branding > a.site-logo-container {
  position: static;
  text-decoration: none;
}
#header .site-branding > a.site-logo-container::after {
  content: "";
  position: absolute;
  inset: 0;
}

/* Advanced Search: reserve the native filter tray before ASP inserts it.
   Six 300px filters form one, two or three columns in the available space. */
#post-945 .wp-block-group:has(> #wpdreams_asp_settings_3) {
  container: sr-search-filters / inline-size;
}
#post-945 #wpdreams_asp_settings_3 {
  display: flow-root;
  min-height: 447px;
}
@container sr-search-filters (min-width: 600px) {
  #post-945 #wpdreams_asp_settings_3 { min-height: 235px; }
}
@container sr-search-filters (min-width: 900px) {
  #post-945 #wpdreams_asp_settings_3 { min-height: 163px; }
}
