/* iOS Fullscreen Support Styles */

/* Hide iOS fullscreen elements when active */
.ios-fullscreen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999 !important;
}

/* Ensure body and html don't scroll in iOS fullscreen */
body.ios-fullscreen,
html.ios-fullscreen {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
    height: 100% !important;
}

/* Hide any potential UI elements during iOS fullscreen */
.ios-fullscreen .webgl-content {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
}

/* Ensure Unity canvas fills the screen properly on iOS */
.ios-fullscreen #unity-canvas {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    object-fit: contain !important;
}

/* Hide loading bar and other UI elements during fullscreen */
.ios-fullscreen #unity-loading-bar,
.ios-fullscreen #unity-logo,
.ios-fullscreen #unity-progress-bar-empty,
.ios-fullscreen .unity-mobile {
    display: none !important;
}

/* Responsive adjustments for different iOS devices */
@media screen and (max-width: 768px) {
    .ios-fullscreen #unity-canvas {
        /* Ensure proper scaling on smaller devices */
        max-width: 100vw !important;
        max-height: 100vh !important;
    }
}

/* Handle safe areas on newer iOS devices */
@supports (padding: max(0px)) {
    .ios-fullscreen {
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
    }
}
