/* --- Estilos base do Dialog --- */
dialog {
  padding: 0;
  border: none;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 451px;
  background-color: #ffffff;

  /* --- FORÇAR CENTRALIZAÇÃO --- */
  margin: auto;
  position: fixed; /* Garante que fique relativo à janela (viewport) */
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  max-height: 90vh; /* Evita que o modal fique maior que a tela */
  overflow-y: auto; /* Adiciona scroll interno se o conteúdo for muito grande */

  /* Animação de entrada suave */
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.3s ease,
    transform 0.3s ease,
    display 0.3s ease allow-discrete;
}

/* O estado quando o modal está aberto */
dialog[open] {
  opacity: 1;
  transform: translateY(0);
}

/* Estilizando o fundo escuro (nativol do <dialog>) */
dialog::backdrop {
  background-color: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px); /* Efeito de vidro borrado */
  opacity: 0;
  transition: opacity 0.3s ease allow-discrete;
}

dialog[open]::backdrop {
  opacity: 1;
}

/* Estilos internos (Layout com Flexbox) */
.dialog-content {
  display: flex;
  flex-direction: column;
  padding: 48px 32px;
  gap: 24px;
}

.dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dialog-header h2 {
  margin: 0;
  font-family: "Inter";
  color: #1a1a1a;
  display: flex;
  gap: 10px;
  flex-direction: column;
  font-size: 2rem;
  font-style: normal;
  font-weight: 400;
  color: #0a0a0a;
  line-height: 120%; /* 38.4px */
}

.dialog-header h2 span {
  display: block;
  font-size: 1rem;
  color: #00587d;
  text-transform: uppercase;
  font-style: normal;
  font-weight: 400;
  line-height: 120%; /* 19.2px */
  letter-spacing: 2.56px;
}

.dialog-body p {
  margin: 0;
  color: #525252;
  font-family: "Inter";
  font-style: normal;
  font-weight: 300;
  line-height: 140%; /* 22.4px */
  font-size: 1rem;
}

/* Estilos genéricos para os botões */
.btn {
  padding: 8px 16px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: filter 0.2s;
  text-transform: none;
  font-weight: 300;
  font-size: 1rem;
  font-style: normal;
  font-family: "Inter";
}

.btn:hover {
  filter: brightness(0.9);
}
.btn.primary {
  background-color: #dd531c;
  color: white;
  flex: 1;
}

.btn-icon {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #666;
  position: absolute;
  right: 14px;
  top: 15px;
}

.btn-icon:hover {
  background-color: #f0f0f0;
  color: #000;
}

.dialog-footer form {
  display: flex;
  justify-content: flex-end;
  flex-direction: row;
  gap: 12px;
}

.dialog-footer form .input {
  border-radius: 8px;
  border: 1px solid #e6e6e6;
  margin-bottom: 5px;
  font-size: 1rem;
  font-style: normal;
  font-weight: 300;
  font-family: "Inter";
  flex: 2;
}

.dialog-footer form .input::placeholder {
  color: #adadad;
  font-size: 1rem;
  font-style: normal;
  font-weight: 300;
  line-height: 100%; /* 16px */
  flex: 1 0 0;
  font-family: "Inter";
}

@media (max-width: 639px) {
  .dialog-footer form {
    flex-direction: column;
  }
  .dialog-footer form .input {
    max-width: inherit;
  }
}
