/* ==========================================================================
   ClearMedUk - Legal, Terms, Privacy & Cookies Typography Layout
   Matches html-theme/terms.html, privacy.html, cookies.html
   ========================================================================== */

/*
 * Parent Pharmacy Mentor styles force:
 *   article { text-align: center; font-size: 14px; }
 * Override so legal pages match the HTML theme (left-aligned body copy).
 */
.legal-content,
article.legal-content {
  max-width: 780px;
  margin: 0 auto;
  text-align: left !important;
  font-size: inherit !important;
}

.legal-content .entry-header,
.legal-content .entry-title,
.legal-content h1 {
  text-align: left;
  margin-bottom: 0.5rem;
}

.legal-meta {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.legal-body {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  text-align: left;
}

.legal-body h2,
.legal-body h3,
.legal-body h4 {
  font-size: 1.35rem;
  font-family: var(--font-sans);
  font-weight: 700;
  margin-top: 1.5rem;
  margin-bottom: 0;
  color: var(--text-main);
  text-align: left;
}

.legal-body h2:first-child,
.legal-body > h2:first-of-type {
  margin-top: 0;
}

.legal-body p,
.legal-body .wp-block-paragraph {
  font-size: 0.9375rem;
  line-height: 1.7;
  text-align: left;
  margin: 0;
}

/* Restore readable lists (base.css clears list-style globally) */
.legal-body ul,
.legal-body ol,
.legal-body .wp-block-list {
  list-style-position: outside;
  padding-left: 1.35rem;
  margin: 0;
  text-align: left;
  width: 100%;
  max-width: 100%;
}

.legal-body ul,
.legal-body ul.wp-block-list {
  list-style-type: disc;
}

.legal-body ol,
.legal-body ol.wp-block-list {
  list-style-type: decimal;
}

.legal-body li,
.legal-body .wp-block-list li {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--text-muted);
  text-align: left;
  margin: 0 0 0.5rem;
  padding-left: 0.25rem;
}

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

.legal-body a {
  color: var(--primary-color);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-body a:hover {
  color: var(--primary-hover, var(--primary-color));
}

/* Editor alignment classes must not win on legal pages */
.legal-content .has-text-align-center,
.legal-content .has-text-align-right,
.legal-body .has-text-align-center,
.legal-body .has-text-align-right,
.legal-body [style*="text-align:center"],
.legal-body [style*="text-align: center"] {
  text-align: left !important;
}

.legal-body .wp-block-heading,
.legal-body .wp-block-list,
.legal-body .wp-block-group {
  text-align: left;
}
