/* Builder contract v1.0: addon-owned mappings from LMS surfaces to Help4 tokens. */
.h4bs-builder-page .h4bs-block-container > .h4bs-builder-container {
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
}

.h4bs-builder-page .h4bs-builder-section-col,
.h4bs-builder-page .h4bs-builder-section-slot,
.h4bs-builder-page .h4bs-builder-container-col,
.h4bs-builder-page .h4bs-builder-container-slot {
    min-width: 0;
}

body.htlms-builder-template-route .h4bs-builder-page :is(
    .h4bs-builder-section-col-label,
    .h4bs-builder-container-col-label
) {
    display: none !important;
}

body.htlms-builder-template-route .h4bs-builder-page .h4bs-block-heading > :is(h1, h2, h3, h4, h5, h6) {
    margin: 0;
    color: inherit;
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
    letter-spacing: inherit;
    line-height: inherit;
    text-transform: inherit;
}

body.htlms-builder-template-route .h4bs-builder-page .h4bs-block-text > :is(p, ul, ol, blockquote) {
    color: inherit;
}

body.htlms-builder-template-route .site-main {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0 !important;
}

body.htlms-builder-template-route .h4bs-template-slot-content {
    overflow: clip;
}

body.htlms-builder-template-draft-preview .site-main > .content-panel,
body.htlms-builder-template-draft-preview .site-main > .content-panel > article {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

body.htlms-builder-template-draft-preview .site-main > .content-panel > article > h1:first-child,
body.htlms-builder-template-draft-preview .site-main > .content-panel > article > p:first-of-type {
    display: none;
}

body.htlms-builder-template-route .htlms-site-archive,
body.htlms-builder-template-route .htlms-site-search-results,
body.htlms-builder-template-route .htlms-site-singular {
    width: 100%;
    max-width: none;
    padding: 0;
}

body.htlms-builder-template-route .htlms-site-singular__content {
    max-width: 920px;
    margin-inline: auto;
}

@media (max-width: 767px) {
    body.htlms-builder-template-route .h4bs-builder-section,
    body.htlms-builder-template-route .h4bs-builder-container {
        max-width: 100%;
    }

    body.htlms-builder-template-route .h4bs-block-heading {
        font-size: min(var(--h4bs-font-size, 36px), 36px) !important;
    }
}

.h4bs-addon-module,
[data-h4bs-module] .htlms-library,
[data-h4bs-module] .htlms-dashboard,
[data-h4bs-module] .htlms-membership,
[data-h4bs-module] .htlms-portal,
[data-h4bs-module] .htlms-verify,
[data-h4bs-module] .htlms-commerce-checkout {
    color: var(--h4bs-color-text, #25102d);
    font-family: var(--h4bs-font-body, system-ui, sans-serif);
}

[data-h4bs-module] :is(h1, h2, h3, h4, h5, h6) {
    color: var(--h4bs-color-heading, #25102d);
    font-family: var(--h4bs-font-heading, system-ui, sans-serif);
}

[data-h4bs-module] :is(a, .htlms-eyebrow) {
    color: var(--h4bs-color-link, var(--h4bs-color-primary, #ff4fb8));
}

[data-h4bs-module] :is(.htlms-button--primary, .htlms-complete-button) {
    background: var(--h4bs-color-primary, #ff4fb8);
    border-color: var(--h4bs-color-primary, #ff4fb8);
    border-radius: var(--h4bs-button-radius, var(--h4bs-radius-md, 6px));
    color: var(--h4bs-color-on-primary, #ffffff);
}

[data-h4bs-module] :is(.htlms-button--secondary, .htlms-button--primary:hover, .htlms-complete-button:hover) {
    background: var(--h4bs-color-secondary, #8b5cf6);
    border-color: var(--h4bs-color-secondary, #8b5cf6);
    color: var(--h4bs-color-on-secondary, #ffffff);
}

[data-h4bs-module] :is(
    .htlms-course-card,
    .htlms-plan-card,
    .htlms-access-box,
    .htlms-cert-result,
    .htlms-pdf-card,
    .htlms-flow-step,
    .htlms-commerce-checkout__summary,
    .htlms-commerce-checkout__form
) {
    background: var(--h4bs-color-surface, #fff7fd);
    border-color: var(--h4bs-color-border, #ead6e7);
    border-radius: var(--h4bs-card-radius, var(--h4bs-radius-lg, 8px));
    box-shadow: var(--h4bs-card-shadow, 0 12px 34px rgba(37, 16, 45, 0.1));
}

[data-h4bs-module] :is(input, select, textarea) {
    background: var(--h4bs-color-surface, #ffffff);
    border-color: var(--h4bs-color-border, #ead6e7);
    border-radius: var(--h4bs-field-radius, var(--h4bs-radius-sm, 4px));
    color: var(--h4bs-color-text, #25102d);
    font: inherit;
}

[data-h4bs-module] :is(input, select, textarea):focus-visible {
    border-color: var(--h4bs-color-primary, #ff4fb8);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--h4bs-color-primary, #ff4fb8) 24%, transparent);
    outline: 0;
}

[data-h4bs-module="progress"] :is(progress, [role="progressbar"]) {
    accent-color: var(--h4bs-color-primary, #ff4fb8);
}

[data-h4bs-module="video"] :is(video, iframe),
[data-h4bs-module="protected-pdf"] :is(embed, iframe) {
    background: var(--h4bs-color-surface-alt, #fff0f9);
    border-radius: var(--h4bs-card-radius, var(--h4bs-radius-lg, 8px));
    max-width: 100%;
}

@media (prefers-reduced-motion: reduce) {
    [data-h4bs-module] *,
    [data-h4bs-module] *::before,
    [data-h4bs-module] *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
