body {
    margin: 0;
    font-family: Arial, sans-serif;
    background-color: #000;
    color: #FFD700;
}

/* Ensure the map container centers and scales to SVG aspect ratio */
.map-container {
    position: relative;
    width: 80%;
    max-width: 1200px;
    margin: 30px auto;
    overflow: hidden;
    border: 2px solid #FFD700;
    border-radius: 10px;
    background: #000;
    box-shadow: 0 8px 30px rgba(0,0,0,0.7);
}

.map-image {
    width: 100%;
    height: auto;
    display: block;
    opacity: 0.95;
    position: relative;
    z-index: 1;
}

.svg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none; /* default, overridden on children */
    z-index: 2;
}

/* Make embedded SVG scale to container while preserving viewBox */
.svg-overlay svg {
    width: 100%;
    height: 100%;
}

/* === LIMPIEZA DE EFECTOS DE ILUMINACIÓN Y BLANQUEO === */
.svg-overlay [id] {
    fill: transparent;
    stroke: #FFD700;
    stroke-width: 2;
    pointer-events: all;
}

/* Quitar iluminación y cambio de color al pasar el mouse */
.svg-overlay [id]:hover {
    filter: none !important;
    stroke: #FFD700 !important;
}

/* Quitar hover especial de coincidencias */
.svg-overlay .lote-matched:hover {
    filter: none !important;
}

/* Quitar hover de figuras con dashed */
.svg-overlay [id][title][style*="stroke-dasharray"]:hover {
    stroke: inherit !important;
    stroke-dasharray: inherit !important;
    fill: inherit !important;
}

/* === ESTILOS BASE Y EFECTO TENUE POR LOTE === */
.svg-overlay .lote {
    transition: filter 160ms ease, opacity 160ms ease;
}

/* Colores base por estado */
.svg-overlay .lote.available { fill: rgba(40,167,69,0.85); }   /* Verde */
.svg-overlay .lote.reserved  { fill: rgba(255,193,7,0.9); }    /* Amarillo */
.svg-overlay .lote.sold      { fill: rgba(220,53,69,0.9); }    /* Rojo */

/* Hover tenue (ligeramente más oscuro, sin cambio de color) */
.svg-overlay .lote.available:hover { filter: brightness(0.92); }
.svg-overlay .lote.reserved:hover  { filter: brightness(0.92); }
.svg-overlay .lote.sold:hover      { filter: brightness(0.92); }

/* Evitar contorno blanco en hover */
.svg-overlay rect[data-overlay-for]:hover {
    outline: none !important;
}

/* Info popup turned into a bottom sheet */
.info-popup {
    position: fixed;
    left: 50%;
    bottom: 0;
    transform: translate(-50%, 110%);
    z-index: 10001;
    width: min(980px, 96%);
    max-width: 980px;
    background: linear-gradient(180deg,#0b0b0b,#070707);
    border: 2px solid rgba(255,215,0,0.09);
    color: #fff;
    padding: 18px;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 -10px 40px rgba(0,0,0,0.8);
    font-family: Inter, Arial, sans-serif;
    transition: transform 260ms cubic-bezier(.2,.9,.2,1), opacity 160ms ease;
    display: block;
    max-height: 60vh;
    overflow: auto;
}
.info-popup.open {
    transform: translate(-50%, 0%);
    opacity: 1;
}
.info-popup .info-close {
    position: absolute;
    right: 12px;
    top: 8px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
}
.info-popup .info-card { display: flex; gap: 18px; }
.info-popup .info-left { flex: 1; }
.info-popup .info-right { width: 220px; background: linear-gradient(180deg,#121212,#0b0b0b); border-radius: 8px; border: 1px solid rgba(255,215,0,0.04); }
.info-popup h3 { margin: 0 0 8px 0; font-size: 20px; color: #FFD700; }
.info-popup .id { color: #FFD700; }
.info-popup .estado strong { color: #FFD700; }
.info-popup .fields pre { color: #eaeaea; font-size: 13px; margin: 6px 0; max-height: 240px; overflow: auto; }
.info-popup .actions { margin-top: 8px; }
.info-popup .contact-btn {
    background: linear-gradient(180deg,#FFD700,#e6b800);
    color: #111;
    border: none;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}

/* fields in bottom sheet */
.fields-list { display: flex; flex-direction: column; gap: 6px; margin-top:8px; }
.field-row { display: flex; gap: 8px; align-items: flex-start; }
.field-label { min-width: 120px; color: #FFD700; font-weight: 600; }
.field-value { color: #e9e9e9; white-space: normal; }

.info-sep { border: none; height: 1px; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.03), transparent); margin: 12px 0; }
.legend { margin-top: 8px; }
.legend-title { color: #FFD700; font-weight: 700; margin-bottom: 6px; }
.legend-items { display: flex; gap: 10px; }
.legend-item { display:flex; gap:8px; align-items:center; }
.swatch { width:14px; height:14px; display:inline-block; border-radius:3px; border:1px solid rgba(0,0,0,0.3); }
.swatch.available { background: rgba(40,167,69,0.85); }
.swatch.reserved { background: rgba(255,193,7,0.9); }
.swatch.sold { background: rgba(220,53,69,0.9); }

@media (max-width: 600px) {
    .info-popup {
        left: 6px;
        right: 6px;
        width: calc(100% - 12px);
        padding: 12px 10px;
        border-radius: 12px 12px 0 0;
    }
    .field-label { min-width: 100px; font-size: 13px; }
    .field-value { font-size: 14px; }
    .info-popup h3 { font-size: 16px; }
}

@media (min-width: 601px) and (max-width: 980px) {
    .info-popup { width: calc(100% - 40px); }
}

.actions { display: none; }

.info-popup { z-index: 10010; }

.map-legend { display: none !important; }

/* Controles de zoom */
.zoom-controls {
  position: absolute;
  right: 14px;
  top: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 3; /* por encima del SVG */
}

.zoom-btn {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid rgba(255,215,0,0.25);
  background: linear-gradient(180deg, #111, #0a0a0a);
  color: #FFD700;
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0,0,0,0.6);
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
  user-select: none;
}
.zoom-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(0,0,0,0.7);
  border-color: rgba(255,215,0,0.45);
}
.zoom-btn:active {
  transform: translateY(0);
}

@media (max-width: 640px) {
  .zoom-controls {
    right: 10px;
    top: 10px;
  }
  .zoom-btn {
    width: 38px;
    height: 38px;
    font-size: 18px;
  }
}

/* === Botón flotante de login elegante === */
.login-btn {
  position: fixed;
  bottom: 26px;
  right: 26px;
  background: linear-gradient(145deg, #FFD700, #d4af37);
  color: #111;
  font-weight: 700;
  border: none;
  border-radius: 50px;
  padding: 14px 28px;
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(255, 215, 0, 0.25);
  z-index: 10020;
  transition: all 0.3s ease;
  overflow: hidden;
}

/* Efecto de luz dorada detrás */
.login-btn::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: radial-gradient(circle, rgba(255,215,0,0.55) 0%, rgba(255,215,0,0) 70%);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.4s ease;
  z-index: 0;
}

/* === Botón flotante de login elegante === */
.login-btn {
  position: fixed;
  bottom: 26px;
  right: 26px;
  background: linear-gradient(145deg, #FFD700, #d4af37);
  color: #111;
  font-weight: 700;
  border: none;
  border-radius: 50px;
  padding: 14px 28px;
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(255, 215, 0, 0.25);
  z-index: 10020;
  transition: all 0.3s ease;
  overflow: hidden;
}

/* Efecto de luz dorada detrás */
.login-btn::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: radial-gradient(circle, rgba(255,215,0,0.55) 0%, rgba(255,215,0,0) 70%);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.4s ease;
  z-index: 0;
}



.login-btn:hover {
  color: #000;
  box-shadow: 0 6px 28px rgba(255, 215, 0, 0.5);
  transform: translateY(-2px);
}

.login-btn:active {
  transform: translateY(1px);
  box-shadow: 0 3px 15px rgba(255, 215, 0, 0.35);
}


.login-btn:active {
  transform: translateY(1px);
  box-shadow: 0 3px 15px rgba(255, 215, 0, 0.35);
}
