
:is([class*="with-line"]) {
    &:after {
        display: block;
        border: 0;
        width: 180px;
        max-width: 50%;
        content: "";
        font-size: calc(1px + var(--custom-effect-height));
        line-height: var(--custom-effect-height);
        height: var(--custom-effect-height);
        background: var(--custom-effect-color);
        transition: all 0.3s;
        border-top-right-radius: var(--custom-effect-radius);
        border-top-left-radius: var(--custom-effect-radius);
        margin: var(--custom-effect-margin);
        padding: 0;
    }

    &[class*="align-center"]:after {
        margin-left: auto;
        margin-right: auto;
    }

    &[class*="with-line-text-color"]:after {
        --custom-effect-color: currentColor
    }
}

/*
 * Control the hover stylings of outline block style.
 * Unnecessary once block styles are configurable via theme.json
 * https://github.com/WordPress/gutenberg/issues/42794
 */
.wp-block-button.is-style-outline > .wp-block-button__link:not(.has-background):hover {
    background-color: var(--wp--preset--color--secondary);
    color: var(--wp--preset--color--base);
    border-color: var(--wp--preset--color--secondary);
}