/* Estilos personalizados para NetVault */

/* Protección de Leaflet frente a Tailwind Preflight (que aplica max-width: 100%; height: auto; a <img>) */
.leaflet-container img,
.leaflet-container .leaflet-tile,
.leaflet-container .leaflet-marker-icon,
.leaflet-container .leaflet-marker-shadow {
  max-width: none !important;
  max-height: none !important;
}

.leaflet-container .leaflet-tile {
  height: auto;
}

/* Mejoras para los Popups de Leaflet */
.leaflet-popup-content-wrapper {
  border-radius: 14px !important;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.12), 0 8px 10px -6px rgba(0, 0, 0, 0.08) !important;
  border: 1px solid #e2e8f0;
  padding: 4px;
}

.leaflet-popup-content {
  margin: 10px 12px !important;
  line-height: 1.45 !important;
}

.leaflet-container {
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  background-color: #f1f5f9;
}

/* Pines personalizados por tipo de seguridad WiFi */
.netvault-pin-wrapper {
  background: transparent;
  border: none;
}

.netvault-wifi-pin {
  width: 32px;
  height: 32px;
  border-radius: 9999px 9999px 9999px 4px;
  transform: rotate(-45deg);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2.5px solid #ffffff;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.28);
  transition: transform 0.15s ease;
}

.netvault-wifi-pin:hover {
  transform: rotate(-45deg) scale(1.1);
}

.netvault-wifi-pin > span {
  transform: rotate(45deg);
  font-size: 13px;
  line-height: 1;
}

.netvault-wifi-pin--open {
  background: #059669;
  color: #ffffff;
}

.netvault-wifi-pin--wpa {
  background: #2563eb;
  color: #ffffff;
}

.netvault-wifi-pin--wep {
  background: #d97706;
  color: #ffffff;
}

.netvault-wifi-pin--private {
  background: #475569;
  color: #ffffff;
}

/* Clusters */
.marker-cluster-small,
.marker-cluster-medium,
.marker-cluster-large {
  background-color: rgba(37, 99, 235, 0.2) !important;
}

.marker-cluster-small div,
.marker-cluster-medium div,
.marker-cluster-large div {
  background-color: #2563eb !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  font-family: 'Plus Jakarta Sans', sans-serif !important;
}

/* Contención de scroll en modales nativos <dialog> */
dialog:modal {
  overscroll-behavior: contain;
}

dialog::backdrop {
  overflow: hidden;
  overscroll-behavior: contain;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(2px);
}

/* Transiciones suaves */
button, a {
  transition: all 0.15s ease-in-out;
}

/* Scrollbar estilizado */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}
