/* Universal Alert Modal System */
.alert-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 99999;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

.alert-modal-overlay.active {
  display: flex;
}

.alert-modal {
  background: white;
  border-radius: 16px;
  padding: 0;
  min-width: 320px;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  animation: slideUp 0.3s ease;
  overflow: hidden;
}

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

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

.alert-modal-header {
  padding: 24px 24px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #e0e0e0;
}

.alert-modal-icon {
  font-size: 32px;
  line-height: 1;
}

.alert-modal-icon.success {
  color: #4CAF50;
}

.alert-modal-icon.error {
  color: #f44336;
}

.alert-modal-icon.warning {
  color: #FFA500;
}

.alert-modal-icon.info {
  color: #2196F3;
}

.alert-modal-icon.confirm {
  color: #FF9800;
}

.alert-modal-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #2e2e2e;
  margin: 0;
  flex: 1;
}

.alert-modal-body {
  padding: 24px;
  color: #555;
  font-size: 1rem;
  line-height: 1.6;
  text-align: center;
}

.alert-modal-footer {
  padding: 16px 24px 24px;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.alert-modal-btn {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 100px;
}

.alert-modal-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

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

.alert-modal-btn-primary {
  background: linear-gradient(135deg, #4CAF50, #45a049);
  color: white;
}

.alert-modal-btn-primary:hover {
  background: linear-gradient(135deg, #45a049, #3d8b40);
}

.alert-modal-btn-danger {
  background: linear-gradient(135deg, #f44336, #da190b);
  color: white;
}

.alert-modal-btn-danger:hover {
  background: linear-gradient(135deg, #da190b, #c41700);
}

.alert-modal-btn-warning {
  background: linear-gradient(135deg, #FFA500, #ff8c00);
  color: white;
}

.alert-modal-btn-warning:hover {
  background: linear-gradient(135deg, #ff8c00, #ff7700);
}

.alert-modal-btn-secondary {
  background: #e0e0e0;
  color: #333;
}

.alert-modal-btn-secondary:hover {
  background: #d0d0d0;
}

.alert-modal-btn-info {
  background: linear-gradient(135deg, #2196F3, #1976D2);
  color: white;
}

.alert-modal-btn-info:hover {
  background: linear-gradient(135deg, #1976D2, #1565C0);
}

/* Confirm dialog specific styles */
.alert-modal-footer.confirm-actions {
  justify-content: center;
}

/* Close button (X) */
.alert-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 24px;
  color: #999;
  cursor: pointer;
  transition: color 0.3s ease;
  line-height: 1;
  padding: 4px;
}

.alert-modal-close:hover {
  color: #333;
}

/* Loading spinner */
.alert-modal-loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #FFA500;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-right: 8px;
  vertical-align: middle;
}

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

/* Responsive */
@media (max-width: 480px) {
  .alert-modal {
    min-width: 280px;
    width: 95%;
  }
  
  .alert-modal-header {
    padding: 20px 20px 12px;
  }
  
  .alert-modal-body {
    padding: 20px;
    font-size: 0.95rem;
  }
  
  .alert-modal-footer {
    padding: 12px 20px 20px;
    flex-direction: column;
  }
  
  .alert-modal-btn {
    width: 100%;
  }
  
  .alert-modal-title {
    font-size: 1.3rem;
  }
}