/* These styles are generated from project.scss. */
/* Proton Slate Theme Overrides */

.alert-debug {
  background-color: var(--bs-surface-bg);
  color: var(--bs-body-color);
  border: 1px solid var(--ps-border);
  border-left: 4px solid var(--bs-secondary);
  border-radius: 0.5rem;
}

.alert-error {
  background-color: rgba(255, 95, 95, 0.1);
  color: var(--bs-danger);
  border: 1px solid var(--bs-danger);
  border-radius: 0.5rem;
}

/* Django form error styling */
.errorlist {
  color: var(--bs-danger);
  background: rgba(255, 95, 95, 0.1);
  border: 1px solid var(--bs-danger);
  border-radius: 0.5rem;
  padding: 0.5rem 1rem;
  margin-bottom: 1rem;
  list-style: none;
  font-family: var(--bs-font-monospace);
  font-size: 0.875rem;
}

.errorlist li {
  margin: 0;
}

/* Django success messages */
.messages .alert-success {
  background: var(--success);
  color: var(--body-bg);
  border: none;
}

/* Form field enhancements */
.form-group label {
  color: var(--gray-400);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.form-group .helptext {
  color: var(--gray-600);
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

/* Pagination styling */
.pagination .page-link {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--gray-400);
  font-family: var(--bs-font-monospace);
}

.pagination .page-item.active .page-link {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--body-bg);
  box-shadow: 0 0 8px rgba(0, 255, 158, 0.6);
}

/* Code and pre blocks */
pre {
  background: var(--surface);
  color: var(--gray-400);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.75rem;
  padding: 1rem;
  font-family: var(--bs-font-monospace);
  overflow-x: auto;
}

/* Table responsive wrapper */
.table-responsive {
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Custom utility classes */
.text-glow-primary {
  text-shadow: 0 0 6px var(--primary);
}

.text-glow-cyan {
  text-shadow: 0 0 6px var(--accent-cyan);
}

.bg-gradient-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent-cyan) 100%);
}

.bg-gradient-secondary {
  background: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-magenta) 100%);
}

/* Loading overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(13, 17, 23, 0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.loading-spinner {
  border: 3px solid var(--surface);
  border-top: 3px solid var(--primary);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
}

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

/* Dark mode compatibility for third-party components */
.select2-container--default .select2-selection--single {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--gray-400);
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
  color: var(--gray-400);
}

.select2-dropdown {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.select2-container--default .select2-results__option {
  background: var(--surface);
  color: var(--gray-400);
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
  background: var(--primary);
  color: var(--body-bg);
}

/* Toast notifications */
.toast {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--gray-400);
}

.toast-header {
  background: var(--body-bg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
