/* Keep native map previews readable and inside the visible guide map. */
body .jax-guide-map .mapboxgl-popup {
  --jax-popup-limit: min(320px, calc(100dvh - 120px));
  box-sizing: border-box;
  z-index: 4;
}
body .jax-guide-map .mapboxgl-popup-content {
  box-sizing: border-box;
  padding: 0 !important;
  max-height: var(--jax-popup-limit) !important;
  overflow: hidden !important;
}
body .jax-guide-map .mapboxgl-popup .elementor-8956 {
  max-height: max(0px, calc(var(--jax-popup-limit) - 2px)) !important;
  overflow: auto !important;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}
body .jax-guide-map .mapboxgl-popup .jax-activity-preview .elementor-widget-container {
  height: auto !important;
  min-height: 0 !important;
  text-align: left !important;
}
body .jax-guide-map .mapboxgl-popup .jax-activity-preview > .elementor-container > .elementor-column > .elementor-widget-wrap {
  box-sizing: border-box;
  grid-template-columns: 76px minmax(0, 1fr) !important;
  gap: 5px 12px !important;
  padding: 14px !important;
}
body .jax-guide-map .mapboxgl-popup .jax-activity-preview .jax-activity-preview-photo,
body .jax-guide-map .mapboxgl-popup .jax-activity-preview .jax-activity-preview-photo img {
  width: 76px !important;
}
body .jax-guide-map .mapboxgl-popup .jax-activity-preview .jax-activity-preview-photo img {
  height: 100px !important;
}
body .jax-guide-map .mapboxgl-popup .jax-activity-preview .jet-listing-dynamic-field,
body .jax-guide-map .mapboxgl-popup .jax-activity-preview .jet-listing-dynamic-field__inline-wrap,
body .jax-guide-map .mapboxgl-popup .jax-activity-preview .jet-listing-dynamic-field__content {
  width: 100% !important;
  min-width: 0 !important;
  justify-content: flex-start !important;
  text-align: left !important;
  padding: 0 !important;
  margin: 0 !important;
}
body .jax-guide-map .mapboxgl-popup .jax-activity-preview .jax-activity-preview-title .jet-listing-dynamic-field__content,
body .jax-guide-map .mapboxgl-popup .jax-activity-preview .jax-activity-preview-title .jet-listing-dynamic-field__content * {
  font: 600 14px/1.4 Poppins, sans-serif !important;
  letter-spacing: 0 !important;
  color: #173c46 !important;
  -webkit-line-clamp: unset !important;
  white-space: normal !important;
  overflow: visible !important;
  overflow-wrap: anywhere;
}
body .jax-guide-map .mapboxgl-popup .jax-activity-preview .jax-activity-preview-address .jet-listing-dynamic-field__content,
body .jax-guide-map .mapboxgl-popup .jax-activity-preview .jax-activity-preview-address .jet-listing-dynamic-field__content * {
  font: 400 12px/1.4 Poppins, sans-serif !important;
  color: #637b80 !important;
  -webkit-line-clamp: unset !important;
  white-space: normal !important;
  overflow: visible !important;
  overflow-wrap: anywhere;
}
body .jax-guide-map .mapboxgl-popup .jax-activity-preview .jet-listing-dynamic-field__content {
  display: block !important;
}
body .jax-guide-map .mapboxgl-popup .jax-activity-preview .jax-activity-preview-category,
body .jax-guide-map .mapboxgl-popup .jax-activity-preview .jax-activity-preview-category * {
  font: 500 11px/1.4 Poppins, sans-serif !important;
  color: #25636b !important;
  text-align: left !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
body .jax-guide-map .mapboxgl-popup .jax-activity-preview .jax-activity-preview-category a:not(:focus-visible) {
  outline: none !important;
}
body .jax-guide-map .mapboxgl-popup .jax-activity-preview .jax-activity-preview-link a {
  width: fit-content !important;
  min-height: 44px !important;
  font: 600 13px/1.4 Poppins, sans-serif !important;
  margin: 2px 0 0 !important;
  padding: 8px 12px !important;
}
body .jax-guide-map .mapboxgl-popup .mapboxgl-popup-close-button {
  position: absolute !important;
  top: 3px !important;
  right: 3px !important;
  width: 44px !important;
  height: 44px !important;
  box-shadow: none !important;
}
body .jax-guide-map .mapboxgl-popup .jax-activity-preview .jax-activity-preview-category,
body .jax-guide-map .mapboxgl-popup .jax-activity-preview .jax-activity-preview-title {
  padding-right: 36px !important;
}
@media (max-width: 767px) {
  body .jax-guide-map .mapboxgl-popup {
    --jax-popup-limit: var(--jax-popup-height, max(44px, calc(100dvh - var(--jax-header-edge, 64px) - var(--jax-guide-controls-height, 160px) - 198px)));
    top: auto !important;
    bottom: var(--jax-popup-bottom, 36px) !important;
    left: var(--jax-popup-left, 12px) !important;
    right: var(--jax-popup-right, 12px) !important;
    width: auto !important;
    max-width: none !important;
    transform: none !important;
  }
  body .jax-guide-map .mapboxgl-popup[data-jax-outside-view] {
    visibility: hidden !important;
    pointer-events: none !important;
  }
  body .jax-guide-map .mapboxgl-popup .jax-activity-preview > .elementor-container > .elementor-column > .elementor-widget-wrap {
    grid-template-columns: 68px minmax(0, 1fr) !important;
    gap: 4px 10px !important;
    padding: 12px !important;
  }
  body .jax-guide-map .mapboxgl-popup .jax-activity-preview .jax-activity-preview-photo,
  body .jax-guide-map .mapboxgl-popup .jax-activity-preview .jax-activity-preview-photo img {
    width: 68px !important;
  }
  body .jax-guide-map .mapboxgl-popup .jax-activity-preview .jax-activity-preview-photo img {
    height: 90px !important;
  }
}

/* Area-guide groups match the existing teal map controls and remain touch-friendly. */
.jax-guide-map .jax-guide-in-cluster { visibility: hidden !important; pointer-events: none !important; }
.jax-guide-clusters { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.jax-guide-map button.jax-guide-cluster {
  position: absolute; transform: translate(-50%, -50%); pointer-events: auto;
  display: flex; align-items: center; justify-content: center; min-width: 96px; min-height: 44px;
  padding: 9px 15px; margin: 0; border: 2px solid #fff; border-radius: 24px;
  background: #173c46; color: #fff; font: 600 13px/1.3 Poppins, sans-serif;
  box-shadow: 0 2px 8px #173c4640; white-space: nowrap; cursor: pointer;
}
.jax-guide-map button.jax-guide-cluster:hover { background: #25636b; }
.jax-guide-map button.jax-guide-cluster:focus-visible,
.jax-guide-cluster-list button:focus-visible { outline: 3px solid #d89b36; outline-offset: 3px; }
.jax-guide-map .jax-guide-cluster-note {
  position: absolute; top: 12px; left: 12px; z-index: 3; max-width: calc(100% - 74px);
  padding: 7px 10px; margin: 0; border-radius: 8px; background: #fffffff2; color: #173c46;
  box-shadow: 0 1px 5px #173c461a; font: 400 12px/1.4 Poppins, sans-serif; pointer-events: none;
}
.jax-guide-cluster-note[hidden] { display: none !important; }
.jax-guide-map .jax-guide-cluster-list {
  position: absolute; z-index: 6; top: 16px; left: 16px; right: 16px;
  box-sizing: border-box; max-width: 380px; max-height: min(65%, 340px); overflow: auto;
  overscroll-behavior: contain; padding: 16px; border: 1px solid #d9e5e4; border-radius: 16px;
  background: #fff; color: #173c46; box-shadow: 0 8px 30px #173c4633;
}
.jax-guide-cluster-list h3 { margin: 0 60px 12px 0; font: 600 16px/1.4 Poppins, sans-serif; }
.jax-guide-cluster-list ul { list-style: none; padding: 0; margin: 0; }
.jax-guide-cluster-list li + li { border-top: 1px solid #e5eeed; }
.jax-guide-cluster-list li button {
  display: block; width: 100%; min-height: 44px; padding: 12px 4px; border: 0; border-radius: 0;
  background: transparent; color: #173c46; text-align: left; white-space: normal;
  font: 600 13px/1.45 Poppins, sans-serif; cursor: pointer;
}
.jax-guide-cluster-list li button:hover { background: #f1f7f6; }
.jax-guide-cluster-list small { display: block; color: #506b71; font: 400 11px/1.5 Poppins, sans-serif; }
.jax-guide-cluster-list .jax-guide-cluster-close {
  position: absolute; top: 6px; right: 8px; min-height: 44px; border: 0; padding: 8px;
  background: transparent; color: #173c46; font: 500 12px/1.4 Poppins, sans-serif;
}
