/* ============================================================================
   dbf-swal.css  Tema unificado dos modais de comunicacao do site
   Aplicado via SweetAlert2 customClass.
   Usado pelo helper js/dbf-swal.js (DbfSwal).

   Variantes (cor varia conforme a acao):
     .dbf-swal-popup.is-danger    Excluir/Cancelar/Recusar  -> gradient vermelho-rosa
     .dbf-swal-popup.is-success   Enviar/Confirmar/Aceitar  -> gradient verde-azul
     .dbf-swal-popup.is-info      Informacao                 -> gradient azul-indigo
     .dbf-swal-popup.is-warning   Atencao                    -> gradient laranja-amarelo
     .dbf-swal-popup.is-question  Padrao DBF (pergunta)      -> gradient laranja DBF

   Estrutura visual (reproduz modal Bootstrap do admin_pedidos):
     - Popup com cantos arredondados (16px) + sombra elegante
     - Header com gradient horizontal + icone branco + titulo branco + botao X
     - Body com fundo branco
     - Footer com botoes pill (border-radius 999px) cinza claro + cor principal
============================================================================ */

/* ---------- Estrutura geral ---------- */
.dbf-swal-popup {
  border-radius: 16px !important;
  padding: 0 !important;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25) !important;
  font-family: inherit !important;
}

/* ---------- Header (titulo + close) ---------- */
.dbf-swal-popup .swal2-title {
  color: #fff !important;
  font-size: 22px !important;
  font-weight: 700 !important;
  padding: 22px 28px 22px 26px !important;
  margin: 0 !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  letter-spacing: -.01em !important;
  text-align: left !important;
  position: relative;
}
.dbf-swal-popup .swal2-title::before {
  font-family: "bootstrap-icons" !important;
  font-size: 26px;
  font-weight: 400;
  margin-right: 4px;
}
.dbf-swal-popup.is-danger    .swal2-title::before { content: "\f33a"; } /* bi-exclamation-triangle */
.dbf-swal-popup.is-warning   .swal2-title::before { content: "\f33a"; }
.dbf-swal-popup.is-success   .swal2-title::before { content: "\f26b"; } /* bi-check-circle */
.dbf-swal-popup.is-info      .swal2-title::before { content: "\f431"; } /* bi-info-circle */
.dbf-swal-popup.is-question  .swal2-title::before { content: "\f504"; } /* bi-question-circle */

/* Esconde o icone padrao do Swal (nosso esta no titulo) */
.dbf-swal-popup .swal2-icon { display: none !important; }

/* Botao X de fechar */
.dbf-swal-popup .swal2-close {
  position: absolute !important;
  top: 14px !important;
  right: 14px !important;
  color: rgba(255, 255, 255, 0.92) !important;
  font-size: 30px !important;
  width: 32px !important;
  height: 32px !important;
  line-height: 1 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 8px !important;
  transition: background .15s, transform .15s;
}
.dbf-swal-popup .swal2-close:hover {
  background: rgba(255, 255, 255, 0.2) !important;
  color: #fff !important;
  transform: scale(1.05);
}
.dbf-swal-popup .swal2-close:focus { outline: none !important; box-shadow: none !important; }

/* ---------- Cores do header por variante ---------- */
.dbf-swal-popup.is-danger .swal2-title    { background: linear-gradient(90deg, #ef4444 0%, #e11d48 50%, #be185d 100%); }
.dbf-swal-popup.is-warning .swal2-title   { background: linear-gradient(90deg, #f59e0b 0%, #f97316 50%, #ef4444 100%); }
.dbf-swal-popup.is-success .swal2-title   { background: linear-gradient(90deg, #10b981 0%, #059669 50%, #0891b2 100%); }
.dbf-swal-popup.is-info .swal2-title      { background: linear-gradient(90deg, #3b82f6 0%, #6366f1 50%, #8b5cf6 100%); }
.dbf-swal-popup.is-question .swal2-title  { background: linear-gradient(90deg, #ff7733 0%, #ff5500 50%, #e64a00 100%); }

/* ---------- Body ---------- */
.dbf-swal-popup .swal2-html-container {
  padding: 22px 28px 12px !important;
  margin: 0 !important;
  font-size: 15px !important;
  color: #374151 !important;
  text-align: left !important;
  line-height: 1.5;
}
.dbf-swal-popup .swal2-html-container strong { color: #1a1f2e; }

/* ---------- Inputs do body (textarea, input, select) ---------- */
.dbf-swal-popup .swal2-input,
.dbf-swal-popup .swal2-textarea,
.dbf-swal-popup .swal2-select,
.dbf-swal-popup .swal2-file {
  width: calc(100% - 56px) !important;
  margin: 8px 28px !important;
  padding: 10px 12px !important;
  border: 1px solid #d1d5db !important;
  border-radius: 8px !important;
  font-size: 14px !important;
  font-family: inherit !important;
  box-shadow: none !important;
}
.dbf-swal-popup .swal2-input:focus,
.dbf-swal-popup .swal2-textarea:focus,
.dbf-swal-popup .swal2-select:focus {
  border-color: #ff5500 !important;
  box-shadow: 0 0 0 3px rgba(255, 85, 0, 0.15) !important;
}
.dbf-swal-popup .swal2-input-label {
  margin: 0 28px !important;
  font-size: 12px !important;
  color: #6b7280 !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: .05em !important;
}
.dbf-swal-popup .swal2-validation-message {
  margin: 8px 28px 0 !important;
  background: #fef2f2 !important;
  color: #991b1b !important;
  border-radius: 6px !important;
}

/* ---------- Actions (botoes) ---------- */
.dbf-swal-popup .swal2-actions {
  padding: 16px 28px 24px !important;
  margin: 0 !important;
  gap: 10px !important;
  display: flex !important;
  justify-content: flex-end !important;
  background: #fff;
  border-top: 0;
}

.dbf-swal-popup .swal2-styled {
  padding: 11px 26px !important;
  border-radius: 999px !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  letter-spacing: .01em;
  box-shadow: none !important;
  border: 0 !important;
  transition: transform .15s, filter .15s;
}
.dbf-swal-popup .swal2-styled:hover { filter: brightness(0.95); transform: translateY(-1px); }
.dbf-swal-popup .swal2-styled:focus { outline: none !important; box-shadow: 0 0 0 3px rgba(255,85,0,.25) !important; }

/* Cancelar  cinza claro */
.dbf-swal-popup .swal2-cancel {
  background: #f3f4f6 !important;
  color: #1a1f2e !important;
}
.dbf-swal-popup .swal2-cancel:hover { background: #e5e7eb !important; }

/* Confirmar  cor varia por variante */
.dbf-swal-popup.is-danger    .swal2-confirm { background: #dc2626 !important; color: #fff !important; }
.dbf-swal-popup.is-warning   .swal2-confirm { background: #f59e0b !important; color: #fff !important; }
.dbf-swal-popup.is-success   .swal2-confirm { background: #059669 !important; color: #fff !important; }
.dbf-swal-popup.is-info      .swal2-confirm { background: #3b82f6 !important; color: #fff !important; }
.dbf-swal-popup.is-question  .swal2-confirm { background: #ff5500 !important; color: #fff !important; }

/* Variante "deny" (botao do meio, raramente usado) */
.dbf-swal-popup .swal2-deny { background: #6b7280 !important; color: #fff !important; }

/* ---------- Toast (variante pequena, top-right) ---------- */
.dbf-swal-toast.dbf-swal-popup {
  padding: 12px 18px !important;
  border-radius: 10px !important;
  width: auto;
  min-width: 280px;
  max-width: 420px;
}
.dbf-swal-toast.dbf-swal-popup .swal2-title {
  padding: 0 !important;
  background: none !important;
  color: #1a1f2e !important;
  font-size: 14px !important;
  font-weight: 600 !important;
}
.dbf-swal-toast.dbf-swal-popup.is-success .swal2-title { color: #059669 !important; }
.dbf-swal-toast.dbf-swal-popup.is-danger  .swal2-title { color: #dc2626 !important; }
.dbf-swal-toast.dbf-swal-popup.is-info    .swal2-title { color: #3b82f6 !important; }
.dbf-swal-toast.dbf-swal-popup.is-warning .swal2-title { color: #f59e0b !important; }
.dbf-swal-toast .swal2-title::before { display: none; }

/* Toast deve mostrar APENAS o titulo - esconde qualquer container vazio
   (input, html, actions, validation, footer, icon, image, close) que o
   SweetAlert renderiza por default mesmo quando nao configurado. */
.dbf-swal-toast.dbf-swal-popup .swal2-html-container,
.dbf-swal-toast.dbf-swal-popup .swal2-input,
.dbf-swal-toast.dbf-swal-popup .swal2-textarea,
.dbf-swal-toast.dbf-swal-popup .swal2-select,
.dbf-swal-toast.dbf-swal-popup .swal2-radio,
.dbf-swal-toast.dbf-swal-popup .swal2-checkbox,
.dbf-swal-toast.dbf-swal-popup .swal2-file,
.dbf-swal-toast.dbf-swal-popup .swal2-range,
.dbf-swal-toast.dbf-swal-popup .swal2-input-label,
.dbf-swal-toast.dbf-swal-popup .swal2-validation-message,
.dbf-swal-toast.dbf-swal-popup .swal2-actions,
.dbf-swal-toast.dbf-swal-popup .swal2-footer,
.dbf-swal-toast.dbf-swal-popup .swal2-image,
.dbf-swal-toast.dbf-swal-popup .swal2-icon,
.dbf-swal-toast.dbf-swal-popup .swal2-close {
  display: none !important;
}

/* ---------- Mobile ---------- */
@media (max-width: 600px) {
  .dbf-swal-popup .swal2-title { font-size: 18px !important; padding: 18px 22px !important; }
  .dbf-swal-popup .swal2-html-container { padding: 18px 22px 10px !important; font-size: 14px !important; }
  .dbf-swal-popup .swal2-actions { padding: 14px 22px 20px !important; flex-direction: column-reverse; gap: 8px !important; }
  .dbf-swal-popup .swal2-styled { width: 100% !important; padding: 12px 18px !important; }
}
