/* assets/css/modais.css */

/* Bloqueia scroll da página ao abrir modal */
body.modal-open {
  overflow: hidden;
}

/* Overlay escuro por cima do site */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(12px, 3vw, 32px);
  z-index: 9999;
  opacity: 1;
  animation: modalFadeIn 0.18s ease-out;
}

/* Card do modal */
.modal {
  width: min(960px, 100%);
  max-height: min(90vh, 1000px);
  background: #1e1e1e;
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(6px);
  animation: modalSlideUp 0.18s ease-out;
}

/* Corpo – área rolável com o conteúdo dos partials */
.modal__body {
  padding: 32px 40px 24px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Rodapé com botão fechar */
.modal__footer {
  padding: 16px 40px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: flex-end;
}

/* Botão FECHAR – padrão do projeto */
.modal__close-btn {
  width: 100px;
  height: 40px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  background: var(--green);
  color: var(--black);
  font-family: var(--ff-sans);
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.12s ease, opacity 0.18s ease;
}

.modal__close-btn:hover {
  transform: translateY(-1px);
  opacity: 0.95;
}

.modal__close-btn:active {
  transform: translateY(0);
  opacity: 0.9;
}

/* Tipografia dentro do modal */

.modal__body h1,
.modal__body h2,
.modal__body h3,
.modal__body h4{
  font-family: var(--ff-display);
  font-weight: 600;
  color: #ffffff;
  margin: 0 0 16px;
  text-transform: uppercase;
}

/* Título principal recomendado: <h2 class="modal-title"> */
.modal__body .modal-title {
  font-size: 24px;
}

.modal__body h3 {
  font-size: 20px;
}

.modal__body p,
.modal__body li {
  font-family: var(--ff-sans);
  font-size: 18px;
  font-weight: 300;
  line-height: 1.6;
  color: #ffffff;
}

/* Listas */
.modal__body ul {
  margin: 0 0 16px 20px;
  padding: 0;
}

/* Blocos / seções */
.modal__body section {
  margin-bottom: 20px;
}

/* Tabelas longas – com scroll horizontal se precisar */
.modal__body table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-family: var(--ff-sans);
  font-size: 16px;
  overflow-x: auto;
  display: block;
}

.modal__body th,
.modal__body td {
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 8px 10px;
  color: #ffffff;
}

.modal__body th {
  background: rgba(255, 255, 255, 0.06);
  font-weight: 500;
}

/* Scrollbar mais discreta (webkit) */
.modal__body::-webkit-scrollbar {
  width: 8px;
}

.modal__body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.25);
  border-radius: 8px;
}

/* Animações */
@keyframes modalFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes modalSlideUp {
  from {
    transform: translateY(16px);
  }
  to {
    transform: translateY(0);
  }
}

/* Pequena animação de saída (reaproveita classes) */
.modal-overlay--closing {
  animation: modalFadeOut 0.16s ease-in forwards;
}

.modal--closing {
  animation: modalSlideDown 0.16s ease-in forwards;
}

@keyframes modalFadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

@keyframes modalSlideDown {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(16px);
  }
}

/* Responsivo */
@media (max-width: 768px) {
  .modal {
    width: 100%;
    max-height: 92vh;
    border-radius: 18px;
  }

  .modal__body {
    padding: 24px 20px 16px;
  }

  .modal__footer {
    padding: 12px 20px 20px;
    justify-content: center;
  }

  .modal__close-btn {
    width: 100%;
  }

  .modal__body p,
  .modal__body li {
    font-size: 16px;
  }
}

/* GARANTE que o modal sempre fique acima de tudo */
.modal-overlay {
  position: fixed !important;
  inset: 0 !important;
  z-index: 999999 !important;
  pointer-events: auto !important;
}

.modal {
  position: relative !important;
  z-index: 1000000 !important;
}

