html, body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Form controls don't inherit the page font by default (the browser gives them
   its own). Make them follow the page — fixes e.g. #realViewButton and the
   sidebar's inputs/buttons, which otherwise stay on the UA default font. */
input, button, select, textarea {
    font-family: inherit;
}

a, a:hover, a:active, a:visited {
    text-decoration: none;
    color: inherit;
}

.text {
    color: white;
}

#potree_sidebar_container {
    left: -300px;
    z-index: 2;
    -webkit-transition: left .35s;
    transition: left .35s;
}

.ol-full-screen {
    left: .5em;
    right: unset;
    top: 4.5em;
}

.ol-touch .ol-control button {
    font-size: 1.14em;
}

/* a button as marzipano's .standardButton (static/marzipano/css/info.css): the sidebar's Admin settings */
.standardButton {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-height: 38px;
    padding: 8px 14px;
    color: #f4f4f6;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 9px;
    background-color: rgba(255, 255, 255, 0.06);
    white-space: nowrap;
    vertical-align: middle;
    transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.05s ease;
}

.standardButton:hover {
    background-color: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.26);
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.22);
}

.standardButton:active {
    transform: translateY(1px);
}

/* the icon before the text */
.standardButton > img {
    width: 16px;
    height: 16px;
    margin-right: 8px;
}

/* a link as a button: not the sidebar's link colour */
#potree_sidebar_container a.standardButton {
    color: #f4f4f6;
    text-decoration: none;
}

/* the sidebar's Admin settings: its buttons one under the other, full width */
.admin-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* the action buttons, bottom left beside the sidebar: as marzipano's #buttonContainer */
#buttonContainer {
    position: absolute;
    bottom: 10px;
    left: 10px;
    z-index: 1;
}

/* over the globe: above Cesium's credits, which sit in the same corner */
#cesiumContainer ~ #buttonContainer {
    bottom: 36px;
}

#actionButtons {
    display: flex;
}

.actionButton {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    cursor: pointer;
}

.actionButton:hover {
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.85));
}

#enterVrButton {
    color: #fff;
}

/* the engine's own VR button (ENTER VR text by the menu button): the action bar's #enterVrButton clicks it */
#VRButton {
    display: none !important;
}

#globe_button > img, #shareButton img {
    width: 32px;
    height: 32px !important;  /* over the inline 24px of the legacy engine's share icon */
}

/* the link takes the whole button: its click (the sidebar's) opens the share popup */
#shareButton > a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

/* white icons: the dark outline of .shadow keeps them on a white background */
#buttonContainer img, #buttonContainer svg {
    filter: drop-shadow(0 0 1px rgba(0, 0, 0, 0.8)) drop-shadow(0 0 1px rgba(0, 0, 0, 0.8));
}

.shadow {
    filter: drop-shadow(0 0 1px rgba(0, 0, 0, 0.8)) drop-shadow(0 0 1px rgba(0, 0, 0, 0.8));
}

#fullscreenToggle .icon {
  position: absolute;
  right: 8px;
  top: 8px;
  z-index: 1;
  display: none;
  width: 40px;
  height: 40px;
}

body.fullscreen-enabled #fullscreenToggle .icon.on {
  display: none;
}
body.fullscreen-enabled #fullscreenToggle .icon.off {
  display: block;
}
body.fullscreen-enabled #fullscreenToggle.enabled .icon.on {
  display: block;
}
body.fullscreen-enabled #fullscreenToggle.enabled .icon.off {
  display: none;
}

/* swell: on-screen joystick for avatar / walk mode (see static/potree/js/avatar_joystick.js).
   Created and toggled from JS; visible only while avatar mode is active. */
#avatarJoystick {
    position: fixed;
    left: 28px;
    bottom: 28px;
    width: 132px;
    height: 132px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.28);
    border: 2px solid rgba(255, 255, 255, 0.55);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
    z-index: 1000;
    touch-action: none;        /* the JS handles the gesture itself */
    user-select: none;
    -webkit-user-select: none;
}
#avatarJoystickKnob {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 58px;
    height: 58px;
    margin: -29px 0 0 -29px;   /* centre on the base */
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
    transition: transform 0.05s linear;
    pointer-events: none;      /* the base captures the pointer */
}

/* the FOV does nothing in orthographic: the page's slider and the sidebar's (the page sets the body class) */
.camera-ortho .fov-block,
.camera-ortho li:has(> #sldFOV) {
    display: none !important;
}
