/* Keep sticky contents in the document scroll container on the Helix template. */
body.vreflex-product-page,
.vreflex-product-page .body-innerwrapper {
    overflow-x: clip;
}

/* The reading surface continues to both edges of the product page. */
body.vreflex-product-page,
.vreflex-product-page .body-wrapper,
.vreflex-product-page .body-innerwrapper,
.vreflex-product-page #sp-main,
.vreflex-product-page #sp-main > section {
    background-color: #fff !important;
}

/* Helix also paints the module's grid column. It remains visible outside the
   1440px reading layout, so reset the column that contains that layout only. */
.vreflex-product-page #sp-main [class*="col-"]:has(.vreflex-product-layout) {
    background: #fff !important;
}

.vreflex-product-content :is(p, li, td, th),
.vreflex-product-content .sppb-addon-text-block .sppb-addon-content {
    font-size: 17px;
    line-height: 1.75;
}

.vreflex-product-layout {
    --vreflex-header-height: 60px;
    --vreflex-anchor-offset: 100px;
    --vreflex-nav-green: var(--vreflex-brand, #006400);
    display: grid;
    grid-template-columns: 232px minmax(0, 1fr);
    align-items: start;
    gap: 48px;
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 48px 40px 64px;
    background: #fff;
}

.vreflex-product-toc {
    position: sticky;
    top: calc(var(--vreflex-header-height) + 24px);
    z-index: 5;
    min-width: 0;
    background: #fff;
}

.vreflex-product-toc__caption {
    margin: 0 0 18px;
    padding: 0 18px;
    color: #6b776e;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.vreflex-product-toc__list {
    max-height: calc(100vh - var(--vreflex-header-height) - 100px);
    max-height: calc(100dvh - var(--vreflex-header-height) - 100px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    margin: 0;
    padding: 0;
    border-inline-end: 1px solid #e2e8e3;
    list-style: none;
}

.vreflex-product-toc__list[hidden] {
    display: none;
}

.vreflex-product-toc__list li {
    margin: 0;
    padding: 0;
}

.vreflex-product-toc__list a {
    display: block;
    margin-inline-end: -1px;
    padding: 13px 18px;
    border-inline-end: 3px solid transparent;
    color: #5c685f;
    font-size: 15px;
    line-height: 1.6;
    overflow-wrap: anywhere;
    text-decoration: none;
    transition: color .18s ease, background-color .18s ease, border-color .18s ease;
}

.vreflex-product-toc__list a:hover {
    color: var(--vreflex-nav-green);
    background: var(--vreflex-brand-tint, #f0f7f0);
}

.vreflex-product-toc__list a[aria-current="location"] {
    border-inline-end-color: var(--vreflex-nav-green);
    color: var(--vreflex-nav-green);
    background: var(--vreflex-brand-selected, #e6f1e5);
    font-weight: 600;
}

.vreflex-product-toc__list a:focus-visible,
.vreflex-product-toc__toggle:focus-visible,
.vreflex-product-anchor:focus-visible {
    outline: 2px solid var(--vreflex-nav-green);
    outline-offset: -2px;
}

.vreflex-product-toc__toggle {
    display: none;
}

.vreflex-product-content {
    min-width: 0;
    background: #fff;
}

.vreflex-product-content .sppb-row-container {
    width: 100%;
    max-width: 100%;
}

.vreflex-product-content > .vreflex-product-section {
    padding: 40px 32px !important;
}

.vreflex-product-content > .vreflex-product-section:first-child {
    padding-top: 0 !important;
}

.vreflex-product-anchor {
    scroll-margin-top: var(--vreflex-anchor-offset);
}

@media (min-width: 992px) and (max-width: 1199px) {
    .vreflex-product-layout {
        grid-template-columns: 208px minmax(0, 1fr);
        gap: 24px;
        padding-inline: 24px;
    }

    .vreflex-product-content > .vreflex-product-section {
        padding-inline: 24px !important;
    }
}

@media (max-width: 991px) {
    .vreflex-product-layout {
        display: block;
        padding: 24px 20px 40px;
    }

    .vreflex-product-toc {
        top: calc(var(--vreflex-header-height) + 8px);
        z-index: 10;
        margin-bottom: 28px;
        border: 1px solid #dce6dd;
        border-radius: 4px;
        box-shadow: 0 4px 16px rgb(24 60 33 / 6%);
    }

    .vreflex-product-toc__caption {
        display: none;
    }

    .vreflex-product-toc__toggle {
        position: relative;
        display: flex;
        flex-direction: column;
        gap: 3px;
        width: 100%;
        min-height: 66px;
        margin: 0;
        padding: 11px 42px 11px 16px;
        border: 0;
        border-radius: 4px;
        color: #69746b;
        background: #fff;
        font: inherit;
        font-size: 14px;
        line-height: 1.5;
        text-align: start;
        cursor: pointer;
    }

    .vreflex-product-toc__current {
        color: var(--vreflex-nav-green);
        font-size: 16px;
        font-weight: 600;
    }

    .vreflex-product-toc__toggle::after {
        position: absolute;
        top: 27px;
        inset-inline-end: 18px;
        width: 8px;
        height: 8px;
        border-inline-end: 1.5px solid var(--vreflex-nav-green);
        border-bottom: 1.5px solid var(--vreflex-nav-green);
        content: '';
        transform: rotate(45deg);
    }

    .vreflex-product-toc__toggle[aria-expanded="true"]::after {
        top: 31px;
        transform: rotate(225deg);
    }

    .vreflex-product-toc__list {
        position: absolute;
        top: 100%;
        inset-inline: -1px;
        max-height: min(55vh, 440px);
        max-height: min(55dvh, 440px);
        border: 1px solid #dce6dd;
        border-radius: 0 0 4px 4px;
        background: #fff;
        box-shadow: 0 8px 16px rgb(24 60 33 / 8%);
    }

    .vreflex-product-toc__list a {
        padding: 12px 16px;
        font-size: 15px;
    }

    .vreflex-product-content > .vreflex-product-section {
        padding: 32px 20px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .vreflex-product-toc__list a {
        transition: none;
    }
}
