/**
 * Tema global SweetAlert2 — visual clean (drawers / Nutír-style).
 * SweetAlert2 ≤6.x: .swal2-modal, .swal2-buttonswrapper
 * SweetAlert2 ≥7.x: .swal2-popup, .swal2-actions
 * Carregar depois de sweetalert2.min.css
 */

body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) {
  overflow-y: auto;
}

.swal2-container {
  padding: 24px 16px !important;
  background: rgba(15, 23, 42, 0.42) !important;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

/* Caixa do modal (v6: swal2-modal | v7+: swal2-popup) */
.swal2-popup.fw-swal2-popup,
.swal2-popup,
.swal2-modal {
  /* Biblioteca define min-height no popup + às vezes inline; altura deve seguir o conteúdo */
  min-height: auto !important;
  position: relative;
  max-width: 420px !important;
  width: min(100%, 420px) !important;
  padding: 2rem 1.75rem 1.75rem !important;
  margin: 0 auto !important;
  border-radius: 18px !important;
  border: 1px solid rgba(226, 232, 240, 0.95) !important;
  box-shadow:
    0 24px 48px -12px rgba(15, 23, 42, 0.22),
    0 0 0 1px rgba(255, 255, 255, 0.06) inset !important;
  font-family: "Inter Tight", Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  background: #ffffff !important;
  color: #0f172a !important;
}

.swal2-popup.fw-swal2-popup .swal2-title,
.swal2-popup .swal2-title,
.swal2-modal .swal2-title,
.swal2-title.fw-swal2-title {
  margin: 0 0 0.65rem 0 !important;
  padding: 0 !important;
  font-size: 1.25rem !important;
  font-weight: 700 !important;
  letter-spacing: -0.025em !important;
  line-height: 1.35 !important;
  color: #13161b !important;
}

.swal2-popup .swal2-html-container,
.swal2-popup .swal2-content,
.swal2-modal .swal2-content {
  margin: 0 !important;
  padding: 0 !important;
  font-size: 0.9375rem !important;
  font-weight: 400 !important;
  line-height: 1.55 !important;
  color: #64748b !important;
  text-align: center !important;
}

.swal2-popup .swal2-html-container a,
.swal2-modal .swal2-content a {
  color: var(--fw-community-primary, #6366f1);
  font-weight: 600;
}

/* Ícones — SweetAlert2 6.x posiciona X/check com px fixos num canvas 80×80 + content-box.
 * Não reduzir width/height nem usar border-box aqui (quebra o X e o ✓). */
.swal2-popup .swal2-icon,
.swal2-modal .swal2-icon {
  margin: 0 auto 1.25rem !important;
  width: 80px !important;
  height: 80px !important;
  box-sizing: content-box !important;
  border-width: 4px !important;
  border-style: solid !important;
}

.swal2-popup .swal2-icon.swal2-warning,
.swal2-modal .swal2-icon.swal2-warning {
  border-color: #fcd34d !important;
  color: #b45309 !important;
  font-size: 60px !important;
  line-height: 80px !important;
  text-align: center !important;
}

.swal2-popup .swal2-icon.swal2-info,
.swal2-modal .swal2-icon.swal2-info {
  border-color: #93c5fd !important;
  color: #1d4ed8 !important;
  font-size: 60px !important;
  line-height: 80px !important;
  text-align: center !important;
}

.swal2-popup .swal2-icon.swal2-success,
.swal2-modal .swal2-icon.swal2-success {
  border-color: #86efac !important;
  color: #15803d !important;
}

.swal2-popup .swal2-icon.swal2-error,
.swal2-modal .swal2-icon.swal2-error {
  border-color: #fca5a5 !important;
  color: #b91c1c !important;
}

.swal2-popup .swal2-icon.swal2-question,
.swal2-modal .swal2-icon.swal2-question {
  border-color: #c4b5fd !important;
  color: #5b21b6 !important;
  font-size: 60px !important;
  line-height: 80px !important;
  text-align: center !important;
}

/* Linhas do X: garantir rotações do tema base (evita conflito com resets globais). */
.swal2-popup .swal2-icon.swal2-error [class^="swal2-x-mark-line"],
.swal2-modal .swal2-icon.swal2-error [class^="swal2-x-mark-line"] {
  background-color: currentColor !important;
}

.swal2-popup .swal2-icon.swal2-error [class^="swal2-x-mark-line"][class$="left"],
.swal2-modal .swal2-icon.swal2-error [class^="swal2-x-mark-line"][class$="left"] {
  -webkit-transform: rotate(45deg) !important;
  transform: rotate(45deg) !important;
}

.swal2-popup .swal2-icon.swal2-error [class^="swal2-x-mark-line"][class$="right"],
.swal2-modal .swal2-icon.swal2-error [class^="swal2-x-mark-line"][class$="right"] {
  -webkit-transform: rotate(-45deg) !important;
  transform: rotate(-45deg) !important;
}

/* Anel e traços do sucesso herdam dimensões do ícone 80px */
.swal2-popup .swal2-icon.swal2-success .swal2-success-ring,
.swal2-modal .swal2-icon.swal2-success .swal2-success-ring {
  box-sizing: content-box !important;
}

.swal2-popup .swal2-icon-content,
.swal2-modal .swal2-icon-content {
  font-weight: 700 !important;
}

/* Área de botões (v6: swal2-buttonswrapper) */
.swal2-popup .swal2-actions,
.swal2-modal .swal2-actions,
.swal2-modal .swal2-buttonswrapper {
  margin: 1.5rem 0 0 !important;
  gap: 10px !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  display: flex !important;
}

.swal2-popup .swal2-styled,
.swal2-modal .swal2-styled {
  margin: 0 !important;
  padding: 0.65rem 1.35rem !important;
  font-family: inherit !important;
  font-size: 0.9375rem !important;
  font-weight: 700 !important;
  letter-spacing: 0 !important;
  border-radius: 12px !important;
  box-shadow: none !important;
  text-transform: none !important;
  transition: filter 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease !important;
}

.swal2-popup .swal2-styled:focus,
.swal2-modal .swal2-styled:focus {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--fw-community-primary, #6366f1) 28%, transparent) !important;
}

.swal2-popup .swal2-styled.swal2-confirm,
.swal2-modal .swal2-styled.swal2-confirm {
  background: var(--fw-community-primary, #6366f1) !important;
  border: none !important;
  color: #fff !important;
}

.swal2-popup .swal2-styled.swal2-confirm:hover,
.swal2-modal .swal2-styled.swal2-confirm:hover {
  filter: brightness(1.05);
}

.swal2-popup .swal2-styled.swal2-deny,
.swal2-modal .swal2-styled.swal2-deny {
  background: #dc2626 !important;
  border: none !important;
  color: #fff !important;
}

.swal2-popup .swal2-styled.swal2-cancel,
.swal2-modal .swal2-styled.swal2-cancel {
  background: #f1f5f9 !important;
  border: 1px solid #e2e8f0 !important;
  color: #475569 !important;
}

.swal2-popup .swal2-styled.swal2-cancel:hover,
.swal2-modal .swal2-styled.swal2-cancel:hover {
  background: #e2e8f0 !important;
}

.swal2-popup .swal2-styled.swal2-confirm[style*="background"],
.swal2-modal .swal2-styled.swal2-confirm[style*="background"],
.swal2-popup .swal2-actions .btn-danger,
.swal2-modal .swal2-actions .btn-danger,
.swal2-modal .swal2-buttonswrapper .btn-danger {
  box-shadow: 0 2px 8px rgba(185, 28, 28, 0.25);
}

/* Bootstrap (buttonsStyling: false) */
.swal2-popup .swal2-actions .btn,
.swal2-modal .swal2-actions .btn,
.swal2-modal .swal2-buttonswrapper .btn {
  margin: 0 !important;
  border-radius: 12px !important;
  font-weight: 700 !important;
  font-size: 0.9375rem !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  padding: 0.65rem 1.35rem !important;
  line-height: 1.3 !important;
  transition: filter 0.15s ease, box-shadow 0.15s ease !important;
}

.swal2-popup .swal2-actions .btn-lg,
.swal2-modal .swal2-actions .btn-lg,
.swal2-modal .swal2-buttonswrapper .btn-lg {
  padding: 0.7rem 1.5rem !important;
  font-size: 0.9375rem !important;
}

.swal2-popup .swal2-actions .btn.mt-4,
.swal2-modal .swal2-actions .btn.mt-4,
.swal2-modal .swal2-buttonswrapper .btn.mt-4 {
  margin-top: 0 !important;
}

.swal2-popup .swal2-actions .btn.mr-3,
.swal2-modal .swal2-actions .btn.mr-3,
.swal2-modal .swal2-buttonswrapper .btn.mr-3 {
  margin-right: 0 !important;
}

.swal2-popup .swal2-actions .btn-outline-secondary,
.swal2-modal .swal2-actions .btn-outline-secondary,
.swal2-modal .swal2-buttonswrapper .btn-outline-secondary {
  border-width: 1.5px !important;
  color: #475569 !important;
  border-color: #e2e8f0 !important;
  background: #fff !important;
}

.swal2-popup .swal2-actions .btn-outline-secondary:hover,
.swal2-modal .swal2-actions .btn-outline-secondary:hover,
.swal2-modal .swal2-buttonswrapper .btn-outline-secondary:hover {
  background: #f8fafc !important;
  border-color: #cbd5e1 !important;
  color: #334155 !important;
}

.swal2-popup .swal2-actions .btn-primary:not(.btn-danger),
.swal2-modal .swal2-actions .btn-primary:not(.btn-danger),
.swal2-modal .swal2-buttonswrapper .btn-primary:not(.btn-danger) {
  border: none !important;
  background-color: var(--fw-community-primary, #6366f1) !important;
  border-color: var(--fw-community-primary, #6366f1) !important;
}

.swal2-toast {
  border-radius: 14px !important;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12) !important;
  font-family: "Inter Tight", Inter, system-ui, sans-serif !important;
}
