/* Keep the floating WhatsApp control in normal flow across the tablet layout. */
@media (min-width: 768px) and (max-width: 991.98px) {
  #whatsapp-float {
    position: static !important;
    width: 74px !important;
    height: 74px !important;
    margin: 1rem auto 0 !important;
  }

  #whatsapp-float .contact_icon {
    width: 52px !important;
    height: 52px !important;
    font-size: 26px !important;
  }
}

/* Reserve a desktop lane for the fixed WhatsApp control beside calculator promos. */
@media (min-width: 992px) {
  .sbf-calculator-promo-inner {
    padding-inline-end: calc(100px + 30px + 1rem);
  }
}

/* Give keyboard users a clear, high-contrast focus indicator on the enquiry form. */
.sbf-contact-form-output .ff-el-form-control:focus-visible,
.sbf-contact-form-output .ff-btn-submit:focus-visible {
  outline: 3px solid #0d6efd !important;
  outline-offset: 2px !important;
  border-color: #0d6efd !important;
}

/* Preserve the established card typography after correcting heading levels. */
.contact-strip-item .contact-strip-title {
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.3rem;
  font-size: 0.75rem;
  font-weight: 700;
}

.service-row .service-row-title {
  color: var(--navy);
  margin-bottom: 0.35rem;
  font-family: inherit;
  font-size: 1.05rem;
}

.office-card .office-card-title {
  color: var(--navy);
  margin-bottom: 0.9rem;
  font-size: 1.2rem;
}

/* Prevent classic scrollbars from exposing Bootstrap's negative row margins. */
@media (min-width: 992px) and (max-width: 1199.98px) {
  .services-section > .container > .row,
  .beams-content > .container > .row {
    --bs-gutter-x: 2rem;
  }
}

/* Keep long legal-page email addresses inside the reading column. */
@media (max-width: 351.98px) {
  .editorial-content a[href^="mailto:"] {
    overflow-wrap: anywhere;
    word-break: break-word;
  }
}

/* A labelled contact link stays in the footer and cannot cover page content. */
footer a.sbf-footer-whatsapp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  margin-top: 0.5rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid #fae0ac;
  border-radius: 0.25rem;
  background-color: transparent;
  color: #fae0ac;
  line-height: 1.4;
  text-decoration: none;
}

footer a.sbf-footer-whatsapp:hover {
  background-color: #fae0ac;
  color: #0b1d32;
}

footer a.sbf-footer-whatsapp:focus-visible {
  outline: 3px solid #fae0ac;
  outline-offset: 3px;
}

/* Preserve the existing behaviour while the cookie choices are open. */
body:has(.sbf-cookie-banner:not([hidden])) .sbf-footer-whatsapp {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

/* The two detailed guides share the site's navy and gold enquiry buttons. */
:is(.page-id-38, .page-id-40) .editorial-content a.btn.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  max-width: 100%;
  padding: 0.75rem 1.25rem;
  border: 2px solid #0b1d32;
  border-radius: 0.25rem;
  background: #0b1d32;
  color: #fae0ac;
  font-weight: 600;
  line-height: 1.4;
  white-space: normal;
  text-decoration: none;
}

:is(.page-id-38, .page-id-40) .editorial-content a.btn.btn-primary:hover,
:is(.page-id-38, .page-id-40) .editorial-content a.btn.btn-primary:active {
  background: #fae0ac;
  color: #0b1d32;
}

:is(.page-id-38, .page-id-40) .editorial-content a.btn.btn-primary:focus-visible {
  outline: 3px solid #0b1d32;
  outline-offset: 3px;
  box-shadow: 0 0 0 3px #fff;
}

/* Keep the desktop table; give each label and explanation full width on phones.
   Explicit roles in the render helper retain the table's accessible structure. */
@media screen and (max-width: 767.98px) {
  .editorial-content .sbf-enquiry-checklist,
  .editorial-content .sbf-enquiry-checklist tbody {
    display: block;
    width: 100%;
  }

  /* The column headings remain available to assistive technology. */
  .editorial-content .sbf-enquiry-checklist thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .editorial-content .sbf-enquiry-checklist tbody tr {
    display: block;
    margin-bottom: 0.75rem;
    border: 1px solid #e5dac3;
    border-left: 3px solid #cfad6a;
    border-radius: 0.25rem;
    background: #fbf8f1;
  }

  .editorial-content .sbf-enquiry-checklist tbody th,
  .editorial-content .sbf-enquiry-checklist tbody td {
    display: block;
    width: auto;
    border: 0;
    background: transparent;
    box-shadow: none;
    overflow-wrap: break-word;
  }

  .editorial-content .sbf-enquiry-checklist tbody th {
    padding: 0.875rem 1rem 0.25rem;
    color: #0b1d32;
    font-weight: 700;
  }

  .editorial-content .sbf-enquiry-checklist tbody td {
    padding: 0 1rem 0.875rem;
  }
}


/* Distinguish the existing UK review steps without changing their reading order. */
.page-id-40 .editorial-content p.sbf-exit-step {
  margin: 0 0 1rem;
  padding: 1.125rem 1.5rem;
  border: 1px solid #e5dac3;
  border-left: 3px solid #cfad6a;
  border-radius: 0.25rem;
  background: #fbf8f1;
  color: #24364b;
}

.page-id-40 .editorial-content p.sbf-exit-step > strong {
  display: block;
  margin-bottom: 0.35rem;
  color: #0b1d32;
}

.page-id-40 .editorial-content p.sbf-exit-coordination {
  margin-top: 2rem;
  padding-left: 1rem;
  border-left: 3px solid #cfad6a;
  color: #24364b;
}

/* Two adjacent existing paragraphs form one full-size, always-visible note.
   The separate contact signpost above them stays in normal body flow. */
.page-id-40 .editorial-content p.sbf-exit-notes-start,
.page-id-40 .editorial-content p.sbf-exit-notes-end {
  margin: 0;
  padding: 1.5rem;
  border: 1px solid #cfad6a;
  background: #fff;
  color: #24364b;
}

.page-id-40 .editorial-content p.sbf-exit-notes-start {
  border-bottom: 0;
  border-radius: 0.25rem 0.25rem 0 0;
  padding-bottom: 1rem;
}

.page-id-40 .editorial-content p.sbf-exit-notes-end {
  margin-bottom: 1.5rem;
  border-top: 0;
  border-radius: 0 0 0.25rem 0.25rem;
  padding-top: 0;
}

.page-id-40 .editorial-content .sbf-exit-notes-start a {
  color: #0b1d32;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.page-id-40 .editorial-content .sbf-exit-notes-start a:hover {
  text-decoration-thickness: 2px;
}

.page-id-40 .editorial-content .sbf-exit-notes-start a:focus-visible {
  outline: 2px solid #0b1d32;
  outline-offset: 3px;
}

@media (max-width: 575.98px) {
  .page-id-40 .editorial-content p.sbf-exit-step,
  .page-id-40 .editorial-content p.sbf-exit-notes-start,
  .page-id-40 .editorial-content p.sbf-exit-notes-end {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}
