#consultation_and_sales_form_page {
  direction: rtl;
  width: 100%;
  padding: 6rem 2rem 8rem;
  background: #f5f5f5;
  box-sizing: border-box;
}

#consultation_and_sales_form_page .consultation_and_sales_form_wrapper {
  background: #fff url("../img/popup-form-bg.png") no-repeat;
  width: 55%;
  max-width: 72rem;
  margin: 0 auto;
  border: 0;
  padding: 4rem 8rem;
  box-sizing: border-box;
}

#consultation_and_sales_form_page .popup-form .form-header {
  text-align: center;
  padding: 0 0 5rem;
}

#consultation_and_sales_form_page .popup-form .form-header .title {
  font-family: OpenSansHebrewLight, serif;
  line-height: normal;
  font-size: 2rem;
  color: #000000;
  margin-top: 3rem;
  text-align: center;
}

#consultation_and_sales_form_page .popup-form .form-header h3.title {
  font-family: OpenSansHebrewBold, serif;
  line-height: normal;
  font-size: 3rem;
  color: #000000;
  margin-bottom: 3rem;
  text-align: center;
}

#consultation_and_sales_form_page .popup-form .form-header p,
#consultation_and_sales_form_page .popup-form .form-header a {
  font-family: OpenSansHebrewBold, serif;
  line-height: normal;
  font-size: 2rem;
  color: #000000;
  margin: 1rem 0;
  direction: ltr;
  display: block;
}

#consultation_and_sales_form_page .popup-form .form-header a.maskyoom {
  display: inline-block;
  direction: ltr;
}

#consultation_and_sales_form_page .popup-form .form-header a.maskyoom img {
  max-width: 6rem;
  height: auto;
}

#consultation_and_sales_form_page .contact-form-tech {
  direction: rtl;
  text-align: right;
}

#consultation_and_sales_form_page .contact-form-tech * {
  direction: rtl;
}

#consultation_and_sales_form_page .contact-form-tech label {
  font-family: OpenSansHebrewLight, serif;
  line-height: normal;
  font-size: 2rem;
  color: #000000;
  margin: 1.5rem 0 0;
  text-align: right;
  width: 100%;
}

#consultation_and_sales_form_page .contact-form-tech input[type=submit],
#consultation_and_sales_form_page .contact-form-tech input[type=text],
#consultation_and_sales_form_page .contact-form-tech input[type=tel],
#consultation_and_sales_form_page .contact-form-tech input[type=email],
#consultation_and_sales_form_page .contact-form-tech input[type=file] {
  margin: 0.6rem 0;
  border-radius: 0;
  height: 4rem;
  background: #ffffff;
  /* 1px (not rem) — 0.1rem becomes sub-pixel on mobile and iOS drops edges */
  border: 1px solid #000000;
  box-sizing: border-box;
  background-clip: padding-box;
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  font-size: 1.8rem;
  padding: 1rem;
  direction: rtl;
}

#consultation_and_sales_form_page .contact-form-tech select {
  margin: 0.6rem 0;
  border-radius: 0;
  height: 4rem;
  background: #ffffff;
  border: 1px solid #000000;
  box-sizing: border-box;
  background-clip: padding-box;
  width: 100%;
  font-size: 1.8rem;
  padding: 0 1rem;
  position: relative;
  z-index: 0;
}

#consultation_and_sales_form_page .contact-form-tech textarea {
  margin-top: 0.6rem;
  border-radius: 0;
  background: #ffffff;
  border: 1px solid #000000;
  box-sizing: border-box;
  background-clip: padding-box;
  height: 13.1rem;
  width: 100%;
}

#consultation_and_sales_form_page .contact-form-tech input[type=submit] {
  background: #000000;
  box-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
  color: white !important;
  transition: 0.2s all;
  cursor: pointer;
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
  font-family: OpenSansHebrewLight, serif;
  font-size: 1.8rem;
  text-align: center;
  padding: 0.6rem 4.5rem;
  margin-top: 0.6rem;
}

#consultation_and_sales_form_page .contact-form-tech p:has(> input[type=submit]) {
  position: relative;
}

#consultation_and_sales_form_page .contact-form-tech .wpcf7-spinner {
  position: absolute;
  top: 50%;
  left: 1rem;
  margin: 0;
  transform: translateY(-50%);
}

/* Desktop: bottom-align both columns so submit sits on the same line as "סוג מזגן" */
@media screen and (min-width: 992px) {
  #consultation_and_sales_form_page .contact-form-tech .row > .col-lg-6 {
    display: flex;
    flex-direction: column;
  }

  #consultation_and_sales_form_page .contact-form-tech .row > .col-lg-6 > p {
    margin-bottom: 0;
  }

  #consultation_and_sales_form_page .contact-form-tech .row > .col-lg-6 > p:has(> input[type=submit]) {
    margin-top: auto;
  }
}

#consultation_and_sales_form_page .contact-form-tech input[type=submit]:hover:not(:disabled) {
  opacity: 0.85;
}

#consultation_and_sales_form_page .contact-form-tech input[type=submit]:disabled {
  opacity: 1;
  cursor: not-allowed;
}

#consultation_and_sales_form_page input[type=checkbox] {
  width: 2.5rem;
  height: 2.5rem;
  float: right;
  line-height: 2rem;
  border: 0 !important;
  margin: 0 0 0 2rem;
}

#consultation_and_sales_form_page span.wpcf7-list-item {
  margin: 0;
}

#consultation_and_sales_form_page form.contact-form-tech .col_form + p {
  text-align: center;
  width: 100%;
}

#consultation_and_sales_form_page form.contact-form-tech .col_form:first-child {
  padding: 0 0 0 2.5rem;
}

#consultation_and_sales_form_page form.contact-form-tech .col_form:nth-child(2) {
  padding: 0 2.5rem 0 0;
}

/* Keep privacy-policy link on the same line as acceptance text */
#consultation_and_sales_form_page .privacy-policy,
#consultation_and_sales_form_page a.privacy-policy {
  display: inline !important;
  text-align: right;
  font-family: OpenSansHebrewRegular, serif;
  color: #0097a7;
  text-decoration: underline !important;
  direction: rtl;
  margin: 0;
  width: auto;
}

#consultation_and_sales_form_page .wpcf7-list-item-label,
#consultation_and_sales_form_page .wpcf7-list-item-label a {
  display: inline !important;
  width: auto;
}

#consultation_and_sales_form_page .wpcf7-list-item-label br {
  display: none;
}

#consultation_and_sales_form_page .wpcf7-response-output {
  font-family: OpenSansHebrewLight, serif;
  font-size: 1.6rem;
  color: #000000;
  margin: 1.5rem 0 0;
}

/* Error tips overlay instead of pushing layout */
#consultation_and_sales_form_page .wpcf7-form-control-wrap {
  position: relative;
  display: block;
}

#consultation_and_sales_form_page .wpcf7-not-valid-tip {
  position: absolute;
  top: calc(100% - 0.2rem);
  right: 0;
  left: auto;
  z-index: 3;
  font-family: OpenSansHebrewBold, serif;
  font-size: 1.3rem;
  line-height: 1.2;
  margin: 0;
  padding: 0;
  width: auto;
  pointer-events: none;
}

/* City autocomplete above neighboring select field */
#consultation_and_sales_form_page .containerMainAutoComplete {
  position: relative;
  z-index: 5;
}

/* Overlay loader on the city input and center the dots inside it */
#consultation_and_sales_form_page .containerMainAutoComplete .wrapper_loader_ellipsis {
  top: 0.6rem; /* matches input margin-top */
  left: 0;
  right: 0;
  width: 100%;
  height: 4rem; /* matches desktop input height */
  transform: none;
  text-align: center;
  pointer-events: none;
}

#consultation_and_sales_form_page .containerMainAutoComplete .wrapper_loader_ellipsis .lds-ellipsis {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

#consultation_and_sales_form_page .containerMainAutoComplete ul.listsSearch {
  z-index: 20;
  top: 100%;
}

#consultation_and_sales_form_page .col_form:has(.main_autocomplete_cities),
#consultation_and_sales_form_page .wpcf7-form-control-wrap:has(.main_autocomplete_cities) {
  position: relative;
  z-index: 5;
}

#consultation_and_sales_form_page .col_form:has(select),
#consultation_and_sales_form_page .wpcf7-form-control-wrap:has(select) {
  position: relative;
  z-index: 1;
}

@media screen and (max-width: 991px) {
  #consultation_and_sales_form_page {
    background: #fff url("../img/popup-form-bg.png") no-repeat center top;
    background-size: cover;
    /* Clear fixed megamenu/header so title + subtitle stay visible */
    padding: 16rem 2rem 6rem;
  }

  #consultation_and_sales_form_page .contact-form-tech input[type=submit] {
    margin-top: 3rem;
  }

  #consultation_and_sales_form_page .consultation_and_sales_form_wrapper {
    background: transparent;
    width: 90%;
    padding: 4rem 3rem;
  }

  #consultation_and_sales_form_page .containerMainAutoComplete .wrapper_loader_ellipsis {
    height: 5rem; /* matches tablet input height */
  }

  #consultation_and_sales_form_page .popup-form .form-header {
    padding: 1rem 0 3rem;
  }

  #consultation_and_sales_form_page form.contact-form-tech input[type=submit],
  #consultation_and_sales_form_page form.contact-form-tech input[type=text],
  #consultation_and_sales_form_page form.contact-form-tech input[type=tel],
  #consultation_and_sales_form_page form.contact-form-tech input[type=email],
  #consultation_and_sales_form_page form.contact-form-tech select {
    height: 5rem;
  }

  #consultation_and_sales_form_page form.contact-form-tech label {
    font-size: 2.5rem;
  }
}

@media screen and (max-width: 767px) {
  #consultation_and_sales_form_page {
    /* Clear fixed mobile header (~66px / 14rem) + room so title & subtitle stay visible */
    padding: 20rem 1.5rem 8rem;
  }

  #consultation_and_sales_form_page .consultation_and_sales_form_wrapper {
    width: 100%;
    padding: 2rem 2rem 5rem;
  }

  #consultation_and_sales_form_page .popup-form .form-header {
    padding: 1rem 0 4rem;
  }

  #consultation_and_sales_form_page .popup-form .form-header h3.title {
    font-size: 3rem;
    margin-top: 0;
    margin-bottom: 2.5rem;
  }

  #consultation_and_sales_form_page .popup-form .form-header .title {
    font-size: 2.4rem;
    line-height: 1.35;
    margin-top: 2rem;
  }

  #consultation_and_sales_form_page .popup-form .form-header p,
  #consultation_and_sales_form_page .popup-form .form-header a {
    margin: 1.5rem 0;
  }

  #consultation_and_sales_form_page .contact-form-tech label {
    margin-top: 2rem;
  }

  #consultation_and_sales_form_page .contact-form-tech input[type=text],
  #consultation_and_sales_form_page .contact-form-tech input[type=tel],
  #consultation_and_sales_form_page .contact-form-tech input[type=email],
  #consultation_and_sales_form_page .contact-form-tech input[type=submit],
  #consultation_and_sales_form_page .contact-form-tech select {
    font-size: 3.4rem;
    height: 7rem;
  }

  #consultation_and_sales_form_page .contact-form-tech input[type=submit] {
    margin-top: 4rem;
    margin-bottom: 2rem;
  }

  /* Keep last field (email) fully framed — avoid flush overlap with submit on iOS */
  #consultation_and_sales_form_page .contact-form-tech input[type=text],
  #consultation_and_sales_form_page .contact-form-tech input[type=tel],
  #consultation_and_sales_form_page .contact-form-tech input[type=email],
  #consultation_and_sales_form_page .contact-form-tech select {
    border: 1px solid #000000;
    margin-bottom: 1rem;
  }

  #consultation_and_sales_form_page span.wpcf7-list-item {
    display: block;
    margin: 1.2rem 0;
  }

  #consultation_and_sales_form_page .containerMainAutoComplete .wrapper_loader_ellipsis {
    height: 7rem; /* matches mobile input height */
  }

  #consultation_and_sales_form_page .containerMainAutoComplete .wrapper_loader_ellipsis .lds-ellipsis {
    top: calc(50% + 0.4rem - 6px); /* ~2px down from last mobile position */
  }

  #consultation_and_sales_form_page form.contact-form-tech .col_form:first-child,
  #consultation_and_sales_form_page form.contact-form-tech .col_form:nth-child(2) {
    padding: 0;
  }
}
