/* HY-96: mobile map preview. Sideways swipe slides the next nearby card in.
   Swipe up grows the sheet. Swipe down collapses it, then closes it.
   The grab handle is outside the scroller so a downward pull is never swallowed
   by inner scroll or the map. */

.hy-map-preview.hy-preview-swipe {
  overflow: hidden;
  touch-action: none;
  overscroll-behavior: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  max-height: min(58vh, 520px);
}

.hy-map-preview.hy-preview-swipe.is-expanded {
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  max-height: none;
  height: auto;
  border-radius: 0;
  display: flex;
  flex-direction: column;
  touch-action: manipulation;
}

.hy-map-preview.hy-preview-swipe.is-dragging {
  max-height: none;
  transition: none !important;
  touch-action: none;
}

.hy-map-preview.hy-preview-swipe.is-settling {
  max-height: none;
}

.hy-map-preview.hy-preview-swipe.is-dragging.is-expanded {
  touch-action: none;
}

.hy-preview-viewport {
  overflow: hidden;
  width: 100%;
}

.hy-map-preview.is-expanded .hy-preview-viewport {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
}

.hy-preview-track {
  display: flex;
  width: 300%;
  align-items: flex-start;
  will-change: transform;
}

.hy-map-preview.is-expanded .hy-preview-track {
  height: 100%;
  align-items: stretch;
}

.hy-preview-slide {
  flex: 0 0 33.3333%;
  width: 33.3333%;
  min-width: 0;
  box-sizing: border-box;
}

.hy-map-preview.is-expanded .hy-preview-slide {
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  touch-action: none;
}

.hy-preview-scroll {
  overflow: hidden;
  min-height: 0;
  touch-action: auto;
}

.hy-map-preview.is-expanded .hy-preview-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: none;
  touch-action: pan-y;
}

.hy-map-preview.hy-preview-swipe .hy-map-sheet-one .hy-map-sheet-grab {
  touch-action: none;
  flex: none;
  min-height: 28px;
  padding: 10px 14px 8px;
  cursor: grab;
}

.hy-map-preview.hy-preview-swipe:not(.is-expanded) .hy-map-sheet,
.hy-map-preview.hy-preview-swipe:not(.is-expanded) .hy-map-sheet-one {
  max-height: none;
  overflow: hidden;
}

.hy-map-preview.is-expanded .hy-map-sheet,
.hy-map-preview.is-expanded .hy-map-sheet-one {
  max-height: none;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  border-radius: 0;
  display: flex;
  flex-direction: column;
}

.hy-preview-track.hy-preview-anim {
  transition: transform 0.28s ease;
}

.hy-map-preview.hy-preview-anim {
  transition: transform 0.26s ease, height 0.26s ease, top 0.26s ease;
}

@media (prefers-reduced-motion: reduce) {
  .hy-preview-track.hy-preview-anim,
  .hy-map-preview.hy-preview-anim {
    transition: none;
  }
}
