/* =========================================================
   AERO SPRINT 1.3.1
   Game-specific styles for Above Interactive Engine 1.1.4+
   ========================================================= */

.aie-aero-sprint {
    background: #06111d;
    font-family: Arial, Helvetica, sans-serif;
    touch-action: none;
    outline: none;
}

.aie-aero-sprint .aie-canvas {
    position: absolute;
    inset: 0;
}

.aie-aero-sprint:focus-visible {
    box-shadow: inset 0 0 0 2px rgba(67, 170, 255, 0.78);
}

.aie-aero-sprint__toolbar {
    position: absolute;
    inset: 0;
    z-index: 45;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    gap: 7px;
    padding: 0 10px 10px;
    pointer-events: none;
}

.aie-aero-sprint__toolbar .aie-button {
    min-height: 34px;
    padding: 0 9px;
    border-color: rgba(67, 170, 255, 0.26);
    background: rgba(4, 14, 24, 0.78);
    font-size: 9px;
    letter-spacing: 0.07em;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    pointer-events: auto;
}

.aie-aero-sprint__toolbar .aie-button:hover,
.aie-aero-sprint__toolbar .aie-button:focus-visible {
    background: rgba(0, 100, 183, 0.86);
}

.aie-aero-sprint__toolbar .aie-button:disabled {
    opacity: 0.42;
    cursor: default;
    transform: none;
}

.aie-aero-sprint__touch {
    position: absolute;
    z-index: 48;
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    height: clamp(72px, 16vh, 104px);
    display: none;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0;
    padding: 0;
    pointer-events: auto;
    background: rgba(3, 10, 17, 0.92);
    border-top: 1px solid rgba(67, 170, 255, 0.58);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.aie-aero-sprint__touch button {
    display: grid;
    place-items: center;
    width: 100%;
    min-width: 0;
    height: 100%;
    margin: 0;
    padding: 0 3px;
    color: #fff;
    background: rgba(4, 14, 24, 0.90);
    border: 0;
    border-left: 1px solid rgba(67, 170, 255, 0.34);
    border-radius: 0;
    box-shadow: inset 0 0 20px rgba(0, 128, 255, 0.06);
    font: 900 clamp(11px, 3vw, 20px)/1 Arial, Helvetica, sans-serif;
    letter-spacing: 0.02em;
    touch-action: none;
    pointer-events: auto;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.aie-aero-sprint__touch button:first-child {
    border-left: 0;
}

.aie-aero-sprint__touch button:active {
    background: rgba(0, 100, 183, 0.96);
    box-shadow: inset 0 0 28px rgba(67, 170, 255, 0.32);
}

.aie-aero-sprint__touch .aie-aero-sprint__brake {
    background: rgba(78, 46, 39, 0.94);
}

.aie-aero-sprint__touch .aie-aero-sprint__throttle {
    color: #06111d;
    background: rgba(97, 230, 165, 0.92);
}

.aie-aero-sprint__touch .aie-aero-sprint__boost {
    color: #06111d;
    background: rgba(67, 170, 255, 0.94);
}

.aie-aero-sprint--touch-active .aie-aero-sprint__touch {
    display: grid;
}

.aie-aero-sprint--touch-active .aie-aero-sprint__toolbar {
    padding-bottom: calc(clamp(72px, 16vh, 104px) + 7px);
}

@media (hover: none) and (pointer: coarse) {
    .aie-aero-sprint__touch {
        display: grid;
    }

    .aie-aero-sprint__toolbar {
        padding-bottom: calc(clamp(72px, 16vh, 104px) + 7px);
    }
}

@media (max-width: 760px), (max-height: 620px) {
    .aie-aero-sprint__toolbar {
        gap: 4px;
        padding-left: 6px;
        padding-right: 6px;
    }

    .aie-aero-sprint__toolbar .aie-button {
        min-height: 29px;
        padding: 0 6px;
        font-size: 8px;
    }

    .aie-aero-sprint__touch {
        height: clamp(68px, 18vh, 90px);
    }

    .aie-aero-sprint--touch-active .aie-aero-sprint__toolbar,
    .aie-aero-sprint__toolbar {
        padding-bottom: calc(clamp(68px, 18vh, 90px) + 6px);
    }
}

.aie-aero-sprint:fullscreen,
.aie-aero-sprint:-webkit-full-screen {
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
}

@media (prefers-reduced-motion: reduce) {
    .aie-aero-sprint__toolbar .aie-button,
    .aie-aero-sprint__touch button {
        transition-duration: 1ms !important;
    }
}
