/* Custom Alert Component Styles */
.custom-alert-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  animation: fadeIn 0.3s ease-out;
}

.custom-alert-modal {
  background: white;
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow: hidden;
  animation: slideIn 0.3s ease-out;
  position: relative;
}

/* Dark theme support */
:host-context(.dark-mode) .custom-alert-modal {
  background: #2d3748;
  color: #e2e8f0;
}

/* Alert Header */
.alert-header {
  display: flex;
  align-items: center;
  padding: 1.5rem 1.5rem 1rem 1.5rem;
  border-bottom: 1px solid #e2e8f0;
  position: relative;
  min-height: 3rem;
}

:host-context(.dark-mode) .alert-header {
  border-bottom-color: #4a5568;
}

.alert-icon {
  margin-right: 0.75rem;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
}

.alert-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 6px;
  flex: 1;
  line-height: 1.5rem;
  display: flex;
  align-items: center;
  padding-right: 3rem; /* Add space for close button */
}

.alert-close-btn {
  position: absolute;
  top: 50%;
  right: 1rem;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 1.25rem;
  color: #6b7280;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 4px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
}

.alert-close-btn:hover {
  background-color: #f3f4f6;
  color: #374151;
}

:host-context(.dark-mode) .alert-close-btn {
  color: #a0aec0;
}

:host-context(.dark-mode) .alert-close-btn:hover {
  background-color: #4a5568;
  color: #e2e8f0;
}

/* Alert Body */
.alert-body {
  padding: 1rem 1.5rem;
}

.alert-message {
  margin: 0;
  font-size: 1rem;
  line-height: 1.5;
  color: #374151;
}

:host-context(.dark-mode) .alert-message {
  color: #e2e8f0;
}

/* Alert Footer */
.alert-footer {
  padding: 1rem 1.5rem 1.5rem 1.5rem;
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  border-top: 1px solid #e2e8f0;
}

:host-context(.dark-mode) .alert-footer {
  border-top-color: #4a5568;
}

/* Alert Types */
.alert-info .alert-icon {
  color: #3b82f6;
}

.alert-success .alert-icon {
  color: #10b981;
}

.alert-warning .alert-icon {
  color: #f59e0b;
}

.alert-error .alert-icon {
  color: #ef4444;
}

/* Button Styles */
.btn {
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.btn-primary {
  background-color: #3b82f6;
  color: white;
  border-color: #3b82f6;
}

.btn-primary:hover {
  background-color: #2563eb;
  border-color: #2563eb;
}

.btn-secondary {
  background-color: #6b7280;
  color: white;
  border-color: #6b7280;
}

.btn-secondary:hover {
  background-color: #4b5563;
  border-color: #4b5563;
}

:host-context(.dark-mode) .btn-primary {
  background-color: #4f46e5;
  border-color: #4f46e5;
}

:host-context(.dark-mode) .btn-primary:hover {
  background-color: #4338ca;
  border-color: #4338ca;
}

:host-context(.dark-mode) .btn-secondary {
  background-color: #6b7280;
  border-color: #6b7280;
}

:host-context(.dark-mode) .btn-secondary:hover {
  background-color: #4b5563;
  border-color: #4b5563;
}

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

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

/* Responsive Design */
@media (max-width: 576px) {
  .custom-alert-modal {
    width: 95%;
    margin: 1rem;
  }
  
  .alert-header,
  .alert-body,
  .alert-footer {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  .alert-header {
    min-height: 2.5rem;
  }
  
  .alert-icon {
    font-size: 1.25rem;
    width: 1.25rem;
    height: 1.25rem;
  }
  
  .alert-title {
    font-size: 1.1rem;
    padding-right: 2.5rem;
  }
  
  .alert-close-btn {
    width: 1.75rem;
    height: 1.75rem;
    font-size: 1.1rem;
  }
  
  .alert-footer {
    flex-direction: column;
  }
  
  .btn {
    width: 100%;
    margin-bottom: 0.5rem;
  }
  
  .btn:last-child {
    margin-bottom: 0;
  }
}
