@font-face {
  font-family: "Body";
  src: url("/assets/Tenon-Regular.woff2");
}

html {
  position: fixed;
  top: -60px;
  width: 100vw;
  height: 100vh;
  font-family: "Body", sans-serif;
  background-color: #fff;
  overflow: hidden;
}

body {
  min-width: 430px;
  height: 932px;
  padding: 0;
  margin: 0;
  overflow: hidden;
}

html,
body {
  overscroll-behavior: none;
  -webkit-overflow-scrolling: auto;
}

* {
  -webkit-user-select: none !important;
  -webkit-touch-callout: none !important;
  -webkit-tap-highlight-color: transparent !important;
}

#status-bar-bg {
  position: fixed;
  top: -env(safe-area-inset-top);
  left: 0;
  right: 0;
  width: 100vw;
  height: calc(env(safe-area-inset-top) + 7.5%);
  transition: background-color 0.22s ease;
  transition-delay: 0.01s;
  background-color: #f9fcfa;
  z-index: 9999;
}

.design-mode #status-bar-bg {
  background-color: red;
}

#design-mode {
  position: fixed;
  top: 10px;
  right: 0;
  width: 25px;
  height: 50px;
  background-color: rgba(0, 0, 0, 0.01);
  z-index: 10000;
}

.design-mode #design-mode {
  background-color: rgba(255, 0, 0, 0.3);
}

.design-mode .preview-field {
  outline: 1px dashed red;
}

.image-added #input,
.image-added #input-bg {
  display: none;
}

#password-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: #fff;
  display: flex;
  opacity: 1;
  z-index: 10000;
}

.popup-visible #password-overlay {
  background-color: #7d7e7d;
}

#password-title {
  margin-top: 30vh;
  width: 100%;
  text-align: center;
  font-size: 40px;
  color: #fff;
  -webkit-text-stroke: 0.7px #fff;
  margin-bottom: 20px;
}

#password {
  width: 120px;
  height: 80px;
  padding: 0 30px;
  margin: 0 auto;
  border: 1px solid #bbb;
  border-radius: 10px;
  font-size: 30px;
  font-family: monospace;
  outline: none;
  text-align: left;
  letter-spacing: 30px;
  transition: all 0.3s ease-in-out;
  overflow: hidden;
}
#password:focus {
  outline: 2px solid #01615f;
}

.unlocked #password-overlay {
  display: none;
}

.locked * {
  pointer-events: none;
  opacity: 0;
}
.locked #password-overlay,
.locked #password-overlay * {
  display: block;
  opacity: 1;
  pointer-events: auto;
}

/*
 * Preview
 */

#input {
  position: fixed;
  width: 0;
  height: 0;
  opacity: 0;
}
#input-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #fff;
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
#input-bg-image {
  position: fixed;
  top: -60px;
  left: 0;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  object-position: center;
  filter: blur(10px);
  opacity: 0.1;
  z-index: 1;
}

.input-bg-button {
  width: 200px;
  height: 50px;
  border-radius: 10px;
  background-color: #01615f;
  color: #fff;
  font-size: 14px;
  font-weight: bold;
  z-index: 1001;
}

#preview-top {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100vw;
  filter: brightness(1.718);
}

#preview-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100vw;
  height: 67.5vh;
  object-fit: cover;
  object-position: bottom;
}

.preview-field {
  position: absolute;
  min-width: 100px;
  color: #2a3434;
  background: #fff;
  transform: translateY(5px);
  padding: 5px 1px;
  font-size: 3.6vw;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#preview-date {
  bottom: 118vw;
  left: 37px;
}

#preview-time {
  bottom: 118vw;
  right: 37px;
  text-align: right;
  min-width: 200px;
}

#preview-title {
  bottom: 103.5vw;
  left: 37px;
  min-width: 250px;
  max-width: 250px;
}

#preview-total {
  bottom: 103.5vw;
  right: 37px;
  text-align: right;
}

.swiped #preview-success {
  opacity: 1;
  pointer-events: all;
}

#preview-success {
  position: fixed;
  top: 60vw;
  left: 50%;
  transform: translateX(-50%);
  width: 92vw;
  height: 380px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease-in-out;
  transition-delay: 0.7s;
}

#preview-success-top-cover {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 50px;
  background-color: #fff;
  z-index: 10;
}
#preview-success-top-title {
  position: absolute;
  top: 1px;
  left: -3px;
  width: calc(100% + 6px);
  padding: 10px 0px;
  text-align: center;
  -webkit-text-stroke: 0.7px #fff;
  font-size: 15px;
  color: #fff;
  border-radius: 20px 20px 0px 0px;
  background: #01615f;
  outline: 1px solid #01615f;
  z-index: 20;
}
#preview-success-bottom-cover {
  position: absolute;
  top: 30vh;
  left: 0;
  width: 100%;
  height: 10vh;
  background-color: #fff;
  border-radius: 0px 0px 30px 30px;
  z-index: 10;
}
#preview-success-bottom-cover2 {
  position: absolute;
  top: 34vh;
  left: -5%;
  width: 110%;
  height: 31vh;
  background-color: #fcfaf7;
  z-index: 10;
}

#preview-success-border {
  position: absolute;
  top: 40px;
  left: 0;
  width: 100%;
  height: 30vh;
  outline: 4px solid #01615f;
  border-radius: 20px;
  z-index: 11;
}

#preview-success-border-left {
  position: absolute;
  top: 38px;
  left: -4px;
  width: calc(100% + 8px);
  height: 20px;
  background-color: #01615f;
  z-index: 11;
}
#preview-success-border-right {
  position: absolute;
  top: 41.5px;
  left: 0;
  width: 100%;
  height: 20px;
  border-radius: 100px 100px 0px 0px;
  background-color: #fff;
  z-index: 11;
}

#picked-up-icon {
  width: 20px;
  height: 20px;
  margin-top: -3.5px;
  margin-right: 5px;
  vertical-align: middle;
}

/*
 * Popup
 */

.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  transition-delay: 0.045s;
  z-index: 2000;
}

.popup-visible .popup-overlay {
  opacity: 1;
  pointer-events: auto;
}

.popup {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100vw;
  max-width: 500px;
  height: 47vh;
  background: #fff;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  border-radius: 17px 17px 0 0;
  overflow: hidden;
  pointer-events: none;
  transition: transform 0.2s ease-in-out;
  transform: translateY(100%);
  z-index: 2001;
}

@media (min-width: 431px) {
  .popup {
    height: 45.7vh;
  }
}

.popup-visible .popup {
  pointer-events: auto;
  transform: translateY(0);
}

#popup-bg {
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  height: calc(100% - 22px);
  object-fit: cover;
  object-position: bottom;
}

#popup-close {
  position: absolute;
  top: 0;
  right: 0;
  width: 80px;
  height: 70px;
}

/*
 * Swipe
 */

#swipe {
  position: absolute;
  bottom: 12.5vw;
  width: 300px;
  height: 60px;
  left: 50%;
  transform: translateX(-50%) scale(1.01);
  border: 2px solid #01615f;
  border-radius: 100px;
  background-color: #fff;
  overflow: hidden;
  z-index: 100;
}
#swipe label {
  display: block;
  width: 100%;
  height: 100%;
  margin-top: -2px;
  margin-left: 25px;
  line-height: 60px;
  text-align: center;
  font-size: 15px;
  font-weight: bold;
  color: #01615f;
  -webkit-text-stroke: 0.7px #01615f;
  opacity: 0.9;
  letter-spacing: 0.5px;
  transition: opacity 0.3s ease-in-out;
}
#swipe #handle {
  position: absolute;
  top: 0;
  left: 0;
  width: 60px;
  height: 60px;
  background-color: #01615f;
  border-radius: 100px;
  cursor: pointer;
  z-index: 10;
}
#swipe #handle-bg {
  position: absolute;
  top: 0;
  left: 0px;
  width: 0px;
  height: 60px;
  background-color: #01615f;
  border-radius: 100px;
  pointer-events: none;
}
#swipe #handle svg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-52%, -50%);
  width: 43px;
  height: 43px;
  fill: #fff;
}

/* Success */

#success {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 100%;
  height: 45vw;
  opacity: 0;
  pointer-events: none;
  background-color: #fff;
  transition: all 0.1s ease-in-out;
  z-index: 100;
}
.swiped #success {
  opacity: 1;
  pointer-events: all;
  transition: all 0.6s ease-in-out;
  transition-delay: 0.1s;
}
#successContainer {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: all 1s ease-in-out;
  position: relative;
}
.swiped #successContainer {
  opacity: 1;
  transition: all 0.6s ease-in-out;
  transition-delay: 0.5s;
}
#success #check {
  position: relative;
  margin-top: 10px;
  width: 60px;
  height: 60px;
  background-color: #01615f;
  border-radius: 100%;
}
#success #check svg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.5) rotate(-50deg);
  width: 40px;
  height: 40px;
  fill: #fff;
  opacity: 0;
}
.swiped #success #check svg {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1) rotate(0deg);
  transition: all 1s ease-in-out;
  transition-delay: 0.5s;
}

.pulse:before {
  content: "";
  position: absolute;
  top: 15px;
  left: 50%;
  margin-left: -25px;
  width: 50px;
  height: 50px;
  animation: pulse 3s infinite linear;
  background-color: #01615f;
  border-radius: 100%;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 0;
  }
  70% {
    transform: scale(1.6);
    opacity: 0.3;
  }
  100% {
    transform: scale(2);
    opacity: 0;
  }
}

#success #successLabel {
  margin-top: 20px;
  font-size: 17px;
  -webkit-text-stroke: 0.9px #01615f;
  color: #01615f;
  letter-spacing: 0px;
}
#success #successDesc {
  width: 100%;
  margin-top: 10px;
  font-size: 14px;
  color: #999;
  line-height: 20px;
  text-align: center;
}
