/* Modal legal do rodapé - abre na mesma página, com fundo embaçado. */
body.footer-legal-modal-open {
  overflow: hidden;
}

.footer-legal-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.footer-legal-modal-overlay.is-open {
  display: flex;
}

.footer-legal-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.58);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.footer-legal-modal-box {
  position: relative;
  z-index: 1;
  width: min(860px, 100%);
  max-height: min(82vh, 720px);
  overflow: auto;
  border-radius: 28px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  color: #0f172a;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.34);
  border: 1px solid rgba(148, 163, 184, 0.35);
  outline: none;
}

.footer-legal-modal-close {
  position: sticky;
  top: 14px;
  left: 14px;
  margin: 14px 0 0 14px;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: #0f172a;
  color: #ffffff;
  font-size: 30px;
  line-height: 1;
  font-weight: 400;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.22);
  transition: transform .16s ease, filter .16s ease;
}

.footer-legal-modal-close:hover {
  transform: scale(1.04);
  filter: brightness(1.08);
}

.footer-legal-modal-content {
  padding: 10px clamp(22px, 5vw, 58px) clamp(28px, 5vw, 52px);
}

.footer-legal-modal-content h2 {
  margin: 0 0 18px;
  font-size: clamp(1.75rem, 4vw, 2.65rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
  font-weight: 950;
  color: #07142d;
}

.footer-legal-modal-text {
  display: grid;
  gap: 14px;
  font-size: clamp(0.98rem, 2vw, 1.06rem);
  line-height: 1.68;
  color: #334155;
}

.footer-legal-modal-text p {
  margin: 0;
}

@media (max-width: 640px) {
  .footer-legal-modal-overlay {
    align-items: flex-start;
    padding: 14px;
  }

  .footer-legal-modal-box {
    max-height: calc(100svh - 28px);
    border-radius: 22px;
  }

  .footer-legal-modal-close {
    top: 10px;
    left: 10px;
    margin: 10px 0 0 10px;
    width: 38px;
    height: 38px;
    font-size: 28px;
  }

  .footer-legal-modal-content {
    padding: 8px 20px 28px;
  }
}
