/* =========================================================
   zeus-map.css — Mapa de direcciones (zeus-map.js)
   Hoja del mapa del artboard 3 (pantalla completa en el celular,
   ventana centrada en escritorio), pin, sucursal, etiquetas de zona y
   mapa chico. Prefijo: zmap. Plan: docs/plans/pedidos-en-linea.md.
   ========================================================= */

html.zmap-open, html.zmap-open body { overflow: hidden; }

/* Debajo de los Swal (1060) para que sus avisos se vean sobre el mapa. */
.zmap {
  position: fixed; inset: 0; z-index: 1050; background: #E9EEE6;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; color: #13213F;
}
.zmap[hidden] { display: none; }
.zmap *, .zmap *::before, .zmap *::after { box-sizing: border-box; }
.zmap__canvas { position: absolute; inset: 0; z-index: 0; }

.zmap__top { position: absolute; left: 14px; right: 14px; top: calc(16px + env(safe-area-inset-top, 0px)); z-index: 500; display: flex; flex-direction: column; gap: 8px; }
.zmap__bar { display: flex; gap: 8px; align-items: center; }
.zmap__round {
  width: 46px; height: 46px; flex: none; border-radius: 999px; border: 0; background: #fff; color: #13213F;
  display: grid; place-items: center; box-shadow: 0 4px 14px rgba(19, 33, 63, .15); cursor: pointer;
}
.zmap__round svg { width: 18px; height: 18px; }
.zmap__search {
  flex: 1; height: 46px; border-radius: 999px; background: #fff; display: flex; align-items: center; gap: 8px;
  padding: 0 14px; box-shadow: 0 4px 14px rgba(19, 33, 63, .15); color: #6B7896; min-width: 0;
}
.zmap__search svg { width: 17px; height: 17px; flex: none; }
.zmap__search input { border: 0; outline: 0; flex: 1; font: 500 15px 'Inter', sans-serif; min-width: 0; color: #13213F; background: transparent; }
.zmap__search input::-webkit-search-cancel-button { display: none; }

.zmap__sug { background: #fff; border-radius: 20px; padding: 6px; box-shadow: 0 10px 28px rgba(19, 33, 63, .16); max-height: 46vh; overflow-y: auto; }
.zmap__sug[hidden] { display: none; }
.zmap__item {
  width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; border: 0;
  background: transparent; text-align: left; cursor: pointer; color: #13213F; font: inherit;
}
.zmap__item svg { width: 18px; height: 18px; flex: none; color: #6B7896; }
.zmap__item strong { display: block; font-size: 13.5px; }
.zmap__item small { display: block; color: #56627E; font-size: 12px; margin-top: 1px; }
.zmap__item.is-first { background: #EEF2FF; }
.zmap__item.is-first svg { color: #3157D5; }
.zmap__item:hover, .zmap__item:focus-visible { background: #EEF2FF; outline: none; }
.zmap__item.is-action { color: #3157D5; font-weight: 700; }
.zmap__item.is-action svg { color: currentColor; }
.zmap__item.is-action strong { font-size: 13.5px; }
.zmap__note { margin: 0; padding: 10px 12px; font-size: 12.5px; color: #56627E; }

.zmap__locate {
  position: absolute; right: 16px; bottom: calc(196px + env(safe-area-inset-bottom, 0px)); z-index: 500;
  width: 48px; height: 48px; border-radius: 999px; border: 0; background: #fff; color: #3157D5;
  display: grid; place-items: center; box-shadow: 0 6px 16px rgba(19, 33, 63, .18); cursor: pointer;
}
.zmap__locate svg { width: 20px; height: 20px; }

.zmap__sheet {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 500; background: #fff; border-radius: 28px 28px 0 0;
  padding: 10px 18px calc(22px + env(safe-area-inset-bottom, 0px)); box-shadow: 0 -10px 30px rgba(19, 33, 63, .12);
  display: flex; flex-direction: column; gap: 10px;
}
.zmap__handle { width: 44px; height: 5px; border-radius: 99px; background: #D7DCE7; align-self: center; }
.zmap__place { display: flex; gap: 12px; align-items: center; min-height: 48px; }
.zmap__place-ic { width: 44px; height: 44px; border-radius: 14px; background: #E8EEFF; color: #3157D5; display: grid; place-items: center; flex: none; }
.zmap__place-ic svg { width: 20px; height: 20px; }
.zmap__place b { display: block; font-weight: 700; font-size: 15px; line-height: 1.3; }
.zmap__place small { display: block; font-size: 12.5px; font-weight: 600; margin-top: 2px; color: #56627E; }
.zmap__place small.is-ok { color: #0F6E50; }
.zmap__place small.is-bad { color: #B42318; }
.zmap__confirm {
  height: 52px; border-radius: 999px; border: 0; cursor: pointer;
  background: linear-gradient(135deg, #3157D5, #4A6FF0); color: #fff; font: 800 15px 'Inter', sans-serif;
}
.zmap__confirm:disabled { opacity: .5; cursor: default; }

@media (min-width: 760px) {
  .zmap { inset: auto; left: 50%; top: 50%; width: 520px; height: min(780px, 92vh); transform: translate(-50%, -50%); border-radius: 28px; overflow: hidden; box-shadow: 0 0 0 100vmax rgba(14, 26, 51, .55), 0 30px 60px rgba(14, 26, 51, .35); }
  .zmap__sheet { border-radius: 28px 28px 0 0; }
}

/* Pin arrastrable y sucursal */
.zmap-pin { background: none; border: 0; }
.zmap-pin svg { display: block; filter: drop-shadow(0 4px 6px rgba(19, 33, 63, .3)); }
.zmap-pin__shadow { position: absolute; left: 13px; bottom: -4px; width: 14px; height: 5px; border-radius: 50%; background: rgba(19, 33, 63, .25); }
.zmap-pin__hint {
  position: absolute; bottom: 46px; left: 50%; transform: translateX(-50%); white-space: nowrap;
  background: #13213F; color: #fff; font: 700 11.5px 'Inter', sans-serif; border-radius: 999px; padding: 5px 10px;
}
.zmap-store { background: #13213F; color: #fff; border-radius: 12px; display: grid !important; place-items: center; box-shadow: 0 6px 14px rgba(19, 33, 63, .35); }
.leaflet-tooltip.zmap-tag {
  background: #fff; border: 0; border-radius: 999px; padding: 3px 9px; box-shadow: 0 2px 8px rgba(19, 33, 63, .15);
  font: 800 12px 'Inter', sans-serif; color: #13213F;
}
.leaflet-tooltip.zmap-tag::before { display: none; }

/* Vértices al dibujar / editar zonas */
.zmap-vertex { background: #fff; border: 2px solid #3157D5; border-radius: 50%; box-shadow: 0 1px 4px rgba(19, 33, 63, .3); }
.zmap-vertex.is-first { background: #3157D5; }

/* Vista del pin en una página (ZeusMap.preview): se mira acá y se ajusta en
   la hoja del mapa. La usan el formulario de sucursal y quien la necesite. */
.zmap-preview {
  position: relative; display: block; width: 100%; height: 180px; margin-top: 12px; padding: 0; overflow: hidden; cursor: pointer;
  border: 1px solid var(--zeus-line); border-radius: 16px; background: var(--zeus-surface-2);
}
.zmap-preview:focus-visible { outline: 2px solid var(--zeus-accent); outline-offset: 2px; }
.zmap-preview__canvas { position: absolute; inset: 0; pointer-events: none; }
.zmap-preview__btn {
  position: absolute; right: 10px; bottom: 10px; z-index: 500; height: 32px; padding: 0 12px; border-radius: 999px;
  background: var(--zeus-surface); color: var(--zeus-ink); font-size: 12.5px; font-weight: 700;
  display: inline-flex; align-items: center; box-shadow: var(--zeus-shadow);
}
