.legal-doc-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.legal-doc-overlay[hidden] {
  display: none !important;
}

.legal-doc-modal {
  background: #fff;
  width: min(920px, 100%);
  max-height: calc(100vh - 2rem);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
}

.legal-doc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #e2e8f0;
}

.legal-doc-header h2 {
  margin: 0;
  font-size: 1.1rem;
}

.legal-doc-close {
  border: none;
  background: #f1f5f9;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
}

.legal-doc-close:hover {
  background: #e2e8f0;
}

#legal-doc-frame {
  flex: 1;
  min-height: 70vh;
}

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

.legal-inline-link {
  color: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.legal-inline-link:hover {
  opacity: 0.85;
}

.consent-text .legal-inline-link {
  position: relative;
  z-index: 2147483647;
}
