/* ==========================================================================
   SWEETALERT2 - THEME CYBER-MODERN 2026 (ESTÁNDAR MOTOS / MOTOCHECK)
   Branding oficial: Obsidian Navy, Speed Yellow, Warm Slate & Alto Contraste
   ========================================================================== */

/* Elevación de Capas (Por encima de Drawer 1065 y Sidebar 1045) */
.swal2-container {
  z-index: 2200 !important;
}

.swal2-container.swal2-backdrop-show,
.swal2-container.swal2-noanimation {
  background: rgba(8, 12, 20, 0.72) !important;
  backdrop-filter: blur(5px) !important;
  -webkit-backdrop-filter: blur(5px) !important;
}

/* Modal Popup Central */
.swal2-popup {
  background: #0E1420 !important;
  color: #F8FAFC !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 20px !important;
  padding: 1.75rem 1.5rem !important;
  box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 200, 10, 0.08) !important;
  font-family: var(--font-sans, 'Inter', system-ui, -apple-system, sans-serif) !important;
}

.swal2-popup .swal2-title {
  font-family: var(--font-sports, 'Space Grotesk', system-ui, sans-serif) !important;
  font-size: 1.25rem !important;
  font-weight: 700 !important;
  color: #FFFFFF !important;
  margin-bottom: 0.5rem !important;
  letter-spacing: -0.2px;
}

.swal2-popup .swal2-html-container {
  color: #94A3B8 !important;
  font-size: 0.88rem !important;
  line-height: 1.55 !important;
}

/* Botones con Brand Styling 2026 */
.swal2-actions {
  gap: 0.65rem !important;
  margin-top: 1.4rem !important;
}

.swal2-styled.swal2-confirm,
.swal2-popup .swal2-actions .btn-primary {
  background: #FFC80A !important;
  border: 1px solid #FFC80A !important;
  color: #0B0F17 !important;
  font-weight: 700 !important;
  font-family: var(--font-sports, 'Space Grotesk', sans-serif) !important;
  font-size: 0.85rem !important;
  border-radius: 12px !important;
  padding: 0.6rem 1.5rem !important;
  box-shadow: 0 4px 14px rgba(255, 200, 10, 0.28) !important;
  transition: all 0.16s ease !important;
}

.swal2-styled.swal2-confirm:hover,
.swal2-popup .swal2-actions .btn-primary:hover {
  background: #E5B300 !important;
  border-color: #E5B300 !important;
  transform: translateY(-1px);
}

.swal2-styled.swal2-cancel,
.swal2-popup .swal2-actions .btn-outline-secondary {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  color: #CBD5E1 !important;
  font-weight: 600 !important;
  font-size: 0.85rem !important;
  border-radius: 12px !important;
  padding: 0.6rem 1.35rem !important;
  transition: all 0.16s ease !important;
}

.swal2-styled.swal2-cancel:hover,
.swal2-popup .swal2-actions .btn-outline-secondary:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #FFFFFF !important;
}

.swal2-styled.swal2-deny,
.swal2-popup .swal2-actions .btn-outline-danger {
  background: rgba(239, 68, 68, 0.12) !important;
  border: 1px solid rgba(239, 68, 68, 0.3) !important;
  color: #EF4444 !important;
  font-weight: 600 !important;
  border-radius: 12px !important;
}

/* Iconos de Estado Oficiales */
.swal2-icon {
  margin: 1.25rem auto 0.75rem auto !important;
}

/* Éxito: Verde Esmeralda Automotriz */
.swal2-icon.swal2-success {
  border-color: #00B86B !important;
  color: #00B86B !important;
}
.swal2-icon.swal2-success .swal2-success-ring {
  border: 0.25em solid rgba(0, 184, 107, 0.25) !important;
}
.swal2-icon.swal2-success [class^='swal2-success-line'] {
  background-color: #00B86B !important;
}
.swal2-icon.swal2-success .swal2-success-fix,
.swal2-icon.swal2-success .swal2-success-circular-line-left,
.swal2-icon.swal2-success .swal2-success-circular-line-right {
  background-color: transparent !important;
}

/* Error: Carmesí Deportivo */
.swal2-icon.swal2-error {
  border-color: #EF4444 !important;
  color: #EF4444 !important;
}
.swal2-icon.swal2-error [class^='swal2-x-mark-line'] {
  background-color: #EF4444 !important;
}

/* Advertencia: Speed Yellow */
.swal2-icon.swal2-warning {
  border-color: #FFC80A !important;
  color: #FFC80A !important;
}

/* Información: Cyan Tecnológico */
.swal2-icon.swal2-info {
  border-color: #38BDF8 !important;
  color: #38BDF8 !important;
}

/* Pregunta: Speed Yellow / Slate */
.swal2-icon.swal2-question {
  border-color: #FFC80A !important;
  color: #FFC80A !important;
}

/* ==========================================================================
   TOASTS & NOTIFICACIONES TEMPORALES CENTRADAS (ESTÁNDAR MOTOCHECK 2026)
   Regla de Plataforma: Todas las notificaciones de feedback se muestran
   CENTRADAS EN EL MEDIO, con diseño HUD Obsidian Navy Cyber-Modern 2026,
   microanimación fluida y alto contraste universal (Light & Dark mode).
   ========================================================================== */
.swal2-container.swal2-center {
  z-index: 2300 !important;
}

/* CERO OVERLAY / CERO BACKDROP PARA TOASTS: El contenedor no oscurece la pantalla */
.swal2-container.swal2-toast-shown,
.swal2-container.swal2-toast-shown.swal2-backdrop-show,
.swal2-container:has(.swal2-toast),
.swal2-container:has(.swal2-toast-cyber-center),
body.swal2-toast-shown .swal2-container {
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  pointer-events: none !important;
}

.swal2-popup.swal2-toast,
.swal2-popup.swal2-toast-cyber-center {
  background: rgba(14, 20, 32, 0.96) !important;
  color: #FFFFFF !important;
  border: 1px solid rgba(255, 200, 10, 0.35) !important;
  border-radius: 20px !important;
  padding: 1.15rem 1.85rem !important;
  min-width: 320px !important;
  max-width: 460px !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8), 0 0 25px rgba(255, 200, 10, 0.12) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.85rem !important;
  backdrop-filter: blur(16px) !important;
  box-sizing: border-box !important;
  pointer-events: auto !important;
}

.swal2-popup.swal2-toast-cyber-center.swal2-show {
  animation: swalToastCenterIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.swal2-popup.swal2-toast-cyber-center.swal2-hide {
  animation: swalToastCenterOut 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

@keyframes swalToastCenterIn {
  0% {
    opacity: 0;
    transform: scale(0.9) translateY(10px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes swalToastCenterOut {
  0% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
  100% {
    opacity: 0;
    transform: scale(0.9) translateY(10px);
  }
}

.swal2-popup.swal2-toast .swal2-title,
.swal2-popup.swal2-toast-cyber-center .swal2-title {
  font-family: var(--font-sports, 'Space Grotesk', system-ui, sans-serif) !important;
  font-size: 0.98rem !important;
  font-weight: 700 !important;
  color: #FFFFFF !important;
  margin: 0 !important;
  padding: 0 !important;
  letter-spacing: 0.2px !important;
  text-align: left !important;
}

.swal2-popup.swal2-toast .swal2-icon,
.swal2-popup.swal2-toast-cyber-center .swal2-icon {
  margin: 0 !important;
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  border-width: 2.5px !important;
  transform: scale(0.85);
  flex-shrink: 0 !important;
}

/* Halos y bordes de acento dinámicos por tipo de notificación */
.swal2-popup.swal2-toast.swal2-icon-success,
.swal2-popup.swal2-toast-cyber-center:has(.swal2-icon-success) {
  border-color: rgba(16, 185, 129, 0.45) !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8), 0 0 25px rgba(16, 185, 129, 0.2) !important;
}

.swal2-popup.swal2-toast.swal2-icon-error,
.swal2-popup.swal2-toast-cyber-center:has(.swal2-icon-error) {
  border-color: rgba(239, 68, 68, 0.45) !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8), 0 0 25px rgba(239, 68, 68, 0.2) !important;
}

.swal2-popup.swal2-toast.swal2-icon-warning,
.swal2-popup.swal2-toast-cyber-center:has(.swal2-icon-warning) {
  border-color: rgba(255, 200, 10, 0.45) !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8), 0 0 25px rgba(255, 200, 10, 0.2) !important;
}

.swal2-popup.swal2-toast.swal2-icon-info,
.swal2-popup.swal2-toast-cyber-center:has(.swal2-icon-info) {
  border-color: rgba(56, 189, 248, 0.45) !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8), 0 0 25px rgba(56, 189, 248, 0.2) !important;
}

.swal2-timer-progress-bar {
  background: #FFC80A !important;
  height: 3px !important;
  border-radius: 0 0 20px 20px !important;
}

/* Soporte Universal: En Modo Claro, la cápsula HUD se mantiene oscura para máximo contraste */
html[data-bs-theme="light"] .swal2-popup.swal2-toast,
html[data-bs-theme="light"] .swal2-popup.swal2-toast-cyber-center {
  background: rgba(11, 15, 23, 0.96) !important;
  color: #FFFFFF !important;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5), 0 0 25px rgba(255, 200, 10, 0.15) !important;
}

html[data-bs-theme="light"] .swal2-popup.swal2-toast .swal2-title,
html[data-bs-theme="light"] .swal2-popup.swal2-toast-cyber-center .swal2-title {
  color: #FFFFFF !important;
}

/* Botones modales en Modo Claro */
html[data-bs-theme="light"] .swal2-popup:not(.swal2-toast) {
  background: #FFFFFF !important;
  color: #0F172A !important;
  border: 1px solid #E2E8F0 !important;
  box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.15) !important;
}

html[data-bs-theme="light"] .swal2-popup:not(.swal2-toast) .swal2-title {
  color: #0F172A !important;
}

html[data-bs-theme="light"] .swal2-popup:not(.swal2-toast) .swal2-html-container {
  color: #475569 !important;
}

html[data-bs-theme="light"] .swal2-styled.swal2-cancel {
  background: #F1F5F9 !important;
  border-color: #CBD5E1 !important;
  color: #334155 !important;
}
