/**
 * Delete Confirmation Modal - Material Design
 * v2.0 - Con countdown y validaciones
 */

/* ============================================================
   MODAL PRINCIPAL
   ============================================================ */

.delete-confirmation-modal {
  border-radius: 16px !important;
  padding: 24px !important;
}

.delete-modal-content {
  padding: 16px 0 !important;
}

/* ============================================================
   CONTAINER DEL COUNTDOWN
   ============================================================ */

.delete-countdown-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 16px 0;
}

.delete-countdown-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 16px rgba(245, 158, 11, 0.3);
  animation: iconPulse 2s ease-in-out infinite;
}

.delete-countdown-icon i {
  font-size: 40px;
  color: white;
}

@keyframes iconPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 8px 16px rgba(245, 158, 11, 0.3);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 12px 24px rgba(245, 158, 11, 0.4);
  }
}

/* ============================================================
   TIMER DE COUNTDOWN
   ============================================================ */

.delete-countdown-timer {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 24px rgba(220, 38, 38, 0.4);
  position: relative;
  overflow: hidden;
}

.delete-countdown-timer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.3);
  animation: timerSpin 3s linear;
}

.countdown-number {
  font-size: 3rem;
  font-weight: 700;
  color: white;
  line-height: 1;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

@keyframes countdownPulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
}

@keyframes timerSpin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* ============================================================
   MENSAJE
   ============================================================ */

.delete-countdown-message {
  text-align: center;
  max-width: 400px;
}

.delete-item-name {
  font-size: 1.125rem;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.87);
  margin: 0 0 8px 0;
}

.delete-warning {
  font-size: 0.9375rem;
  color: rgba(0, 0, 0, 0.6);
  margin: 0;
}

/* ============================================================
   BOTONES
   ============================================================ */

.delete-confirm-btn {
  padding: 12px 28px !important;
  font-weight: 600 !important;
  font-size: 0.9375rem !important;
  border-radius: 8px !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.delete-confirm-btn:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(220, 38, 38, 0.4) !important;
}

.delete-cancel-btn {
  padding: 12px 28px !important;
  font-weight: 500 !important;
  font-size: 0.9375rem !important;
  border-radius: 8px !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.delete-cancel-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(107, 114, 128, 0.3) !important;
}

@keyframes buttonEnable {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

/* ============================================================
   MODAL DE BLOQUEO POR WHATSAPP
   ============================================================ */

.delete-blocked-modal {
  border-radius: 16px !important;
  padding: 24px !important;
}

.delete-blocked-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
}

.delete-blocked-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 16px rgba(220, 38, 38, 0.3);
}

.delete-blocked-icon i {
  font-size: 40px;
  color: white;
}

.delete-blocked-container p {
  font-size: 1rem;
  color: rgba(0, 0, 0, 0.87);
  margin: 0;
  text-align: center;
}

.delete-blocked-hint {
  font-size: 0.875rem !important;
  color: rgba(0, 0, 0, 0.6) !important;
}

.delete-blocked-btn {
  padding: 12px 28px !important;
  font-weight: 600 !important;
  border-radius: 8px !important;
}

/* ============================================================
   MODAL DE ÉXITO
   ============================================================ */

.delete-success-modal {
  border-radius: 16px !important;
}

.delete-success-modal .swal2-icon {
  width: 80px !important;
  height: 80px !important;
  border: none !important;
}

/* ============================================================
   MODAL DE ERROR
   ============================================================ */

.delete-error-modal {
  border-radius: 16px !important;
}

/* ============================================================
   BOTONES DESHABILITADOS
   ============================================================ */

.delete-confirm-btn:disabled {
  opacity: 0.5 !important;
  cursor: not-allowed !important;
  transform: none !important;
}

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

@media (max-width: 576px) {
  .delete-confirmation-modal,
  .delete-blocked-modal {
    padding: 16px !important;
  }

  .delete-countdown-icon,
  .delete-blocked-icon {
    width: 64px;
    height: 64px;
  }

  .delete-countdown-icon i,
  .delete-blocked-icon i {
    font-size: 32px;
  }

  .delete-countdown-timer {
    width: 100px;
    height: 100px;
  }

  .countdown-number {
    font-size: 2.5rem;
  }

  .delete-item-name {
    font-size: 1rem;
  }

  .delete-warning {
    font-size: 0.875rem;
  }

  .delete-confirm-btn,
  .delete-cancel-btn,
  .delete-blocked-btn {
    padding: 10px 20px !important;
    font-size: 0.875rem !important;
  }
}

/* ============================================================
   DARK MODE
   ============================================================ */

@media (prefers-color-scheme: dark) {
  .delete-confirmation-modal,
  .delete-blocked-modal,
  .delete-success-modal,
  .delete-error-modal {
    background: #1e1e1e !important;
  }

  .delete-item-name {
    color: rgba(255, 255, 255, 0.95);
  }

  .delete-warning,
  .delete-blocked-hint {
    color: rgba(255, 255, 255, 0.6) !important;
  }

  .delete-blocked-container p {
    color: rgba(255, 255, 255, 0.87);
  }
}

/* ============================================================
   ACCESSIBILITY
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  .delete-countdown-icon,
  .delete-countdown-timer::before,
  .countdown-number,
  .delete-confirm-btn,
  .delete-cancel-btn,
  .delete-blocked-btn {
    animation: none !important;
    transition: none !important;
  }

  .delete-confirm-btn:not(:disabled):hover,
  .delete-cancel-btn:hover {
    transform: none !important;
  }
}

/* High contrast */
@media (prefers-contrast: high) {
  .delete-countdown-icon,
  .delete-countdown-timer,
  .delete-blocked-icon {
    border: 2px solid currentColor;
  }
}

/* ============================================================
   PRINT
   ============================================================ */

@media print {
  .swal2-container,
  .delete-confirmation-modal,
  .delete-blocked-modal {
    display: none !important;
  }
}

/* ============================================================
   ANIMACIONES ADICIONALES
   ============================================================ */

.delete-confirmation-modal .swal2-popup {
  animation: modalSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Shake animation para error */
.delete-error-modal .swal2-icon {
  animation: errorShake 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes errorShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-8px); }
  75% { transform: translateX(8px); }
}
