/* ============================================================
   MODAIS LEGAIS (Privacidade · Cookies · Livro de Reclamações)
   ============================================================ */

.legal-modal {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  transition: opacity 320ms ease;
  pointer-events: none;
}

.legal-modal.is-open {
  display: flex;
  opacity: 1;
  pointer-events: auto;
}

.legal-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 12, 0.72);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  cursor: pointer;
}

.legal-modal-card {
  position: relative;
  width: 100%;
  max-width: 720px;
  max-height: 88vh;
  background: var(--cream, #faf7f2);
  border: 1px solid rgba(212, 164, 55, 0.35);
  border-radius: 12px;
  box-shadow:
    0 30px 80px -20px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(212, 164, 55, 0.08);
  transform: translateY(20px) scale(0.98);
  transition: transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.legal-modal.is-open .legal-modal-card {
  transform: translateY(0) scale(1);
}

.legal-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(20, 20, 22, 0.12);
  background: rgba(255, 255, 255, 0.9);
  color: var(--black, #141416);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 200ms ease, transform 200ms ease, color 200ms ease;
  z-index: 2;
}

.legal-modal-close:hover {
  background: var(--gold, #d4a437);
  color: #fff;
  transform: rotate(90deg);
}

.legal-modal-close:focus-visible {
  outline: 2px solid var(--gold, #d4a437);
  outline-offset: 2px;
}

.legal-modal-body {
  padding: 56px 48px 44px;
  overflow-y: auto;
  color: var(--grey-700, #4a4a52);
  font-family: 'Inter Tight', sans-serif;
  line-height: 1.65;
  font-size: 0.95rem;
}

.legal-modal-eyebrow {
  font-family: 'Inter Tight', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-dark, #a87c20);
  margin-bottom: 12px;
  position: relative;
  padding-left: 28px;
}

.legal-modal-eyebrow::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 1px;
  background: var(--gold, #d4a437);
}

.legal-modal-title {
  font-family: 'Cormorant Garamond', 'Times New Roman', serif;
  font-size: clamp(1.8rem, 3.2vw, 2.4rem);
  font-weight: 500;
  line-height: 1.15;
  color: var(--black, #141416);
  margin: 0 0 28px;
  text-wrap: balance;
}

.legal-modal-title em {
  font-style: italic;
  color: var(--gold-dark, #a87c20);
}

.legal-modal-body h3 {
  font-family: 'Inter Tight', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--black, #141416);
  margin: 26px 0 8px;
  letter-spacing: 0.01em;
}

.legal-modal-body p {
  margin: 0 0 14px;
}

.legal-modal-body ul {
  margin: 0 0 18px;
  padding-left: 22px;
}

.legal-modal-body li {
  margin-bottom: 6px;
}

.legal-modal-body a {
  color: var(--gold-dark, #a87c20);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 180ms ease;
}

.legal-modal-body a:hover {
  color: var(--black, #141416);
}

.legal-modal-body code {
  background: rgba(212, 164, 55, 0.12);
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 0.85em;
  color: var(--gold-dark, #a87c20);
}

.legal-modal-cta {
  display: inline-block;
  padding: 10px 22px;
  background: var(--black, #141416);
  color: var(--cream, #faf7f2) !important;
  text-decoration: none !important;
  border-radius: 4px;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: background 220ms ease, color 220ms ease;
}

.legal-modal-cta:hover {
  background: var(--gold, #d4a437);
  color: #fff !important;
}

.legal-modal-meta {
  margin-top: 30px;
  padding-top: 18px;
  border-top: 1px solid rgba(20, 20, 22, 0.08);
  font-size: 0.82rem;
  font-style: italic;
  color: var(--grey-500, #7a7a82);
}

/* Lock body scroll when open */
body.legal-modal-open {
  overflow: hidden;
}

/* Mobile */
@media (max-width: 640px) {
  .legal-modal {
    padding: 12px;
  }
  .legal-modal-card {
    max-height: 92vh;
    border-radius: 10px;
  }
  .legal-modal-body {
    padding: 48px 24px 32px;
    font-size: 0.9rem;
  }
  .legal-modal-close {
    top: 10px;
    right: 10px;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .legal-modal,
  .legal-modal-card,
  .legal-modal-close {
    transition: none !important;
  }
}
