body {
  font-family: Inter;
}

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw; /* ✅ Fix: Full width */
  height: 100vh; /* ✅ Fix: Full height */
  background: rgba(0, 0, 0, 0.8);
  z-index: 9999;
  padding: 40px 20px;
  justify-content: center;
  align-items: flex-start;
  overflow-y: auto;
  flex-direction: column; /* ✅ Important in Safari */
}
/* Prevent body scroll */
body.modal-open-all-purpose {
  position: fixed;
  width: 100%;
  overflow: hidden;
  top: 0;
}

/* Scrollable modal content */
.modal-content-all-purpose {
  width: 536px;
  max-width: 100%;
  max-height: calc(100vh - 40px); /* makes full modal visible on all browsers */
  overflow-y: auto;
  background: #fff;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.7);
  margin: 20px auto; /* reduced from 80px */
  position: relative;
}

.modal-content-all-purpose::-webkit-scrollbar {
  display: none;
}

.modal-header-all-purpose {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-top: 0px;
  padding-left: 0px;
  margin-right: 10px;
}

.contact_popup_title-all-purpose {
  font-size: 24px;
  font-weight: 500;
  line-height: 32px;
}

.close-btn-all-purpose {
  font-size: 24px;
  cursor: pointer;
}

label {
  display: block;
  font-weight: bold;
  margin-bottom: 5px;
}

.input-container-all-purpose {
  position: relative;
  width: 100%;
}

.input_all_contact_us-all-purpose {
  width: 236px;
  height: 40px;
  color: #667085 !important;
  font-family: Inter;
  font-weight: 300;
  font-size: 16px;
  border: 1px solid #dedede;
  border-radius: 8px;
  padding-left: 10px;
}

/* Close Button */
.contact_us_close {
  font-size: 24px;
  cursor: pointer;
}

label {
  font-size: 12px;
  font-weight: 400;
  line-height: 20px;
  margin-top: 0px;
  padding-top: 0px;
  padding-bottom: 0px;
  margin-bottom: 4px !important;
}

.icon-all-purpose {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  display: none;
}

.valid-all-purpose {
  color: green;
  display: inline;
}

.invalid-all-purpose {
  color: red;
  display: inline;
}

textarea {
  resize: none;
  height: 60px;
}

button {
  width: 100%;
  background: #0052cc;
  color: white;
  padding: 12px;
  border: none;
  font-size: 18px;
  border-radius: 5px;
  cursor: pointer;
}

.span_valid-all-purpose {
  height: 16px !important;
  line-height: 16px !important;
  font-size: 12px;
  color: red;
}
/* Ensure Zip Code field takes full width */
.full-width-all-purpose {
  width: 100%;
  height: 50px;
}

.form-container-all-purpose {
  display: flex;
  flex-wrap: wrap;
  gap: 15px; /* Keeps spacing between rows */
  justify-content: space-between; /* Pushes left & right fields to edges */
}

.form-group-all-purpose {
  width: calc(50% - 10px); /* Two inputs per row */
  height: 50px;
  /* margin-bottom: 20px; */
}

/*  Make it half-width instead of full */
.form-group-all-purpose.full-width-all-purpose {
  width: 100% !important;
  height: 74px;
  margin-bottom: 0px;
  /* margin-right: 15px; */
}

/*  Make it full-width for one field in row */
.form-group-all-purpose.full_width_one_field-all-purpose {
  width: 100% !important;
  height: 74px;
  margin-bottom: 0px;
}
.full_width_message-all-purpose {
  height: 90px;
}
.input_zip_full_row-all-purpose {
  width: 100%;
  height: 40px;
  color: #667085 !important;
  font-family: Inter;
  font-weight: 300;
  font-size: 16px;
  border: 1px solid #dedede;
  border-radius: 8px;
  padding-left: 10px;
}

#txtarea_content_contact-all-purpose {
  font-weight: 300;
  color: #667085 !important;
  font-family: inter;
  font-size: 16px;
  height: 80px;
  width: 488px !important;
  border: 1px solid #dedede;
  border-radius: 8px;
  margin-left: 0px !important;
  padding-left: 10px;
}

.submit-btn-contact-us-all-purpose {
  background: #2979c8;
  color: white;
  padding: 10px;
  width: 488px !important;
  border: none;
  margin-top: 16px;
  cursor: pointer;
  border-radius: 5px;
  margin-bottom: 20px !important;
}

/*  spinner while ajax call execute  */
/* Fullscreen Overlay */
#spinner-overlay-all-purpose {
  display: none; /* Hidden by default */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5); /* Semi-transparent background */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999; /* Ensure it's on top */
}

/* Spinner Animation */
.spinner-all-purpose {
  width: 50px;
  height: 50px;
  border: 6px solid #f3f3f3;
  border-top: 6px solid #3498db;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.div_between_fields_and_submit-all-purpose {
  height: 16px;
}

/*  END spinner while ajax call execute  */

.contact_us_close-all-purpose {
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 24px;
  padding-left: 7px;
  cursor: pointer;
}

/* =========================================  */
/*    📌 M O B I L E  : One field per row     */
/* =========================================  */
@media (max-width: 600px) {
  /* Prevent body scroll */
  body.modal-open-all-purpose {
    position: fixed;
    width: 100%;
    overflow: hidden;
    top: 0;
  }
  #modal_contact-all-purpose {
    padding: 0px;
  }

  /* Scrollable modal content */
  .modal-content-all-purpose {
    width: 100%;
    max-height: 100% !important;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch; /* iOS momentum scroll */
  }

  .modal {
    display: none !important;
    height: 100vh !important;
    padding-top: 0 !important;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.8);
  }

  .contact_popup_title-all-purpose {
    font-size: 16px;
    font-weight: 500;
    line-height: 24px;
  }
  .form-group-all-purpose {
    width: 100%; /* Each field takes full width */
    height: 50px;
    margin-bottom: 0px;
  }
  .form-group-all-purpose.full-width-all-purpose {
    width: 100% !important;
    height: 74px;
    margin-bottom: 0px;
    margin-right: 0px;
  }

  .full_width_message-all-purpose {
    height: 100px;
  }
  .input_all_contact_us-all-purpose {
    width: 100%;
  }
  #txtarea_content_contact-all-purpose {
    width: 100% !important;
  }

  .submit-btn-contact-us-all-purpose {
    width: 100% !important;
    margin-top: -30px;
  }
  .div_between_fields_and_submit-all-purpose {
    height: 0px;
  }
}
