.modal-overlay {
  display: none;

  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);

  z-index: 1000;
}

.modal-content {
  position: absolute;
  top: 55%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  width: 70%;
  max-width: 500px;
  text-align: center;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #f00;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  font-size: 16px;
  line-height: 30px;
  cursor: pointer;
}

.modal-content img {
  max-width: 100%;
  border-radius: 10px;
}

.modal-overlay.active {
  display: block;
}

/* Add overflow: scroll for small devices like iPhone SE and Galaxy S8+ */
.modal-content.scrollable {
  overflow: scroll;
  max-height: 80vh;
  /* Limit max height to 80% of the viewport height */
  padding-right: 10px;
  /* Prevent content from being cut off due to scrollbar */
}

.contact-form-detail {
  width: 100%;
  max-width: 100%;
  padding: 0 15px;
}

.contact-form-detail .form-group {
  margin-bottom: 15px;
}

.contact-form-detail input,
.contact-form-detail select,
.contact-form-detail textarea {
  width: 100%;
  padding: 12px;
  border-radius: 5px;
  border: 1px solid #ddd;
  box-sizing: border-box;
  font-size: 14px;
}

.contact-form-detail .form-btn button {
  width: 100%;
  padding: 12px;
  font-size: 16px;
  background-color: #f00;
  color: #fff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

/* Responsive Styles */

/* iPhone SE (320px wide) */
@media (max-width: 375px) and (min-width: 320px) {
  .modal-content {
    overflow: scroll;
    max-height: 100vh;
    top: 45%;
    padding: 15px;
    max-width: 80%;
  }

  .modal-close {
    width: 28px;
    height: 28px;
    font-size: 14px;
    line-height: 28px;
  }

  .modal-content.scrollable {
    max-height: 80vh;
  }

  .contact-form-detail .form-group input,
  .contact-form-detail .form-group select,
  .contact-form-detail .form-group textarea {
    font-size: 14px;
  }

  .contact-form-detail .form-btn button {
    padding: 10px;
    font-size: 14px;
  }
  button.th-btn.btn-fw {
    margin: 14px 1px 1px 38px;
  }
}

/* iPhone XR, iPhone 12 Pro, iPhone 14 Pro Max (414px to 430px wide) */
@media (max-width: 430px) and (min-width: 375px) {
  .modal-content {
    top: 50%;
    padding: 18px;
    max-width: 80%;
  }

  .modal-close {
    width: 28px;
    height: 28px;
    font-size: 15px;
    line-height: 28px;
  }

  .modal-content.scrollable {
    max-height: 80vh;
  }

  .contact-form-detail .form-group input,
  .contact-form-detail .form-group select,
  .contact-form-detail .form-group textarea {
    font-size: 15px;
  }

  .contact-form-detail .form-btn button {
    padding: 12px;
    font-size: 16px;
  }
  button.th-btn.btn-fw {
    margin: 14px 1px 1px 38px;
  }
}

/* Pixel 7 (412px wide) */
@media (max-width: 412px) and (min-width: 380px) {
  .modal-content {
    overflow: scroll;
    max-height: 90vh;
    top: 50%;
    padding: 16px;
    max-width: 80%;
  }

  .modal-close {
    width: 28px;
    height: 28px;
    font-size: 15px;
    line-height: 28px;
  }

  .modal-content.scrollable {
    max-height: 80vh;
  }

  .contact-form-detail .form-group input,
  .contact-form-detail .form-group select,
  .contact-form-detail .form-group textarea {
    font-size: 15px;
  }

  .contact-form-detail .form-btn button {
    padding: 12px;
    font-size: 16px;
  }
  button.th-btn.btn-fw {
    margin: 14px 1px 1px 38px;
  }
}

/* Samsung Galaxy S8+ (412px wide) */
@media (max-width: 412px) and (min-width: 375px) {
  .modal-content {
    top: 50%;
    padding: 16px;
    max-width: 80%;
  }

  .modal-close {
    width: 28px;
    height: 28px;
    font-size: 15px;
    line-height: 28px;
  }

  .modal-content.scrollable {
    max-height: 80vh;
  }

  .contact-form-detail .form-group input,
  .contact-form-detail .form-group select,
  .contact-form-detail .form-group textarea {
    font-size: 15px;
  }

  .contact-form-detail .form-btn button {
    padding: 12px;
    font-size: 16px;
  }
  button.th-btn.btn-fw {
    margin: 14px 1px 1px 38px;
  }
}

/* Very Small Devices (Below 375px) */
@media (max-width: 374px) {
  .modal-content {
    top: 50%;
    padding: 12px;
    max-width: 85%;
  }

  .modal-close {
    width: 24px;
    height: 24px;
    font-size: 13px;
    line-height: 24px;
  }

  .modal-content.scrollable {
    max-height: 80vh;
  }

  .contact-form-detail .form-group input,
  .contact-form-detail .form-group select,
  .contact-form-detail .form-group textarea {
    font-size: 14px;
  }

  .contact-form-detail .form-btn button {
    padding: 10px;
    font-size: 14px;
  }
  button.th-btn.btn-fw {
    margin: 14px 1px 1px 38px;
  }
}

@media (max-width: 1326px) and (max-width: 1326px) {
  .modal-content {
    overflow: scroll;
    max-height: 90vh;
    top: 45%;
    padding: 15px;
    max-width: 80%;
  }

  .modal-close {
    width: 28px;
    height: 28px;
    font-size: 14px;
    line-height: 28px;
  }

  .modal-content.scrollable {
    max-height: 80vh;
  }

  .contact-form-detail .form-group input,
  .contact-form-detail .form-group select,
  .contact-form-detail .form-group textarea {
    font-size: 14px;
  }

  .contact-form-detail .form-btn button {
    padding: 10px;
    font-size: 14px;
  }
}

h2.sec-title {
  text-align: left;
}

button#sndEmailDatas {
  margin: auto;
  width: 120px;
  height: 42px;
  color: white;
  background-color: #ff0000;
}

div#bfrSndDataRslts {
  text-align: justify;
}
