/* Modern SweetAlert2 — confirms + toasts, light + dark */

.swal2-container {
  z-index: 20000 !important;
}

.swal2-container.swal2-backdrop-show:not(.swal2-toast-shown),
.swal2-container.swal2-noanimation:not(.swal2-toast-shown) {
  background: rgba(15, 23, 42, 0.55) !important;
  backdrop-filter: blur(4px);
}

/* Toast: transparent overlay only — keep SweetAlert grid placement */
.swal2-container.swal2-toast-shown,
.swal2-container.rl-swal-toast-container,
.swal2-container.swal2-toast-shown.swal2-backdrop-show,
.swal2-container.swal2-toast-shown.swal2-noanimation,
.swal2-container.rl-swal-toast-container.swal2-backdrop-show,
.swal2-container.rl-swal-toast-container.swal2-noanimation {
  background: transparent !important;
  background-color: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: none !important;
  pointer-events: none !important;
  overflow: visible !important;
}

.swal2-container.swal2-toast-shown > .swal2-popup,
.swal2-container.rl-swal-toast-container > .swal2-popup {
  pointer-events: auto !important;
}

/* Bottom-center toast slot (SweetAlert grid: column 2 / row 3) */
.swal2-container.swal2-bottom > .swal2-popup.rl-swal-toast,
.swal2-container.rl-swal-toast-container.swal2-bottom > .swal2-popup {
  grid-column: 2 !important;
  grid-row: 3 !important;
  place-self: end center !important;
  margin-bottom: 20px !important;
}

.rl-swal.swal2-popup,
.swal2-popup.rl-swal {
  width: min(420px, calc(100vw - 32px)) !important;
  padding: 28px 24px 22px !important;
  border-radius: 16px !important;
  background: #fff !important;
  border: 1px solid #e8edf5 !important;
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.2) !important;
  font-family: inherit !important;
}

.rl-swal .swal2-icon {
  margin: 0 auto 16px !important;
  border-width: 3px !important;
  width: 4.5em !important;
  height: 4.5em !important;
}

.rl-swal .swal2-icon.swal2-question {
  border-color: #93c5fd !important;
  color: #2563eb !important;
}

.rl-swal .swal2-icon.swal2-warning {
  border-color: #fcd34d !important;
  color: #d97706 !important;
}

.rl-swal .swal2-icon.swal2-success {
  border-color: #6ee7b7 !important;
  color: #059669 !important;
}

.rl-swal .swal2-icon.swal2-error {
  border-color: #fca5a5 !important;
  color: #dc2626 !important;
}

.rl-swal .swal2-icon.swal2-info {
  border-color: #7dd3fc !important;
  color: #0284c7 !important;
}

.rl-swal .swal2-title {
  margin: 0 0 8px !important;
  padding: 0 !important;
  font-size: 1.2rem !important;
  font-weight: 600 !important;
  letter-spacing: -0.02em !important;
  color: #0f172a !important;
  line-height: 1.3 !important;
}

.rl-swal .swal2-html-container,
.rl-swal .swal2-content {
  margin: 0 !important;
  padding: 0 !important;
  font-size: 0.9375rem !important;
  font-weight: 400 !important;
  color: #64748b !important;
  line-height: 1.5 !important;
}

.rl-swal .swal2-actions {
  margin: 22px 0 0 !important;
  gap: 10px !important;
  width: 100%;
  flex-wrap: wrap;
}

.rl-swal-confirm,
.rl-swal-cancel {
  margin: 0 !important;
  min-width: 108px;
  padding: 10px 18px !important;
  border-radius: 10px !important;
  font-size: 0.875rem !important;
  font-weight: 600 !important;
  box-shadow: none !important;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease !important;
}

.rl-swal-confirm {
  background: #0c6af4 !important;
  border: none !important;
  color: #fff !important;
}

.rl-swal-confirm:hover {
  background: #004bba !important;
}

.rl-swal-cancel {
  background: transparent !important;
  border: 1.5px solid #e5e7eb !important;
  color: #374151 !important;
}

.rl-swal-cancel:hover {
  background: #f8fafc !important;
  border-color: #d1d5db !important;
}

/* Bottom toast pill */
.rl-swal-toast.swal2-popup,
.swal2-popup.rl-swal-toast {
  width: auto !important;
  max-width: min(420px, calc(100vw - 32px)) !important;
  padding: 12px 16px !important;
  border-radius: 999px !important;
  background: #fff !important;
  border: 1px solid #e8edf5 !important;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.18) !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px;
}

.rl-swal-toast .swal2-icon,
.rl-swal-toast-icon.swal2-icon {
  margin: 0 !important;
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  border: none !important;
  border-radius: 50% !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.rl-swal-toast .swal2-success-ring,
.rl-swal-toast [class^="swal2-success-line"],
.rl-swal-toast .swal2-success-circular-line-left,
.rl-swal-toast .swal2-success-circular-line-right,
.rl-swal-toast .swal2-success-fix-tip {
  display: none !important;
}

.rl-swal-toast-icon-success {
  background: #10b981 !important;
  color: #fff !important;
}

.rl-swal-toast-icon-warning {
  background: #f59e0b !important;
  color: #fff !important;
}

.rl-swal-toast-icon-info {
  background: #0c6af4 !important;
  color: #fff !important;
}

.rl-swal-toast-icon-question {
  background: #6366f1 !important;
  color: #fff !important;
}

.rl-swal-toast .swal2-icon .swal2-icon-content,
.rl-swal-toast-icon .swal2-icon-content {
  font-size: 1rem !important;
  font-weight: 700 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.rl-swal-toast .swal2-icon .material-symbols-outlined,
.rl-swal-toast-icon .material-symbols-outlined {
  font-size: 18px;
  font-variation-settings: "FILL" 1, "wght" 600, "GRAD" 0, "opsz" 20;
  color: inherit;
  line-height: 1;
}

.rl-swal-toast .swal2-title {
  margin: 0 !important;
  padding: 0 !important;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  color: #0f172a !important;
  text-align: left !important;
  line-height: 1.35 !important;
}

.rl-swal-toast .swal2-html-container,
.rl-swal-toast .swal2-timer-progress-bar-container {
  display: none !important;
}

/* —— Dark mode —— */
html[data-theme="dark"] .swal2-container.swal2-backdrop-show:not(.swal2-toast-shown),
html[data-theme="dark"] .swal2-container.swal2-noanimation:not(.swal2-toast-shown) {
  background: rgba(15, 23, 42, 0.72) !important;
}

html[data-theme="dark"] .rl-swal.swal2-popup,
html[data-theme="dark"] .swal2-popup.rl-swal {
  background: #1e293b !important;
  border-color: #334155 !important;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45) !important;
}

html[data-theme="dark"] .rl-swal .swal2-title {
  color: #f1f5f9 !important;
}

html[data-theme="dark"] .rl-swal .swal2-html-container,
html[data-theme="dark"] .rl-swal .swal2-content {
  color: #94a3b8 !important;
}

html[data-theme="dark"] .rl-swal .swal2-icon.swal2-question {
  border-color: rgba(147, 197, 253, 0.45) !important;
  color: #93c5fd !important;
}

html[data-theme="dark"] .rl-swal-confirm {
  background: #0c6af4 !important;
}

html[data-theme="dark"] .rl-swal-confirm:hover {
  background: #2580f7 !important;
}

html[data-theme="dark"] .rl-swal-cancel {
  background: transparent !important;
  border-color: #334155 !important;
  color: #e2e8f0 !important;
}

html[data-theme="dark"] .rl-swal-cancel:hover {
  background: rgba(255, 255, 255, 0.06) !important;
}

html[data-theme="dark"] .rl-swal-toast.swal2-popup,
html[data-theme="dark"] .swal2-popup.rl-swal-toast {
  background: #1e293b !important;
  border-color: #334155 !important;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.4) !important;
}

html[data-theme="dark"] .rl-swal-toast .swal2-title {
  color: #f1f5f9 !important;
}

html[data-theme="dark"] .rl-swal-toast-icon-success {
  background: #10b981 !important;
}
