/* ============================================================
   Map screen — full-bleed Naver map with floating top chrome.
   .screen--map already has position: absolute; inset: 0 from .screen,
   so children can position absolute against it directly.
   ============================================================ */

.screen--map .screen__top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-overlay);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4) var(--space-3);
  /* push the search bar below the iOS status bar / dynamic island */
  padding-top: calc(var(--space-3) + env(safe-area-inset-top, 0px));
  pointer-events: none; /* let map drag through padding */
}

.screen--map .screen__top > * {
  pointer-events: auto;
}

/* Category tabs + filter button row (floating over the map) */
.map__tabs-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
}

.map__tabs-row .tabs {
  flex: 1;
  min-width: 0;
}

.screen--map .screen__body {
  position: absolute;
  inset: 0;
  z-index: var(--z-map);
}

.map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: var(--color-surface-tonal);
}

.map__loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-sm);
  color: var(--color-text-tertiary);
  pointer-events: none;
}

/* Pin used inside Naver HtmlIcon. Drop-shadow follows the pin's path. */
.map-pin {
  filter: drop-shadow(0 2px 4px rgba(42, 33, 24, 0.22));
}

/* ---------- Zoom control ---------- */

.map-zoom {
  position: absolute;
  right: var(--space-3);
  bottom: calc(var(--nav-clearance) + var(--space-5));
  z-index: var(--z-overlay);
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--color-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.map-zoom__btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-primary);
  transition: background-color var(--duration-fast) var(--easing-standard);
}

.map-zoom__btn:hover {
  background: var(--color-surface-tonal);
}

.map-zoom__btn:active {
  background: var(--color-brand-primary-tint);
}

.map-zoom__btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2.5;
  fill: none;
  stroke-linecap: round;
}

.map-zoom__track {
  position: relative;
  width: 4px;
  height: 96px;
  margin: var(--space-1) 0;
  background: var(--color-border-default);
  border-radius: var(--radius-full);
  cursor: pointer;
  touch-action: none;
}

/* Wider hit area for easier dragging */
.map-zoom__track::before {
  content: "";
  position: absolute;
  inset: -8px -14px;
}

.map-zoom__fill {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 50%;
  background: var(--color-brand-primary);
  border-radius: var(--radius-full);
  transition: height var(--duration-fast) var(--easing-standard);
}

.map-zoom__thumb {
  position: absolute;
  left: 50%;
  bottom: 50%;
  transform: translate(-50%, 50%);
  width: 20px;
  height: 6px;
  background: var(--color-surface);
  border: 1.5px solid var(--color-text-secondary);
  border-radius: var(--radius-xs);
  cursor: grab;
  pointer-events: none; /* track handles all pointer events */
  transition: bottom var(--duration-fast) var(--easing-standard);
}
