:root {
  --legal-title-color: #111827;
  --legal-heading-color: #1f2937;
  --legal-text-color: #4b5563;
  --legal-border-color: #f3f4f6;
  --modal-header-color: #101828;
}

/* =========================================
   Modal (Terms, Privacy, etc.)
   ========================================= */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-container {
  background-color: #ffffff;
  border-radius: 16px;
  width: 90%;
  max-width: 800px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.modal-overlay.active .modal-container {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 30px;
  border-bottom: 1px solid #f3f4f6;
}

.modal-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--modal-header-color);
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  cursor: pointer;
  color: #6a7282;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  transition: color 0.2s ease;
}

.modal-close:hover {
  color: #101828;
}

.modal-body {
  flex: 1;
  min-height: 0;
  padding: 30px;
  padding-bottom: 60px;
  overflow-y: auto;
  font-size: 14px;
  line-height: 1.6;
  color: #4a5565;
  -webkit-overflow-scrolling: touch;
}

.terms-content,
.privacy-content {
  word-break: break-all;
}

/* Legal Content Styles */
.legal-content h3 {
  font-size: 22px;
  font-weight: 700;
  color: var(--legal-title-color);
  margin-bottom: 32px;
  border-bottom: 2px solid var(--legal-border-color);
  padding-bottom: 12px;
}

.legal-section {
  margin-bottom: 40px;
  margin-top: 20px;
}

.legal-section:first-child {
  margin-top: 0;
}

.legal-section:last-child {
  margin-bottom: 0;
}

.legal-section h4 {
  font-size: 16px;
  font-weight: 700;
  color: var(--legal-heading-color);
  margin-bottom: 12px;
  display: block;
}

.legal-section p {
  margin-bottom: 10px;
  color: var(--legal-text-color);
  line-height: 1.7;
  word-break: keep-all;
}

.legal-section ul {
  margin: 12px 0;
  padding-left: 0;
  list-style: none;
}

.legal-section ul li {
  margin-bottom: 8px;
  color: var(--legal-text-color);
  line-height: 1.6;
  padding-left: 4px;
}

.legal-section ul li:last-child {
  margin-bottom: 0;
}

.legal-section strong {
  color: var(--legal-title-color);
  font-weight: 600;
}

.legal-section br {
  margin-bottom: 4px;
  display: block;
  content: "";
}
