/* __V3D_TEMPLATE__ - template-based file; delete this line to prevent this file from being updated */

/* -------------------------------------------------------------------------
   Aerne Vision - iPhone / iPad full-viewport setup
   Compatible with current Safari viewport handling and Verge3D 4.13 layouts.
   ------------------------------------------------------------------------- */

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    overscroll-behavior: none;
    background: #000;
}

/*
   Keep the document locked to the visual viewport.
   100dvh follows Safari's dynamically changing browser chrome.
*/
body {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100vh;   /* fallback */
    height: 100dvh;  /* modern iOS Safari */
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

noscript {
    display: block;
    text-align: center;
    padding-top: 100px;
    font-size: 20px;
}

/*
   The original HTML uses id="v3d-container".
   Keep the class selector as well for compatibility with Verge3D templates.
*/
#v3d-container,
.v3d-container {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100vh;   /* fallback */
    height: 100dvh;  /* correct dynamic height on modern iPhone Safari */
    margin: 0;
    padding: 0;
    overflow: hidden;
    box-sizing: border-box;
}

/* Prevent inline-canvas gaps and guarantee canvas fills the app container. */
#v3d-container canvas,
.v3d-container canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
    margin: 0;
    padding: 0;
}

.fullscreen-button {
    position: absolute;
    top: max(5px, env(safe-area-inset-top));
    right: max(5px, env(safe-area-inset-right));
    width: 50px;
    height: 50px;
    cursor: pointer;
    background-size: 100% 100%;
    display: none;
    z-index: 10;
}

.fullscreen-open {
    background-image: url('media/fullscreen_open.svg');
}

.fullscreen-close {
    background-image: url('media/fullscreen_close.svg');
}

/* Removes tap highlighting on iOS devices. */
* {
    -webkit-tap-highlight-color: rgba(0,0,0,0);
}

/* Helper class for UI elements which must stay clear of Dynamic Island,
   rounded corners and the Home Indicator. Apply this only to HUD/UI wrappers,
   not to the WebGL canvas itself. */
.ios-safe-area {
    box-sizing: border-box;
    padding-top: env(safe-area-inset-top);
    padding-right: env(safe-area-inset-right);
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
}

/* Dark Theme */
.v3d-simple-preloader-background {
    background-color: #ffff9b;
}

.v3d-simple-preloader-container {
    filter: drop-shadow(0px 0px 0px #000000);
}

.v3d-webgl-error {
    color: lightgray;
}


.v3d-simple-preloader-bar {
    background: linear-gradient(90deg, #000000, #000000);
    height: 1px;
    border-color: #000000;
}

.v3d-simple-preloader-logo {
    background-image: url('media/Aerne_Vision_Logo.svg');
}

.v3d-simple-preloader-container {
    --v3d-preloader-img-width: 238px;
    --v3d-preloader-img-height: 88px;
}