@font-face {
    font-family: SkodaNextRegular;
    src: url(fonts/SKODANext-Regular.ttf);
}

@font-face {
    font-family: SkodaNextBold;
    src: url(fonts/SKODANext-Bold.ttf);
}

@keyframes pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

@keyframes infinite-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

model-viewer {
    width: 100%;
    height: 100%;
    position: fixed;
    opacity: 1;
    transition: opacity .5s ease-in;
    -moz-transition: opacity .5s ease-in;
    -webkit-transition: opacity .5s ease-in;
}

html {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    background-color: black;
    touch-action: none;
}

body {
    color: #002E53;
    margin: 0;
    font-family: SkodaNextRegular;
    user-select: none;
}

#landscape-warning {
    display: none;
}

#loading-view {
    display: block;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000000;
    background: rgb(28,88,73,0.6);
    color: white;
    font-family: SkodaNextRegular;
    text-align: center;
    padding-top: 5em;
    font-weight: 100;
    display: flex;
    justify-content: center;
    flex-direction: column;
}

#loading-view span {
    margin-bottom: 5em;
}

#loading-view-background {
display: block;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgb(28,88,73);
    background: radial-gradient(circle, rgba(28,88,73,1) 0%, rgba(14,58,47,1) 100%);
}

#loading-view #placeholder {
    background-image: url('images/loading-placeholder.svg');
    background-repeat: no-repeat;
    background-position-x: center;
    background-position-y: center;
    height: 7em;
    width: 80%;
    margin-left: auto;
    margin-right: auto;
    background-size: contain;
    margin-bottom: 4em;
    animation: pulse 2s ease-in-out infinite;
}

#loading-view #spinner {
    background-image: url('images/loading-spinner.svg');
    background-repeat: no-repeat;
    background-position-x: center;
    background-position-y: center;
    height: 2em;
    width: 2em;
    margin-left: auto;
    margin-right: auto;
    animation: infinite-spin 1.5s linear infinite;
}

.round-button {
    border-radius: 5em;
    width: 4.4em;
    height: 4.4em;
    background-color: #F1F1F1;
    border: 0;
    background-repeat: no-repeat;
    background-size: auto;
    background-position: 50% 50%;
}

#enter-button {
    background-color: #78FAAE;
    padding: 1em;
    padding-left: 1.5em;
    padding-right: 1.5em;
    font-family: SkodaNextBold;
    border: 0;
    border-radius: 2em;
    margin: auto;
    margin-top: 3em;
    margin-bottom: 10em;
    font-size: 1em;
    color: #0E3A2F;
    display: none;
}

#ar-button {
    background-image: url('images/icon-fullscreen.svg');
    background-color: #78FAAE;
    position: fixed;
    right: 2em;
    bottom: 2em;
}

#doors-button {
    background-image: url('images/icon-doors.svg');
    position: fixed;
    left: 2em;
    bottom: 2em;
}

#doors-button.disabled {
    opacity: 0.7;
}

#toggle-buttons {
    position: fixed;
    bottom: 1.8em;
    left: 50%;
    transform: translateX(-50%);
    background-color: #FFFFFF88;
    border-radius: 2em;
    width: 13em;
    display: flex;
    backdrop-filter: blur(24px);
}

#toggle-buttons button {
    height: 2.5em;
    flex: 1;
    font-size: 1em;
    background-color: transparent;
    color: black;
    font-family: SkodaNextRegular;
    display: inline-block;
    border: .15em solid transparent;
}

#toggle-buttons button.selected {
    background-color: white;
    border: .15em solid #161718;
}

#variant-buttons {
    position: fixed;
    bottom: 6em;
    height: 3em;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    width: 12em;
    flex-direction: row;
    overflow-x: scroll;
    scroll-snap-type: x mandatory;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    z-index: 10;
    border-radius: 2em;
    align-items: center;
}

#variant-arrow-buttons {
    position: fixed;
    bottom: 6em;
    left: 50%;
    transform: translateX(-50%);
    background-color: #F1F1F1;
    border-radius: 2em;
    width: 17em;
    height: 3em;
}

.variant div {
    background: rgb(255,255,255);
    background: linear-gradient(135deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0) 12%, rgba(255,255,255,0.5) 31%, rgba(255,255,255,0) 47%);
}

#variant-arrow-buttons button {
    height: 3em;
    width: 3em;
    background-color: transparent;
    border-radius: 4em;
    font-family: SkodaNextBold;
    display: inline-block;
    border: 1px solid transparent;
    position: absolute;
    top: 0;
    bottom: 0;
    margin-top: auto;
    margin-bottom: auto;
    z-index: 100;
}

#variant-buttons::-webkit-scrollbar {
    display: none;
}

#variant-buttons button{
    height: 3em;
    width: 3em;
    background-color: transparent;
    border-radius: 4em;
    font-family: SkodaNextBold;
    display: inline-block;
    border: 1px solid transparent;
    margin: .25em;
}

#variant-buttons button.variant div {
    position: relative;
    width: 2.4em;
    height: 2.4em;
    border-radius: 2.4em;
    background-color: red;
    left: 50%;
    transform: translateX(-50%);
}

#variant-buttons button.selected{
    background-color: #E8FFF1;
    border: 1px solid #419468;
}

#arrow-left {
    background-image: url('images/icon-left.svg');
    left: 0.5em;
}

#arrow-left.disabled {
    background-image: url('images/icon-left-disabled.svg');
}

#arrow-right {
    background-image: url('images/icon-right.svg');
    right: 0.5em;
}

#arrow-right.disabled {
    background-image: url('images/icon-right-disabled.svg');
}

#ar-button.safari-ar-placeholder {
    background-image: url('images/icon-fullscreen-disabled.svg');
    background-color: #F1F1F1;
    display: none;
}

#safari-warning {
    display: block;
    background-color: white;
    color: #161718;
    font-family: SkodaNextRegular;
    text-align: center;
    bottom: 9em;
    position: fixed;        
    padding: .5em;
    padding-left: 1em;
    padding-right: 1em;
    border-radius: .4em;
    left: 50%;
    transform: translate(-50%, -50%);
    height: 2em;
    white-space: nowrap;
    opacity: 0;
    transition: opacity .5s ease-in;
    -moz-transition: opacity .5s ease-in;
    -webkit-transition: opacity .5s ease-in;
    align-content: center;
    pointer-events: none;
}

#cta-link {
    color: white;
    text-decoration: none;
    position: fixed;
    top: 2em;
    left: 2em;
    font-family: SkodaNextBold;
}

#car-change-button {
    position: fixed;
    right: 2em;
    top: 2.1em;
    width: 9.5em;
    height: 3em;
    background: none;
    border: 2px solid white;
    font-family: SkodaNextBold;
    color: white;
    background-image: url('images/icon-car.svg');
    background-repeat: no-repeat;
    background-position-x: 10%;
    background-position-y: center;
    text-align: right;
    padding-right: 1.25em;
    font-size: .75em;
    background-color: #0002;
    backdrop-filter: blur(10px);
}

#cta-button {
    position: fixed;
    left: 2em;
    top: 2.1em;
    width: 7em;
    height: 3em;
    background: none;
    border: 2px solid white;
    font-family: SkodaNextBold;
    color: white;
    font-size: .75em;
    background-color: #0002;
    backdrop-filter: blur(10px);
}

#car-change-view {
    position: fixed;
    width: 100%;
    height: 100%;
    z-index: 1000;
    background-color: #000000F2;
    backdrop-filter: blur(10px);
    padding-top: 2em;
    text-align: center;
    display: none;
}

#car-change-view h1 {
    font-size: 1.5em;
    font-family: SkodaNextBold;
    color: white;
    font-weight: unset;
    text-align: left;
    padding-left: 1.25em;
}

#car-change-view button {
    font-size: 1em;
    color: white;
}

#car-change-view .car-button {
    width: calc(100% - 2.25em);
    background-color: #37383A;
    border: 2px solid #37383A;
    border-radius: 0.2em;
    font-family: SkodaNextBold;
    font-size: 1.4em;
    height: 6em;
    padding-top: 2.75em;
    margin-bottom: 1em;
    background-repeat: no-repeat;
    background-size: 12em;
    background-position-x: center;
    background-position-y: 0em;
}

#car-change-view .car-button.selected {
    border: 2px solid #78FAAE;
}

#car-change-view #confirm-button {
    background-color: #78FAAE;
    height: 3em;
    font-family: SkodaNextBold;
    padding-left: 1.5em;
    padding-right: 1.5em;
    width: auto;
    color: #0E3A2F;
}

#car-change-view #close-button {
    font-family: SkodaNextBold;
    background: none;
    position: fixed;
    bottom: 5em;
    height: 3em;
    display: block;
    width: 100%;
}

#landing-page {
    position: fixed;
    height: 100%;
    width: 100%;
    z-index: 10000;
    background: rgb(28,88,73);
    background: radial-gradient(circle, rgba(28,88,73,1) 0%, rgba(14,58,47,1) 100%);
    color: #78FAAE;
    text-align: center;
    justify-content: center;
    flex-direction: column;
    display: flex;
}

#logo {
    background-image: url('images/skoda-immersive.svg');
    width: 18em;
    height: 4.5em;
    background-repeat: no-repeat;
    background-size: contain;
    display: block;
    margin: auto;
    background-position: center;
}

#powered-by-skoda {
    background-image: url('images/powered-by-skoda-alt.svg');
    width: 18em;
    height: 3em;
    background-repeat: no-repeat;
    background-size: contain;
    background-position-x: center;
    position: fixed;
    bottom: 0;
    right: 2em;
}

#qr-code-container {
    border: 1px solid #78FAAE;
    background-color: #78FAAE22;
    width: 12em;
    height: 12em;
    border-radius: 2em;
    display: block;
    margin: auto;
    margin-top: 3em;
    margin-bottom: 3em;
    position: relative;
}

#qr-code-background {
    position: absolute;
    background-color: white;
    top: 1.6em;
    left: 1.6em;
    right: 1.6em;
    bottom: 1.6em;
    border-radius: 0.5em;
    z-index: -10;
    background-color: white;
}

#viewer[ar-status="session-started"] > #toggle-buttons {
    display: none !important;
}

#viewer[ar-status="session-started"] > #variant-buttons {
    display: none !important;
}

#viewer[ar-status="session-started"] > #cta-link {
    display: none !important;
}

#viewer[ar-status="session-started"] > #doors-button {
    display: none !important;
}

#viewer[ar-status="session-started"] > #car-change-button {
    display: none !important;
}

#viewer[ar-status="session-started"] > #variant-arrow-buttons {
    display: none !important;
}

#viewer[ar-status="object-placed"] > #toggle-buttons {
    display: none !important;
}

#viewer[ar-status="object-placed"] > #variant-buttons {
    display: none !important;
}

#viewer[ar-status="object-placed"] > #cta-link {
    display: none !important;
}

#viewer[ar-status="object-placed"] > #doors-button {
    display: none !important;
}

#viewer[ar-status="object-placed"] > #car-change-button {
    display: none !important;
}

#viewer[ar-status="object-placed"] > #variant-arrow-buttons {
    display: none !important;
}

@media only screen and (max-width: 40em) {
    html {
        overflow: hidden;
    }

    #qr-code-container {
        display: none;
    }

    #enter-button {
        display: block;
    }

    #landing-page span {
        display: none;
    }

    #powered-by-skoda {
        margin: auto;
        display: block;
        left: 0;
        right: 0;
        background-image: url('images/powered-by-skoda.svg');
    }
    
    #logo {
        width: 60%;
        height: 4.6em;
    }
    
    #powered-by-skoda {
        width: 60%;
        bottom: 3em;
    }
}

@media screen and (max-height:40em) and (orientation:landscape) {
    #landscape-warning {
        display: block;
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 1000000;
        background: rgb(28,88,73);
        background: radial-gradient(circle, rgba(28,88,73,1) 0%, rgba(14,58,47,1) 100%);
        color: #78FAAE;
        font-family: SkodaNextBold;
        text-align: center;
        padding-top: 5em;
    }
}

* {
    color-scheme: light;
}
