/* Default button styles */
.wp-block-button:not(.is-style-outline) .wp-block-button__link {

    transition: color 0.1s ease-in-out, background-color 0.1s ease-in-out;
    
    &.has-secondary-background-color,
    &.has-accent-variant-background-color {
        color: var(--wp--preset--color--base);
    }
    
    &.has-primary-background-color,
    &.has-accent-background-color {
        color: var(--wp--preset--color--contrast);
    }

    &.has-accent-variant-background-color:hover {
        background: var(--wp--preset--color--accent) !important;
        color: var(--wp--preset--color--contrast) !important;
    }

    &:hover {
        background: var(--wp--preset--color--accent-variant) !important;
        color: var(--wp--preset--color--base) !important;
    }
}

/* Outline button styles */
.wp-block-button.is-style-outline > .wp-block-button__link,
.wp-block-button.is-style-outline > .wp-block-button__link.has-background {
    color: inherit;
    background: transparent !important;
    transition: border-color 0.1s ease-in-out;

    &:hover {
        border-color: var(--wp--preset--color--accent-variant);
    }
}

/* Exceptions for buttons in section styles */
.is-style-section-accent-variant .wp-block-button:not(.is-style-outline) .wp-block-button__link:hover {
    background: var(--wp--preset--color--accent) !important;
    color: var(--wp--preset--color--contrast) !important;
}

.is-style-section-accent-variant .wp-block-button.is-style-outline > .wp-block-button__link:hover,
.is-style-section-accent-variant .wp-block-button.is-style-outline > .wp-block-button__link.has-background:hover {
    border-color: var(--wp--preset--color--secondary);
}