* {
  margin: 0;
  padding: 0;
  touch-action: manipulation; /* disable double-tap zoom global */
}

.light-theme {
  --color-ligth: #fbf8f1;
  --color-base: #e9dac1;
  --color-main: #54bab9;
  --color-text: white;
  --corner: 17px;
  --shutter-width: 90px;
  --carousel-width: 40px;
}

html,
body,
.container {
  height: 100%;
  width: 100%;
}

body {
  margin: 0;
  padding: 0;
  background: var(--color-base);
  color: var(--color-text);
  font-family: sans-serif;
  -webkit-touch-callout: none; /* prevent callout to copy image, etc when tap to hold */
  -webkit-text-size-adjust: none; /* prevent webkit from resizing text to fit */
  -webkit-user-select: none;
}

.fullheight {
  height: calc(var(--vh, 1vh) * 100);
}

.card {
  display: flex;
  background-image: linear-gradient(120deg, #84fab0 0%, #8fd3f4 100%);
  width: 100%;
}

.card-cortners {
  -webkit-clip-path: polygon(
    var(--corner, 10px) 0%,
    calc(100% - var(--corner, 10px)) 0%,
    100% var(--corner, 10px),
    100% calc(100% - var(--corner, 10px)),
    calc(100% - var(--corner, 10px)) 100%,
    var(--corner, 10px) 100%,
    0% calc(100% - var(--corner, 10px)),
    0% var(--corner, 10px)
  );
  clip-path: polygon(
    var(--corner, 10px) 0%,
    calc(100% - var(--corner, 10px)) 0%,
    100% var(--corner, 10px),
    100% calc(100% - var(--corner, 10px)),
    calc(100% - var(--corner, 10px)) 100%,
    var(--corner, 10px) 100%,
    0% calc(100% - var(--corner, 10px)),
    0% var(--corner, 10px)
  );
}

.card-main {
  position: relative;
  height: 90%;
  overflow: visible;
}

button {
  -webkit-touch-callout: none; /* prevent callout to copy image, etc when tap to hold */
  -webkit-text-size-adjust: none; /* prevent webkit from resizing text to fit */
  -webkit-user-select: none;
  user-select: none;
}

.button-take-photo {
  background-color: transparent;
  border-radius: 100%;
  border: 6px solid var(--color-ligth);
  height: var(--shutter-width);
  opacity: 0.7;
  position: relative;
  width: var(--shutter-width);
}

.button-take-photo-inside {
  width: calc(var(--shutter-width) - 20px);
  height: calc(var(--shutter-width) - 20px);
  border-radius: 100%;
  background-color: var(--color-ligth);
  position: absolute;
  margin: auto;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
}

.button-take-photo:active {
  opacity: 0.97;
}

.controls-shutter {
  width: 50%;
  height: var(--shutter-width);
  position: absolute;
  z-index: 99;
  height: 10%;
  margin: 0 auto;
  left: 0;
  right: 0;
  bottom: 5%;
  text-align: center;
  content: "";
}

.button-open-photos {
  position: absolute;
  width: var(--carousel-width);
  height: var(--carousel-width);
  border-radius: 10px;
  border: 0px solid white;
  top: 0;
  bottom: 0;
  margin: auto 0;
  left: -10px;
}

.button-close-photo {
  position: absolute;
  width: var(--carousel-width);
  height: var(--carousel-width);
  border-radius: 10px;
  background-color: transparent;
  border: 0px solid white;
  top: 20px;
  bottom: 0;
  right: 20px;
}

.button-close-photo:active {
  background-color: rgba(250, 250, 250, 0.2);
}

.button-close-photo:hover {
  opacity: 1;
}
.button-close-photo:before,
.button-close-photo:after {
  position: absolute;
  content: " ";
  height: 33px;
  width: 2px;
  top: 2px;
  background-color: var(--color-ligth);
}
.button-close-photo:before {
  transform: rotate(45deg);
}
.button-close-photo:after {
  transform: rotate(-45deg);
}

/* Show button only when img has a photo. */
#photo:not([src]) + .button-close-photo {
  display: none;
}

.video-container {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
.video-container #cam,
.video-container #photo {
  /* Make video to at least 100% wide and tall */
  min-width: 100%;
  min-height: 100%;

  /* Setting width & height to auto prevents the browser from stretching or squishing the video */
  width: auto;
  height: auto;

  /* Center the video */
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.bottom {
  top: 5%;
  position: relative;
}
