/**
 * IBEC Horizon — Skin único de modais (v7A.9.21.32).
 *
 * Padroniza TODOS os popups (painel frontend + portais + importação) no mesmo
 * visual do modal de Importação Inteligente: topo em gradiente azul com título
 * branco, corpo branco, cantos arredondados e botão de fechar branco.
 *
 * Estratégia: retrofit por CSS sobre os cabeçalhos/diálogos JÁ existentes
 * (sem reescrever o markup de cada modal). Os modais ibec-si-* e ibec-serpro-*
 * já nascem nesse padrão e servem de referência.
 *
 * Também blinda a cor do texto dos botões do plugin contra temas que
 * sobrescrevem `color` (causa do "texto da mesma cor do botão").
 */

/* ───────────────────────────── Diálogos ───────────────────────────── */
/* v7A.9.21.98 — antes: `overflow: hidden !important` impedia o scroll vertical
 * dentro do diálogo (formulários longos como "Nova empresa" eram cortados em
 * ~90vh). Trocado por overflow-x:hidden + overflow-y:auto: mantém o clipping
 * dos cantos arredondados (border-radius continua válido) e libera o scroll. */
.etm-user-profile-modal__dialog,
.etm-modal-dialog,
.etm-batch-modal__dialog,
.ibec-attendance-dialog,
.ibec-assessment-preview-dialog,
.ibec-instructor-profile-dialog,
.ibec-evidence-dialog {
  border-radius: 18px !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  box-shadow: 0 24px 60px rgba(11, 31, 77, 0.32) !important;
  border: 1px solid rgba(11, 31, 77, 0.10) !important;
}

/* ──────────────────────── Cabeçalho azul padrão ───────────────────── */
.etm-user-profile-modal__head,
.etm-modal-head,
.etm-batch-modal__head,
.ibec-attendance-head,
.ibec-instructor-profile-head {
  background: linear-gradient(135deg, #0B1F4D, #163B8C) !important;
  color: #fff !important;
  padding: 18px 22px !important;
  border-bottom: 0 !important;
  align-items: flex-start !important;
}

/* Títulos e subtítulos do cabeçalho → branco */
.etm-user-profile-modal__head h1, .etm-user-profile-modal__head h2, .etm-user-profile-modal__head h3,
.etm-modal-head h1, .etm-modal-head h2, .etm-modal-head h3,
.etm-batch-modal__head h1, .etm-batch-modal__head h2, .etm-batch-modal__head h3,
.ibec-attendance-head h1, .ibec-attendance-head h2, .ibec-attendance-head h3,
.ibec-instructor-profile-head h1, .ibec-instructor-profile-head h2, .ibec-instructor-profile-head h3 {
  color: #fff !important;
  margin: 0 !important;
}
.etm-user-profile-modal__head p,
.etm-modal-head p,
.etm-batch-modal__head p,
.ibec-attendance-head p,
.ibec-instructor-profile-head p {
  color: rgba(255, 255, 255, 0.85) !important;
  margin: 4px 0 0 !important;
}

/* Botão de fechar no cabeçalho → branco translúcido */
.etm-batch-modal__close,
.ibec-attendance-close,
.ibec-instructor-profile-close,
.etm-modal-close,
.etm-user-profile-modal__close {
  background: rgba(255, 255, 255, 0.15) !important;
  color: #fff !important;
  border: 0 !important;
  border-radius: 999px !important;
}
.etm-batch-modal__close:hover,
.ibec-attendance-close:hover,
.ibec-instructor-profile-close:hover,
.etm-modal-close:hover,
.etm-user-profile-modal__close:hover {
  background: rgba(255, 255, 255, 0.28) !important;
}

/* Modal de certificado manual (#ibec-mc-modal) — header sem classe própria:
 * o conteúdo é montado inline; padroniza o título e o botão de fechar. */
#ibec-mc-modal h2 { color: #0B1F4D; }

/* ─────────────────── Blindagem de texto dos botões ────────────────── *
 * Alguns temas sobrescrevem `color` dos <button>/<a>, deixando o texto na
 * mesma cor do fundo. Reforçamos a cor correta por classe. */
.etm-manage-btn,
.etm-manage-btn-warning,
.etm-manage-btn-primary,
.ibec-si-btn--primary,
.ibec-serpro-btn--primary {
  color: #fff !important;
}
.etm-manage-btn-light,
.etm-manage-btn-ghost,
.ibec-si-btn--secondary,
.ibec-serpro-btn--ghost {
  color: #0B1F4D !important;
}
.etm-manage-btn-danger,
.etm-manage-btn-sm.danger {
  color: #c0271c !important;
}
.ibec-si-btn--gold {
  color: #0B1F4D !important;
}
