@import url('https://fonts.googleapis.com/css2?family=Prompt&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Thai&display=swap');

a {
  text-decoration: none;
  color: #575757;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Prompt';
  justify-content: center;
  align-items: center;
  text-align: center;
  transition: ease-in-out 0.5s;
}

body {
  display: flex;
  padding: 0 10px;
  min-height: 100vh;
  align-items: center;
  background: #f1efef;
  justify-content: center;
}

.wrapper,
.wrapper2 {
  height: 100%;
  max-width: 600px;
  width: 90%;
  background-image: linear-gradient(to right, #fffef0, #f0fbff);
  border-radius: 29px;
  padding: 20px ;
  transition: height 0.2s ease;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: width 0.5s ease, height 0.5s ease;
  transition: ease-in-out 0.5s;
}

.wrapper.active,
.wrapper2.active {
  height: 100%;
  padding-bottom: 20px;
  padding-top: 20px;
  padding-left: 20px;
  padding-right: 20px;
  transition: width 0.5s ease, height 0.5s ease;
  transition: ease-in-out 0.5s;
}

header h1 {
  font-size: 21px;
  font-weight: 500;
}

header p {
  margin-top: 5px;
  color: #575757;
  font-size: 16px;
}

.controls {
  display: flex;
  justify-content: space-around;
  margin-top: 20px;
}

button {
  padding: 10px;
  font-size: 16px;
  cursor: pointer;
  background-color: #4caf50; /* Green */
  color: white;
  border: none;
  border-radius: 5px;
}

button:hover {
  background-color: #45a049; /* Darker green on hover */
}

#switch-camera {
  margin-right: 10px;
}

#toggle-flashlight {
  margin-left: 10px;
}

.fa-camera,
.fa-flashlight {
  margin-right: 5px;
}

#button-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
}

#button {
  background-image: linear-gradient(to right, #d8ffc7, #bdf6ff);
  padding: 10px;
  font-size: 16px;
  cursor: pointer;
  color: rgb(0, 0, 0);
  border: none;
  border-radius: 5px;
  width: 100%;
  margin: 10px 0 10px 0;
  transition: background-image ease-in-out 0.3s;
}

#button:hover {
  background-image: linear-gradient(to right, #4dff00, #00ddff);
  transition: background-image ease-in-out 0.3s;
}

.qr-code {
  opacity: 0;
  display: flex;
  padding: 33px 0;
  border-radius: 5px;
  align-items: center;
  pointer-events: none;
  justify-content: center;
  border: 1px solid #ccc;
}

.wrapper.active .qr-code {
  opacity: 1;
  pointer-events: auto;
  transition: opacity 0.5s 0.05s ease;
}

.qr-code img {
  width: 100%; /* Responsive image */
  max-width: 170px; /* Adjust the max-width as needed */
}

.popup {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}

.popup-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

.close {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 20px;
  cursor: pointer;
}
.wrapper :where(input){
  width: 100%;
  height: 55px;
  border: none;
  outline: none;
  border-radius: 5px;
  transition: 0.1s ease;
  margin-top: 20px;
  }
  .wrapper input{
  font-size: 18px;
  padding: 0 17px;
  border: 1px solid #d1d1d1;
  }
  .wrapper input:focus{
  box-shadow: 0 3px 6px rgba(0,0,0,0.13);
  }
  .wrapper input::placeholder{
  color: #999;
  }