/* ---------- SweetAlert2 restyle — matches the app's own look instead of the library default:
   rounded cards, brand-accent blue, Bootstrap's font stack, and full dark-mode support (the
   stock theme is always white and looks jarring against the rest of the app in dark mode). ---------- */

.swal2-popup {
  border-radius: 1rem !important;
  box-shadow: 0 20px 45px rgba(15, 23, 42, .16) !important;
  font-family: var(--bs-body-font-family, -apple-system, "Segoe UI", Roboto, sans-serif) !important;
  padding-bottom: 1.75rem !important;
}

.swal2-title {
  font-size: 1.25rem !important;
  font-weight: 700 !important;
  color: #1f2937;
  padding-top: 1.5rem;
}

.swal2-html-container {
  font-size: .92rem !important;
  color: #4b5563;
}

.swal2-actions {
  gap: .6rem;
  margin-top: 1.5rem;
}

.swal2-styled {
  border-radius: .5rem !important;
  padding: .5rem 1.25rem !important;
  font-size: .9rem !important;
  font-weight: 600 !important;
  box-shadow: none !important;
  transition: transform .15s ease, box-shadow .15s ease;
}

.swal2-styled:hover {
  transform: translateY(-1px);
}

.swal2-styled:focus {
  box-shadow: 0 0 0 .2rem rgba(59, 130, 246, .25) !important;
}

.swal2-confirm {
  background-color: var(--brand-accent, #3B82F6) !important;
}

.swal2-cancel {
  background-color: #eef0f4 !important;
  color: #4b5563 !important;
}

.swal2-deny {
  background-color: #dc3545 !important;
}

/* Icon rings — softer, brand-tinted instead of SweetAlert2's saturated defaults */
.swal2-icon.swal2-success {
  border-color: #b7ecc5 !important;
  color: #198754 !important;
}

.swal2-icon.swal2-success [class^='swal2-success-line'] {
  background-color: #198754 !important;
}

.swal2-icon.swal2-success .swal2-success-ring {
  border-color: #b7ecc5 !important;
}

.swal2-icon.swal2-error {
  border-color: #f3c2c2 !important;
  color: #dc3545 !important;
}

.swal2-icon.swal2-error [class^='swal2-x-mark-line'] {
  background-color: #dc3545 !important;
}

.swal2-icon.swal2-warning {
  border-color: #fbe0b0 !important;
  color: #d97706 !important;
}

.swal2-icon.swal2-info {
  border-color: #bcd7fb !important;
  color: var(--brand-accent, #3B82F6) !important;
}

.swal2-icon.swal2-question {
  border-color: #d8dbe3 !important;
  color: #6b7280 !important;
}

/* Inputs inside prompts (e.g. quick-add doctor) — match Bootstrap's .form-control instead of the library default */
.swal2-input,
.swal2-select,
.swal2-textarea {
  border-radius: .5rem !important;
  border: 1px solid #dbe0e8 !important;
  box-shadow: none !important;
  font-size: .9rem !important;
}

.swal2-input:focus,
.swal2-select:focus,
.swal2-textarea:focus {
  border-color: var(--brand-accent, #3B82F6) !important;
  box-shadow: 0 0 0 .2rem rgba(59, 130, 246, .15) !important;
}

.swal2-validation-message {
  border-radius: .4rem;
  background: #fef2f2;
  color: #b91c1c;
}

.swal2-timer-progress-bar {
  background: var(--brand-accent, #3B82F6) !important;
}

/* ---------- Dark mode ---------- */
[data-bs-theme="dark"] .swal2-popup {
  background: #161b22 !important;
  box-shadow: 0 20px 45px rgba(0, 0, 0, .45) !important;
}

[data-bs-theme="dark"] .swal2-title {
  color: #e5e7eb;
}

[data-bs-theme="dark"] .swal2-html-container {
  color: #9ca3af;
}

[data-bs-theme="dark"] .swal2-cancel {
  background-color: rgba(255, 255, 255, .08) !important;
  color: #d1d5db !important;
}

[data-bs-theme="dark"] .swal2-input,
[data-bs-theme="dark"] .swal2-select,
[data-bs-theme="dark"] .swal2-textarea {
  background-color: #0d1117 !important;
  border-color: rgba(255, 255, 255, .12) !important;
  color: #e5e7eb !important;
}

[data-bs-theme="dark"] .swal2-validation-message {
  background: rgba(220, 53, 69, .15);
  color: #fca5a5;
}
