/* ═══════════════════════════════════════════════════════════════════════════
   SweetAlert v2 (sweetalert@2) — docs/PADRAO_LAYOUT_UI.md §1 (botões) e §5 (cores)
   Carregar após brand.css quando existir; fallbacks cobrem páginas só com esta folha.
   Sobrescreve estilos injetados no <head> pela lib (insertAt: top).
═══════════════════════════════════════════════════════════════════════════ */

.swal-modal {
  border-radius: 6px !important;
  font-family:   var(--font-family, 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif) !important;
}

.swal-title {
  font-family: var(--font-family, 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif) !important;
  font-weight: 600 !important;
  color:       var(--color-gray-900, #000000) !important;
}

.swal-text {
  font-family: var(--font-family, 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif) !important;
  color:       var(--color-gray-500, #64748B) !important;
}

/* Tipografia / espaçamento alinhados a .btn-action-* (PADRAO_LAYOUT_UI §1) */
.swal-footer .swal-button {
  box-shadow:    none !important;
  border:        none !important;
  border-radius: 6px !important;
  font-family:   var(--font-family, 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif) !important;
  font-weight:   500 !important;
  font-size:     0.875rem !important;
  padding:       8px 18px !important;
  line-height:   normal !important;
}

/* Primária — equivalente .btn-action-1 */
.swal-footer .swal-button--confirm:not(.swal-button--danger) {
  background-color: var(--color-primary-dark, #0d276b) !important;
  color:            #fff !important;
}

.swal-footer .swal-button--confirm:not(.swal-button--danger):not([disabled]):hover,
.swal-footer .swal-button--confirm:not(.swal-button--danger):not([disabled]):focus {
  background-color: var(--color-primary-dark, #0d276b) !important;
  color:            #fff !important;
  filter:           brightness(0.94);
}

/* Secundária / cancelar — .btn-action-neutral */
.swal-footer .swal-button--cancel {
  background-color: var(--color-gray-200, #E2E8F0) !important;
  color:            #1E293B !important;
}

.swal-footer .swal-button--cancel:not([disabled]):hover,
.swal-footer .swal-button--cancel:not([disabled]):focus {
  background-color: #CBD5E1 !important;
  color:            #1E293B !important;
}

/* dangerMode — token --color-error (brand.css § feedback) */
.swal-footer .swal-button--danger {
  background-color: var(--color-error, #EF4444) !important;
  color:            #fff !important;
}

.swal-footer .swal-button--danger:not([disabled]):hover,
.swal-footer .swal-button--danger:not([disabled]):focus {
  background-color: var(--color-error, #EF4444) !important;
  color:            #fff !important;
  filter:           brightness(0.92);
}

.swal-footer .swal-button:focus {
  outline:    none !important;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(0, 82, 255, 0.35) !important;
}

.swal-footer .swal-button--cancel:focus {
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(100, 116, 139, 0.35) !important;
}

.swal-footer .swal-button--danger:focus {
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(239, 68, 68, 0.35) !important;
}

/* Dark mode — mesmo fundo que modais Bootstrap (layout.css) */
body.dark-mode .swal-modal {
  background-color: #0D1529 !important;
}

body.dark-mode .swal-title {
  color: #fff !important;
}

body.dark-mode .swal-text {
  color: var(--color-gray-400, #94A3B8) !important;
}

body.dark-mode .swal-footer {
  border-top-color: rgba(255, 255, 255, 0.1) !important;
}

/* Disabled em dark mode — manter legibilidade do texto */
body.dark-mode .swal-footer .swal-button[disabled],
body.dark-mode .swal-footer .swal-button.swal-button--disabled,
body.dark-mode .swal-footer .swal-button--cancel[disabled] {
  background-color: rgba(148, 163, 184, 0.26) !important;
  color: #E2E8F0 !important;
  -webkit-text-fill-color: #E2E8F0 !important;
  opacity: 0.95 !important;
  text-shadow: none !important;
}

/* SweetAlert costuma injetar estilos inline no botão cancel; reforçar contraste */
body.dark-mode .swal-footer .swal-button.swal-button--cancel,
body.dark-mode .swal-footer button.swal-button--cancel {
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
}
