body {
  margin: 0;
  padding: 0;
  overflow: hidden;
}

#canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
}
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: linear-gradient(to top, #000000c9 0%, transparent 20%);
  z-index: 999; /* Se necessário, para garantir que o overlay fique acima de outros elementos */
}


.poweredbysnap-logo {
  width: auto; /* Set to auto to avoid stretching */
  position: absolute; /* Position relative to the viewport */
  bottom: -10px; /* Adjust to desired distance from the bottom*/
  left: 10px; /* Adjust to desired distance from the left */
  display: flex;
  align-items: center;
  justify-content: flex-start; /* Align content within the element to the left */
  z-index: 1001;
}

.poweredbysnap-logo > img {
  width: 20vw;
}

#controls {
  position: absolute;
  bottom: 5%;
  width: 100%;
  display: flex;
  justify-content: center;
  z-index: 999;
  display: none;
}

#outline {
  position: absolute;
  bottom: 10%;
  left: 50%;
  transform: translateX(-50%);
  height: var(--button-size, 100px); /* Default for mobile */
  width: var(--button-size, 100px);
  border: none;
  z-index: 900;
  opacity: 0.5;
  transition: background-color 0.2s ease;
}

#record-button {
  position: absolute;
  bottom: 10%;
  left: 50%;
  transform: translateX(-50%);
  height: var(--button-size, 100px); /* Default for mobile */
  width: var(--button-size, 100px);
  background-image: url(assets/RecordButton.png);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: transparent;
  border-radius: 50%;
  border: none;
  z-index: 1000;
  transition: background-color 0.2s ease;
}

#record-button.pressed {
  background-color: green; /* Change to green when pressed */
  content: "Recording..."; /* Optionally add text */
}

/* Contêiner que envolve todos os botões */
#action-buttons-container {
  position: fixed; /* Mantém fixo na parte inferior */
  bottom: -5%;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 1000;
  width: 80vw; /* Mesma largura do fundo preto */
  height: 25vh; /* Mesma altura do fundo preto */
}

/* Fundo branco arredondado para cobrir os botões */
#action-buttons-bg {
  position: absolute;
  width: 80vw;
  height: 25vh;
  background-color: white; /* Mesmo estilo do pop-up */
  border-radius: 15px;
  /* box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2); */
  background-color: black;
  z-index: -1; /* Mantém o fundo atrás dos botões */
}

/* Alinha os botões de download e compartilhar horizontalmente */
#action-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  z-index: 1001;
  padding-top: 15px;
}

/* Posiciona o botão de voltar abaixo dos outros */
#back-button-container {
  position: absolute;
  top: 15px; /* Ajuste fino para posicionamento vertical */
  left: 15px; /* Ajuste fino para posicionamento horizontal */
  margin-top: 0; /* Remove a margem anterior */
  z-index: 1001;
}

/* Estilização dos botões */
#share-button, #download-button, #back-button {
  height: 50px;
  width: 50px;
  background-color: transparent;
  border: none;
  cursor: pointer;
}

/* Ajusta tamanho das imagens dentro dos botões */
#share-button img, #download-button img, #back-button img {
  max-width: 100%;
  max-height: 100%;
}


#back-button {
  transform: none;
  background-color: transparent;
  height: 50px;
  width: 50px;
  color: transparent;
  border: none;
  cursor: pointer;
  user-select: none;
  outline: none;
  padding: 0%;
  transition: transform 0.15s ease-in-out;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}
#back-button img {
  /* Add this if your button uses an image */
  max-width: 100%;
  max-height: 100%;
  height: auto;
}

#back-button:active {
  transform: translate(2px, 2px);
}

#share-button {
  height: 70px;
  width: 70px;
  background-color: transparent;
  transform: translate(-50%, 0);
  color: transparent;
  border: none;
  cursor: pointer;
  user-select: none;
  outline: none;
  padding: 0%;
  transition: transform 0.15s ease-in-out;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}

#share-button img {
  max-width: 100%;
  max-height: 100%;
  height: auto;
}

#share-button:active {
  transform: translate(calc(-25% + 2px), 2px);
}

#download-button {
  height: 70px;
  width: 70px;
  background-color: transparent;
  /* transform: translate(50%, 0); */
  color: transparent;
  border: none;
  cursor: pointer;
  user-select: none;
  outline: none;
  padding: 0%;
  transition: transform 0.15s ease-in-out;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}

#download-button img {
  max-width: 100%;
  max-height: 100%;
  height: auto;
}

#download-button:active {
  transform: translate(0px, calc(10% - 2px));
}

#switch-cam {
  position: absolute;
  top: 3%;
  right: 5%;
  z-index: 950;
}

#switch-button {
  height: 45px;
  width: 45px;
  background-image: url(assets/SwitchButton.png);
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  background-color: transparent;
  border: none;
  user-select: none;
  outline: none;
  transition: transform 0.2sease;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  position: absolute;
  right: 25px;
  bottom: 25px;
  z-index: 1000;
  color: white;
}

#switch-button:active {
  transform: scale(5%, 5%); /* Only scale without affecting translation */
}

#loading {
  position: absolute;
  top: 40%;
  left: 40%;
  z-index: 900;
  display: none; /* Hidden by default */
}

#loading-icon {
  height: 80px;
  width: 80px;
  animation: spin 2s linear infinite; /* Apply the spin animation */
}

#mode-toggle {
  position: absolute;
  bottom: 65px;
  left: 25px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toggle-button {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  opacity: 0.6;
  transition: all 0.3s ease;
  width: 40px;
  height: 40px;
}
/* 
.toggle-button.active {
  transform: scale(1.25);
  opacity: 1;
} */

.toggle-button img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

#terms-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.829); /* Fundo preto com opacidade */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  font-family: Arial, sans-serif;
}

.popup-content {
  background-color: rgb(255, 255, 255);
  padding: 10px 15px 10px 15px;
  width: 90%; /* Ajuste para dispositivos móveis */
  max-width: 500px; /* Aumenta a largura máxima */
  text-align: center;
  max-height: 30%; /* Limita a altura para não ocupar toda a tela */
  overflow-y: auto; /* Se o conteúdo for maior, cria uma barra de rolagem */
}



.popup-content h2 {
  margin-bottom: 30px;
  font-size: 12px;
  color: rgb(0, 0, 0);
  font-family: "Montserrat", serif;
}

.popup-content p {
  font-size: 20px;
  margin-bottom: 20px;
  color: rgb(0, 0, 0);
  font-weight: normal;
  font-family: "Montserrat", serif;
}
.popup-content a {
color: rgb(147, 194, 255);
font-weight: bold;
}
.popup-content button {
  margin: 10px;
  padding: 12px 20px;
  font-size: 16px;
  cursor: pointer;
  border: none;
  /* border-radius: 5px; */
  transition: background-color 0.3s;
}

#accept-button {
  background-color: #000000;
  color: rgb(255, 255, 255);
}

#deny-button {
  background-color: #ffffff;
  color: rgb(0, 0, 0);
  outline-width: thin;
  font-weight: bold;
  outline-style: inset;
  outline-color: black;
}

.popup-content {
  width: 90%;
  max-width: 60vw; /* Ajusta para ocupar uma parte maior da tela */
}

.popup-content h2 {
  font-size: 19px;
}

.popup-content p {
  font-size: 12px;
}

.popup-content button {
  padding: 12px 18px;
  font-size: 13px;
}
/* Keyframes for the rotation */
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Desktop-specific styles */
.desktop #outline,
.desktop #record-button {
  height: 70px;
  width: 70px;
}

.desktop #share-button {
  height: 70px;
  width: 70px;
}

.desktop #download-button {
  height: 70px;
  width: 70px;
}

.desktop #back-button {
  height: 50px;
  width: 50px;
}

/* Hide switch button on desktop */
.desktop #switch-cam {
  display: none;
}


/* #share-button, #download-button {
  background-color: white;
  border-radius: 15px;
  padding: 10px;
  box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2);
  transition: background-color 0.3s ease, transform 0.2s ease;
}

#share-button:hover, #download-button:hover {
  background-color: #f1f1f1;
}

#share-button:active, #download-button:active {
  transform: scale(0.95);
} */

#camera-error-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  z-index: 9999;
  visibility: visible; /* Garante que esteja visível */
}

#camera-error-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: black;
  z-index: 9998;
}

#camera-error-text {
  position: relative;
  color: white;
  font-family: "Montserrat", sans-serif;
  font-size: 20px;
  line-height: 1.5;
  text-align: center;
  max-width: 80%;
  z-index: 10000;
  padding: 20px;
}

