/* Popup Warning Styles */
#popup-warning-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

.popup-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.popup-content {
  position: relative;
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  max-width: 400px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  transform: scale(0.9) translateY(20px);
  transition: transform 0.3s ease;
}

#popup-warning-container.show .popup-overlay {
  opacity: 1;
}

#popup-warning-container.show .popup-content {
  transform: scale(1) translateY(0);
}

.popup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid #f0f0f0;
}

.popup-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 16px;
  flex-shrink: 0;
}

.popup-close {
  background: none;
  border: none;
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
  color: #666;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.popup-close:hover {
  background: #f5f5f5;
  color: #333;
}

.popup-body {
  padding: 20px 24px;
}

.popup-title {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 8px 0;
  color: #1a1a1a;
  display: flex;
  align-items: center;
}

.popup-message {
  font-size: 16px;
  line-height: 1.5;
  color: #666;
  margin: 0;
}

.popup-footer {
  padding: 16px 24px 24px;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.popup-btn {
  padding: 12px 24px;
  border-radius: 8px;
  border: none;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 80px;
}

.popup-btn-primary {
  background: #3b82f6;
  color: white;
}

.popup-btn-primary:hover {
  background: #2563eb;
  transform: translateY(-1px);
}

.popup-btn-secondary {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;
}

.popup-btn-secondary:hover {
  background: #e5e7eb;
  transform: translateY(-1px);
}

/* Type-specific styles */
.type-warning .popup-icon {
  background: #fef3c7;
  color: #f59e0b;
}

.type-warning .popup-title {
  color: #92400e;
}

.type-error .popup-icon {
  background: #fee2e2;
  color: #dc2626;
}

.type-error .popup-title {
  color: #991b1b;
}

.type-success .popup-icon {
  background: #d1fae5;
  color: #059669;
}

.type-success .popup-title {
  color: #047857;
}

.type-info .popup-icon {
  background: #dbeafe;
  color: #2563eb;
}

.type-info .popup-title {
  color: #1e40af;
}

/* Responsive */
@media (max-width: 480px) {
  #popup-warning-container {
    padding: 16px;
  }

  .popup-content {
    max-width: 100%;
  }

  .popup-header {
    padding: 16px 20px 12px;
  }

  .popup-body {
    padding: 16px 20px;
  }

  .popup-footer {
    padding: 12px 20px 20px;
    flex-direction: column;
  }

  .popup-btn {
    width: 100%;
  }

  .popup-title {
    font-size: 18px;
  }

  .popup-message {
    font-size: 14px;
  }
}

/* Animation for better UX */
@keyframes popupSlideIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes popupSlideOut {
  from {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
  to {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .popup-content {
    background: #1f2937;
    color: #f9fafb;
  }

  .popup-header {
    border-bottom-color: #374151;
  }

  .popup-title {
    color: #f9fafb;
  }

  .popup-message {
    color: #d1d5db;
  }

  .popup-close {
    color: #9ca3af;
  }

  .popup-close:hover {
    background: #374151;
    color: #f9fafb;
  }

  .popup-btn-secondary {
    background: #374151;
    color: #d1d5db;
    border-color: #4b5563;
  }

  .popup-btn-secondary:hover {
    background: #4b5563;
  }
}
