/* Review 3: first-party search corrections from the approved PDF markup. */
.home-page .tour-search {
  padding-bottom: 104px;
}

.custom-search [data-field="tourists"] > .field-button {
  border-right-color: transparent;
}

.custom-search .popover {
  max-height: calc(100dvh - 24px);
  overflow: auto;
  overscroll-behavior: contain;
}

.custom-search .option-list,
.custom-search .filter-options {
  max-height: min(420px, calc(100dvh - 230px));
  overflow-y: auto;
  overscroll-behavior: contain;
}

@media (max-width: 768px) {
  .home-page .tour-search {
    padding-bottom: 76px;
  }

  .custom-search .popover {
    right: 16px;
    bottom: max(24px, env(safe-area-inset-bottom));
    left: 16px;
    max-height: calc(100dvh - 24px);
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
  }

  .custom-search .option-list,
  .custom-search .filter-options {
    max-height: calc(100dvh - 190px - env(safe-area-inset-bottom));
  }
}

@media (prefers-reduced-motion: reduce) {
  .custom-search *,
  .custom-search *::before,
  .custom-search *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}
