/* SweetAlert2 dark theme overrides */
:root {
  --swal-dark-bg: #0f172a;
  --swal-dark-surface: #111827;
  --swal-dark-border: #334155;
  --swal-dark-title: #e5e7eb;
  --swal-dark-text: #cbd5e1;
  --swal-dark-input-bg: #0b1220;
  --swal-dark-input-border: #475569;
  --swal-dark-confirm: #0ba6c5;
  --swal-dark-confirm-hover: #31d2f2;
  --swal-dark-cancel: #475569;
  --swal-dark-cancel-hover: #334155;
}

:root {
  --swal2-background: var(--swal-dark-surface);
}

.swal2-container.swal2-backdrop-show {
  background: rgba(2, 6, 23, 0.78);
}

.swal2-popup,
.swal2-modal {
  background: linear-gradient(160deg, var(--swal-dark-surface), #0b1220 65%);
  border: 1px solid var(--swal-dark-border);
  border-radius: 14px;
  box-shadow: 0 18px 50px rgba(2, 6, 23, 0.65);
  color: var(--swal-dark-text) !important;
  background-color: var(--swal-dark-surface) !important;
  border-color: var(--swal-dark-border) !important;
}

.swal2-title {
  color: var(--swal-dark-title) !important;
}

.swal2-popup.swal2-icon-warning .swal2-title {
  color: #f59e0b !important;
}

.swal2-popup.swal2-icon-error .swal2-title {
  color: #ef4444 !important;
}

.swal2-popup.swal2-icon-success .swal2-title {
  color: #22c55e !important;
}

.swal2-popup.swal2-icon-info .swal2-title {
  color: #38bdf8 !important;
}

.swal2-html-container,
.swal2-content {
  color: var(--swal-dark-text) !important;
}

.swal2-close {
  color: #94a3b8 !important;
}

.swal2-close:hover {
  color: #e2e8f0 !important;
}

.swal2-input,
.swal2-textarea,
.swal2-select,
.swal2-file {
  background: var(--swal-dark-input-bg) !important;
  color: var(--swal-dark-title) !important;
  border: 1px solid var(--swal-dark-input-border) !important;
}

.swal2-input:focus,
.swal2-textarea:focus,
.swal2-select:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.24);
}

.swal2-actions .swal2-confirm,
.swal2-styled.swal2-confirm {
  background-color: var(--swal-dark-confirm) !important;
  color: #fff !important;
  border: none !important;
  border-width: 0 !important;
  border-color: transparent !important;
  outline: none !important;
}

.swal2-icon.swal2-warning ~ .swal2-actions .swal2-confirm,
.swal2-popup.swal2-icon-warning .swal2-confirm {
  background-color: #f59e0b !important;
}

.swal2-icon.swal2-error ~ .swal2-actions .swal2-confirm,
.swal2-popup.swal2-icon-error .swal2-confirm {
  background-color: #ef4444 !important;
}

.swal2-icon.swal2-success ~ .swal2-actions .swal2-confirm,
.swal2-popup.swal2-icon-success .swal2-confirm {
  background-color: #22c55e !important;
}

.swal2-icon.swal2-info ~ .swal2-actions .swal2-confirm,
.swal2-popup.swal2-icon-info .swal2-confirm {
  background-color: #38bdf8 !important;
}

.swal2-actions .swal2-confirm:hover,
.swal2-styled.swal2-confirm:hover,
.swal2-actions .swal2-confirm:active,
.swal2-styled.swal2-confirm:active {
  background-color: var(--swal-dark-confirm-hover) !important;
  color: #fff !important;
  border: none !important;
  border-width: 0 !important;
  border-color: transparent !important;
  outline: none !important;
}

.swal2-popup.swal2-icon-warning .swal2-confirm:hover,
.swal2-popup.swal2-icon-warning .swal2-confirm:active {
  background-color: #d97706 !important;
}

.swal2-popup.swal2-icon-error .swal2-confirm:hover,
.swal2-popup.swal2-icon-error .swal2-confirm:active {
  background-color: #dc2626 !important;
}

.swal2-popup.swal2-icon-success .swal2-confirm:hover,
.swal2-popup.swal2-icon-success .swal2-confirm:active {
  background-color: #16a34a !important;
}

.swal2-popup.swal2-icon-info .swal2-confirm:hover,
.swal2-popup.swal2-icon-info .swal2-confirm:active {
  background-color: #0ea5e9 !important;
}

.swal2-actions .swal2-confirm:focus,
.swal2-actions .swal2-confirm:focus-visible,
.swal2-styled.swal2-confirm:focus,
.swal2-styled.swal2-confirm:focus-visible {
  border: none !important;
  border-width: 0 !important;
  border-color: transparent !important;
  outline: none !important;
  box-shadow: none !important;
}

.swal2-actions .swal2-cancel {
  background-color: var(--swal-dark-cancel) !important;
  border-color: var(--swal-dark-cancel) !important;
  color: #e5e7eb !important;
}

.swal2-actions .swal2-cancel:hover {
  background-color: var(--swal-dark-cancel-hover) !important;
  border-color: var(--swal-dark-cancel-hover) !important;
}

.swal2-loader {
  border-color: #93c5fd transparent #93c5fd transparent;
}

.swal2-actions.swal2-loading .swal2-styled.swal2-confirm,
.swal2-actions.swal2-loading .swal2-confirm {
  background-color: transparent !important;
  color: transparent !important;
  border-style: solid !important;
  border-width: 0.25em !important;
  border-color: #93c5fd transparent #93c5fd transparent !important;
  border-radius: 50% !important;
  box-shadow: none !important;
}
