.legal-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10100;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.legal-modal-content {
  background: var(--background-color, #ffffff);
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  max-width: 800px;
  width: 100%;
}

.legal-modal-header {
  align-items: center;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  flex-shrink: 0;
  justify-content: space-between;
  padding: 1rem 1.25rem;
}

.legal-modal-tabs {
  display: flex;
  gap: 0.5rem;
}

.legal-modal-tabs button {
  background: var(--primary-color-hover, #01014d);
  border: 2px solid transparent;
  border-radius: 6px;
  color: var(--background-color, #01014d);
  :cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.4rem 0.9rem;
  transition: all 0.15s ease;
}

.legal-modal-tabs button:hover {
  background: var(--primary-color);
  color: var(--background-color);
}

.legal-modal-tabs button.active {
  background: var(--primary-color, #01014d);
  border-color: var(--primary-color, #01014d);
  color: #fff;
}

.legal-modal-close {
  background: transparent;
  border: none;
  border-radius: 6px;
  color: var(--primary-color, #01014d);
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
  padding: 0.25rem 0.5rem;
  min-width: revert;
  width: auto;
  transition: color 0.15s ease;
}

.legal-modal-close:hover {
  color: #111827;
}

.legal-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem 1.25rem;
}

.legal-modal-body h1,
.legal-modal-body h2,
.legal-modal-body h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.legal-modal-body h1:first-child,
.legal-modal-body h2:first-child,
.legal-modal-body h3:first-child {
  margin-top: 0;
}

.legal-modal-body p {
  line-height: 1.7;
  margin-bottom: 1rem;
}

.legal-modal-loading,
.legal-modal-error {
  padding: 2rem;
  text-align: center;
}

.legal-modal-error {
  color: #dc2626;
}

@media (max-width: 600px) {
  .legal-modal-tabs button {
    line-height: 0.75;
    min-width: 40vw;
  }

  .legal-modal-header {
    flex-direction: column;
    gap: 0.75rem;
  }

  .legal-modal-close {
    align-self: flex-end;
    position: absolute;
    right: 1rem;
    top: 0.75rem;
  }

  .legal-modal-content {
    max-height: 95vh;
    min-width: 100vw;
  }
}
