/* * ==================================== Font ==================================== */
.title {
  color: #0083ca;
  font-family: "Noto Sans TC", sans-serif;
  font-weight: bold;
  font-size: 40px;
  padding-bottom: 24px;
}
@media screen and (max-width: 480px), (max-height: 480px) {
  .title {
    font-size: 24px;
    padding-bottom: 16px;
  }
}

.text {
  color: #000000;
  font-family: "Noto Sans TC", sans-serif;
  font-weight: 500;
  font-size: 24px;
}
@media screen and (max-width: 480px), (max-height: 480px) {
  .text {
    font-size: 18px;
  }
}

.hints {
  color: #000000;
  font-family: "Noto Sans TC", sans-serif;
  font-weight: 500;
  font-size: 16px;
}
@media (orientation: landscape) {
  .hints {
    display: none;
  }
}

.code {
  color: #0083ca;
  font-family: "Noto Sans TC", sans-serif;
  font-weight: bold;
  font-size: 60px;

  padding: 24px;
}

/* * ================================= Container ================================= */
.Min-Height {
  min-height: 100vh;
  min-height: 100dvh; /* new browsers */
}

.container {
  text-align: center;
  display: flex;
  justify-content: center;
  max-width: 1024px;
}

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 16px;
}

.row > * {
  padding-right: 0;
  padding-left: 0;
}
@media (orientation: portrait) {
  .row {
    grid-template-columns: 1fr;
  }
}

.footer {
  bottom: 0;
  left: 0;
  right: 0;
  padding: 5% 5% 10% 5%;
}
@media screen and (max-width: 480px) {
  .footer {
    position: fixed;
  }
}

.take-photo-page-footer {
  z-index: 999;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 5% 5% 10% 5%;
  position: fixed;
}
@media (max-height: 480px) and (orientation: landscape) {
  /* .frame-wrapper {
    height: 100vh;
    height: 100dvh;
  } */
  .take-photo-page-footer {
    top: 50%;
    transform: translateY(-50%) !important;
    padding: 0%;
    position: fixed;
    align-self: center !important;
    left: auto;
    bottom: auto;
  }
}
@media (min-height: 481px) and (orientation: landscape) {
  /* .frame-wrapper {
    height: 100vh;
    height: 100dvh;
  } */
  .take-photo-page-footer {
    padding: 0%;
    position: fixed;
    align-self: center !important;
  }
}

.flex-column-takephoto {
  flex-direction: column !important;
}
/* @media (max-height: 480px) and (orientation: landscape) {
  .flex-column-takephoto {
    flex-direction: initial !important;
  }
} */

/* * ================================== Padding ================================== */
.padding-top-5 {
  padding-top: 5%;
}

.padding-RL-5 {
  padding: 0% 5%;
}

/* * ================================== Button ================================== */
.button {
  background-color: #0083ca;
  color: #ffffff;
  font-family: "Noto Sans TC", sans-serif;
  font-weight: bold;
  font-size: 18px;
  padding: 16px;
  border: solid 2px #0083ca;
  border-radius: 100px;
  transition: background-color 0.3s, transform 0.3s;
  width: 100%;
  text-decoration: none !important;
}
.button:hover,
.button:active {
  background-color: #005a8a;
  transform: scale(0.97);
}

.image-button {
  width: 144px;
  display: inline-block;
  text-decoration: none;
  transition: all 0.3s ease;
}
.image-button:hover {
  transform: scale(0.9);
  filter: brightness(80%);
}

.image-button:active {
  transform: scale(0.8);
  filter: brightness(60%);
}

.button-text {
  display: block;
  text-align: center;
  color: #0083ca;
  font-family: "Noto Sans TC", sans-serif;
  font-weight: bold;
  font-size: 20px;
  padding-bottom: 16px;
  margin-top: -8px;
  text-decoration: none;
}
@media (orientation: landscape) {
  .button-text {
    display: none;
  }
}

.button-container {
  display: flex;
  z-index: 2;
  justify-content: center;
  align-items: center;
  padding-bottom: 40px;
}
.button-container a {
  width: 50%;
  margin: 0px 4px;
}

.button-white {
  flex: 1;
  width: calc(50% - 4px); /* 50% width with 4px spacing */
  background-color: #ffffff;
  color: #0083ca;
  font-family: "Noto Sans TC", sans-serif;
  font-weight: bold;
  font-size: 18px;
  padding: 16px;
  border: solid 2px #0083ca;
  border-radius: 100px;
  transition: background-color 0.3s, transform 0.3s;
  text-decoration: none !important;
  margin-right: 4px;
}
.button-white:hover,
.button-white:active {
  background-color: #005a8a;
  transform: scale(0.97);
  color: #ffffff;
}

.button-blue {
  flex: 1;
  width: calc(50% - 4px); /* 50% width with 4px spacing */
  background-color: #0083ca;
  color: #ffffff;
  font-family: "Noto Sans TC", sans-serif;
  font-weight: bold;
  font-size: 18px;
  padding: 16px;
  border: solid 2px #0083ca;
  border-radius: 100px;
  transition: background-color 0.3s, transform 0.3s;
  text-decoration: none !important;
  margin-left: 4px;
}

.button-blue:hover,
.button-blue:active {
  background-color: #005a8a;
  transform: scale(0.97);
}

/* * =================================== Image ================================== */
.logo {
  width: 30%;
}
@media screen and (max-width: 480px), (max-height: 480px) {
  .logo {
    width: 160px;
  }
}
@media screen and (max-height: 480px) {
  .take-photo-page .logo {
    display: none;
  }
}

.custom-bg {
  background-image: url("../images/bg-pattern.png"),
    linear-gradient(#dbf2ff, #f6fcff);
  background-size: 195px, auto;
  background-repeat: repeat;
  background-position: center;
  background-attachment: fixed;
}

.icon img {
  width: 64px !important;
  padding: 0px 8px;
}
@media screen and (max-width: 480px), (max-height: 480px) {
  .icon img {
    width: 40px !important;
    padding: 0px 8px;
  }
}

.banner {
  width: 100%;
  padding: 16px 0px;
}
@media screen and (max-height: 480px) {
  .banner {
    width: 60%;
    padding: 0px;
  }
}
.image-border {
  z-index: 2;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 2px solid white;
}

.frame {
  width: 100%;
  height: 100%;
  position: relative;
  top: 0;
  left: 0;
  border: 8px solid white;
  border-left: none;
  border-right: none;
}
.frame-wrapper {
  width: 100%;
  overflow: hidden;
  margin: 0 auto;
  position: relative;
}
#videoElement.userFacing {
  transform: translate(-50%, -50%) rotateY(180deg);
}
.video-portrait {
  height: auto;
  width: 100%;
}
.video-landscape {
  height: 100%;
  width: auto;
}
#videoElement {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: -1;
}
#facereg {
  max-width: 100%;
  width: 100%;
}
#countdown {
  position: absolute;
  left: 50%;
  top: 50%;
  display: inline-block;
  transform: translate(-50%, -50%);
  transition: 1s;
  font-size: 0vw;
  font-weight: 700;
  opacity: 80%;
  color: #fff;
  text-shadow: 0px 1px 1px #211d30;
}

@media (max-height: 480px) and (orientation: landscape) {
  .frame-wrapper {
    aspect-ratio: 1.5;
    max-height: 100vh;
    max-height: 100dvh; /* new browsers */
    width: auto;
    object-fit: contain;
    padding-top: 0%;
    border: 0px;
    margin: 0 auto;
  }
  .image-border {
    border: none;
  }
}
@media (min-height: 481px) and (orientation: landscape) {
  .frame-wrapper {
    width: 80%;
    margin: 0 auto;
    margin-top: 24px;
    padding-top: 0%;
  }
  .image-border {
    border: 2px solid white;
  }
}
@media (max-height: 480px) and (orientation: landscape) {
  #facereg {
    max-height: 100vh;
    max-height: 100dvh; /* new browsers */
    max-width: 100vw;
  }
}
.choose-image-container {
  display: inline-block;
  position: relative;
  cursor: pointer;
}

.choose-image {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  transition: all 0.3s ease;
}

.choose-image-container.clicked .choose-image {
  outline: 10px solid #ffffff;
  box-shadow: 0px 8px 24px rgba(0, 0, 0, 0.5);
  border-radius: 8px;
  margin: 0px 0px 32px 0px;
}

.choose-image-container.clicked .date-overlay {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 14px;
  color: rgba(0, 0, 0, 0.16);
}

.choose-image-container:not(.clicked) .choose-image {
  outline: 2px solid #9daaba;
  background-color: rgba(0, 0, 0, 0.5);
  border-radius: 8px;
  margin: 0px 0px 32px 0px;
  filter: brightness(0.7);
}

.choose-image-container:not(.clicked) .date-overlay {
  display: none;
}

/* * =================================== Pop-up ================================== */

#overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #00000090;
  z-index: 999;
  display: none;
  transition: opacity 0.3s ease;
}

#popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.5);
  background-color: #ffffff;
  border-radius: 16px;
  padding: 16px 0px 0px 0px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  display: none;
  transition: transform 0.3s ease, opacity 0.3s ease;
  z-index: 1;
  width: 85vw;
  max-height: 90%; /* Set a maximum height for the popup */
  overflow-y: auto; /* Enable vertical scrolling */
}

.popup-text-box {
  display: grid;
  padding: 16px 24px 0px 24px;
}

.popup-text-box .text {
  padding-bottom: 24px;
}

.popup-content {
  text-align: center;
}

.popup-header {
  height: 48px;
  padding-bottom: 16px;
  text-align: end;
}
#downloadBtnA {
  display: flex;
}
.popup-header span {
  color: #8d8d8d;
  font-family: "Noto Sans TC", sans-serif;
  font-weight: bold;
  font-size: 16px;
  padding: 24px;
}

.popup-header img {
  padding-left: 8px !important;
}

.popup-image {
  text-align: center;
}

.popup-image img {
  width: 100%;
}
.popup-buttons {
  display: flex;
  justify-content: space-between;
  padding-top: 16px;
}

.button-col {
  width: 50%;
}

#overlay.active {
  display: block;
}
.hidden {
  display: none;
}
#popup.active {
  transform: translate(-50%, -50%) scale(1);
  display: block;
  z-index: 1000;
}

@media (orientation: landscape) {
  #popup.active {
    transform: translate(-50%, -50%) scale(1);
    display: block;
    z-index: 1000;
    width: 70vw;
  }
}

#printOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #00000000;
  z-index: 999;
  display: none;
  transition: opacity 0.3s ease;
}

#printOverlay.active {
  display: block;
}

#printPopup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.5);
  background-color: #ffffff;
  border-radius: 16px;
  padding: 16px 0px 40px 0px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  display: none;
  z-index: 1;
  width: 85vw;
  max-height: 90%; /* Set a maximum height for the popup */
  overflow-y: auto; /* Enable vertical scrolling */
}

#printPopup.active {
  transform: translate(-50%, -50%) scale(1);
  display: block;
  z-index: 1000;
}
