/* ==========================================================================
   VIGÍA — ESTILOS DEL PANEL FAMILIAR Y MAPA 3D WEBGL (index.html)
   ========================================================================== */

/* El mapa WebGL ocupa el 100% de la pantalla sin cortes */
#map3d {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background: #FAF7F2;
}

/* Halo pulsante de radar para menores en vivo */
@keyframes radarWave {
  0% { transform: scale(0.8); opacity: 0.95; }
  50% { transform: scale(1.45); opacity: 0.35; }
  100% { transform: scale(2.1); opacity: 0; }
}

.radar-pulse {
  position: absolute;
  inset: -14px;
  border-radius: 9999px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.5) 0%, rgba(56, 189, 248, 0) 70%);
  animation: radarWave 2s infinite ease-out;
  pointer-events: none;
}

.radar-pulse-sos {
  position: absolute;
  inset: -16px;
  border-radius: 9999px;
  background: radial-gradient(circle, rgba(239, 68, 68, 0.75) 0%, rgba(239, 68, 68, 0) 70%);
  animation: radarWave 1s infinite ease-out;
  pointer-events: none;
}

/* Estilos del Modo Presentación Guiado con Avatar Vigía */
@keyframes tourGlowPulse {
  0%, 100% {
    box-shadow: 0 0 0 3px #38bdf8, 0 0 22px 6px rgba(56, 189, 248, 0.75);
  }
  50% {
    box-shadow: 0 0 0 7px #0284c7, 0 0 36px 10px rgba(14, 165, 233, 0.95);
  }
}

#tourSpotlightPointer {
  z-index: 10050 !important;
}

#vigiaInteractiveTourCard {
  z-index: 10040 !important;
}

.tour-active-highlight {
  outline: 3px solid #38bdf8 !important;
  outline-offset: 4px !important;
  animation: tourGlowPulse 1.8s infinite !important;
  position: relative !important;
  z-index: 10030 !important;
}

@keyframes tourBounceUp {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

@keyframes tourBounceDown {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(7px); }
}

.tour-bounce-up {
  animation: tourBounceUp 1.2s infinite ease-in-out;
}

.tour-bounce-down {
  animation: tourBounceDown 1.2s infinite ease-in-out;
}

.tour-bounce {
  animation: tourBounceUp 1.2s infinite ease-in-out;
}

/* Glassmorphism cálido en tono crema */
.glass-hud {
  background: rgba(250, 247, 242, 0.95);
  color: #2C251E;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid #D5C7B3;
  box-shadow: 0 10px 25px -5px rgba(44, 37, 30, 0.18);
}

.glass-btn {
  background: rgba(255, 253, 249, 0.95);
  color: #2C251E;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid #D5C7B3;
  box-shadow: 0 8px 20px -4px rgba(44, 37, 30, 0.18);
}

.glass-btn:hover {
  background: #FAF7F2;
  box-shadow: 0 12px 24px -4px rgba(44, 37, 30, 0.25);
}

/* Popups nativos MapLibre estilizados en tema crema cálido */
.maplibregl-popup-content {
  background: #FAF7F2 !important;
  color: #2C251E !important;
  border-radius: 16px !important;
  padding: 14px 16px !important;
  border: 1px solid #D5C7B3 !important;
  box-shadow: 0 16px 32px -5px rgba(44, 37, 30, 0.22) !important;
}

.maplibregl-popup-tip {
  border-top-color: #FAF7F2 !important;
}

.maplibregl-popup-close-button {
  color: #6B5E4E !important;
  font-size: 18px !important;
  padding: 6px 10px !important;
}

/* Marcador Billboard erguido */
.billboard-marker {
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: bottom center;
}

.billboard-marker:hover {
  transform: scale(1.08) translateY(-4px);
}

/* Nombre flotante encima de vehículos 3D */
@keyframes vehicleNameFloat {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-3.5px); }
}

.vehicle-name-float {
  animation: vehicleNameFloat 2.4s ease-in-out infinite;
  will-change: transform;
}

/* Suspensión sutil de vehículo 3D en movimiento */
@keyframes vehicleSuspension3D {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-1.2px); }
}

.vehicle-3d-driving {
  animation: vehicleSuspension3D 0.65s ease-in-out infinite;
  will-change: transform;
}

@keyframes vehicleBeaconPulse {
  0%, 100% { opacity: 0.45; transform: scale(0.92); }
  50% { opacity: 1; transform: scale(1.18); }
}

.vehicle-beacon-pulse {
  animation: vehicleBeaconPulse 0.9s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}

/* Panel inferior swipeable */
.bottom-sheet {
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), max-height 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, max-height;
}
