/* Footer fixes (home page trial). Loaded after the Divi footer CSS so these win. */

/* 1. Pop-up modal: pinned 5px from the bottom of the viewport, centred, no border,
   soft white glow, slightly translucent. */
body #page-container .et-l--footer .et_pb_row_3_tb_footer.modal {
  position: fixed !important;
  bottom: 5px;
  left: 50%;
  transform: translateX(-50%);
  margin: 0 !important;
  border: 0 !important;
  background-color: rgba(21, 40, 69, 0.92) !important;
  box-shadow: 0 0 14px 2px rgba(255, 255, 255, 0.35);
}

/* 2. "Leave a message" tab: out of the 1200px row, hard against the bottom-right
   corner of the viewport, no white bottom border. */
body #page-container .et-l--footer .et_pb_button_1_tb_footer_wrapper {
  position: fixed !important;
  right: 0;
  bottom: 0;
  margin: 0 !important;
  z-index: 1000;
}
body #page-container .et_pb_section .et_pb_button_1_tb_footer {
  border-bottom: 0 !important;
}

/* The slide-out form was stacked above the tab in the same flow; keep it clear of
   the tab now that the tab is fixed separately. */
.et-l--footer .et_pb_section_1_tb_footer { padding-bottom: 48px !important; }

/* 3. The fixed modal and tab cover the bottom of the page, so give the footer
   room below the copyright / privacy / terms links so they can be scrolled clear
   and clicked. */
.et-l--footer .et_pb_section_0_tb_footer.et_pb_section { padding-bottom: 130px !important; }
@media only screen and (max-width: 767px) {
  .et-l--footer .et_pb_section_0_tb_footer.et_pb_section { padding-bottom: 190px !important; }
}

/* ---- Pop-up message form ---- */
/* The full-screen dim overlay (.et_pb_column_4_tb_footer) sits below the header, so the
   nav floated over it. While the form is open (body.cf-open, set by footer-fixes.js) drop
   the header back under the overlay so it fades with the rest of the page. */
body.cf-open .et-l--header { z-index: 2; }

/* Centre the button and give it room. */
body #page-container .et_pb_code_1_tb_footer .submit-wrap p {
  display: block;
  text-align: center;
  margin: 0;
}
body #page-container .et_pb_code_1_tb_footer .wpcf7-submit {
  display: inline-block;
  margin: 0;
  padding: 12px 36px;
  min-width: 170px;
  text-align: center;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}
body #page-container .et_pb_code_1_tb_footer .wpcf7-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.3);
}

/* ---- Request-appointment form: home page + contact page ---- */
body #page-container .et_pb_code_0 .submit-wrap p { text-align: center; }
body #page-container .et_pb_code_0 .wpcf7-submit.submit,
body #page-container .et_pb_code_0 .wpcf7-submit.submit:hover {
  border: 0 !important;
  border-radius: 5px;
  width: auto !important;
  min-width: 170px;
  padding: 12px 36px !important;
  background-color: #152845;
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}
body #page-container .et_pb_code_0 .wpcf7-submit.submit:hover {
  background-color: #24497a;
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.32);
}

/* ---- Service-page sidebar form ---- */
body #page-container .et_pb_code_0_tb_body .wpcf7-submit {
  border: 0 !important;
  color: #152845 !important;
  box-shadow: 0 3px 10px rgba(21, 40, 69, 0.18);
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
body #page-container .et_pb_code_0_tb_body .wpcf7-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(21, 40, 69, 0.25);
  filter: brightness(1.06);
}

/* The (hidden) submit spinner sat inline after the button and, with its 24px side margins,
   pulled the button off-centre. Take it out of the flow; it still shows while submitting. */
.submit-wrap .wpcf7-spinner {
  position: absolute;
  margin: 0 0 0 12px;
}
