/* Semantic formatting for HTML produced by the product rich-text editor.
   Tailwind Preflight removes the browser defaults for these tags. */
.product-rich-text {
  line-height: 1.8;
  overflow-wrap: anywhere;
}

.product-rich-text > :first-child { margin-top: 0; }
.product-rich-text > :last-child { margin-bottom: 0; }
.product-rich-text p { margin: 0 0 0.75rem; }

.product-rich-text h1,
.product-rich-text h2,
.product-rich-text h3,
.product-rich-text h4,
.product-rich-text h5,
.product-rich-text h6 {
  line-height: 1.35;
  font-weight: 700;
  margin: 1.5rem 0 0.75rem;
}

.product-rich-text h1 { font-size: 2rem; }
.product-rich-text h2 { font-size: 1.5rem; }
.product-rich-text h3 { font-size: 1.25rem; }
.product-rich-text h4 { font-size: 1.125rem; }
.product-rich-text h5 { font-size: 1rem; }
.product-rich-text h6 { font-size: 0.875rem; }

.product-rich-text ul,
.product-rich-text ol {
  margin: 0.75rem 0;
  padding-left: 1.75rem;
}

.product-rich-text ul { list-style: disc; }
.product-rich-text ol { list-style: decimal; }
.product-rich-text li { margin: 0.25rem 0; }

.product-rich-text a {
  color: #2e7240;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.product-rich-text strong,
.product-rich-text b { font-weight: 700; }
.product-rich-text em,
.product-rich-text i { font-style: italic; }
.product-rich-text u { text-decoration: underline; }

.product-rich-text blockquote {
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  border-left: 4px solid #a7c9ad;
  background: #f5f8f4;
}

.product-rich-text img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1rem auto;
}

.product-rich-text figure {
  max-width: 100%;
  margin: 1rem 0;
}

.product-rich-text figcaption {
  margin-top: 0.4rem;
  color: #667066;
  font-size: 0.875rem;
  text-align: center;
}

.product-rich-text .table {
  max-width: 100%;
  overflow-x: auto;
}

.product-rich-text table {
  width: 100%;
  margin: 1rem 0;
  border-collapse: collapse;
}

.product-rich-text th,
.product-rich-text td {
  padding: 0.5rem 0.75rem;
  border: 1px solid #d9ded8;
  text-align: left;
  vertical-align: top;
}

.product-rich-text th {
  background: #f5f8f4;
  font-weight: 700;
}

.product-rich-text hr {
  margin: 1.5rem 0;
  border: 0;
  border-top: 1px solid #d9ded8;
}

.product-rich-text pre {
  margin: 1rem 0;
  padding: 1rem;
  overflow-x: auto;
  border-radius: 0.5rem;
  background: #f3f4f3;
  white-space: pre-wrap;
}

.product-rich-text code {
  font-family: Consolas, "Courier New", monospace;
}

.product-rich-text .text-align-center { text-align: center; }
.product-rich-text .text-align-right { text-align: right; }
.product-rich-text .text-align-justify { text-align: justify; }
