* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  position: relative;
  background-color: rgb(252, 244, 233);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2rem;
  padding: 1rem 1.5rem;
  font-size: 16px;
  font-family: "Helvetica", sans-serif;
}

label {
  font-size: 18px;
  color: #075e54;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

input,
textarea {
  font-size: 18px;
  font-family: "Helvetica", sans-serif;
  width: 100%;
  max-width: 350px;
  padding: 12px;
  border: 1px solid #00a884;
  border-radius: 1rem;
  outline: none;
  transition: border-color 0.3s ease;
}

input:focus,
textarea:focus {
  border-color: #25d366;
}

input.error {
  border-color: #ff0000;
}

textarea {
  height: 100px;
  resize: vertical;
}

.layout {
  width: 100%;
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.instructions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.instructions h2 {
  font-size: 24px;
  color: #075e54;
  margin-bottom: 0.5rem;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
}

.form-container {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 2rem;
  width: 100%;
}

form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.5rem;
  border-radius: 1rem;
  background-color: white;
  border: 1px solid #00a884;
  width: 100%;
  max-width: 400px;
}

form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.5rem;
  border-radius: 1rem;
  background-color: white;
  border: 1px solid #00a884;
  width: 100%;
  max-width: 400px;
}

.btn-grp {
  display: flex;
  gap: 0.5rem;
}

button {
  width: 100%;
  font-size: 1rem;
  padding: 0.75rem;
  border-radius: 2rem;
  background: #25d366;
  border: none;
  color: black;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.btn-grp button:hover {
  background: #128c7e;
  color: white;
}

section {
  z-index: 100;
}

.output {
  overflow: visible;
}

.img-container {
  position: relative;
}

.whatsapp-inapp {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 450px;
  height: min(50vh, 475px);

  background-image: url("/assets/images/bg.jpeg");
  background-position: center;
  background-size: contain;

  border-radius: 1rem;
}

.whatsapp-phone {
  display: flex;
  flex-direction: column;
  height: clamp(500px, 70vh, 600px);
  border-radius: 2rem;
  width: 60%;
}

.whatsapp-nav {
  display: flex;
  flex-direction: row;
  padding: 1rem 1rem;
  width: 100%;
  height: 4rem;

  gap: 5px;

  border-top-left-radius: 2rem;
  border-top-right-radius: 2rem;
  background-color: #202c33;
}

.whatsapp-nav p {
  padding: 0;
  margin: 0;
  color: #202c33;
  z-index: 1;
}

.whatsapp-nav .wa-pfp {
  width: 2.25rem;
  height: 2.25rem;
  background-color: #85959f;
  border-radius: 50%;
}

.p-grp {
  display: flex;
  flex-direction: column;

  gap: 0.5rem;

  p {
    color: #e7ebed;
  }

  .online {
    font-size: 12px;
  }
}

.phone-body {
  display: flex;

  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.5rem;

  height: 100%;
  background-image: url("/assets/images/wa-bg.jpg");
  background-color: #111b21;
  background-size: cover;
  background-position: center; /* Centers the background image */
  background-repeat: no-repeat; /* Prevents the background image from repeating */

  z-index: 0;

  border-bottom-left-radius: 2rem;
  border-bottom-right-radius: 2rem;

  overflow: show;
}

.phone-body .message {
  display: flex;
  width: 100%;
  height: 3rem;
  z-index: 10;
  gap: 0.25rem;
  margin-bottom: 0.25rem;
}

.phone-body .message .textinput {
  display: flex;

  color: #fff;
  text-align: center;
  height: 80%;
  background-color: #202c33;
  width: 80%;
  border-radius: 2rem;
  margin-left: 0.5rem;

  padding-inline: 0.5rem;

  gap: 8px;

  align-items: center;
}

#wa-txt {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 90%;
}

.phone-body .message .send {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #00a884;
  border-radius: 50%;
  height: 75%;
  width: 36px;
  border: unset;
  cursor: pointer;
}

.current-date {
  width: fit-content;
  height: fit-content;
  border-radius: 8px;
  color: #85959f;
  background-color: #182229;
  font-size: 12px;
  padding: 0.5rem;
}

.whatsapp {
  z-index: 1;
  width: 100%;
  height: auto;
}

#qr {
  position: absolute;
  top: 49%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 100;
}

/* footer stuff */
.footer {
  padding: 0;
}

.footer-content {
  width: 100%;
  display: flex;
  justify-content: space-between;
}

.footer-links a {
  color: #128c7e;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: #075e54;
  text-decoration: underline;
}

.separator {
  margin: 0 1rem;
}

.footer-copyright {
  color: #666;
  font-size: 0.875rem;
}

@media screen and (max-width: 480px) {
  .footer-content {
    flex-direction: column;
    gap: 1rem;
  }
}

/* responsive design */
@media screen and (max-width: 640px) {
  .instructions {
    display: none;
  }
  nav {
    display: flex;
    justify-content: center;
  }
  .form-container {
    flex-direction: column-reverse;
  }

  textarea {
    height: unset;
    width: 100%;
  }

  form {
    width: 100%;
  }

  .whatsapp-inapp {
    width: 90vw;
    height: 50vh;
  }

  .whatsapp-phone {
    display: none;
  }

  .layout {
    flex-direction: column;
  }
}

/* Additional styles for tel input */

.iti {
  width: 100%;
  margin-bottom: 16px;
}

.iti__flag {
  background-image: url("https://cdn.jsdelivr.net/npm/intl-tel-input@24.7.0/build/img/flags.png");
}

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .iti__flag {
    background-image: url("https://cdn.jsdelivr.net/npm/intl-tel-input@24.7.0/build/img/flags@2x.png");
  }
}

/* IntlTelInput Customization */

.iti__country-list {
  max-height: 200px;
  width: 300px;
}

.phone-error {
  margin-top: 0.5rem;
  color: #ff0000;
  font-size: 0.875rem;
}
