/* ==========================================================================
   Landing Page Builder pages only (bundle "lpb_page"): styles of markup that only this plugin's
   renderer produces. The website widgets themselves are System (upb_site.css).
   ========================================================================== */

/* ==========================================================================
   Title highlights: span.upb-hl inside a title; the look comes from
       .upb-hl-color | .upb-hl-marker | .upb-hl-underline | .upb-hl-gradient on the page
   ========================================================================== */

.upb-hl {
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
}

/* color */
.upb-hl-color .upb-hl {
    color: var(--upb-accent);
}

/* marker: soft brand stripe behind the lower half */
.upb-hl-marker .upb-hl {
    background-image: linear-gradient(transparent 58%, color-mix(in srgb, var(--upb-accent) 30%, transparent) 58%, color-mix(in srgb, var(--upb-accent) 30%, transparent) 92%, transparent 92%);
    padding: 0 0.06em;
}

/* underline */
.upb-hl-underline .upb-hl {
    text-decoration: underline;
    text-decoration-color: var(--upb-accent);
    text-decoration-thickness: 0.1em;
    text-underline-offset: 0.14em;
    text-decoration-skip-ink: none;
}

/* gradient: heading color → brand color */
.upb-hl-gradient .upb-hl {
    background-image: linear-gradient(90deg, var(--upb-accent), color-mix(in srgb, var(--upb-accent) 55%, var(--upb-heading)));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* dark / image backgrounds: lighter brand color */
.upb-hl-color .upb-on-dark .upb-hl {
    color: color-mix(in srgb, var(--upb-accent) 65%, var(--upb-heading));
}

.upb-hl-underline .upb-on-dark .upb-hl {
    text-decoration-color: color-mix(in srgb, var(--upb-accent) 65%, var(--upb-heading));
}

.upb-hl-gradient .upb-on-dark .upb-hl {
    background-image: linear-gradient(90deg, color-mix(in srgb, var(--upb-accent) 55%, var(--upb-heading)), var(--upb-heading));
}

.upb-hl-marker .upb-on-dark .upb-hl {
    background-image: linear-gradient(transparent 58%, color-mix(in srgb, var(--upb-accent) 55%, transparent) 58%, color-mix(in srgb, var(--upb-accent) 55%, transparent) 92%, transparent 92%);
}

/* brand color backgrounds: the brand color would disappear → white based looks */
.upb-hl-color :is(.upb-section-accent, .upb-hero-accent, .upb-box-accent) .upb-hl,
.upb-hl-gradient :is(.upb-section-accent, .upb-hero-accent, .upb-box-accent) .upb-hl,
.upb-hl-marker :is(.upb-section-accent, .upb-hero-accent, .upb-box-accent) .upb-hl {
    color: var(--upb-heading);
    background-image: linear-gradient(transparent 58%, var(--upb-surface-strong) 58%, var(--upb-surface-strong) 92%, transparent 92%);
    -webkit-background-clip: border-box;
    background-clip: border-box;
}

.upb-hl-underline :is(.upb-section-accent, .upb-hero-accent, .upb-box-accent) .upb-hl {
    text-decoration-color: var(--upb-heading);
}

