/* css/drop/modal_system.css */
/* Version 3.0 - FIXED: z-index hierarchy */

/* MODAL SYSTEM - Base z-index: 9999 */
.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  backdrop-filter: blur(4px);
  background: rgba(0, 0, 0, 0.35);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.25s ease;
}

/* NOTIFICATION MODALS - z-index: 99999 (HIGHER THAN FORM MODALS) */
#customAlertModal,
#customConfirmModal,
#customSuccessModal,
#customErrorModal,
#customLoadingModal {
  z-index: 99999 !important;
}

.modal-box {
  width: 95%;
  max-width: 420px;
  background: #fff;
  border-radius: 16px;
  padding: 30px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
  text-align: center;
  animation: slideUp 0.3s ease;
}

.modal-box h3 {
  font-size: 20px;
  font-weight: 700;
  margin: 15px 0 10px;
  color: #1e293b;
}

.modal-box p {
  font-size: 15px;
  line-height: 1.6;
  color: #475569;
  margin: 10px 0 20px;
  white-space: pre-line;
}

.modal-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 15px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-icon svg {
  width: 100%;
  height: 100%;
}

.btn {
  padding: 12px 24px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  width: 100%;
  margin-top: 15px;
  transition: all 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn:active {
  transform: translateY(0);
}

.btn-group {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.btn-primary {
  background: #4f46e5;
  color: white;
}
.btn-primary:hover {
  background: #4338ca;
}

.btn-secondary {
  background: #e5e7eb;
  color: #374151;
}
.btn-secondary:hover {
  background: #d1d5db;
}

.btn-success {
  background: #16a34a;
  color: white;
}
.btn-success:hover {
  background: #15803d;
}

.btn-danger {
  background: #ef4444;
  color: white;
}
.btn-danger:hover {
  background: #dc2626;
}

.loading-modal {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 18px;
  padding: 40px;
  text-align: center;
  animation: scaleIn 0.3s ease;
  max-width: 300px;
}

.loader {
  width: 60px;
  height: 60px;
  border: 6px solid #e5e7eb;
  border-top: 6px solid #6366f1;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

@keyframes scaleIn {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
