/**
 * WYSIWYG section — theme-styled rich content
 */

.wysiwyg .block-intro {
    margin-block-end: 28px;
}

.wysiwyg .block-intro__heading {
    font-size: var(--h2-font-size);
}

.wysiwyg__inner {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
}

.wysiwyg--align-center .wysiwyg__inner {
    align-items: center;
    text-align: center;
}

.wysiwyg--align-center .wysiwyg__content,
.wysiwyg--align-center .wysiwyg__content :where(p, h1, h2, h3, h4, h5, h6, li, blockquote):not(.form-row):not(.order-tracking__intro):not(.order-tracking__actions) {
    text-align: center;
}

.wysiwyg--align-center .block-intro,
.wysiwyg--align-center .wysiwyg__content,
.wysiwyg--width-narrow .wysiwyg__inner {
    width: 100%;
    max-width: 42rem;
}

.wysiwyg--align-center .block-intro,
.wysiwyg--align-center .wysiwyg__content,
.wysiwyg--width-narrow.wysiwyg--align-center .wysiwyg__inner {
    margin-inline: auto;
}

/* Contain: site container. Full width: viewport with theme gutters. */
.wysiwyg__shell {
    width: 100%;
    padding-inline: var(--container-gutter);
}

.wysiwyg--fullwidth .wysiwyg__inner,
.wysiwyg--fullwidth .block-intro,
.wysiwyg--fullwidth .wysiwyg__content {
    max-width: none;
}

/* -------------------------------------------------------------------------- */
/* Content                                                                    */
/* -------------------------------------------------------------------------- */

.wysiwyg__content {
    width: 100%;
}

.wysiwyg__content > * + * {
    margin-block-start: var(--body-paragraph-gap);
}

.wysiwyg__content :where(h1, h2, h3, h4, h5, h6) {
    margin-block: 1.35em 0.4em;
    font-family: var(--entities-font);
    font-weight: 800;
    letter-spacing: -0.01em;
    line-height: 1.25;
    color: var(--color-title);
}

.wysiwyg__content :where(h1, h2, h3, h4, h5, h6):first-child {
    margin-block-start: 0;
}

.wysiwyg__content h2 {
    font-size: clamp(1.35rem, 2vw, 1.65rem);
}

.wysiwyg__content h3 {
    font-size: clamp(1.15rem, 1.6vw, 1.35rem);
}

.wysiwyg__content h4 {
    font-size: var(--h4-font-size);
}

.wysiwyg__content a {
    color: var(--color-primary);
    font-weight: 600;
    text-underline-offset: 0.15em;
}

.wysiwyg__content a:hover {
    color: var(--color-primary-hover);
}

.wysiwyg__content :where(ul, ol) {
    margin: 0;
    padding-inline-start: 1.25em;
}

.wysiwyg__content li + li {
    margin-block-start: 0.4em;
}

.wysiwyg__content blockquote {
    margin: 0;
    padding: 16px 20px;
    border-inline-start: 3px solid var(--color-primary);
    border-radius: 0 14px 14px 0;
    background: rgba(105, 219, 124, 0.08);
    color: var(--color-title);
    font-style: italic;
}

.wysiwyg__content img,
.wysiwyg__content figure {
    max-width: 100%;
    height: auto;
    border-radius: 16px;
}

.wysiwyg__content figure {
    margin: 0.5em 0;
}

.wysiwyg__content figcaption {
    margin-block-start: 8px;
    color: var(--gray-50);
    font-size: 13px;
    text-align: center;
}

.wysiwyg__content hr {
    margin-block: var(--stack-gap-lg);
    border: 0;
    border-block-start: 1px solid var(--brd-gray-300);
}

.wysiwyg__content table {
    width: 100%;
    overflow: hidden;
    border-collapse: collapse;
    border-radius: 12px;
    background: var(--white);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.wysiwyg__content :where(th, td) {
    padding: 0.85em 1em;
    border-block-end: 1px solid var(--brd-gray-300);
}

.wysiwyg__content th {
    font-family: var(--entities-font);
    font-weight: 700;
    color: var(--color-title);
    background: var(--green-99);
}

.wysiwyg__content tr:last-child :where(th, td) {
    border-block-end: 0;
}

.wysiwyg__content :where(pre, code) {
    font-size: 0.92em;
}

.wysiwyg__content pre {
    padding: 16px 18px;
    overflow-x: auto;
    border-radius: 12px;
    background: var(--gray-08);
    color: var(--green-90);
}

/* -------------------------------------------------------------------------- */
/* Section CTA                                                                */
/* -------------------------------------------------------------------------- */

.wysiwyg__footer {
    display: flex;
    justify-content: flex-start;
    margin-block-start: 32px;
}

.wysiwyg--align-center .wysiwyg__footer {
    justify-content: center;
}

/* -------------------------------------------------------------------------- */
/* Theme backgrounds                                                          */
/* -------------------------------------------------------------------------- */

.wysiwyg--bg-primary .block-intro__heading,
.wysiwyg--bg-brand .block-intro__heading,
.wysiwyg--bg-dark .block-intro__heading,
.wysiwyg--bg-gradient .block-intro__heading,
.wysiwyg--bg-primary .wysiwyg__content :where(h1, h2, h3, h4, h5, h6),
.wysiwyg--bg-brand .wysiwyg__content :where(h1, h2, h3, h4, h5, h6),
.wysiwyg--bg-dark .wysiwyg__content :where(h1, h2, h3, h4, h5, h6),
.wysiwyg--bg-gradient .wysiwyg__content :where(h1, h2, h3, h4, h5, h6) {
    color: var(--white);
}

.wysiwyg--bg-primary .wysiwyg__content,
.wysiwyg--bg-brand .wysiwyg__content,
.wysiwyg--bg-dark .wysiwyg__content,
.wysiwyg--bg-gradient .wysiwyg__content {
    color: var(--body-text-color-on-dark);
}

.wysiwyg--bg-primary .wysiwyg__content a,
.wysiwyg--bg-brand .wysiwyg__content a,
.wysiwyg--bg-dark .wysiwyg__content a,
.wysiwyg--bg-gradient .wysiwyg__content a {
    color: var(--heading-accent-lime);
}

.wysiwyg--bg-primary .wysiwyg__content a:hover,
.wysiwyg--bg-brand .wysiwyg__content a:hover,
.wysiwyg--bg-dark .wysiwyg__content a:hover,
.wysiwyg--bg-gradient .wysiwyg__content a:hover {
    color: var(--white);
}

.wysiwyg--bg-primary .wysiwyg__content blockquote,
.wysiwyg--bg-brand .wysiwyg__content blockquote,
.wysiwyg--bg-dark .wysiwyg__content blockquote,
.wysiwyg--bg-gradient .wysiwyg__content blockquote {
    background: rgba(255, 255, 255, 0.08);
    border-inline-start-color: var(--heading-accent-lime);
    color: var(--white);
}

.wysiwyg--bg-primary .wysiwyg__content hr,
.wysiwyg--bg-brand .wysiwyg__content hr,
.wysiwyg--bg-dark .wysiwyg__content hr,
.wysiwyg--bg-gradient .wysiwyg__content hr {
    border-block-start-color: rgba(255, 255, 255, 0.18);
}

.wysiwyg--bg-primary .wysiwyg__content figcaption,
.wysiwyg--bg-brand .wysiwyg__content figcaption,
.wysiwyg--bg-dark .wysiwyg__content figcaption,
.wysiwyg--bg-gradient .wysiwyg__content figcaption {
    color: rgba(255, 255, 255, 0.62);
}

@media (max-width: 767px) {
    .wysiwyg__content table {
        display: block;
        overflow-x: auto;
    }
}
