/* Restores normal rich-text styling (headings, lists, bold, links, line
   breaks) inside admin-authored HTML content (product/description fields
   edited via CKEditor). Tailwind's preflight reset strips all of this by
   default, so this file is loaded after output-tailwind.css in
   includes/header-link.php and overrides it for anything tagged
   .wysiwyg-content. */

.wysiwyg-content {
  line-height: 1.6;
}

.wysiwyg-content p {
  margin: 0 0 1em;
}

.wysiwyg-content p:last-child {
  margin-bottom: 0;
}

.wysiwyg-content h1,
.wysiwyg-content h2,
.wysiwyg-content h3,
.wysiwyg-content h4,
.wysiwyg-content h5,
.wysiwyg-content h6 {
  font-size: revert;
  font-weight: 700;
  margin: 1em 0 0.5em;
}

.wysiwyg-content h1:first-child,
.wysiwyg-content h2:first-child,
.wysiwyg-content h3:first-child,
.wysiwyg-content h4:first-child,
.wysiwyg-content h5:first-child,
.wysiwyg-content h6:first-child {
  margin-top: 0;
}

.wysiwyg-content ul {
  list-style: disc;
  margin: 0 0 1em;
  padding-left: 1.25em;
}

.wysiwyg-content ol {
  list-style: decimal;
  margin: 0 0 1em;
  padding-left: 1.25em;
}

.wysiwyg-content li {
  margin-bottom: 0.35em;
}

.wysiwyg-content li:last-child {
  margin-bottom: 0;
}

.wysiwyg-content blockquote {
  margin: 0 0 1em;
  padding-left: 1em;
  border-left: 3px solid currentColor;
  opacity: 0.85;
}

.wysiwyg-content a {
  text-decoration: underline;
}

.wysiwyg-content strong,
.wysiwyg-content b {
  font-weight: 700;
}

/* Legacy plain-text descriptions are rendered with nl2br(), so every line
   break is a bare <br>; give it a little breathing room so paragraphs read
   like paragraphs instead of one dense block. */
.wysiwyg-content br {
  content: "";
  display: block;
  margin-top: 0.4em;
}
