/* 1. RESET/NORMALIZE */
html, body, h1, h2, h3, p, ul, ol, img {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
}

/* 2. GLOBAL STYLES */
html, body { 
    font-family: 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif;
    font-size: 17px;
    color: white;
    height: 100%;
    overflow: hidden;
}
body {
    background: #9DB8A9;
}

#loading-indicator {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(#9DB8A9,#121513);
}

.loader {
    width: 50px;
    aspect-ratio: 1;
    border-radius: 50%;
    border: 8px solid;
    border-color: #fff #0000;
    animation: l1 1s infinite;
}
@keyframes l1 {to{transform: rotate(.5turn)}}

#container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    /* aspect-ratio: 4/3;     */ 
}
#scene-container {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(#9DB8A9,#121513);
}

#info-panel {
    position: absolute;
    top: 0px;
    right: 0px;
    width: 348px;
    height: 100%;
    overflow: visible;
    border-left: 1px solid rgba(255, 255, 255, 0.25);
    box-sizing: border-box;
    transition: transform 0.4s ease;
    background: linear-gradient(#9DB8A9E3,#121513E3);
}

#info-view {
    height: 100%;
    display: flex;
    flex-direction: column;
}

#info-page-container {
    flex-grow: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    /* background-color: #ff000080; */
    mask-image: linear-gradient(to bottom, black 90%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 90%, transparent 100%);
}

#info-button-bar {
    flex: 0 0 88px;
    width: 100%;
    height: 88px;
    display: flex;
    align-items: center;
}

#next-button {
    flex: 1;
    touch-action: none;
}
#prev-button {
    flex: 1;
    touch-action: none;
}

#close-button {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    padding: 0;
}
.home-button-bar {
    position: absolute;
    top: 20px;
    left: 12px;
    display: flex;
}
#home-button .label {
    min-width: 75px;
}

#center-model-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    touch-action: none;
    transition: opacity .4s ease;
}

.icon-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    color: #ffffff;
    cursor: pointer;
    touch-action: none;
}

.icon-button:active .icon {
    opacity: 1.0;
}
@media (hover: hover) and (pointer: fine) {
    .icon-button:hover .icon {
        opacity: 1.0;
    }
}
  
.icon-button .icon {
    width: 47px;
    height: 30px;
    opacity: 0.89;
}

.icon.large {
    width: 64px;
    height: 64px;
}

.icon-button .label {
    padding-top: 8px;
    font-size: 17px;
    font-weight: bold;
    text-transform: uppercase;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.6);
    
}

.label.large {
    padding-top: 24px;
}

/* The gradient overlay for the left edge */
.panel-shadow {
    position: absolute;
    top: 0;
    left: -25px;
    width: 25px;
    height: 100%;
    pointer-events: none;      /* So this layer doesn't block clicks */
    background: linear-gradient(
      to left, 
      rgba(0, 0, 0, 0.12) 0%,
      rgba(0, 0, 0, 0) 100%
    );
}

.poi-counter {
    font-weight: bold;
    font-size: 16px;
    padding: 20px;
}

.poi-title {
    font-weight: bold;
    font-size: 32px;
    padding: 32px 20px 20px 20px;
}

#poi-content p {
    font-weight: normal;
    font-size: 18px;
    padding: 0px 20px 20px 20px;
    line-height: 26px;
}

#poi-content img {
    width: 100%;
    height: auto;
    padding: 0px 0px 20px 0px;
}

#target-view {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
    transition: opacity .4s ease;
}

.target {
    width: 320px;
    height: 320px;
}

#tour-button {
    position: absolute;
    top: 20px;
    right: 20px;
    min-width: 340px;
    transition: opacity 0.4s ease;
    touch-action: none;
}

#instruction-view {
    position: absolute;
    top: 88px;
    right: 20px;
    width: 340px;
    pointer-events: none;
    transition: opacity .4s ease;
}

#instruction-view p {
    font-weight: bold;
    font-size: 17px;
    line-height: 22px;
    padding: 0 8px 0 8px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.6);
}

#lang-button-bar {
    position: absolute;
    left: 20px;
    bottom: 20px;
    display: flex;
    align-items: flex-start;
}


#about-button-bar {
    position: absolute;
    right: 20px;
    bottom: 20px;
    display: flex;
    align-items: flex-end;
}

#log-button {
    touch-action: none;
}

#log-view {
    position: absolute;
    left: 20px;
    bottom: 88px;
    /* pointer-events: none; */
    touch-action: none;
}



.bc-button {
    height: 48px;
    padding: 0 22px;
    border-radius: 24px;
    background-color: rgba(255, 255, 255, 0.89);
    color: black;
    border: none;
    cursor: pointer;
    font-size: 17px;
    font-weight: bold;
    text-transform: uppercase;
    touch-action: none;
}

.bc-button:active {
    background-color: rgba(255, 255, 255, 1.0);
}
@media (hover: hover) and (pointer: fine) {
    .bc-button:hover {
        background-color: rgba(255, 255, 255, 1.0);
    }
}

.bc-button.text-button {
    color: rgba(255, 255, 255, 0.89);
    background-color: transparent;
}
.bc-button.text-button:active {
    color: rgba(255, 255, 255, 1.0);
    background-color: transparent;
}
@media (hover: hover) and (pointer: fine) {
    .bc-button.text-button:hover {
        color: rgba(255, 255, 255, 1.0);
        background-color: transparent;
    }
}

.bc-button.lang {
    background-color: transparent;
    color: #ffffff;
}
.bc-button.lang.selected {
    background-color: rgba(255, 255, 255, 0.89);
    color: #000000;
}
.bc-button.lang:active, .bc-button.lang.selected:active {
    background-color: rgba(255, 255, 255, 1.0);
    color: #000000;
}
@media (hover: hover) and (pointer: fine) {
    .bc-button.lang:hover, .bc-button.lang.selected:hover {
        background-color: rgba(255, 255, 255, 1.0);
        color: #000000;
    }
}


.bc-button.next {
    position: relative; 
    padding-right: 38px;
}

.bc-button.next::after {
    content: "";
    position: absolute;
    top: 0px;
    right: 12px;
    width: 24px;
    height: 100%;
    background: url("icons/icon_next.svg") no-repeat center / 24px 24px;
    pointer-events: none;
}

.bc-button.external {
    position: absolute;
    right: 0;
    bottom: 0;
    border-radius: 24px 0 0 0;;
    padding-right: 45px;
}

.bc-button.external::after {
    content: "";
    position: absolute;
    top: 0px;
    right: 12px;
    width: 24px;
    height: 100%;
    background: url("icons/arrow.up.right.circle.fill.svg") no-repeat center / 24px 24px;
    pointer-events: none;
}

.bc-button.prev {
    position: relative; 
    padding-left: 38px;
}

.bc-button.prev::after {
    content: "";
    position: absolute;
    top: 0px;
    left: 14px;
    width: 24px;
    height: 100%;
    background: url("icons/icon_prev.svg") no-repeat center / 24px 24px;
    pointer-events: none;
}

.bc-button.close {
    position: relative; 
    padding: 0;
}

.bc-button.close::after {
    content: "";
    position: absolute;
    top: 0px;
    left: 0px;
    width: 100%;
    height: 100%;
    background: url("icons/icon_close.svg") no-repeat center / 24px 24px;
    pointer-events: none;
}

.light-button {
    background-color: rgba(225, 225, 225, 0.80);
}
.light-button:active {
    background-color: rgba(225, 225, 225, 1.0);
}
@media (hover: hover) and (pointer: fine) {
    .light-button:hover {
        background-color: rgba(225, 225, 225, 1.0);
    }
}

.light-button.next {
    position: relative;
    padding: 0;
}

.light-button.prev {
    position: relative;
    padding: 0;
}

/* Context Panel */

#context-panel {
    position: absolute;
    left: 50%;
    transform: translate(-50%, -50%);
    height: 85%;
    width: 80%;
    min-width: 920px;
    min-height: 680px;
    transition: top 0.4s ease;
}

#context-close-button, #context-next-button, #context-prev-button, #impressum-close-button {
    width: 48px;
    height: 48px;
}

.context-page-header {
    position: absolute;
    top: 0px;
    left: 0px;
    width: 100%;
    display: flex;
    align-items: center;
}

.context-page {
    position: relative;
    height: 100%;
}

.context-page-content {
    width: 100%;
    height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.panel {
    background-color: #ffffff;
    border-radius: 24px;
    color: #000000;
}

.panel p {
    font-weight: normal;
    font-size: 18px;
    padding: 0px 24px 24px 24px;
    line-height: 26px;
}

.panel img {
    display: block;
    width: 100%;
    height: auto;
    padding: 0px 24px 24px 0px;
}

.panel-title {
    font-size: 32px;
    font-weight: bold;
    padding: 24px 24px 24px 24px;
}

/* Impressum Panel */

#impressum-panel {
    position: absolute;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 820px;
    height: 680px;
    transition: top 0.4s ease;
}

#impressum-images img {
    display: block;
    width: 100%;
    height: auto;
    padding: 0px 60px 60px 60px;
}

/* Barrier View */
#barrier-view {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.25);
    transition: opacity .4s ease;
}

.disabled {
    pointer-events: none; /* Prevent clicks */
    opacity: 0.5; /* Visual indication */
}


/* animation states */
.fadein {
    opacity: 1.0;
    pointer-events: inherit;
}
.fadeout {
    opacity: 0.0;
    pointer-events: none;
}
.panel-visible {
    transform: translateX(0%);
}
.panel-hidden {
    transform: translateX(100%);
}
.context-panel-visible {
    top: 50%;
}
.context-panel-hidden {
    top: -100%;
}

