body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: "Inter", system-ui, sans-serif;
  background-color: #f5f7fa;
  color: #333;
}

/* --- Modal base (cobre toda a janela, não o container pai) --- */
.modal-email {
  position: fixed !important;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;

  background: rgba(0, 0, 0, 0.55);
  z-index: 99999; /* 🔼 acima da navbar */

  display: flex;
  justify-content: center;
  align-items: center;

  animation: fadeIn 0.25s ease-in-out;
}

/* --- Container centralizado --- */
.modal-email__content {
  position: relative;
  background: #fff;
  padding: 24px 28px;
  border-radius: 12px;
  max-width: 760px;
  width: 92vw;
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;

  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.2);
  animation: slideUp 0.3s ease forwards;
}


/*
/ --- Modal base --- /
.modal-email {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;

  / 💫 Animação /
  animation: fadeIn 0.25s ease-in-out;
}

/ --- Container interno (centralizado) --- /
.modal-email__content {
  position: relative; / Necessário para o botão fechar /
  background: #fff;
  padding:  20px;
  border-radius: 12px;
  max-width: 520px;
  width: 90%;
  display: flex;
  flex-direction: column;
  gap: 16px;

  / 🌟 Centralização suave /
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.2);
  transform: translateY(0);
  animation: slideUp 0.3s ease forwards;
}*/

/* --- Animações --- */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* --- Título --- */
.modal-email__content h2 {
  margin: 0;
  text-align: center;
  color: #1e293b;
  font-weight: 600;
  font-size: 1.3rem;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 8px;
}

/* --- Inputs e Textarea --- */
.modal-email__content label {
  font-weight: 500;
  font-size: 0.95rem;
  color: #475569;
}

.modal-email__content input,
.modal-email__content textarea,
.modal-email__content select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  box-sizing: border-box;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.modal-email__content textarea {
  min-height: 220px;
  resize: vertical;
}

.modal-email__content input:focus,
.modal-email__content textarea:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
  outline: none;
}

/* --- Seção de arquivos --- */
.modal-email__file {
  display: flex;
  gap: 10px;
  align-items: center;
  width: 100%;
  background: #f8fafc;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px dashed #cbd5e1;
}

.modal-email__file button {
  background: #3b82f6;
  color: white;
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease;
}

.modal-email__file button:hover {
  background: #2563eb;
}

.modal-email__file span {
  flex: 1;
  font-size: 0.9rem;
  color: #475569;
}

/* --- Lista de anexos --- */
.modal-email__list {
  list-style: none;
  padding: 0;
  margin: 5px 0 0;
  width: 100%;
}

.modal-email__list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
  background: #f1f5f9;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  font-size: 0.9rem;
  margin-bottom: 5px;
}

.modal-email__list li button {
  background: transparent;
  border: none;
  color: #ef4444;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.modal-email__list li button:hover {
  transform: scale(1.2);
}

/* --- Botões de ação --- */
/* A linha de botões precisa de width:100% porque o contêiner do formulário
   alinha os filhos ao centro — sem isso ela encolhe ao tamanho dos botões e
   fica centralizada, e o justify-content não tem espaço livre pra atuar (era
   por isso que o flex-end não empurrava nada pra direita).
   Grid de 3 colunas: Cancelar fica na coluna do meio (permanece onde estava,
   centralizado) e Enviar na terceira, encostado à direita. */
.modal-email__actions {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  width: 100%;
  margin-top: 10px;
}

.modal-email__actions button[type='button'] {
  grid-column: 2;
}

.modal-email__actions button[type='submit'] {
  grid-column: 3;
  justify-self: end;
}

.modal-email__actions button {
  min-width: 110px;
  padding: 10px 18px;
  border-radius: 6px;
  font-weight: 500;
  text-align: center;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-email__actions button[type="button"] {
  background: #e2e8f0;
  color: #334155;
}

.modal-email__actions button[type="button"]:hover {
  background: #cbd5e1;
}

.modal-email__actions button[type="submit"] {
  background: #16a34a;
  color: white;
}

.modal-email__actions button[type="submit"]:hover {
  background: #15803d;
}

/* --- Botão de fechar (opcional) --- */
.modal-email__close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: transparent;
  border: none;
  font-size: 1.3rem;
  color: #64748b;
  cursor: pointer;
  transition: color 0.2s ease;
}
.modal-email__close:hover {
  color: #1e293b;
}

/* ---------- Modo escuro (tema DaisyUI "coffee") ----------
   Branco por herança a partir do contêiner do modal — EXCETO input/textarea/
   select: como eles não têm background-color explícito (fundo claro padrão
   do navegador), herdar texto branco criaria branco-sobre-branco; por isso
   force de volta um texto escuro só neles logo abaixo. */
[data-theme='coffee'] .modal-email__content {
  background: oklch(var(--b2));
  color: #fff;
}
[data-theme='coffee'] .modal-email__content input,
[data-theme='coffee'] .modal-email__content textarea,
[data-theme='coffee'] .modal-email__content select {
  color: #1e293b;
}
[data-theme='coffee'] .modal-email__content h2 {
  color: #fff;
  border-bottom-color: rgba(255, 255, 255, 0.2);
}
[data-theme='coffee'] .modal-email__content label,
[data-theme='coffee'] .modal-email__file span {
  color: #fff;
}
[data-theme='coffee'] .modal-email__file {
  background: oklch(var(--b1));
  border-color: rgba(255, 255, 255, 0.25);
}
[data-theme='coffee'] .modal-email__list li {
  background: oklch(var(--b1));
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}
[data-theme='coffee'] .modal-email__actions button[type="button"] {
  background: oklch(var(--b3));
  color: #fff;
}
[data-theme='coffee'] .modal-email__close {
  color: #fff;
}
[data-theme='coffee'] .modal-email__close:hover {
  color: rgba(255, 255, 255, 0.7);
}
