$controls-button-width: 32px;

.bp-controls {
    position: absolute;
    bottom: 25px;
    left: 50%;
    display: flex;
    background: fade-out($black, .2);
    border-radius: 6px;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity .5s;

    /* stylelint-disable property-no-vendor-prefix */
    // Removes the spinner for number type inputs in Webkit browsers
    input::-webkit-outer-spin-button,
    input::-webkit-inner-spin-button {
        -webkit-appearance: none;
    }

    // Removes the spinner for number type inputs in Firefox
    input[type='number'] {
        -moz-appearance: textfield;
    }
    /* stylelint-enable property-no-vendor-prefix */
}

.box-show-preview-controls .bp-controls {
    opacity: 1;
}

.bp-controls-cell {
    display: table-cell;
    margin: 0;
    padding: 0;
    vertical-align: middle;
    user-select: none;
    touch-action: manipulation;
}

.bp-controls-btn {
    display: block;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    color: $white;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    outline: 0;
    cursor: pointer;
    opacity: .7;
    user-select: none;
    // disables non-standard gestures such as double-tap to zoom
    touch-action: manipulation;
    zoom: 1;

    &:hover,
    &:focus {
        opacity: 1;
    }

    // Custom focus
    &:focus {
        box-shadow: inset 0 0 0 1px fade-out($white, .5), 0 1px 2px fade-out($black, .9);
    }

    span {
        display: block;
        margin: 0 auto;
    }

    svg {
        vertical-align: middle;
    }

    &.disabled,
    &:disabled {
        cursor: default;
        opacity: .2;
        pointer-events: none;
    }
}

.bp-exit-fullscreen-icon {
    display: none;
}

.bp-is-fullscreen {
    .bp-enter-fullscreen-icon {
        display: none;
    }

    .bp-exit-fullscreen-icon {
        display: block;
    }
}

.bp-controls-group {
    display: flex;
    align-items: center;
    margin-right: 4px;
    margin-left: 4px;

    .bp-controls-group-btn {
        width: $controls-button-width;
    }

    & + .bp-controls-cell {
        margin-left: 4px;
    }
}
