/* =========================================================================
   map.css — Estilos del mapa interactivo embebido.
   Todo está scoped a #map-stage para no afectar el resto del sitio claro.
   ========================================================================= */

#map-stage {
  --bg-0: #07090d;
  --bg-1: #0c1117;
  --line:    rgba(255,255,255,0.08);
  --line-2:  rgba(255,255,255,0.14);
  --text:    #e6edf3;
  --text-dim:#8b97a8;
  --text-faint:#5a6678;
  --accent:  #7cf6d2;
  --warn:    #ffb454;
  --danger:  #ff6b8b;
  --ok:      #7cf6d2;
  --shadow:  0 30px 80px rgba(0,0,0,0.55), 0 4px 12px rgba(0,0,0,0.35);

  color: var(--text);
  background:
    radial-gradient(1200px 600px at 20% -10%, rgba(124,246,210,0.06), transparent 60%),
    radial-gradient(900px 500px at 110% 110%, rgba(90,184,255,0.06), transparent 60%),
    linear-gradient(180deg, var(--bg-0), var(--bg-1));
  user-select: none;
}

#map-stage .viewport {
  overflow: hidden;
  cursor: grab;
}
#map-stage .viewport.dragging { cursor: grabbing; }

#map-stage .world {
  position: absolute; top: 0; left: 0;
  transform-origin: 0 0;
  will-change: transform;
}
#map-stage .plan-img {
  display: block;
  filter: invert(0.92) hue-rotate(180deg) brightness(1.05) contrast(1.05) saturate(1.15);
  pointer-events: none;
}
#map-stage .overlay {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  overflow: visible;
}

/* LOT HOTSPOTS */
#map-stage .lot { pointer-events: auto; cursor: pointer; transition: filter .15s; }
#map-stage .lot-fill {
  fill: rgba(124,246,210,0.0);
  stroke: rgba(124,246,210,0.55);
  stroke-width: 1.2;
  transition: fill .15s, stroke .15s, filter .15s;
}
#map-stage .lot[data-status="reserved"] .lot-fill { stroke: rgba(255,180,84,0.7); }
#map-stage .lot[data-status="sold"]     .lot-fill { stroke: rgba(255,107,139,0.75); }
#map-stage .lot:hover .lot-fill,
#map-stage .lot.active .lot-fill {
  fill: rgba(124,246,210,0.22);
  stroke: var(--accent);
  filter: drop-shadow(0 0 6px rgba(124,246,210,0.55));
}
#map-stage .lot[data-status="reserved"]:hover .lot-fill,
#map-stage .lot[data-status="reserved"].active .lot-fill {
  fill: rgba(255,180,84,0.22);
  stroke: var(--warn);
  filter: drop-shadow(0 0 6px rgba(255,180,84,0.55));
}
#map-stage .lot[data-status="sold"]:hover .lot-fill,
#map-stage .lot[data-status="sold"].active .lot-fill {
  fill: rgba(255,107,139,0.22);
  stroke: var(--danger);
  filter: drop-shadow(0 0 6px rgba(255,107,139,0.55));
}
#map-stage .lot-num {
  font: 600 16px 'JetBrains Mono', monospace;
  fill: rgba(255,255,255,0.0);
  pointer-events: none;
  text-anchor: middle;
  dominant-baseline: middle;
  transition: fill .15s;
  paint-order: stroke;
  stroke: rgba(0,0,0,0.6);
  stroke-width: 3;
}
#map-stage .lot:hover .lot-num,
#map-stage .lot.active .lot-num { fill: rgba(255,255,255,0.95); }

/* TOOLTIP */
#map-stage .tooltip {
  position: fixed;
  min-width: 220px;
  padding: 14px 16px;
  background: linear-gradient(180deg, rgba(18,25,34,0.96), rgba(12,17,23,0.96));
  border: 1px solid var(--line-2);
  border-radius: 12px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  pointer-events: none;
  transform: translate(-50%, calc(-100% - 14px));
  opacity: 0;
  transition: opacity .12s;
  z-index: 30;
}
#map-stage .tooltip[data-show="true"] { opacity: 1; }
#map-stage .tt-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
#map-stage .tt-lot { font: 500 11px 'JetBrains Mono', monospace; letter-spacing: 0.16em; color: var(--text-dim); }
#map-stage .tt-status { font: 500 10px 'JetBrains Mono', monospace; padding: 2px 7px; border-radius: 999px; }
#map-stage .tt-status[data-s="free"]     { color: var(--ok);     background: rgba(124,246,210,0.1); }
#map-stage .tt-status[data-s="reserved"] { color: var(--warn);   background: rgba(255,180,84,0.1); }
#map-stage .tt-status[data-s="sold"]     { color: var(--danger); background: rgba(255,107,139,0.12); }
#map-stage .tt-name { font-size: 15px; font-weight: 500; margin-bottom: 4px; color: var(--text); }
#map-stage .tt-phone { font: 500 12px 'JetBrains Mono', monospace; color: var(--text-dim); }
#map-stage .tt-hint { margin-top: 10px; font-size: 10px; color: var(--text-faint); letter-spacing: 0.18em; text-transform: uppercase; }

/* ZOOM CONTROLS */
#map-stage .zoom-controls {
  position: absolute; right: 12px; bottom: 12px;
  display: flex; flex-direction: column; gap: 6px;
  z-index: 15;
}
#map-stage .zoom-controls button {
  width: 38px; height: 38px;
  background: rgba(18,25,34,0.85);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line-2);
  border-radius: 10px;
  color: var(--text);
  font-size: 16px;
  cursor: pointer;
  transition: all .2s;
}
#map-stage .zoom-controls button:hover { border-color: var(--accent); color: var(--accent); }

/* MODAL del lote — clase `lotmodal-*` para no chocar con daisyUI `.modal` */
.lotmodal {
  position: fixed; inset: 0;
  display: none;
  align-items: center; justify-content: center;
  z-index: 70;
  pointer-events: auto;
  opacity: 1;
}
.lotmodal[data-show="true"] { display: flex; }
.lotmodal-backdrop {
  position: absolute; inset: 0;
  background: rgba(4,6,9,0.7);
  backdrop-filter: blur(6px);
}
.lotmodal-card {
  position: relative;
  width: min(640px, 92vw);
  background: linear-gradient(180deg, rgba(22,30,40,0.98), rgba(12,17,23,0.98));
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 20px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.55);
  padding: 28px 28px 24px;
  color: #e6edf3;
  animation: lotmodalPop .25s cubic-bezier(.2,.9,.3,1.2);
}
@keyframes lotmodalPop {
  from { transform: translateY(8px) scale(.98); opacity: 0; }
  to   { transform: none; opacity: 1; }
}
.lotmodal-close {
  position: absolute; top: 14px; right: 14px;
  width: 32px; height: 32px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 8px;
  color: #8b97a8; font-size: 18px;
  cursor: pointer; transition: all .2s;
}
.lotmodal-close:hover { color: #fff; border-color: #7cf6d2; }
.lotmodal-eyebrow {
  font: 500 11px 'JetBrains Mono', monospace;
  letter-spacing: 0.22em;
  color: #8b97a8;
}
.lotmodal-header h2 {
  font-family: 'Fraunces', serif;
  font-size: 26px; font-weight: 500; margin: 6px 0 10px;
  letter-spacing: -0.01em;
  color: #fff;
}
.status-pill {
  display: inline-block;
  font: 500 10px 'JetBrains Mono', monospace;
  letter-spacing: 0.18em;
  padding: 4px 10px;
  border-radius: 999px;
  text-transform: uppercase;
}
.status-pill[data-s="free"]     { color: #7cf6d2; background: rgba(124,246,210,0.1); }
.status-pill[data-s="reserved"] { color: #ffb454; background: rgba(255,180,84,0.1); }
.status-pill[data-s="sold"]     { color: #ff6b8b; background: rgba(255,107,139,0.12); }
.lotmodal-grid {
  margin-top: 22px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 22px;
}
.lotmodal-grid .lotmodal-field.full { grid-column: 1 / -1; }
.lotmodal-field {
  display: flex; flex-direction: column; gap: 4px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.lotmodal-field label {
  font: 500 10px 'JetBrains Mono', monospace;
  letter-spacing: 0.16em;
  color: #5a6678;
  text-transform: uppercase;
}
.lotmodal-field span, .lotmodal-field a {
  font-size: 14px; color: #e6edf3; text-decoration: none;
}
.lotmodal-field a {
  color: #7cf6d2;
  display: inline-flex; align-items: center; gap: 6px;
}
.lotmodal-field a:hover { text-decoration: underline; }
.lotmodal-field a::after { content: "↗"; font-size: 11px; opacity: .7; }

@media (max-width: 640px) {
  .lotmodal-grid { grid-template-columns: 1fr; }
}
