/* Base Styles for all Stream UI elements */
@import './quick-navi.css?v=0.0.2';
@import './selection.css?v=1.1.8';
@import './offcanvas.css?v=1.0.0';

/* TODO: Remove this once we have a proper font */
@import url('https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,100;0,300;0,400;0,700;0,900;1,100;1,300;1,400;1,700;1,900&display=swap');
@import url('https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.css');

html,
body {
    overscroll-behavior-x: none;
}

#vise-stream-wrapper {
    --vise-border-radius: 8px;
    --vise-color-bg-main-ui: gray;
    --vise-color-main-ui: white;

    /* Only px, rem, vw, vh */
    --vise-off-canvas-small-width: calc(var(--vise-base) *25);
    --vise-off-canvas-large-width: calc(var(--vise-base) *50);
    /* Scale --vise-base based on container width: minimum 8px, maximum 20px, scales with viewport width */
    --vise-base: calc(var(--vise-rendered-size) * 0.01);
    /* Current rendered width of the wrapper element */
    --vise-rendered-size: 100%;
}

/* Main Container */
#vise-stream-wrapper {
    position: relative;
    width: 100%;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    aspect-ratio: 1920 / 1080;
}

#vise-stream-wrapper.keep-ratio.fullscreen {
    --vise-off-canvas-small-width: 20vw;
    --vise-off-canvas-large-width: 50vw;
    /* --vise-base: 0.8vw; */
}

.vise-stream-container * {
    font-family: 'Lato', sans-serif !important;
    box-sizing: border-box;
    font-weight: 400 !important;
    line-height: 1.3 !important;
}
#vise-stream-wrapper img{
    border-style: none;
    vertical-align: top;
    max-width: 100%;
    height: auto;
}




#vise-stream-wrapper.keep-ratio:fullscreen {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

#vise-stream-wrapper.keep-ratio.fullscreen .vise-stream-container {
    width: min(100vw, 100vh * 16/9);
    aspect-ratio: 16/9;
    height: auto;
}

.vise-stream-container,
.vise-video-container {
    position: relative;
    height: 100%;
    width: 100%;
    background: #1a1a1a;
}

/* BUSS Virtual Machine Experience UI */

.vise-main-ui-top-left,
.vise-main-ui-bottom-left,
.vise-main-ui-bottom-center,
.vise-main-ui-left-center {
    position: absolute;
}

.vise-main-ui-top-left {
    top: calc(var(--vise-base) * 2);
    left: calc(var(--vise-base) * 2);
    z-index: 1000;
    display: grid;
    z-index: 2000;
    grid-template-columns: 1fr 1fr;
    gap: calc(var(--vise-base) * 1);
}

.vise-main-ui-bottom-left {
    bottom: calc(var(--vise-base) * 2);
    left: calc(var(--vise-base) * 2);
    z-index: 1000;
    display: flex;
    flex-direction: row;
    align-items: center;
}

.vise-main-ui-left-center {
    left: calc(var(--vise-base) * 2);
    transform: translateY(-50%);
    z-index: 1000;
    display: flex;
    top: 50%;
    flex-direction: column;

}

.vise-main-ui-left-center .vise-action-item{
    backdrop-filter: blur(10px);
}

.vise-main-ui-bottom-center {
    bottom: calc((var(--vise-base) * 3) - (var(--vise-base) *1.5));
    left: 50%;
    transform: translateX(  round(up,  -50% ,2px));
    display: flex;
    height: calc( var(--vise-base) * 3);
    color: var(--vise-color-main-ui);
    flex-direction: row;
    background: rgb(255 255 255 / 70%);
    backdrop-filter: blur(10px);
    border-radius: calc(var(--vise-base) * 0.5);
}
.vise-main-ui-bottom-center .vise-action-item {
    border-radius: 0;
}
    

.vise-action-item {
    padding: var(--vise-base);
    margin-top: calc(var(--vise-base) * 0.5); 
    margin-bottom: calc(var(--vise-base) * 0.5); 
    display: flex;
    color: #4C4C4C;
    align-content: center;
    justify-content: center;
    background: rgb(255 255 255 / 70%);
    border-color: #E0E0E0;
    position: relative;
    border-radius: calc(var(--vise-base) * 0.5);
    cursor: pointer;
}

.vise-main-ui-bottom-center .vise-action-item{
    margin-top: 0;
    margin-bottom: 0;
    background: none;
}

.vise-main-ui-bottom-center .vise-action-item.selected::after,
.vise-main-ui-bottom-center .vise-action-item.hover::after {
    content: '';
    z-index: -1;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border-right: 1px gray solid;
    background: linear-gradient(to bottom, #0067A6 0%, #004874 50%, #002B45 100%);
    left: 0;
    width: 100%;
    border-radius: calc(var(--vise-base) * 0.5);
    height: calc( 100% + 20px);
}
.vise-main-ui-bottom-center .vise-action-item::before {
    content: '';
    z-index: -1;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border-right: 1px gray solid;
    right: 0;
    width: 100%;
    height: 50%;
}
.vise-main-ui-bottom-center .vise-action-item:last-child::before {
    display: none;
}


.vise-action-item:first-child {
    /* border-top-left-radius: calc(var(--vise-base) * 0.5); */
    /* border-left: none; */
    /* border-bottom-left-radius: calc(var(--vise-base) * 0.5); */
}

.vise-action-item:last-child {
    /* border-top-right-radius: calc(var(--vise-base) * 0.5); */
    /* border-bottom-right-radius: calc(var(--vise-base) * 0.5); */
}



.vise-action-item.hover,
.vise-action-item.selected {
    background: linear-gradient(to bottom, #0067A6 0%, #004874 50%, #002B45 100%);
    color: white !important;
}

.vise-main-ui-bottom-center .vise-action-item.hover,
.vise-main-ui-bottom-center .vise-action-item.selected{
    background: none;
}


.vise-action-item.active {
    background: #584a4a;
}

.vise-ui-contact-btn,
.vise-scene-selection-btn,
.vise-ui-quick-navi,
.vise-ui-help-btn,
.vise-ui-full-screen-btn,
.vise-ui-usage-help {
    position: relative;
    cursor: pointer;
    color: var(--vise-color-main-ui);
    margin-top: 0;
    background: rgb(255 255 255 / 70%);
    border: 1px solid rgba(255, 255, 255, 0.5);
    width: calc(var(--vise-base) * 2);
    height: calc(var(--vise-base) * 2);
    backdrop-filter: blur(10px);
    display: flex;
    padding: calc(var(--vise-base) * 0.5);
    border-radius: calc(var(--vise-base) * 0.5);
}

.vise-ui-usage-help {
    margin-left: var(--vise-base);
    width: auto;
}

.vise-ui-usage-help img {
    padding-left: var(--vise-base);
    border-left: 1px solid white;
    margin-left: var(--vise-base);
}

.vise-ui-usage-help img:first-child {
    border-left: none;
    margin-left: 0;
    padding-left: 0;
}

.vise-ui-contact-btn img,
.vise-scene-selection-btn img,
.vise-quick-navi-trigger img,
.vise-ui-help-btn img,
.vise-ui-full-screen-btn img,
.vise-ui-usage-help img {
    width: 100%;
    height: 100%;
    filter: invert(44%) sepia(0%) saturate(0%) hue-rotate(90deg) brightness(98%) contrast(91%);
}

.vise-main-ui-top-left>div:first-child {
    width: calc(var(--vise-base) * 3);
    height: calc(var(--vise-base) * 3);
}

.vise-action-item-text {
    font-size: calc(var(--vise-base) * 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    font-weight: unset;
    white-space: nowrap;
}

.vise-main-ui-top-left svg {
    width: calc(var(--vise-base) * 2);
    height: calc(var(--vise-base) * 2);
    color: gray;
    transition: color 0.3s ease;
}

.vise-ui-help-btn {
    justify-self: flex-end !important;
}

.vise-ui-contact-btn {
    align-self: flex-end !important;
}

.vise-quick-navi-trigger {
    background: none !important;
    border: none !important;
    /* padding: 0 !important; */
    margin-top: 0 !important;
    width: 100%;
    padding: calc(var(--vise-base) * 0.5);
    display: flex;
}
.vise-ui-quick-navi.expanded .vise-quick-navi-trigger{
   visibility: hidden;
}
.vise-action-item-icon-active,
.vise-action-item-icon{
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-content: center;
    align-items: center;
}
.vise-action-item-icon-active img,
.vise-action-item-icon img{
    height: var(--vise-base) !important;
    /* display: block; */
}

.vise-action-item-icon-active{
    display: none;
}

.selected .vise-action-item-icon-active,
.hover .vise-action-item-icon-active{
    display: flex;
}
.selected .vise-action-item-icon,
.hover .vise-action-item-icon{
    display: none;
}



.vise-off-canvas-col-wrapper {
    display: flex;
    flex-direction: row;
    gap: var(--vise-base);
    justify-content: space-between;
}

.vise-off-canvas-row-wrapper {
    display: flex;
    flex-direction: column;
    gap: var(--vise-base);
}

.vise-off-canvas-row-wrapper.center {
    align-items: center;
}

.vise-off-canvas-col-wrapper.center {
    justify-content: center;
}

.v-10 {
    width: 10%;
}

.v-20 {
    width: 20%;
}

.v-30 {
    width: 30%;
}

.v-40 {
    width: 40%;
}

.v-50 {
    width: 50%;
}

.v-60 {
    width: 60%;
}

.v-70 {
    width: 70%;
}

.v-80 {
    width: 80%;
}

.v-90 {
    width: 90%;
}

.vise-ui-full-screen-btn, .vise-ui-usage-help, .vise-ui-contact-btn, .vise-ui-quick-navi{
    backdrop-filter: blur(10px);
}

.vise-main-ui-left-center .vise-action-item.hover{
    background: #F18700ed;
}

/* Screensaver Styles */
.vise-screensaver {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.vise-screensaver video{
    width: 100%;
    height: 100%;
    background: black;
}

.vise-help-arrow {
    z-index: -1;
    display: none;
    position: absolute;
    bottom: 0;
    pointer-events: none;
    right: 0;
    width: calc(var(--vise-base) * 35);
    transform: translate(100%, 100%);
}
.vise-help-arrow img {
    filter: none;
}

#settingsBtn{
    opacity: 0;
}