/* APD 563 — restore the canonical vertical search tabs around APD 562 artwork. */
@media (max-width: 767px) {
  html body.apd380-mobile-search-canonical.apd186-search-modal-open:not(.apd370-location-expanded) .apd186-search-topbar:not([hidden]) {
    box-sizing: border-box !important;
    display: flex !important;
    align-items: flex-end !important;
    justify-content: center !important;
    width: 100% !important;
    height: 80px !important;
    min-height: 80px !important;
    padding: 4px 72px 0 16px !important;
    overflow: visible !important;
    background: #f7f7f7 !important;
    border: 0 !important;
    box-shadow: none !important;
  }

  html body.apd380-mobile-search-canonical.apd186-search-modal-open:not(.apd370-location-expanded) .apd186-search-tabs {
    box-sizing: border-box !important;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    align-items: end !important;
    justify-content: stretch !important;
    gap: 4px !important;
    width: min(330px, 100%) !important;
    min-width: 0 !important;
    height: 78px !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    background: transparent !important;
    scrollbar-width: none !important;
    touch-action: pan-x !important;
    overscroll-behavior-x: contain !important;
    scroll-snap-type: none !important;
  }

  html body.apd380-mobile-search-canonical.apd186-search-modal-open:not(.apd370-location-expanded) .apd186-search-tabs::-webkit-scrollbar {
    display: none !important;
  }

  html body.apd380-mobile-search-canonical.apd186-search-modal-open:not(.apd370-location-expanded) .apd186-search-tab {
    box-sizing: border-box !important;
    position: relative !important;
    display: flex !important;
    flex: 0 1 auto !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 2px !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 76px !important;
    min-height: 76px !important;
    margin: 0 !important;
    padding: 0 1px 5px !important;
    overflow: visible !important;
    color: #717171 !important;
    border: 0 !important;
    border-bottom: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    transform: none !important;
    touch-action: pan-x !important;
    -webkit-tap-highlight-color: transparent !important;
  }

  html body.apd380-mobile-search-canonical.apd186-search-modal-open:not(.apd370-location-expanded) .apd186-search-tab::before {
    content: none !important;
    display: none !important;
  }

  /* The modal clones the real discovery artwork. Retire every fallback icon so
     each category paints exactly one APD 562 illustration. */
  html body.apd380-mobile-search-canonical.apd186-search-modal-open:not(.apd370-location-expanded) .apd186-search-tab > span {
    display: none !important;
  }

  html body.apd380-mobile-search-canonical.apd186-search-modal-open:not(.apd370-location-expanded) .apd186-search-tab > span:is(.is-stays, .is-experiences, .is-services) {
    display: grid !important;
    place-items: center !important;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    flex: 0 0 36px !important;
    margin: 0 0 2px !important;
    padding: 0 !important;
    overflow: visible !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
  }

  html body.apd380-mobile-search-canonical.apd186-search-modal-open:not(.apd370-location-expanded) .apd186-search-tab > span:is(.is-stays, .is-experiences, .is-services) > .apd562-icon {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  /* Safari rasterizes a strong filter on the root balloon SVG as a pink
     rectangle. Keep the neutral contour shadow on the root; the real flame,
     burner aura and red envelope inside the SVG remain the active light. */
  html body.apd380-mobile-search-canonical.apd186-search-modal-open:not(.apd370-location-expanded) .apd186-search-tab .apd562-icon-experiences > svg,
  html body.apd380-mobile-search-canonical.apd186-search-modal-open:not(.apd370-location-expanded) .apd186-search-tab:is(.is-active, [aria-current="page"], [aria-selected="true"]) .apd562-icon-experiences > svg {
    filter: drop-shadow(0 2px 1.5px rgba(90, 0, 24, .28)) !important;
  }

  html body.apd380-mobile-search-canonical.apd186-search-modal-open:not(.apd370-location-expanded) .apd186-search-tab > strong {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    color: inherit !important;
    font-size: clamp(13px, 3.7vw, 15px) !important;
    line-height: 18px !important;
    font-weight: 500 !important;
    letter-spacing: -.025em !important;
    text-align: center !important;
    white-space: nowrap !important;
    overflow: visible !important;
  }

  html body.apd380-mobile-search-canonical.apd186-search-modal-open:not(.apd370-location-expanded) .apd186-search-tab:is(.is-active, [aria-current="page"], [aria-selected="true"]) {
    color: #222 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
  }

  html body.apd380-mobile-search-canonical.apd186-search-modal-open:not(.apd370-location-expanded) .apd186-search-tab:is(.is-active, [aria-current="page"], [aria-selected="true"]) > strong {
    font-weight: 650 !important;
  }

  html body.apd380-mobile-search-canonical.apd186-search-modal-open:not(.apd370-location-expanded) .apd186-search-tab::after {
    content: "" !important;
    position: absolute !important;
    left: 17% !important;
    right: 17% !important;
    bottom: 0 !important;
    height: 3px !important;
    border-radius: 999px !important;
    background: transparent !important;
  }

  html body.apd380-mobile-search-canonical.apd186-search-modal-open:not(.apd370-location-expanded) .apd186-search-tab:is(.is-active, [aria-current="page"], [aria-selected="true"])::after {
    background: #222 !important;
  }

  html body.apd380-mobile-search-canonical.apd186-search-modal-open:not(.apd370-location-expanded) .apd186-search-portal {
    padding-top: 80px !important;
  }
}
