/* ============================================================
   ESTILOS GENERALES (CORREGIDOS)
   ============================================================ */
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  font-family: Arial, sans-serif;
}

#map {
  height: 100vh;
  width: 100vw !important; /* El mapa siempre ocupa todo el fondo */
  position: absolute;
  left: 0;
  top: 0;
  z-index: 1;
}

#sidebar {
  width: 340px;
  height: 100vh;
  position: fixed; /* Ya no empuja al mapa, flota sobre él */
  right: 0;
  top: 0;
  border-left: 1px solid #ccc;
  box-sizing: border-box;
  padding: 10px;
  overflow-y: auto;
  background: #f7f7f7;
  z-index: 3500;
  transition: transform 0.3s ease-in-out;
  box-shadow: -2px 0 10px rgba(0,0,0,0.2);
}

/* ESTADO RETRAÍDO: El panel se va a la derecha */
#sidebar.active {
  transform: translateX(100%);
}

/* El botón de menú - Siempre visible y encima */
#menu-toggle {
    display: flex !important;
    position: fixed;
    top: 10px;
    right: 10px;
    z-index: 4000;
    width: 45px;
    height: 45px;
    background: white;
    border: 1px solid #ccc;
    cursor: pointer;
    border-radius: 4px;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

@media (max-width: 768px) {
  #sidebar { width: 85%; }
}

/* ============================================================
   PANELES Y BOTONES (Tus estilos originales)
   ============================================================ */
.panel {
  background: white;
  padding: 10px;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  margin-bottom: 10px;
}

.header-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #2A52BE;
  margin-bottom: 10px;
  padding-bottom: 5px;
}

.header-panel h2 {
  margin: 0;
  font-size: 16px;
  color: #2A52BE;
}

#gpsStatus {
  font-size: 11px;
  font-weight: bold;
  color: #666;
}

.btn-primary {
  background: #2A52BE;
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
}

.btn-primary:hover { background: #1e3a8a; }

/* REGLA PARA MÓVILES (Solo ajustar ancho del panel) */
@media (max-width: 768px) {
  #sidebar {
    width: 85%; /* En móvil ocupa casi toda la pantalla */
  }
  #map {
    width: 100vw !important; /* El mapa siempre de fondo */
  }
  #menu-toggle {
    right: 10px; /* Siempre accesible */
  }
}
/* Asegura que el buscador no se vea cortado en móviles */
#inputBusqueda {
    -webkit-appearance: none; /* Quita estilos por defecto de iOS */
}

/* Mejora visual para que el usuario sepa que hay una lista */
input::-webkit-calendar-picker-indicator {
    display: none !important; /* Escondemos la flecha fea de algunos Android */
}
#listaSugerenciasCustom div:hover {
    background-color: #f0f4ff;
}

#listaSugerenciasCustom div:active {
    background-color: #e0e0e0; /* Efecto visual al tocar en móvil */
}