/*
 * Presentation only; enqueue after the modernization "style" handle.
 * ACF owns the complete header rich text. WooCommerce owns the complete store
 * notice, its first-visit visibility and its dismissal. The server helper puts
 * only the welcome message in native details; heat warnings stay fully visible.
 * Expanded copy must grow naturally. Never override the outer notice display.
 *
 * Match the theme's phone / wider touch-phone breakpoint. Fine-pointer desktop
 * heat-warning layouts above 767px are deliberately unchanged. The approved
 * native welcome disclosure is compact on both mobile and desktop.
 */
body.bb-modernization-enabled .woocommerce-store-notice > .bb-store-notice-row {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  text-align: start;
}

body.bb-modernization-enabled .woocommerce-store-notice > .bb-store-notice-row > .bb-store-notice-details {
  flex: 1 1 auto;
  min-width: 0;
}

body.bb-modernization-enabled .woocommerce-store-notice > .bb-store-notice-row > .bb-store-notice-details > summary {
  box-sizing: border-box;
  min-height: 44px;
  padding-block: .75rem;
  font-size: max(14px, .875rem);
  font-weight: 700;
  line-height: 1.4;
  cursor: pointer;
}

body.bb-modernization-enabled .woocommerce-store-notice > .bb-store-notice-row > .bb-store-notice-details > summary:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

body.bb-modernization-enabled .woocommerce-store-notice > .bb-store-notice-row > .bb-store-notice-details > summary:hover {
  text-decoration: underline;
}

body.bb-modernization-enabled .woocommerce-store-notice > .bb-store-notice-row > .bb-store-notice-details > .bb-store-notice-message {
  margin-top: .375rem;
  overflow-wrap: anywhere;
}

body.bb-modernization-enabled .woocommerce-store-notice > .bb-store-notice-row > .woocommerce-store-notice__dismiss-link {
  flex: 0 0 auto;
  min-width: 44px;
  min-height: 44px;
  margin: 0;
  padding: 0 .375rem;
}

body.bb-modernization-enabled .woocommerce-store-notice > .bb-store-notice-row > .woocommerce-store-notice__dismiss-link:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

@media (max-width: 767px), (max-width: 1024px) and (pointer: coarse) {
  /* Shipping and rich ACF copy have independent, naturally sized surfaces.
   * All claims remain visible before Slick initializes; no fixed-height mask. */
  body.bb-modernization-enabled > .page-holder > .top-menu > .banner-wrapper > .banner-upper {
    height: auto;
    min-height: 44px;
    max-height: none;
  }

  body.bb-modernization-enabled .top-menu .banner-upper .banner-item {
    min-height: 44px;
    align-items: center !important;
    justify-content: center !important;
    text-align: center;
  }

  body.bb-modernization-enabled .top-menu .banner-upper .banner-item > :is(img, picture) {
    flex: 0 0 auto;
    align-self: center;
  }

  body.bb-modernization-enabled .top-menu .banner-upper .banner-item p {
    min-width: 0;
    margin-block: 0;
    line-height: 1.4;
    text-align: center;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  /* Only the header banner emitted by menu_banner_info, not footer rich text,
   * delivery carousel copy or checkout/payment acknowledgments. */
  body.bb-modernization-enabled > .page-holder > .top-menu > .banner-wrapper > .banner-bottom {
    margin-top: 0;
    padding-block: .5rem;
  }

  body.bb-modernization-enabled > .page-holder > .top-menu > .banner-wrapper > .banner-bottom > .row {
    margin-inline: 0;
  }

  body.bb-modernization-enabled > .page-holder > .top-menu > .banner-wrapper > .banner-bottom > .row > .banner-content {
    padding-inline: .75rem;
    font-family: var(--bb-font-body, system-ui, sans-serif);
    font-size: max(14px, .875rem);
    font-weight: 400;
    line-height: 1.4;
    text-align: center !important;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
  }

  /* ACF can retain editor font sizes and centered paragraphs in nested spans.
   * Normalize only typography, leaving inline warning colors and emphasis,
   * every word, link and intentional line break intact. */
  body.bb-modernization-enabled > .page-holder > .top-menu > .banner-wrapper > .banner-bottom .banner-content :is(p, div, blockquote, ul, ol, li) {
    font-family: inherit !important;
    font-size: inherit !important;
    line-height: inherit !important;
    text-align: center !important;
  }

  body.bb-modernization-enabled > .page-holder > .top-menu > .banner-wrapper > .banner-bottom .banner-content :is(span, strong, b, em, i, a, small) {
    font-family: inherit !important;
    font-size: inherit !important;
    line-height: inherit !important;
  }

  body.bb-modernization-enabled > .page-holder > .top-menu > .banner-wrapper > .banner-bottom .banner-content :is(p, blockquote, ul, ol) {
    margin-block: 0 .375rem !important;
  }

  body.bb-modernization-enabled > .page-holder > .top-menu > .banner-wrapper > .banner-bottom .banner-content :is(h1, h2, h3, h4, h5, h6) {
    margin-block: 0 .375rem !important;
    font-family: inherit !important;
    font-size: max(14px, .9375rem) !important;
    font-weight: 700;
    line-height: 1.35 !important;
    letter-spacing: normal;
    text-align: center !important;
  }

  body.bb-modernization-enabled > .page-holder > .top-menu > .banner-wrapper > .banner-bottom .banner-content :is(strong, b) {
    font-weight: 700;
  }

  body.bb-modernization-enabled > .page-holder > .top-menu > .banner-wrapper > .banner-bottom .banner-content img {
    max-width: 100%;
    height: auto;
  }

  body.bb-modernization-enabled > .page-holder > .top-menu > .banner-wrapper > .banner-bottom .banner-content :is(p, blockquote, ul, ol, h1, h2, h3, h4, h5, h6):last-child {
    margin-bottom: 0 !important;
  }

  /* This sibling is Woo's original notice relocated by bb-modernization.js.
   * Do not target other .woocommerce-info/message/error or dismissal controls.
   * In particular, no display override may defeat Woo's inline display:none
   * when the customer uses its native Dismiss link. */
  body.bb-modernization-enabled > .page-holder > .top-menu + .woocommerce-store-notice {
    padding: .5rem .75rem;
    font-family: Arial, Helvetica, sans-serif;
    font-size: max(14px, .875rem);
    line-height: 1.4;
    text-align: start;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
  }

  body.bb-modernization-enabled > .page-holder > .top-menu + .woocommerce-store-notice :is(span, strong, b, em, i, a, small) {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
  }

  body.bb-modernization-enabled > .page-holder > .top-menu + .woocommerce-store-notice a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: .15em;
  }

  body.bb-modernization-enabled > .page-holder > .top-menu + .woocommerce-store-notice .woocommerce-store-notice__dismiss-link {
    min-width: 44px;
    min-height: 44px;
    margin-inline: .25rem 0;
    padding: 0 .375rem;
    font-weight: 700;
    vertical-align: middle;
  }

  body.bb-modernization-enabled > .page-holder > .top-menu + .woocommerce-store-notice a:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
  }
}

@media (max-width: 767px) {
  body.bb-modernization-enabled .top-menu .banner-upper .mobile-slider {
    width: calc(100% - 88px);
    margin-inline: 44px;
  }
  body.bb-modernization-enabled .top-menu .banner-upper .mobile-slider .slick-arrow {
    display: grid;
    place-items: center;
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
  }
}