button {
    display: flex;
    justify-content: center;
    align-items: center;

    background-color: #00000000;
    border: none;
    text-decoration: none;
    user-select: none;

    cursor: pointer;
    font-family: 'Titan One';
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    border: none;

    img {
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        -webkit-user-drag: none;
        user-select: none;
        pointer-events: none;
    }
}

.button-wrapper-ui,
.btn-wrapper-mobile {
    width: 100%;
    justify-content: center;
    pointer-events: none;
    z-index: var(--z-index-mobile-front);

    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
    user-select: none;
    pointer-events: none;
}

.button-wrapper-ui {
    position: fixed;
    top: calc(var(--padding-page) / 2);
    height: 100%;
    width: 100%;
    display: flex;
    justify-content: space-between;

    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
    user-select: none;
    pointer-events: none;

    .play-wrapper,
    .resize-wrapper {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        height: var(--size-btn-ui);
        gap: calc(var(--size-btn-ui) * 0.2);
    }

    .play-wrapper {
        padding-left: var(--padding-page);
    }

    .resize-wrapper {
        padding-right: var(--padding-page);
    }
}

.audio-wrapper {
    position: absolute;
    padding-left: var(--padding-page);
    bottom: 30%;
    display: flex;
    flex-direction: column;
    z-index: var(--z-index-controls);
}

.iphone-controls {
    bottom: 28%;
}

.btn-ui {
    width: var(--size-btn-ui);
    height: var(--size-btn-ui);
    min-width: var(--size-btn-ui);
    min-height: var(--size-btn-ui);
    border-radius: 50%;
    background-color: var(--color-btn-screen-based);
    pointer-events: auto;
}

.btn-mid-canvas {
    position: absolute;
    width: calc(var(--size-btn-ui) * 3);
    height: calc(var(--size-btn-ui) * 3);
    min-width: calc(var(--size-btn-ui) * 3);
    min-height: calc(var(--size-btn-ui) * 3);
    border-radius: 50%;
    background-color: var(--color-btn-screen-based);
    pointer-events: auto;
    left: calc(50% - var(--size-btn-ui) * 3 / 2);
    bottom: calc(50% - var(--size-btn-ui) * 3 / 2);
    z-index: var(--z-index-controls);

    img {
        width: calc(var(--size-btn-ui) * 3 * 0.8);
        height: calc(var(--size-btn-ui) * 3 * 0.8);
        min-width: calc(var(--size-btn-ui) * 3 * 0.8);
        min-height: calc(var(--size-btn-ui) * 3 * 0.8);
        opacity: 0.5;
    }
}

.btn-img {
    width: calc(var(--size-btn-ui) * 0.8);
    height: calc(var(--size-btn-ui) * 0.8);
    min-width: calc(var(--size-btn-ui) * 0.8);
    min-height: calc(var(--size-btn-ui) * 0.8);
    opacity: 0.5;
}

.btn-mute-vertical {
    border-radius: 0 0 var(--size-btn-ui) var(--size-btn-ui);
}

.volume-wrapper {
    width: calc(var(--size-btn-ui));
    display: flex;
    align-items: center;
    pointer-events: auto;

    .volume-vertical {
        border-radius: var(--size-btn-ui) var(--size-btn-ui) 0 0;
    }

    .volume {
        -webkit-appearance: none;
        min-width: 100%;
        min-height: calc(var(--size-btn-ui));

        background: var(--color-btn-screen-based);
        outline: none;
        -webkit-transition: 0.2s;
        transition: opacity 0.2s;
        height: calc(var(--size-btn-ui) * 3);

        writing-mode: vertical-lr;
        direction: rtl;
    }

    .volume::-webkit-slider-thumb {
        -webkit-appearance: none;
        appearance: none;
        background-color: transparent;
        filter: none;
        box-shadow: none;
        width: calc(var(--size-btn-ui) * 0.8);
        height: calc(var(--size-btn-ui) * 0.8);
        background: url('../assets/icons/slider-thumb.svg');
        background-size: contain;
        border: none;
        opacity: 1;
        cursor: pointer;
    }

    .volume::-moz-range-thumb {
        -webkit-appearance: none;
        appearance: none;
        background-color: transparent;
        filter: none;
        box-shadow: none;
        width: calc(var(--size-btn-ui) * 0.8);
        height: calc(var(--size-btn-ui) * 0.8);
        background: url('../assets/icons/slider-thumb.svg');
        background-size: contain;
        border: none;
        opacity: 1;
        cursor: pointer;
    }
}

.btn-wrapper-mobile {
    position: fixed;
    bottom: 2.5svw;
    display: flex;
    justify-content: space-between;
    padding-left: var(--padding-page);
    padding-right: var(--padding-page);

    .movements {
        display: flex;
        align-items: flex-end;
        gap: clamp(12px, calc(var(--size-btn-mobile) / 5), 24px);
    }

    .actions {
        position: relative;
        width: calc(var(--size-btn-mobile) * 2.5);

        .btn-attack {
            position: absolute;
            left: calc(var(--size-btn-mobile) / 2);
            bottom: var(--size-btn-mobile);
        }
        .btn-jump {
            position: absolute;
            left: calc(var(--size-btn-mobile) * 1.5);
            bottom: calc(var(--size-btn-mobile) * 1.5);
        }
    }

    .btn-mobile {
        width: var(--size-btn-mobile);
        height: var(--size-btn-mobile);

        border-radius: 50%;
        background-color: var(--color-btn-screen-based);
        pointer-events: auto;

        img {
            width: var(--size-btn-mobile);
            height: var(--size-btn-mobile);

            border-radius: 50%;
            opacity: 0.5;
        }
    }
}

.btn-mobile:not(:disabled):active,
.btn-ui:not(:disabled):active {
    background-color: var(--color-btn-active);
}

@media (hover: hover) {
    .btn-mobile {
        display: none;
    }
}
