@import url('https://fonts.googleapis.com/css?family=Abel|Archivo+Black|PT+Sans+Black|Saira+Semi+Condensed|Raleway|Crete+Round1111&display=swap');
@import url("./reporter.css");

:root{
  --background-color: rgb(65, 65, 65);
  --accent-color: rgb(28, 101, 159);
  --gradient-inner-color: rgba(200, 200, 200, 0.5);
  --shadow-color: #000;
  --header-image: url('/showcast/src/img/header.png');
  --button-color: #FFF;
  --ar-button-color: rgba(0, 0, 0, 0.6);
  --ar-button-text-color: #FFF;
  --poster-color: rgba(0, 0, 0, 0);
  --splash-screen-logo: url('about:blank');
  --splash-screen-color: rgba(24, 40, 51, 1);
}

html {
    height: 100%;
}

body {
    background: var(--background-color);
    color:var(--button-color);
    font-family:'Raleway',sans-serif;
    font-size: 24px;
    font-weight: 900;
    line-height: 2;
    margin:0;
    height: 100%;
}

a {
    text-decoration: none;
}
button, button:focus {
    font-family: inherit;
    font-weight: inherit;
    outline: none;
}

:focus{
  outline: none;
}

.container {
    justify-content: center;
    width:100%;
    display: flex;
    position: relative;
}

.panel {
    width:80%;
}

.title {
    text-align: center;
    padding:0.5em;
}

#viewer {
    display: block;
    width:100%;
    background: white;
    flex-grow: 1;
    border-radius:1em;

    background: radial-gradient(ellipse closest-corner, var(--gradient-inner-color), var(--background-color));
    border: 1px solid var(--accent-color);
    box-shadow: 0 0 2em var(--shadow-color);
}

#loading-msg {
    display: none;;
}

#root{
  margin: 0 auto;
  flex: 1;
}

#root[state="loading"] #loading-msg {
    display: initial;
}

#error-msg {
    display: none;
}
#root[state="error"] #error-msg {
    display: initial;
}

#display {
    display: none;
}
#root[state="display"] #display {
    display: initial;
}

.copy-link {
    margin-top: 1em;
    width:80%;
    display: flex;
}
.copy-link > button {
    background: black;
    padding: 0.5em;
    border-radius: 0.5em 0 0 0.5em;
    border:none;
    color:white;
    font-size: 1em;
    cursor: pointer;
}
.copy-link > span {
    padding:0.5em;
    flex-grow: 1;
    border-radius:0 0.5em 0.5em 0;
    background: white;
    color:black;
}

.bigger {
    font-size: 2em;
}

.ar-button-container {
    position: absolute;
    width:100%;
    display: flex;
    justify-content: center;
    bottom:0;
}

.ar-button {
    border:none;
    background: var(--ar-button-color);
    color: var(--ar-button-text-color);
    bottom:0;
    margin:0.5em;
    font-size:0.75em;
    border-radius: 0.5em;
    padding: 0.5em;
    border: 1px solid var(--accent-color);
}

.buy-now-button-container {
    position: absolute;
    width:100%;
    display: flex;
    justify-content: center;
    top:0;
    margin-top:env(safe-area-inset-top);
}

.exit-webxr-ar-button{
  margin-top:env(safe-area-inset-top);
}

.buy-now-button {
    min-width:9em;
    border: 1px solid var(--accent-color);
}

.header {
    width: 100%;
    height: 2.5em;
}

@keyframes shimmer{
  0% {background-position: top 0px left -125px;}
  50% {background-position: top 0px right -125px;}
  100% {background-position: top 0px right -125px;}
}

@keyframes shimmer2{
  0% {background-position: top 50% left -125px;}
  50% {background-position: top 50% left -125px;}
  100% {background-position: top 50% right -125px;}
}

.shimmer{
  color: transparent!important;
  background: 0 50% / 125px 200% no-repeat linear-gradient(to bottom right, rgba(255,255,255,0) 40%, rgba(255,255,255,0.25) 50%, rgba(255,255,255,0) 60%), var(--ar-button-color);
  animation-name: shimmer2;
  animation-duration: 4s;
  animation-iteration-count: infinite;
}

.shimmer > span{
  display: block;
  background: 0 0 / 125px 100% no-repeat linear-gradient(to right, var(--ar-button-text-color), var(--accent-color) 50%, var(--ar-button-text-color)),
    var(--ar-button-text-color);
  -webkit-background-clip: text;
  -moz-background-clip: text;
  background-clip: text;
  animation-name: shimmer;
  animation-duration: 4s;
  animation-iteration-count: infinite;
}

#header-image{
  background-image: var(--header-image);
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  position: relative;
  z-index: 2;
}

#warning_container{
  text-align: center;
  line-height: 1.2;
  margin-top: 1em;
  font-size: 60%;
  font-weight: normal;
}

.qr-code-section > #warning_container{
  position: absolute;
  bottom: 50%;
  margin-bottom: calc(114px + 1em);
  width: calc(250px + 4vw);
  margin-left: -2vw;
}

/*#warning_container::before{
  content: "⚠";
  color: #FFA500;
  display: inline-block;
  vertical-align: middle;
  width: 0;
  font-size: 150%;
}*/

@keyframes pulse_border {
  from { filter: drop-shadow(0px 0px 6px var(--button-color)); }
  to { filter: drop-shadow(0px 0px 10px var(--button-color)); }
}

#cinematic-mode-container{
  display: none;
}

.cinematic-mode-toggle-container{
  display: flex;
  padding-top: 10px;
  justify-content: center;
}

.ar-mode-toggle-label{
  font-size: 16px;
}

.ar-mode-toggle-label-on{
  padding-left: 16px;
}

.ar-mode-toggle-label-off{
}

.ar-mode-toggle-label{
  font-size: 16px;
}

.cinematic-mode-text{
  font-size: 16px;
}

.cinematic-mode-warning{
  font-size: 12px;
  white-space: pre-line;
  text-align: center;
  line-height: 1;
  margin-block: 0;
}

/* // Toggle switch */

.toggle-container {
  width: 50px;
  height: 25px;
  padding-inline-start: 10px;
  padding-inline-end: 20px;
}

.toggle-border {
  width: 200px;
  height: 80px;
  border: 2px solid #f0ebeb;
  border-radius: 130px;
  margin-bottom: 45px;
  padding: 25px;
  background: linear-gradient(to bottom right, white, rgba(220,220,220,.5)), white;
  box-shadow: 0 0 0 2px #fbfbfb;
  cursor: pointer;
  transform: scale(0.25);
  transform-origin: top left;
}

.toggle-border:last-child {
  margin-bottom: 0;
}

input[type="checkbox"] {
  display: none;
}

label[for="ar-mode-toggle"] {
  position: relative;
  display: inline-block;
  width: 200px;
  height: 80px;
  background: #d13613;
  border-radius: 80px;
  cursor: pointer;
  box-shadow: inset 0 0 16px rgba(0,0,0,.3);
  transition: background .5s;
}


input[type="checkbox"]:checked + label[for="ar-mode-toggle"] {
  background: #13d162;
}

.handle {
  position: absolute;
  top: -15px;
  left: -5px;
  width: 110px;
  height: 110px;
  border: 1px solid #e5e5e5;
  background: repeating-radial-gradient(circle at 50% 50%, rgba(200,200,200,.2) 0%, rgba(200,200,200,.2) 2%, transparent 2%, transparent 3%, rgba(200,200,200,.2) 3%, transparent 3%), conic-gradient(white 0%, silver 10%, white 35%, silver 45%, white 60%, silver 70%, white 80%, silver 95%, white 100%);
  border-radius: 50%;
  box-shadow: 3px 5px 10px 0 rgba(0,0,0,.4);
  transition: left .4s;
}

input[type="checkbox"]:checked + label[for="ar-mode-toggle"] > .handle {
  left: calc(100% - 110px + 5px);
}
/**/

#warning_container > span{
  vertical-align: middle;
  display: inline-block;
  margin-left: 1.5em;
    -webkit-animation: 0.66666s ease-in-out 0s infinite alternate pulse_border;
    animation: 0.66666s ease-in-out 0s infinite alternate pulse_border;
}

#share-button {
    height: 1.5em;
    width: 1.3em;
    margin: 1em;
    cursor: pointer;

    /* image masking */
    background-color: var(--button-color);
    -webkit-mask-image: url(/showcast/src/img/Share.png);
    mask-image: url(/showcast/src/img/Share.png);

}

.vertical {
    display: flex;
    flex-direction: column;
}

.tall {
    height: 100%;
}

/* Attribution section */

#attribution_container{
  display: flex;
  flex: 0;
  pointer-events: auto;
  z-index: 2;
  position: absolute;
  top: 2.5em;
  margin-top: env(safe-area-inset-top);
}

body.free-cast #attribution_container{
  top: calc(2.5em + 3rem);
}

body.free-cast #root{
  padding-top: 3rem;
}

body.free-cast #scrollNAG{
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
}

@media only screen and (max-height: 500px) {

    #attribution_container{
      top: 1em;
    }
}

#attribution_container.empty{
  display: none;
}

#attribution_container > .toggle_button{
  height: 2.375em;
}

#attribution_container > .toggle_button::before {
  content: "";
  height: 100%;
  vertical-align: middle;
  display: inline-block;
  width: 0;
}

#attribution_container > .toggle_button > img{
  max-height: 36px;
  vertical-align: middle;
}

.attribution_content_container{
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  color: var(--ar-button-text-color);
  width: calc(80vw - 3em);
  pointer-events: none;
}

.open > .attribution_content_container,
.force > .attribution_content_container{
  display: block;
}

#attribution_content{
  display: inline-block;
  border: 1px solid var(--accent-color);
  border-radius: 0 1em 1em 0;
  box-shadow: 0 0 2em var(--shadow-color);
  margin-top: 0.5em;
  background-color: var(--ar-button-color);
  padding: 0.5em;
  font-size:0.75em;
}

#attribution_content > .attribution_section{
  padding: 0.25em 0;
  line-height: 1.5;
}

.attribution_section > .attribution_title,
.attribution_section > .attribution_author{
  font-weight: bold;
  display: inline-block;
}

img.optionButton{
  height:100%;
  display: inline-table;
}

#framerateContainer{
  top: 0.5em;
  width: 2em;
  text-align: right;
  position: absolute;
  pointer-events: none;
  z-index: 5;
  left: 48px;
  filter: drop-shadow(0px 0px 1px var(--shadow-color));
  color: #FFF;
  font-size: 1rem;
}

/* QR code styles */

.qr-code-section{
  display: none;
  text-align: center;
}

.qr-code-section::before{
  content: "";
  display: inline-block;
  width: 0;
  height: 100%;
  vertical-align: middle;
}

#qr-code-container{
  height: 224px;
  width: 224px;
  border: 3px solid #FFF;
  display: inline-block;
  vertical-align: middle;
}

@media only screen and (min-width: 700px){
  body.show-qr-code{
    display: flex;
    flex-direction: row;
  }

  body.show-qr-code > .qr-code-section{
    display: block;
    width: 250px;
    padding-right: 10%;
  }

  body.show-qr-code > .container{
    width: auto;
    flex: 1;
  }
}

/* Navigation button */

#navigation-back{
  height: 2em;
  margin: 2em 0;
  padding: 0.5em;
  border: 1px solid var(--accent-color);
  border-radius: 0.5em;
  z-index: 3;
  font-size: 50%;
  background-color: var(--ar-button-color);
  color: var(--ar-button-text-color);
  display: none;
  max-width: 50%;
}

#navigation-back::before{
  content: "";
  display: inline-block;
  width: 0;
  height: 100%;
  vertical-align: middle;
}

#navigation-back > span{
  vertical-align: middle;
  line-height: 1em;
  display: inline-block;
}

body.show-back #navigation-back{
  display: block;
}

body.show-back #viewer + .container{
  justify-content: space-between;
}

/* Splash screen */
#splashScreen{
  position: absolute;
  z-index: 100;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background-color: var(--splash-screen-color);
  opacity: 1;
  pointer-events: none;
  transition: opacity 2s ease 1s, height 0s linear 3s;
  text-align: center;
  overflow: hidden;
}

#splashScreen::before{
  content: "";
  height: 100%;
  vertical-align: middle;
  display: inline-block;
  width: 0;
}

body.page-loaded #splashScreen.splash-image-loaded{
  opacity: 0;
  height: 0;
}

.splash-screen-image,
.splash-screen-branding{
  pointer-events: none;
  width: 60%;
  height: 60%;
  transition: width 2s ease 1s, height 2s ease 1s, bottom 2s ease 1s, left 2s ease 1s;
  background-image: url('/static/img/SplashScreen/3300.png');
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  position: relative;
  margin: 0;
  padding: 0;
  display: inline-block;
  vertical-align: middle;
}

.splash-screen-image{
  filter: drop-shadow(0 0 0.1px rgba(24, 40, 51, 1));
}

.splash-screen-branding{
  display: none;
  position: relative;
  top: -7.5%;
}

body.hasSplashScreenLogo .splash-screen-branding{
  display: inline-block;
  background-image: var(--splash-screen-logo);
}

body.hasSplashScreenLogo .splash-screen-image{
  position: absolute;
  bottom: 0;
  height: 15%;
  width: 60%;
  left: 20%;
  vertical-align: bottom;
}

body.splashScreenLight .splash-screen-image{
  background-image: url('/static/img/SplashScreen/3300Dark.png');
  filter: drop-shadow(0 0 0.1px rgba(255, 255, 255, 1));
}

body.splash-screen .splash-screen-link{
  pointer-events: auto;
  height: 100%;
  width: 100%;
  position: absolute;
  bottom: 0;
  left: 0;
  transition: bottom 0s 1.25s;
}

body.hasSplashScreenLogo .splash-screen-link{
  height: 15%;
}

@media only screen and (max-height: 500px) {
    .hide-when-short {
        visibility: hidden;
        height:0.5em;
    }

    .panel{
      width: calc(100% - 1em);
    }
}

@media screen and (max-width: 2750px) {
  .splash-screen-image{
    background-image: url('/static/img/SplashScreen/1650.png');
  }

  body.hasSplashScreenLogo.splashScreenLight .splash-screen-image{
    background-image: url('/static/img/SplashScreen/1650Dark.png');
  }
}

@media screen and (max-width: 1834) {
  .splash-screen-image{
    background-image: url('/static/img/SplashScreen/1100.png');
  }

  body.hasSplashScreenLogo.splashScreenLight .splash-screen-image{
    background-image: url('/static/img/SplashScreen/1100Dark.png');
  }
}

@media screen and (max-width: 1375) {
  .splash-screen-image{
    background-image: url('/static/img/SplashScreen/825.png');
  }

  body.hasSplashScreenLogo.splashScreenLight .splash-screen-image{
    background-image: url('/static/img/SplashScreen/825Dark.png');
  }
}

@media screen and (max-width: 1100) {
  .splash-screen-image{
    background-image: url('/static/img/SplashScreen/660.png');
  }

  body.hasSplashScreenLogo.splashScreenLight .splash-screen-image{
    background-image: url('/static/img/SplashScreen/660Dark.png');
  }
}

@media screen and (max-width: 550) {
  .splash-screen-image{
    background-image: url('/static/img/SplashScreen/330.png');
  }

  body.hasSplashScreenLogo.splashScreenLight .splash-screen-image{
    background-image: url('/static/img/SplashScreen/330Dark.png');
  }
}

@media screen and (max-width: 367) {
  .splash-screen-image{
    background-image: url('/static/img/SplashScreen/220.png');
  }

  body.hasSplashScreenLogo.splashScreenLight .splash-screen-image{
    background-image: url('/static/img/SplashScreen/220Dark.png');
  }
}

body.page-loaded .splash-image-loaded .splash-screen-image,
body.page-loaded .splash-image-loaded .splash-screen-branding{
  width: 40%;
  height: 40%;
}

body.page-loaded.hasSplashScreenLogo .splash-image-loaded  .splash-screen-image{
  width: 30%;
  height: 7.5%;
  bottom: 3.75%;
  left: 35%;
}

body.page-loaded .splash-image-loaded .splash-screen-link{
  bottom: 100%;
}
