/* Legal Popup Widget — OABeiros · Prática Penal */

.legal-link {
  display: inline;
  color: var(--color-accent, #d11116);
  text-decoration: none;
  background: linear-gradient(180deg, transparent 60%, rgba(209,17,22,0.08) 60%);
  padding: 0 2px;
  border-radius: 2px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.15s ease, color 0.15s ease;
}

.legal-link::after {
  content: " ↗";
  font-size: 0.75em;
  opacity: 0.6;
  display: inline-block;
  transform: translateY(-1px);
}

.legal-link:hover {
  background: rgba(209,17,22,0.12);
  color: #5a0a0e;
}

.legal-link:focus-visible {
  outline: 2px solid var(--color-accent, #d11116);
  outline-offset: 2px;
}

/* === POPUP === */

.legal-popup {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.legal-popup.open {
  display: flex;
}

.legal-popup-overlay {
  position: absolute;
  inset: 0;
  background: rgba(20, 20, 20, 0.6);
  backdrop-filter: blur(3px);
  animation: legalFadeIn 0.18s ease;
}

@keyframes legalFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

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

.legal-popup-card {
  position: relative;
  max-width: 680px;
  width: 100%;
  max-height: 80vh;
  overflow: auto;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.35), 0 8px 18px rgba(0,0,0,0.18);
  padding: 32px 36px 28px;
  animation: legalSlideIn 0.22s ease;
  font-family: 'Inter', sans-serif;
}

.legal-popup-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  color: #888;
  border-radius: 50%;
  transition: all 0.15s ease;
}

.legal-popup-close:hover {
  background: #f0f0f0;
  color: #1a1a1a;
}

.legal-popup-eyebrow {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 13px;
  letter-spacing: 0.12em;
  color: var(--color-accent, #d11116);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.legal-popup-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 18px;
  color: #1a1a1a;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--color-accent, #d11116);
}

.legal-popup-body {
  font-size: 16px;
  line-height: 1.7;
  color: #2a2a2a;
  text-align: justify;
  hyphens: auto;
  margin-bottom: 22px;
  white-space: pre-wrap;
}

.legal-popup-footer {
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid #e8e8e0;
  padding-top: 14px;
}

.legal-popup-source {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--color-accent, #d11116);
  text-decoration: none;
  text-transform: uppercase;
}

.legal-popup-source:hover {
  text-decoration: underline;
}

body.legal-popup-open {
  overflow: hidden;
}

@media (max-width: 600px) {
  .legal-popup-card {
    padding: 24px 22px 20px;
    max-height: 90vh;
  }
  .legal-popup-title {
    font-size: 22px;
  }
  .legal-popup-body {
    font-size: 15px;
  }
}
