/* ============================================================================
   MotoXpress v3.5.2 - San Juan Edition
   SISTEMA DE DOBLE CONFIRMACIÓN PERFECCIONADO
   ============================================================================
   Estilos para los modales de revisión de perfil del conductor
   - Pantalla completa para mototaxista (Full Screen Overlay)
   - Tarjeta deslizable para cliente (Bottom Sheet)
   ============================================================================ */

/* ============================================================================
   MODAL: CONDUCTOR ESPERA DECISIÓN (FULL SCREEN OVERLAY)
   ============================================================================ */

#waiting-client-decision-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 99999; /* ✅ v11.70: CERROJO DE ESTADO - Máxima prioridad visual */
  display: none;
}

#waiting-client-decision-modal .panel-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
}

#waiting-client-decision-modal .panel-content {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.waiting-decision-container {
  padding: 40px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  text-align: center;
  max-width: 400px;
  width: 90%;
}

.waiting-icon-container {
  width: 140px;
  height: 140px;
  background: linear-gradient(
    135deg,
    rgba(255, 215, 0, 0.15),
    rgba(255, 215, 0, 0.05)
  );
  border: 2px solid rgba(255, 215, 0, 0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pulse-icon-premium 2.5s infinite;
  box-shadow: 0 0 40px rgba(255, 215, 0, 0.2);
}

.waiting-icon {
  font-size: 4rem;
  filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.6));
}

@keyframes pulse-icon-premium {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.4);
  }
  50% {
    transform: scale(1.08);
    box-shadow: 0 0 0 30px rgba(255, 215, 0, 0);
  }
}

.waiting-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: white;
  margin: 0;
  line-height: 1.4;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.waiting-subtitle {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.6);
  margin: 0;
  font-weight: 500;
}

/* Spinner de carga premium */
.waiting-spinner {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.spinner-dot {
  width: 14px;
  height: 14px;
  background: linear-gradient(135deg, #ffd700, #ffed4e);
  border-radius: 50%;
  animation: bounce-dot-premium 1.4s infinite ease-in-out both;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.spinner-dot:nth-child(1) {
  animation-delay: -0.32s;
}

.spinner-dot:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes bounce-dot-premium {
  0%,
  80%,
  100% {
    transform: scale(0);
    opacity: 0.3;
  }
  40% {
    transform: scale(1.2);
    opacity: 1;
  }
}

/* ============================================================================
   MODAL: CLIENTE REVISA PERFIL (BOTTOM SHEET DESLIZABLE)
   ============================================================================ */

#driver-profile-review-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 10000; /* Por encima de la barra de publicidad */
  display: none;
}

#driver-profile-review-modal .panel-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

#driver-profile-review-modal .panel-content {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  max-height: 85vh; /* Dejar espacio para la barra de publicidad */
  background: linear-gradient(
    180deg,
    rgba(10, 10, 10, 0.98),
    rgba(0, 0, 0, 0.98)
  );
  border-radius: 30px 30px 0 0;
  border-top: 2px solid rgba(255, 215, 0, 0.4);
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  padding-bottom: 160px; /* Espacio para la barra de publicidad (140px + margen) */
  overflow-y: auto;
}

#driver-profile-review-modal.active .panel-content {
  transform: translateY(0);
}

.profile-review-container {
  padding: 30px 20px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 25px;
}

/* Handle para arrastrar */
.profile-review-container::before {
  content: "";
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 5px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 10px;
}

.profile-review-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: #ffd700;
  text-align: center;
  margin: 15px 0 0 0;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}

/* Tarjeta del perfil del conductor */
.driver-profile-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  padding: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  width: 100%;
  max-width: 320px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.driver-photo-large {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  object-fit: cover;
  border: 5px solid #ffd700;
  box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
  background: rgba(20, 20, 20, 0.8);
}

.driver-name-large {
  font-size: 1.5rem;
  font-weight: 800;
  color: white;
  margin: 0;
  text-align: center;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

.rating-display-large {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.3rem;
  font-weight: 800;
  padding: 8px 20px;
  background: rgba(255, 215, 0, 0.1);
  border-radius: 20px;
  border: 1px solid rgba(255, 215, 0, 0.3);
}

.star-icon {
  font-size: 1.6rem;
  filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.6));
}

.rating-value {
  color: #ffd700;
  text-shadow: 0 2px 6px rgba(255, 215, 0, 0.4);
}

/* Botones de acción con efecto de pulso */
.profile-review-actions {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  max-width: 320px;
}

.btn-accept-driver {
  width: 100%;
  padding: 18px;
  background: linear-gradient(135deg, #2ecc71, #27ae60);
  color: white;
  border: none;
  border-radius: 18px;
  font-size: 1.15rem;
  font-weight: 900;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 10px 25px rgba(46, 204, 113, 0.4);
  transition: all 0.3s ease;
  animation: pulse-button 2s infinite;
}

@keyframes pulse-button {
  0%,
  100% {
    box-shadow: 0 10px 25px rgba(46, 204, 113, 0.4);
  }
  50% {
    box-shadow: 0 10px 35px rgba(46, 204, 113, 0.6);
  }
}

.btn-accept-driver:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(46, 204, 113, 0.6);
  filter: brightness(1.15);
}

.btn-accept-driver:active {
  transform: scale(0.97);
}

.btn-reject-driver {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, #ff416c, #ff4b2b);
  color: #ffffff !important;
  border: none;
  border-radius: 18px;
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  transition: all 0.3s ease;
  animation: pulse-button-reject 2s infinite;
}

@keyframes pulse-button-reject {
  0%,
  100% {
    border-color: rgba(255, 77, 77, 0.5);
  }
  50% {
    border-color: rgba(255, 77, 77, 0.8);
  }
}

.btn-reject-driver:hover {
  background: rgba(255, 77, 77, 0.25);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(255, 77, 77, 0.3);
}

.btn-reject-driver:active {
  transform: scale(0.97);
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */

@media (max-width: 480px) {
  .waiting-icon-container {
    width: 120px;
    height: 120px;
  }

  .waiting-icon {
    font-size: 3.5rem;
  }

  .waiting-title {
    font-size: 1.3rem;
  }

  .waiting-subtitle {
    font-size: 1rem;
  }

  .profile-review-container {
    padding: 25px 15px 35px;
    gap: 20px;
  }

  .profile-review-title {
    font-size: 1.2rem;
  }

  .driver-photo-large {
    width: 110px;
    height: 110px;
  }

  .driver-name-large {
    font-size: 1.3rem;
  }

  .rating-display-large {
    font-size: 1.2rem;
  }

  .btn-accept-driver,
  .btn-reject-driver {
    font-size: 1rem;
    padding: 16px;
  }
}

/* ============================================
   DYNAMIC PROXIMITY BADGE — v4.1.1
   Bloque Justificado con Tipografía Montserrat Light
   Branding: Texto BLANCO puro, color semántico en iconos y glow
   ============================================ */

#proximity-badge-container {
  margin-top: 8px;
  width: 100%;
}

.distance-indicator-premium {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px 18px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 215, 0, 0.15);
  animation: fadeInBadge 0.4s ease-out;
}

.distance-indicator-premium .dist-icon {
  font-size: 1.1rem;
  line-height: 1;
  flex-shrink: 0;
}

.distance-indicator-premium .dist-text {
  font-family: "Montserrat", sans-serif;
  font-weight: 300;
  font-size: 0.95rem;
  letter-spacing: 0.8px;
  color: #ffffff;
  text-align: center;
}

/* === Badge Semántico: Cerca (<1km) — Icono Verde, Texto Blanco === */
.distance-indicator-premium.badge-near {
  background: rgba(46, 204, 113, 0.1);
  border-color: rgba(46, 204, 113, 0.3);
}

.distance-indicator-premium.badge-near .dist-text {
  color: #ffffff;
  text-shadow: 0 0 5px rgba(46, 204, 113, 0.5);
}

/* === Badge Semántico: Medio (1-3km) — Icono Oro, Texto Blanco === */
.distance-indicator-premium.badge-medium {
  background: rgba(255, 215, 0, 0.08);
  border-color: rgba(255, 215, 0, 0.25);
}

.distance-indicator-premium.badge-medium .dist-text {
  color: #ffffff;
  text-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
}

/* === Badge Semántico: Lejos (>3km) — Sin Shadow, Texto Blanco Opaco === */
.distance-indicator-premium.badge-far {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.12);
}

.distance-indicator-premium.badge-far .dist-text {
  color: rgba(255, 255, 255, 0.6);
  text-shadow: none;
  font-weight: 300;
}

/* === Animación: Pulse para <500m (Latido de Cercanía) === */
.distance-indicator-premium.badge-pulse .dist-icon {
  animation: badgePulse 1.5s ease-in-out infinite;
}

@keyframes fadeInBadge {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes badgePulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.3);
    opacity: 0.7;
  }
}
