/**
 * [atsp_search] на головній (Elementor) — 1:1 з /katalog/app/.
 * Тільки скидання конфліктів Kit + вирівнювання порталених панелей.
 */

/* Elementor Kit: не чіпати глобальні footer/button всередині наших sheet */
body[class*="elementor-kit-"].atsp-embed-active:not(.atsp-catalog-page) > .anex-panel-portal footer.anex-sheet-foot {
  position: static !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)) !important;
  border-top: 1px solid #e8ecf2 !important;
  border-bottom: 0 !important;
  border-left: 0 !important;
  border-right: 0 !important;
  border-radius: 0 !important;
  background: #fff !important;
  background-color: #fff !important;
  box-shadow: none !important;
  flex-shrink: 0 !important;
  z-index: auto !important;
}

body[class*="elementor-kit-"].atsp-embed-active:not(.atsp-catalog-page) > .anex-panel-portal .anex-dest-selection-bar[hidden] {
  display: none !important;
}

body[class*="elementor-kit-"].atsp-embed-active:not(.atsp-catalog-page) > .anex-panel-portal .anex-sheet-search-input {
  display: block !important;
  width: 100% !important;
  min-height: 44px !important;
  height: auto !important;
  padding: 12px 44px 12px 14px !important;
  line-height: 1.35 !important;
  font-size: 16px !important;
  font-weight: 400 !important;
  border: 1px solid #e0e5ec !important;
  border-radius: 12px !important;
  background: #fff !important;
  color: #1a2233 !important;
  -webkit-text-fill-color: #1a2233 !important;
  box-shadow: none !important;
  overflow: visible !important;
}

body[class*="elementor-kit-"].atsp-embed-active:not(.atsp-catalog-page) > .anex-panel-portal .anex-dest-selection-bar {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  margin: 0 12px 8px !important;
  padding: 10px 12px !important;
  border-radius: 12px !important;
  background: #f0f4fa !important;
  border: 1px solid #dce4f0 !important;
}

body[class*="elementor-kit-"].atsp-embed-active:not(.atsp-catalog-page) > .anex-panel-portal .anex-dest-selection-clear {
  margin-left: auto !important;
  min-height: 0 !important;
  height: auto !important;
  line-height: 1.2 !important;
  padding: 6px 12px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: #fde8ea !important;
  color: #c62828 !important;
  -webkit-text-fill-color: #c62828 !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  box-shadow: none !important;
}

@media (max-width: 768px) {
  body[class*="elementor-kit-"].atsp-embed-active:not(.atsp-catalog-page) > .anex-panel-portal.anex-panel--destination .anex-sheet {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    max-height: 100dvh !important;
    background: #fff !important;
  }

  body[class*="elementor-kit-"].atsp-embed-active:not(.atsp-catalog-page) > .anex-panel-portal.anex-panel--destination .anex-sheet-body,
  body[class*="elementor-kit-"].atsp-embed-active:not(.atsp-catalog-page) > .anex-panel-portal.anex-panel--destination .anex-sheet-body--flush {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow: hidden !important;
    padding: 0 !important;
  }

  body[class*="elementor-kit-"].atsp-embed-active:not(.atsp-catalog-page) > .anex-panel-portal.anex-panel--destination .anex-dest-picker {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
  }

  body[class*="elementor-kit-"].atsp-embed-active:not(.atsp-catalog-page) > .anex-panel-portal.anex-panel--destination .anex-dest-browse {
    display: block !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: hidden !important;
  }

  body[class*="elementor-kit-"].atsp-embed-active:not(.atsp-catalog-page) > .anex-panel-portal.anex-panel--destination .anex-dest-col--countries {
    max-height: 100% !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    background: #fff !important;
    border-right: 0 !important;
  }

  body[class*="elementor-kit-"].atsp-embed-active:not(.atsp-catalog-page) > .anex-panel-portal .anex-dest-countries,
  body[class*="elementor-kit-"].atsp-embed-active:not(.atsp-catalog-page) > .anex-panel-portal .anex-dest-regions-list {
    list-style: none !important;
    margin: 0 !important;
    padding: 6px 0 !important;
  }

  body[class*="elementor-kit-"].atsp-embed-active:not(.atsp-catalog-page) > .anex-panel-portal button.anex-dest-country,
  body[class*="elementor-kit-"].atsp-embed-active:not(.atsp-catalog-page) > .anex-panel-portal .anex-dest-region-row {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    width: 100% !important;
    min-height: 0 !important;
    height: auto !important;
    padding: 14px 16px !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    font-family: inherit !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    line-height: 1.35 !important;
    color: #1a2233 !important;
    -webkit-text-fill-color: #1a2233 !important;
    text-align: left !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    box-shadow: none !important;
    overflow: visible !important;
    cursor: pointer !important;
  }

  body[class*="elementor-kit-"].atsp-embed-active:not(.atsp-catalog-page) > .anex-panel-portal .anex-dest-country-name,
  body[class*="elementor-kit-"].atsp-embed-active:not(.atsp-catalog-page) > .anex-panel-portal .anex-dest-country-flag {
    line-height: 1.35 !important;
    overflow: visible !important;
  }

  body[class*="elementor-kit-"].atsp-embed-active:not(.atsp-catalog-page) > .anex-panel-portal .anex-dest-country.is-active {
    background: #e8eef8 !important;
    background-color: #e8eef8 !important;
  }

  body[class*="elementor-kit-"].atsp-embed-active:not(.atsp-catalog-page) > .anex-panel-portal .anex-dest-country-chevron {
    color: #9aa3b5 !important;
    -webkit-text-fill-color: #9aa3b5 !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
  }

  body[class*="elementor-kit-"].atsp-embed-active:not(.atsp-catalog-page) > .anex-panel-portal .anex-dest-picker-hint {
    margin: 0 !important;
    padding: 10px 16px 0 !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
    color: #6b7792 !important;
  }

  body[class*="elementor-kit-"].atsp-embed-active:not(.atsp-catalog-page) > .anex-panel-portal.anex-panel--destination.is-excursion-picker .anex-sheet-foot--dest {
    display: none !important;
  }

  body[class*="elementor-kit-"].atsp-embed-active:not(.atsp-catalog-page) > .anex-panel-portal.anex-panel--destination.is-excursion-picker .anex-dest-countries-divider {
    padding: 10px 16px 4px !important;
    list-style: none !important;
  }

  body[class*="elementor-kit-"].atsp-embed-active:not(.atsp-catalog-page) > .anex-panel-portal.anex-panel--destination.is-excursion-picker .anex-dest-countries-divider span {
    display: block !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: 0.04em !important;
    text-transform: uppercase !important;
    color: #8b95a8 !important;
  }

  body[class*="elementor-kit-"].atsp-embed-active:not(.atsp-catalog-page) > .anex-panel-portal.anex-panel--destination.is-excursion-picker .anex-dest-countries-divider--top span {
    color: #1f6feb !important;
  }

  body[class*="elementor-kit-"].atsp-embed-active:not(.atsp-catalog-page) > .anex-panel-portal.anex-panel--destination.is-excursion-picker .anex-dest-browse {
    display: block !important;
    grid-template-columns: 1fr !important;
    max-width: 100% !important;
  }

  body[class*="elementor-kit-"].atsp-embed-active:not(.atsp-catalog-page) > .anex-panel-portal.anex-panel--destination.is-excursion-picker .anex-dest-col--countries {
    max-width: 100% !important;
    border-right: none !important;
  }

  body[class*="elementor-kit-"].atsp-embed-active:not(.atsp-catalog-page) > .anex-panel-portal.anex-panel--destination:not(.is-regions-step) .anex-sheet-foot--dest {
    display: none !important;
  }

  body[class*="elementor-kit-"].atsp-embed-active:not(.atsp-catalog-page) > .anex-panel-portal.anex-panel--destination.is-regions-step .anex-sheet-foot--dest {
    display: flex !important;
  }
}
