/* ============================================================
   Mayoom venue search — full-screen map layer
   New, isolated implementation. Shares only color tokens with
   venue-explore-wireframe.html (--ink, --ink-2, --red, --line).
   Contains no code or behavior from archive/mayoom-v1.
   ============================================================ */

#venue-search-screen {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  z-index: 500;
  background: #35bde7;
  display: none;
  flex-direction: column;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 200ms ease, transform 200ms ease;
}
#venue-search-screen.open {
  display: flex;
}
#venue-search-screen.in {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  #venue-search-screen { transition: none; }
}

#venue-search-screen * { box-sizing: border-box; }
#venue-search-screen, #venue-search-screen input, #venue-search-screen button {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ---------- map canvas ---------- */
.vsm-map {
  position: absolute;
  inset: 0;
}
.vsm-map .mapboxgl-ctrl-logo,
.vsm-map .mapboxgl-ctrl-bottom-right,
.vsm-map .mapboxgl-ctrl-attrib { display: none !important; }

/* ---------- loading / error ---------- */
.vsm-status {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; background: #35bde7; color: #fff; text-align: center; padding: 32px;
}
.vsm-status[hidden] { display: none; }
.vsm-status .vsm-spinner {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2.5px solid rgba(255,255,255,.4); border-top-color: #fff;
  animation: vsm-spin 800ms linear infinite;
}
@media (prefers-reduced-motion: reduce) {
  .vsm-status .vsm-spinner { animation-duration: 1600ms; }
}
@keyframes vsm-spin { to { transform: rotate(360deg); } }
.vsm-status p { font-size: 15px; font-weight: 600; max-width: 280px; line-height: 1.4; }
.vsm-status button.vsm-fallback-btn {
  margin-top: 4px; background: #fff; color: #111; border: none; border-radius: 999px;
  padding: 12px 20px; font-size: 14px; font-weight: 700; cursor: pointer; min-height: 44px;
}

/* ---------- header ----------
   Exactly mirrors Explore's .search-field pill (same padding, radius,
   icon sizing, and text scale) rather than three separate circles.
   The leading icon is a back arrow instead of a magnifying glass, and
   the filter control lives inside the same pill, not floating outside it. */
.vsm-header {
  position: relative; z-index: 5;
  padding: max(14px, env(safe-area-inset-top, 0px)) 16px 4px;
}
.vsm-pill {
  display: flex; align-items: center; gap: 12px;
  background: #fff; border-radius: 999px;
  padding: 10px 14px 10px 18px; min-height: 56px;
  box-shadow: 0 2px 8px rgba(17,17,17,.15);
  cursor: pointer;
}
.vsm-back-icon { flex-shrink: 0; display: block; }
.vsm-summary {
  flex: 1; min-width: 0; background: none; border: none; padding: 0;
  display: block; text-align: left; cursor: pointer;
}
.vsm-summary .vsm-primary { display: block; font-size: 15px; font-weight: 650; color: #111; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vsm-summary .vsm-secondary { display: block; font-size: 12.5px; color: #6f6a66; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vsm-filter-btn {
  flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid #ece8e3; background: #fff;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  transition: transform .12s;
}
.vsm-filter-btn:active { transform: scale(.94); }

/* ---------- search-detail panel ---------- */
.vsm-detail {
  position: relative; z-index: 5; margin: 8px 16px 0;
  background: #fff; border-radius: 20px; box-shadow: 0 8px 28px rgba(17,17,17,.18);
  padding: 6px 18px 14px; opacity: 0; transform: translateY(-8px); pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}
.vsm-detail.open { opacity: 1; transform: translateY(0); pointer-events: auto; }
.vsm-field { padding: 14px 0; border-top: 1px solid #ece8e3; }
.vsm-field:first-child { border-top: none; }
.vsm-field label { display: block; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #6f6a66; margin-bottom: 6px; }
.vsm-field input[type="text"],
.vsm-field input[type="date"] {
  width: 100%; border: none; padding: 0; font-size: 16px; font-weight: 600; color: #111; background: none;
}
.vsm-field input:focus { outline: none; }
.vsm-stepper { display: flex; align-items: center; gap: 16px; }
.vsm-stepper button {
  width: 32px; height: 32px; border-radius: 50%; border: 1.5px solid #cfc9c1; background: #fff;
  font-size: 16px; font-weight: 700; color: #111; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.vsm-stepper button:disabled { opacity: .35; cursor: default; }
.vsm-stepper span { font-size: 15px; font-weight: 650; min-width: 16px; text-align: center; }
.vsm-detail-close {
  width: 100%; margin-top: 4px; background: #111; color: #fff; border: none; border-radius: 10px;
  min-height: 46px; font-size: 14px; font-weight: 700; cursor: pointer;
}

/* ---------- search this area ---------- */
.vsm-search-area-btn {
  position: absolute; top: 92px; left: 50%; transform: translateX(-50%) translateY(-6px);
  z-index: 4; background: #111; color: #fff; border: none; border-radius: 999px;
  padding: 10px 18px; font-size: 13.5px; font-weight: 700; box-shadow: 0 4px 14px rgba(17,17,17,.3);
  display: flex; align-items: center; gap: 6px; cursor: pointer;
  opacity: 0; pointer-events: none; transition: opacity 160ms ease, transform 160ms ease;
}
.vsm-search-area-btn.show { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }

/* ---------- price markers ---------- */
.vsm-marker {
  background: #fff; color: #111; border-radius: 16px; border: 1px solid rgba(17,17,17,.08);
  box-shadow: 0 2px 6px rgba(17,17,17,.18); font-size: 13px; font-weight: 700;
  padding: 7px 11px; cursor: pointer; white-space: nowrap;
  min-width: 44px; min-height: 28px; display: flex; align-items: center; justify-content: center;
  transition: transform 120ms ease, background 120ms ease, color 120ms ease;
}
.vsm-marker::before { content: '$'; }
.vsm-marker.selected { background: #e11900; color: #fff; border-color: #e11900; transform: scale(1.06); }
.vsm-marker-hit {
  width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
}
.vsm-cluster {
  background: #111; color: #fff; border-radius: 999px; font-size: 13px; font-weight: 700;
  min-width: 30px; height: 30px; padding: 0 10px; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 6px rgba(17,17,17,.25); cursor: pointer;
}

/* ---------- result preview carousel ----------
   Floating, individually-framed cards -- not a bottom sheet/pop-up
   tab. Each venue gets its own rounded card; swiping the row moves
   between them, syncing the selected map marker as it goes. */
.vsm-carousel {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 6;
  display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 0 calc(50% - 120px) max(18px, env(safe-area-inset-bottom, 0px));
  scrollbar-width: none; -ms-overflow-style: none;
  opacity: 0; transform: translateY(16px); pointer-events: none;
  transition: opacity 200ms ease, transform 200ms ease;
}
.vsm-carousel::-webkit-scrollbar { display: none; width: 0; height: 0; }
.vsm-carousel.open { opacity: 1; transform: translateY(0); pointer-events: auto; }
@media (prefers-reduced-motion: reduce) {
  .vsm-carousel, .vsm-search-area-btn, .vsm-detail { transition: none; }
}
/* The card frame itself is a square (equal width/height) -- photo
   fills most of it, name/info is a compact footer strip. */
.vsm-card {
  flex-shrink: 0; width: 240px; height: 240px; scroll-snap-align: center;
  background: #fff; border-radius: 20px; box-shadow: 0 8px 28px rgba(17,17,17,.22);
  overflow: hidden; display: flex; flex-direction: column; cursor: pointer;
}
.vsm-card-photo {
  width: 100%; flex: 1; min-height: 0; background: #efece9;
  display: flex; align-items: center; justify-content: center; color: #b9b2ab;
}
.vsm-card-body { flex-shrink: 0; padding: 8px 12px 10px; display: flex; flex-direction: column; gap: 1px; }
.vsm-card-name-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.vsm-card-name { font-size: 15px; font-weight: 700; color: #111; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vsm-card-heart { flex-shrink: 0; cursor: pointer; color: #111; }
.vsm-card-meta { font-size: 12px; color: #6f6a66; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vsm-card-price { font-size: 13.5px; font-weight: 700; color: #111; margin-top: 1px; }

/* ---------- no-results ---------- */
.vsm-empty {
  position: absolute; left: 16px; right: 16px; bottom: max(20px, env(safe-area-inset-bottom, 0px));
  z-index: 6; background: #fff; border-radius: 16px; box-shadow: 0 4px 20px rgba(17,17,17,.15);
  padding: 16px 18px; font-size: 14px; color: #111; text-align: center; display: none;
}
.vsm-empty.show { display: block; }
