/* نقشهٔ زیباتو — الگوی اسنپ/دیوار (بعد از map-app.css و map-at.css).        [۲۰۲۶-۱۰-۰۱]
   خوانایی: فیلترِ سپیا/خاکستریِ کاشی‌ها برداشته شد (خیابان‌ها و نام‌های فارسی واضح)؛ فقط کمی آرام‌تر. */
.leaflet-tile-pane{filter:saturate(.72) brightness(1.03) contrast(1.03)}
.leaflet-container{background:#eef0f2!important}
html[data-theme="dark"] .leaflet-tile-pane{filter:invert(1) hue-rotate(190deg) saturate(.45) brightness(.86) contrast(.92)}
html[data-theme="dark"] .leaflet-container{background:#141826!important}

/* ═══ پینِ برچسب‌دار (دیوار) ═══ */
.zmpin-wrap{width:0!important;height:0!important;background:none!important;border:0!important}
.zmpin{position:absolute;left:0;top:0;transform:translate(-50%,calc(-100% - 8px));display:inline-flex;align-items:center;gap:6px;white-space:nowrap;
  padding:6px 11px 6px 10px;border-radius:999px;background:var(--surface,#fff);color:var(--text,#141A3A);direction:rtl;cursor:pointer;
  font-size:12.5px;font-weight:700;line-height:1.1;font-family:inherit;
  box-shadow:0 8px 18px -8px rgba(20,26,58,.5),0 0 0 1px rgba(20,26,58,.07);
  transition:transform .2s cubic-bezier(.16,1,.3,1),background-color .18s,color .18s,box-shadow .18s}
.zmpin::after{content:"";position:absolute;left:50%;bottom:-5px;width:11px;height:11px;background:inherit;border-radius:0 0 3px 0;
  transform:translateX(-50%) rotate(45deg);box-shadow:3px 3px 5px -3px rgba(20,26,58,.35)}
.zmpin-d{width:8px;height:8px;border-radius:50%;flex:none;background:var(--zb-female,#7A2E4D);box-shadow:0 0 0 2px color-mix(in srgb,var(--zb-female,#7A2E4D) 22%,transparent)}
.zmpin.male .zmpin-d{background:var(--zb-male,#2456A6);box-shadow:0 0 0 2px color-mix(in srgb,var(--zb-male,#2456A6) 22%,transparent)}
.zmpin span{font-weight:600;font-size:11.5px;color:var(--zb-gold-ink,#8a6d3f)}
.zmpin span.new{color:var(--zb-ok,#1E9E6A)}
.zmpin.featured{box-shadow:0 8px 18px -8px rgba(20,26,58,.5),0 0 0 2px var(--zb-gold,#C9A46C)}
.zmpin:hover{transform:translate(-50%,calc(-100% - 10px))}
.zmpin.on{background:var(--zb-navy,#141A3A);color:#fff;transform:translate(-50%,calc(-100% - 10px)) scale(1.1);
  box-shadow:0 14px 26px -10px rgba(20,26,58,.7),0 0 0 2px var(--zb-gold,#C9A46C)}
.zmpin.on span{color:var(--zb-gold,#C9A46C)}
html[data-theme="dark"] .zmpin{box-shadow:0 8px 18px -8px rgba(0,0,0,.7),0 0 0 1px rgba(255,255,255,.08)}
/* دور (زوم < ۱۳): پینِ فشرده (نقطه + امتیاز)، نام فقط برای پینِ انتخاب‌شده؛ نقشه کم‌رنگ‌تر تا پین‌ها خوانا بمانند */
.zm-far .zmpin:not(.on) b{display:none}
.zm-far .zmpin:not(.on){padding:5px 9px;gap:5px}
.zm-far .leaflet-tile-pane{filter:saturate(.38) brightness(1.07) contrast(.96)}
html[data-theme="dark"] .zm-far .leaflet-tile-pane{filter:invert(1) hue-rotate(190deg) saturate(.3) brightness(.8) contrast(.9)}
/* خوشه: دایرهٔ سرمه‌ای با حلقهٔ طلایی و عددِ خوانا */
.marker-cluster{background:color-mix(in srgb,var(--zb-gold,#C9A46C) 35%,transparent)!important}
.marker-cluster div{background:var(--zb-navy,#141A3A)!important;color:#fff!important;font-weight:800!important;font-size:13px!important}

/* ═══ چیپ‌های شهر/محله (زیرشان <select> واقعی) ═══ */
.map-filter-row .zm-place{-webkit-appearance:none;appearance:none;flex:none;height:32px;min-height:32px;max-width:150px;padding:0 12px 0 30px!important;
  border-radius:999px!important;font:inherit;font-size:12px;font-weight:700;color:var(--text);cursor:pointer;border:0!important;
  background:var(--surface) url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23888%22 stroke-width=%222.4%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22m6 9 6 6 6-6%22/%3E%3C/svg%3E") no-repeat left 10px center/13px!important;
  box-shadow:0 6px 14px -8px rgba(20,26,58,.5),0 0 0 1px rgba(20,26,58,.07)!important;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}
.map-filter-row .zm-place.on{background-color:var(--zb-navy)!important;color:#fff;
  background-image:url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23fff%22 stroke-width=%222.4%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22m6 9 6 6 6-6%22/%3E%3C/svg%3E")!important}
.map-filter-row .zm-place:disabled{opacity:.5;cursor:default}
/* در حالِ به‌روزرسانیِ محدوده: شمارنده نبض می‌زند (فهرست جابه‌جا نمی‌شود) */
.zm-busy #zms-n{animation:zmBusy .9s ease-in-out infinite alternate}
@keyframes zmBusy{to{opacity:.35}}
@media(prefers-reduced-motion:reduce){.zm-busy #zms-n{animation:none;opacity:.5}}

/* ═══ دسکتاپ: شیت نامرئی؛ چیدمانِ قبلی ═══ */
@media(min-width:768px){ .zms{display:contents} .zms-head{display:none} }

/* ═══ موبایل: نقشهٔ تمام‌صفحه + شیتِ کشیدنی (اسنپ) ═══ */
@media(max-width:767px){
  .map-page{height:calc(100svh - var(--nav-h,76px))!important}
  body:has(.map-page){padding-bottom:0!important}
  .leaflet-touch .leaflet-control-zoom,.leaflet-control-attribution{display:none!important}
  .map-view-toggle,.map-mobile-toggle,.zmp-legend,.map-page .zmp-head{display:none!important}

  /* جست‌وجوی شناورِ بالا، فشرده‌تر */
  /* [مالک: «فرمِ جست‌وجو خیلی بزرگه»] یک قرصِ باریک (اسنپ) + چیپ‌های ریزِ شناور (دیوار)، بدونِ کارتِ پشت — نصفِ ارتفاعِ قبلی */
  .map-page.view-map .map-sidebar-header{margin:10px 12px 0!important;padding:0!important;border-radius:0!important;
    background:none!important;border:0!important;box-shadow:none!important;-webkit-backdrop-filter:none!important;backdrop-filter:none!important}
  .map-page.view-map .map-search-input{height:46px;min-height:46px;padding:0 16px 0 42px!important;border-radius:999px!important;border:0!important;
    background:var(--surface)!important;box-shadow:0 8px 22px -10px rgba(20,26,58,.45),0 0 0 1px rgba(20,26,58,.07)!important}
  .map-page.view-map .map-search-input:focus{box-shadow:0 8px 22px -10px rgba(20,26,58,.45),0 0 0 2px var(--zb-accent)!important}
  .map-page.view-map .map-search-icon{left:15px}
  .map-page.view-map .map-filter-row{margin-top:8px!important;gap:6px;padding:0 2px 6px!important}
  .map-page.view-map :is(.map-filter-chip,.map-filter-btn){height:32px;min-height:32px;padding:0 12px!important;border-radius:999px!important;font-size:12px;
    border:0!important;background:var(--surface)!important;box-shadow:0 6px 14px -8px rgba(20,26,58,.5),0 0 0 1px rgba(20,26,58,.07)!important}
  .map-page.view-map .map-filter-chip svg,.map-page.view-map .map-filter-btn svg{width:13px;height:13px}
  .map-page.view-map .map-filter-chip.active{background:var(--zb-accent)!important;color:#fff!important}
  .map-page.view-map .map-filter-chip.active svg{fill:#fff}
  .map-page.view-map .map-filter-btn{background:var(--zb-navy)!important;color:#fff!important}

  /* شیت */
  .map-page .zms{position:absolute;left:0;right:0;bottom:0;z-index:1003;pointer-events:auto;box-sizing:border-box;
    height:calc(100% - 106px);padding-bottom:var(--map-dock,86px);display:flex;flex-direction:column;
    transform:translateY(var(--zms-y,100%));transition:transform .48s var(--zbx-sheet,cubic-bezier(.16,1,.3,1));will-change:transform;
    background:var(--surface,#fff);border-radius:24px 24px 0 0;box-shadow:0 -14px 34px -18px rgba(20,26,58,.45),0 -1px 0 var(--border)}
  .map-page .zms.drag{transition:none}
  .zms-head{flex:none;position:relative;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:13px 16px 5px;
    cursor:grab;touch-action:none;user-select:none;-webkit-user-select:none}
  .zms-head:active{cursor:grabbing}
  .zms-grab{position:absolute;top:7px;left:50%;transform:translateX(-50%);width:40px;height:4.5px;border-radius:9px;background:color-mix(in srgb,var(--muted) 45%,transparent)}
  .zms-t{display:flex;align-items:baseline;gap:6px;color:var(--text)}
  .zms-t b{font-size:16px;font-weight:800}
  .zms-t span{font-size:13.5px;color:var(--text-2,var(--muted))}
  .zms-more{display:inline-flex;align-items:center;gap:4px;font-size:12.5px;font-weight:700;color:var(--zb-accent);padding:6px 10px;border-radius:99px;
    background:color-mix(in srgb,var(--zb-accent) 9%,transparent)}
  .zms-more svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round;transition:transform .3s}
  .zms.full .zms-more svg{transform:rotate(180deg)}
  .zms-head:focus-visible{outline:2px solid var(--zb-accent);outline-offset:-4px;border-radius:24px 24px 0 0}

  /* حالتِ peek: ریلِ افقیِ کارت‌ها */
  .map-page.view-map .zms .map-salon-list{position:relative!important;inset:auto!important;bottom:auto!important;flex:1;min-height:0;
    display:flex!important;flex-direction:row;gap:10px;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x mandatory;
    padding:2px 16px 14px!important;align-items:flex-start;scrollbar-width:none;overscroll-behavior:contain}
  .map-page.view-map .zms .map-salon-list>*{flex:0 0 min(84vw,340px);scroll-snap-align:center;margin:0!important}
  /* حالتِ full: فهرستِ عمودی */
  .map-page.view-map .zms.full .map-salon-list{flex-direction:column;overflow-x:hidden;overflow-y:auto;scroll-snap-type:none;gap:10px;padding-bottom:24px!important}
  .map-page.view-map .zms.full .map-salon-list{align-items:stretch}
  .map-page.view-map .zms.full .map-salon-list>*{flex:none;width:auto;max-width:none}
  .map-page.view-map .zms .map-salon-card-rich.zmc{box-shadow:0 1px 0 var(--border),0 10px 22px -18px rgba(20,26,58,.6)!important;border:1px solid var(--border)}
  .map-page.view-map .zms .map-salon-card-rich.zmc.active{border-color:var(--zb-gold);box-shadow:0 0 0 2px color-mix(in srgb,var(--zb-gold) 45%,transparent)!important}
  .map-page.view-map .map-salon-list .map-loading{min-width:84vw}
  /* [مالک: «فهرستِ پایین خیلی بزرگه»] حالتِ peek = کارتِ فشرده؛ برچسب‌ها فقط در فهرستِ کامل */
  .map-page.view-map .zms:not(.full) .map-salon-list{padding:0 14px 10px!important;gap:8px}
  .map-page.view-map .zms:not(.full) .map-salon-card-rich.zmc{grid-template-columns:54px minmax(0,1fr) auto;gap:10px;padding:7px 8px!important;border-radius:16px!important}
  .map-page.view-map .zms:not(.full) .zmc-arch{width:54px;height:60px;border-radius:27px 27px 9px 9px}
  .map-page.view-map .zms:not(.full) .zmc-arch b{font-size:19px}
  .map-page.view-map .zms:not(.full) .zmc-star{width:18px;height:18px;font-size:10px;top:-3px}
  .map-page.view-map .zms:not(.full) .zmc .map-salon-name{font-size:14px}
  .map-page.view-map .zms:not(.full) .zmc-body{gap:2px}
  .map-page.view-map .zms:not(.full) :is(.zmc-new,.zmc-g){display:none}
  .map-page.view-map .zms:not(.full) .zmc-go{align-self:center;padding:7px 11px;font-size:12px;border-radius:11px}

  /* دکمهٔ موقعیت روی لبهٔ شیت (مثلِ اسنپ) و «جست‌وجو در این محدوده» زیرِ جست‌وجو */
  .map-page .map-controls{top:auto!important;left:12px!important;right:auto!important;bottom:calc(var(--zms-vis,300px) + 12px)!important;
    transition:bottom .48s var(--zbx-sheet,cubic-bezier(.16,1,.3,1));z-index:1002}
  .map-page .map-control-btn{width:46px;height:46px;border-radius:50%!important;box-shadow:0 10px 22px -10px rgba(20,26,58,.55)!important}
  .map-page:has(.zms.full) .map-controls{opacity:0;pointer-events:none}
  .map-page .map-search-hint{top:104px!important}
  .leaflet-bottom{bottom:calc(var(--zms-vis,300px) + 8px)!important}
}
@media(max-width:767px) and (prefers-reduced-motion:reduce){
  .map-page .zms,.map-page .map-controls{transition:none}
}
