/* Button Frame Widget Styles */

.wml-button-frame {
    width: auto;
    min-width: 180px;
    height: 50px;
    border: 1px solid;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 0;
    isolation: isolate;
    /* Creates independent stacking context for each button */
    transition: background calc(var(--wml-btn-transition, 1) * 1s),
        color calc(var(--wml-btn-transition, 1) * 1s);
    background: var(--wml-btn-bg, #eeeeee);
}

.wml-button-frame::before,
.wml-button-frame::after {
    position: absolute;
    background: var(--wml-btn-bg, #eeeeee);
    z-index: -1;
    transition: calc(var(--wml-btn-transition, 1) * 1s);
    content: '';
}

/* Horizontal bar - full height, narrower width */
.wml-button-frame::before {
    height: 50px;
    width: calc(100% - 40px);
}

/* Vertical bar - full width, shorter height */
.wml-button-frame::after {
    width: 100%;
    height: 30px;
}

.wml-button-text {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    transition: color calc(var(--wml-btn-transition, 1) * 1s);
}

.wml-button-frame:hover::before {
    width: 0px;
    background: var(--wml-btn-hover, #ffffff);
}

.wml-button-frame:hover::after {
    height: 0px;
    background: var(--wml-btn-hover, #ffffff);
}

.wml-button-frame:hover {
    background: var(--wml-btn-hover, #ffffff);
}

.wml-button-frame:hover .wml-button-text {
    color: var(--wml-btn-hover-text, #333333);
}

.wml-button-frame:focus {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.wml-button-frame:focus:not(:focus-visible) {
    outline: none;
}