:not(:defined) > * {
  display: none;
}

html,
body {
    margin: 0;
    height: 100%;
    overflow: hidden;
}

body {
    width: 100%;
    height: 100%;
    margin: 0;
    overflow: hidden;
    position: absolute;
    top: 0;
    left: 0;
}

model-viewer {
    width: 100%;
    height: 100%;
    background-color: #141414;
}

#card {
    margin: 3em auto;
    display: flex;
    flex-direction: column;
    max-width: 600px;
    border-radius: 6px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

.buttons-container {
    position: absolute;
    bottom: 10%;
    left: 0;
    display: flex;
    flex-direction: row;
    justify-content: center;
    width: 100%;
    gap: 2rem;
}

#playButton,
#recordingButton,
#stopRecordingButton {
    z-index: 99999;
    box-sizing: border-box;
    width: 60px;
    height: 60px;
    border: none;
    border-radius: 50%;
    padding: 12px 24px;
    padding-bottom: 0px;
    background-color: rgba(0, 123, 255);
    background-repeat: no-repeat;
    background-position: center;
    background-size: 40px 40px;
}

#playButton {
    background-image: url(./assets/white-play-256.png);
}

#recordingButton {
    display: none;
    background-image: url(./assets/record.png);
}

.recording-border {
    -webkit-animation-name: ripple 2s infinite;
    animation: ripple 2s infinite;
    background: rgba(0, 123, 150, 0.5);
    width: 100%;
    padding: 0;
    width: 40px;
    height: 40px;
    border-radius: 100%;
    margin: 0;
}

.text-container {
    display: none;
    position: absolute;
    z-index: 99999;
    top: 10%;
    left: 0;
    padding: 0.5em;
    color: white;
    background-color: rgba(0, 0, 0, 0.25);
    font-size: 1.2rem;
    font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
}

@keyframes ripple {
    0% {
        transform: scale(2);
    }

    50% {
        transform: scale(3);
        opacity: 0.4;
    }

    100% {
        transform: scale(2);
    }
}

#stopRecordingButton {
    display: none;
    justify-content: center;
    padding: 0;
    align-items: center;
    background-image: url(./assets/stop.png);
}

#playButton:hover {
    background: rgba(0, 0, 0, 0.2) url(./assets/white-play-256.png) center
        no-repeat;
    background-size: 40px 40px;
}

.attribution {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    margin: 1em;
}

.attribution h1 {
    margin: 0 0 0.25em;
}

.attribution img {
    opacity: 0.5;
    height: 2em;
}

.attribution .cc {
    flex-shrink: 0;
    text-decoration: none;
}

footer {
    display: flex;
    flex-direction: column;
    max-width: 600px;
    margin: auto;
    text-align: center;
    font-style: italic;
    line-height: 1.5em;
}

#request-press-play {
    position: absolute;
    width: 40%;
    height: 40px;
    margin: 0 auto 0 auto;
    top: 20%;
    left: 0;
    right: 0;
    z-index: 1000;
}

#request-press-play button {
    padding: 20px;
    margin: 5px;
    border-radius: 0px;
    font-size: 20px;
    width: 100%;
}

.hide {
    display: none;
}

#overlay {
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #00000099;
}

.buttons-container,
.text-container {
    display: none;
}

model-viewer[ar-status="object-placed"] .buttons-container,
model-viewer[ar-status="object-placed"] .text-container,
model-viewer[ar-status="session-started"] .buttons-container,
model-viewer[ar-status="session-started"] .text-container {
    display: flex !important;
}

.progress-bar {
  display: block;
  width: 33%;
  height: 10%;
  max-height: 2%;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate3d(-50%, -50%, 0);
  border-radius: 25px;
  box-shadow: 0px 3px 10px 3px rgba(0, 0, 0, 0.5), 0px 0px 5px 1px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.9);
  background-color: rgba(0, 0, 0, 0.5);
}

.progress-bar.hide {
  visibility: hidden;
  transition: visibility 0.3s;
}

.update-bar {
  background-color: rgba(255, 255, 255, 0.9);
  width: 0%;
  height: 100%;
  border-radius: 25px;
  float: left;
  transition: width 0.3s;
}

#ar-button {
  background-image: url(ar_icon.png);
  background-repeat: no-repeat;
  background-size: 20px 20px;
  background-position: 12px 50%;
  background-color: #fff;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  bottom: 16px;
  padding: 0px 16px 0px 40px;
  font-family: Roboto Regular, Helvetica Neue, sans-serif;
  font-size: 14px;
  color:#4285f4;
  height: 36px;
  line-height: 36px;
  border-radius: 18px;
  border: 1px solid #DADCE0;
}

#ar-button:active {
  background-color: #E8EAED;
}

#ar-button:focus {
  outline: none;
}

#ar-button:focus-visible {
  outline: 1px solid #4285f4;
}

@keyframes circle {
  from { transform: translateX(-50%) rotate(0deg) translateX(50px) rotate(0deg); }
  to   { transform: translateX(-50%) rotate(360deg) translateX(50px) rotate(-360deg); }
}

@keyframes elongate {
  from { transform: translateX(100px); }
  to   { transform: translateX(-100px); }
}

model-viewer > #ar-prompt {
  position: absolute;
  left: 50%;
  bottom: 60px;
  animation: elongate 2s infinite ease-in-out alternate;
  display: none;
}

model-viewer[ar-status="session-started"] > #ar-prompt {
  display: block;
}

model-viewer > #ar-prompt > img {
  animation: circle 4s linear infinite;
}