@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}
html {
  font-size: 62.5%;
}
body {
  height: 100vh;
  width: 100vw;
  background-image: linear-gradient(180deg, #a8d4e6, #f3edda);
  overflow: hidden;
}

/* ==== SCREEN 1 ====== */

.mobile__screen {
  max-width: 500px;
  height: 100vh;
  margin: 0 auto;
  padding: 0px 20px;
  padding-top: 50px;
}

/*===== SLIDER =====*/

.slider__container {
  width: 100%;
}
.slide {
  display: none;
  height: 60vh;
  max-width: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  transition: transform 0.3s linear;
}
.active.slide {
  display: flex;
}
.slide__title h1 {
  font-size: 3rem;
}
.slide__title p {
  color: #25316d;
  font-size: 1.8rem;
  font-weight: 600;
  margin-top: 10px;
}
.slide img {
  width: 75%;
}

/*===== PROGRESS BAR =====*/

.progress__bar {
  position: relative;
  height: 5px;
  width: 100%;
  background-color: #c2e2ff;
  margin-bottom: 2rem;
  border-radius: 10px;
}

.progress__animation {
  width: 0;
  height: 100%;
  background-color: #577399;
  border-radius: 10px;
  transition: all 0.3s linear;
}

.progress__bar .slider__count {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 10;
  height: 100%;
  width: 100%;
  display: flex;
}

.slider__count .count {
  border-left: 5px solid #a8d4e6;
  border-right: 5px solid #a8d4e6;
}
.count:first-child {
  border-left: none;
}
.count:last-child {
  border-right: none;
}
.screen__overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transition: all 0.3s linear;
  z-index: 55;
}
.active.screen__overlay {
  background: rgba(143, 143, 143, 0.4);
}
.screen__bottom {
  position: fixed;
  max-width: 500px;
  width: 100%;
  height: max-content;
  left: 50%;
  bottom: 0;
  background: #fff;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  text-align: center;
  z-index: 99;
  transform: translate(-50%);
}

/*====== NUMBER INPUT ====== */

.input__container {
  display: flex;
  padding: 15px;
  margin: 0px 20px;
  margin-top: 20px;
  background: #f2f3f7;
  border: 2px solid #0582fe;
  border-radius: 10px;
}
.input__flag {
  background: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 10px;
  font-size: 1.8rem;
  font-weight: 600;
  border-radius: 5px;
  box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
  cursor: pointer;
}
.input__flag img {
  height: 20px;
}
.input__number {
  border: none;
  background: transparent;
  padding-left: 20px;
  font-size: 1.8rem;
  font-weight: 600;
  width: 100%;
  outline: none;
  letter-spacing: 2px;
}
.input__number::placeholder {
  letter-spacing: initial;
  color: #d1d3d9;
  font-weight: 500;
}
.text__blue {
  font-weight: 600;
  font-size: 1.6rem;
  color: #0582fe;
  margin: 20px 0px;
}

/* ===== SEND BUTTON ===== */

.btn__send {
  background: #7b91b0;
  position: relative;
  color: #fff;
  display: none;
  opacity: 0;
  height: 50px;
  width: 100%;
  border-radius: 0;
  border-top-left-radius: 5px;
  border-top-right-radius: 5px;
  pointer-events: none;
}
.btn__send span {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.6rem;
}
.btn__send::before {
  position: absolute;
  content: "";
  top: 0;
  left: 0;
  width: var(--afterBack, 0%);
  height: 100%;
  background: #0582fe;
  border-top-left-radius: 5px;
  border-top-right-radius: 5px;
}
.validate.btn__send {
  background: rgba(0, 128, 255, 0.7);
  pointer-events: all;
  cursor: pointer;
}
.active .btn__send {
  display: block;
  opacity: 1;
}

/* ===== CUSTOM KEYPAD ===== */

.keypad {
  max-width: 500px;
  width: 100%;
  display: none;
  opacity: 0;
  grid-template-columns: repeat(3, 1fr);
  background: #d1d3d9;
  padding: 10px;
  padding-bottom: 20px;
  gap: 10px;
  transition: all 0.3s linear;
}
.active .keypad {
  display: grid;
  opacity: 1;
}
button {
  position: relative;
  padding: 10px;
  height: 50px;
  border: none;
  border-radius: 10px;
  background: #fff;
  font-size: 2rem;
  display: grid;
  place-items: center;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s linear;
}
button:active {
  background: #505050;
}
button .letter {
  margin-top: 20px;
  font-size: 1.4rem;
}
button .number {
  position: absolute;
  width: 100%;
  height: 100%;
  padding: 5px;
}
.delete {
  background: transparent;
}
.delete img {
  width: 20px;
}
button:nth-last-child(2) {
  grid-column: 2/3;
}

/* ===== SCREEN 2 ======== */

.screen__2,
.screen2 .screen__1,
.screen2 .input__container,
.screen2 .btn__send,
.screen2 h3.text__blue,
.screen2 .screen__overlay {
  display: none;
}

.screen2 .keypad {
  display: grid;
  opacity: 1;
}
.screen2 .screen__2 {
  display: flex;
  font-size: 1.6rem;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  height: 45vh;
}
.screen__2 h1 {
  font-size: 3rem;
}
.screen__center {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.inputs {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 20px 0px;
}
.inputs input {
  height: 60px;
  width: 40px;
  border-radius: 10px;
  border: 2px solid transparent;
  background: #a8d4e6;
  font-size: 2rem;
  color: #0582fe;
  text-align: center;
}
input:focus {
  outline-color: #0582fe;
}
.link {
  text-decoration: underline;
  color: #909090;
  font-weight: 600;
  cursor: pointer;
}

/* ===== MEDIA QUERIES ===== */

@media screen and (max-width: 768px) {
  html {
    font-size: 55%;
  }
  .active .keypad {
    display: none;
  }
}
@media screen and (max-height: 650px) {
  html {
    font-size: 55%;
  }
  .mobile__screen {
    padding-top: 20px;
  }
  .slide img {
    width: 60%;
  }
}
