/* ==========================================================================
   Staging visual QA fixes (Nov 2026), loaded after main.min.css.
   Block IDs match the finding IDs in andy-callif-staging-visual-qa.md.
   Components: lib/snippets/acbb-call-cta.php. Behaviour: assets/app/js/acbb-qa.js.
   ========================================================================== */

:root {
  --acbb-red: #971B21;       /* Callif red, 8.42:1 on white */
  --acbb-red-deep: #640D0E;
  --acbb-blue: #0571B6;      /* Bond blue, 5.19:1 on white */
  --acbb-btn: #066A94;       /* button blue, 6.01:1 with white */
  --acbb-ink: #212121;
  --acbb-grey: #f5f5f5;
  --acbb-line: #d6d6d6;
}

/* D6 Skip link */
.acbb-skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100000;
  padding: 12px 18px;
  background: var(--acbb-btn);
  color: #fff !important;
  font: 700 16px/1 "Nunito Sans", sans-serif;
  border-radius: 4px;
  text-decoration: none;
}
.acbb-skip-link:focus { top: 12px; outline: 3px solid #fff; outline-offset: 2px; }

/* B3 Hero text legibility: scrim over the photo */
body .home-hero-wrap { position: relative; }
@media (min-width: 1201px) {
  body .home-hero-wrap::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(18, 22, 28, .66) 0%, rgba(18, 22, 28, .50) 42%, rgba(18, 22, 28, 0) 68%);
  }
  body .home-hero-wrap > .container { position: relative; z-index: 2; }
}
@media (max-width: 1200px) {
  body .home-hero { position: relative; }
  body .home-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: rgba(18, 22, 28, .56);
  }
  body .home-hero > *:not(img):not(picture) { position: relative; z-index: 2; }
}

/* B1 Hero: the call is the primary action */
body .home-hero-links {
  display: flex;
  flex-wrap: wrap;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
@media (min-width: 768px) {
  body .home-hero-links { flex-direction: row; justify-content: center; gap: 16px; }
}
body .home-hero-links-phone {
  order: -1;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  min-width: 260px;
  margin: 0 !important;
  padding: 0 28px;
  border-radius: 4px;
  background: var(--acbb-red);
  color: #fff !important;
  font-size: 20px !important;
  font-weight: 800 !important;
  text-decoration: none !important;
}
body .home-hero-links-phone:hover,
body .home-hero-links-phone:focus-visible { background: var(--acbb-red-deep); color: #fff !important; }
body .home-hero-links .btn-global { min-height: 56px; display: inline-flex; align-items: center; margin: 0; }
body .home-hero-links-note {
  flex: 1 1 100%;
  margin: 0 !important;
  color: #fff;
  font: 600 16px/1.3 "Nunito Sans", sans-serif;
  text-align: center;
}

/* B2 Mobile sticky call bar (replaces the blue phone strip on phones) */
.acbb-callbar { display: none; }
@media (max-width: 767px) {
  .acbb-callbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100001;
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 8px;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
    background: #fff;
    border-top: 1px solid var(--acbb-line);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, .12);
  }
  .acbb-callbar a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    border-radius: 4px;
    font: 800 17px/1 "Nunito Sans", sans-serif;
    text-decoration: none;
  }
  .acbb-callbar__call { background: var(--acbb-red); color: #fff; }
  .acbb-callbar__msg { background: #fff; color: var(--acbb-btn); border: 2px solid var(--acbb-btn); }
  body { padding-top: 80px !important; padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  body .header .header-cta { display: none !important; }
  .userway_buttons_wrapper { top: auto !important; bottom: 76px !important; }
  #scrollToTop { bottom: 76px !important; }
}

/* B4 In-content call band (homepage copy and the inner-page CTAs) */
.acbb-cta-band {
  display: flex;
  width: 100% !important;
  max-width: none !important;
  float: none !important;
  box-sizing: border-box;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin: 32px 0;
  padding: 20px 24px;
  background: var(--acbb-grey);
  border-left: 4px solid var(--acbb-red);
  border-radius: 4px;
}
.acbb-cta-band__text {
  flex: 1 1 100%;
  margin: 0 !important;
  font-size: 17px;
  line-height: 1.45;
  color: var(--acbb-ink);
}
.acbb-cta-band a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 4px;
  font-weight: 800;
  font-size: 17px;
  white-space: nowrap;
  text-decoration: none !important;
}
.acbb-cta-band a.acbb-cta-band__call { background: var(--acbb-red); color: #fff !important; }
.acbb-cta-band a.acbb-cta-band__call:hover { background: var(--acbb-red-deep); }
.acbb-cta-band a.acbb-cta-band__msg { background: #fff; color: var(--acbb-btn) !important; border: 2px solid var(--acbb-btn); }
@media (max-width: 575px) { .acbb-cta-band a { flex: 1 1 100%; } }

/* B1 / B9 Call + Message pair (inner-page heroes, 404) */
.acbb-cta-pair { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 8px 0 0; }
.acbb-cta-pair a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 4px;
  font-family: "Nunito Sans", sans-serif;
  font-weight: 800;
  font-size: 17px;
  white-space: nowrap;
  text-decoration: none !important;
}
.acbb-cta-pair a.acbb-cta-pair__call { background: var(--acbb-red); color: #fff !important; }
.acbb-cta-pair a.acbb-cta-pair__call:hover { background: var(--acbb-red-deep); }
.acbb-cta-pair a.acbb-cta-pair__msg { background: #fff; color: var(--acbb-btn) !important; border: 2px solid var(--acbb-btn); }
.acbb-cta-pair a.acbb-cta-pair__pay {
  flex: 1 1 100%;
  min-height: 0;
  padding: 0;
  font-size: 16px;
  font-weight: 700;
  justify-content: flex-start;
  text-decoration: underline !important;
}
.acbb-cta-pair__note { flex: 1 1 100%; margin: 0 !important; font-size: 15px; color: #424242; }
.acbb-cta-pair--on-dark .acbb-cta-pair__note,
.acbb-cta-pair--on-dark a.acbb-cta-pair__pay { color: #fff !important; }
.internal-hero .acbb-cta-pair { justify-content: center; }
.internal-hero .acbb-cta-pair a.acbb-cta-pair__pay { justify-content: center; }
@media (max-width: 575px) { .acbb-cta-pair a:not(.acbb-cta-pair__pay) { flex: 1 1 100%; } }

/* B9 404 */
.acbb-404-links { margin: 20px 0 !important; }
.acbb-404-links li { margin-bottom: 8px; }

/* B6 Lead forms: visible labels (Contact Form 7 templates wrapped in .acbb-form) */
.acbb-form { display: grid; gap: 14px; }
.acbb-form label,
.acbb-form .acbb-form__label {
  display: block;
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}
.acbb-form .acbb-form__opt { font-weight: 400; opacity: .85; }
.acbb-form input[type="text"],
.acbb-form input[type="tel"],
.acbb-form input[type="email"],
.acbb-form select,
.acbb-form textarea {
  width: 100% !important;
  min-height: 48px;
  padding: 10px 12px !important;
  border: 1px solid #fff !important;
  border-radius: 4px !important;
  background: #fff !important;
  color: var(--acbb-ink) !important;
  font: 400 16px/1.4 "Nunito Sans", sans-serif !important;
}
.acbb-form textarea { min-height: 96px; height: 96px; resize: vertical; }
.acbb-form :is(input, select, textarea):focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.acbb-form input[type="submit"] {
  width: 100%;
  min-height: 52px;
  border: 0 !important;
  border-radius: 4px !important;
  background: #fff !important;
  color: var(--acbb-red-deep) !important;
  font: 800 18px/1 "Nunito Sans", sans-serif !important;
  cursor: pointer;
}
.acbb-form .form-note { margin: 0 !important; font-size: 14px; line-height: 1.45; color: #fff; }
.acbb-form .form-note a { color: #fff !important; font-weight: 700; text-decoration: underline; }
.acbb-form .wpcf7-not-valid-tip { color: #fff; font-weight: 700; }
/* Homepage: lead form in its own section above the footer */
.acbb-home-form { padding: 56px 0; background: #fff; }
.acbb-form-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  gap: 32px;
  align-items: start;
  max-width: 1080px;
  margin: 0 auto;
  padding: 32px;
  background: var(--acbb-red);
  border-radius: 6px;
}
.acbb-form-panel__intro p { margin: 0 !important; color: #fff; font-size: 17px; line-height: 1.55; }
.acbb-form-panel__intro a { color: #fff !important; font-weight: 800; text-decoration: underline; white-space: nowrap; }
.acbb-form-panel__title { margin: 0 0 12px !important; color: #fff !important; font: 600 28px/1.25 Poppins, sans-serif !important; text-transform: none !important; }
@media (max-width: 991px) {
  .acbb-form-panel { grid-template-columns: minmax(0, 1fr); gap: 18px; padding: 24px 18px; }
  .acbb-home-form { padding: 32px 0; }
}

/* B7 Live-person box as one tel link; "Need a Bail Bond?" card shows the number; sidebar photo CTA number */
a.acbb-livebox {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  padding: 24px 28px;
  background: var(--acbb-ink);
  color: #fff !important;
  text-decoration: none !important;
}
a.acbb-livebox:hover { background: #000; }
.acbb-livebox__text { font: 400 20px/1.4 Poppins, sans-serif; }
.acbb-livebox__num { font: 800 24px/1 "Nunito Sans", sans-serif; white-space: nowrap; }
.home-works-phone {
  display: inline-block;
  position: relative;
  z-index: 2;
  margin-top: 6px;
  padding: 8px 16px;
  border-radius: 4px;
  background: var(--acbb-red);
  color: #fff;
  font: 800 17px/1.2 "Nunito Sans", sans-serif;
}
body .home-works-inner picture,
body .home-works-inner img { width: 100%; height: 100%; object-fit: cover; }
body .home-about-cta a,
body .home-about-cta p a { color: #fff !important; font-weight: 800; text-decoration: underline; }

/* C1 Contrast: link red and light blue on buttons/text (brand palette) */
body .home-copy-main :is(p, ol, ul, table) a:not(.acbb-cta-band a),
body .home-about-main > p a,
body:not(.home) .entry-content :is(p, ol, ul, table) a:not([class*="btn"]):not(.acbb-btn):not([class*="acbb-cta"]) {
  color: var(--acbb-red) !important;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.btn-blue,
body .lead-form form .submit input,
.wpcf7 input[type="submit"]:not(.acbb-form input) {
  background-color: var(--acbb-btn) !important;
  border-color: var(--acbb-btn) !important;
  color: #fff !important;
}
.header .menu > li.current-menu-item > a,
.header .menu > li:hover > a,
.header .menu .sub-menu li.current-menu-item > a { color: var(--acbb-blue) !important; }
body .home-location h2 { color: var(--acbb-red) !important; }
body .home-location-info a.phone,
body .home-location-info a.link,
.footer-info a.link,
.breadcrumb a { color: var(--acbb-blue) !important; }
body .home-hero-badge-content { background: var(--acbb-btn); }

/* B8 Mobile menu: sub-menu toggle buttons (main.js still opens the menu on the <li> click) */
.acbb-submenu-toggle {
  position: absolute;
  top: 0;
  right: 0;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  z-index: 2;
}
.acbb-submenu-toggle:focus-visible { outline: 3px solid var(--acbb-blue); outline-offset: -3px; }
.header .genesis-nav-menu li.menu-item-has-children { position: relative; }
@media (min-width: 1201px) {
  .acbb-submenu-toggle { width: 18px; height: 18px; top: 50%; right: -4px; transform: translateY(-50%); }
}

/* D2 Reading width */
body .home-copy-main :is(p, ul, ol) { max-width: 72ch; }
body .home-copy--faq .home-copy-main :is(p, ul, ol) { max-width: none; }

/* D3 Tables that scroll sideways */
.acbb-swipe-hint { margin: 0 0 6px !important; font-size: 14px; font-weight: 700; color: #424242; }
@media (min-width: 992px) { .acbb-swipe-hint { display: none; } }
.table-scroll.is-scrollable { position: relative; }
.table-scroll.is-scrollable:not(.is-scrolled-end) {
  -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent);
  mask-image: linear-gradient(90deg, #000 85%, transparent);
}

/* D1 Homepage on phones: collapsed reference sections */
.acbb-collapse-head { margin-bottom: 0 !important; }
.acbb-collapse-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 0;
  border: 0;
  border-bottom: 1px solid var(--acbb-line);
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.acbb-collapse-toggle::after {
  content: "";
  flex: none;
  width: 10px;
  height: 10px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform .2s;
}
.acbb-collapse-toggle[aria-expanded="true"]::after { transform: rotate(-135deg); }
.acbb-collapse-panel { padding-top: 12px; }

/* D6 Focus, tap targets, slider pause */
header.header button.burger:focus-visible,
.header-search > button:focus-visible,
.acbb-callbar a:focus-visible,
.acbb-cta-band a:focus-visible,
.acbb-cta-pair a:focus-visible,
body .home-hero-links a:focus-visible {
  outline: 3px solid var(--acbb-blue) !important;
  outline-offset: 2px;
}
header.header button.burger { min-width: 44px; min-height: 44px; }

/* D7 Calculator: equal checkboxes */
.acb-calc__check input[type="checkbox"] { width: 18px; height: 18px; flex: 0 0 18px; }

/* D9 FAQ grid: an odd last question spans both columns */
body .content-sidebar-wrap .home-copy-main .acbb-faq > .acbb-faq__item:last-child:nth-child(odd) { grid-column: 1 / -1; }

/* Search bar: box centred top-to-bottom in the dark bar (it had 17px above and 0 below); on phones and tablets
   leave room on the right so the close (X) button sits beside the box instead of behind it. */
.header-search-fluid { padding: 17px 75px !important; }
@media (max-width: 1200px) {
  .header-search-fluid { padding: 15px 56px 15px 15px !important; }
  .header-search-fluid > button.close { right: 18px; }
}
@media (max-width: 575px) {
  .header-search-fluid form label input { padding: 0 52px 0 18px !important; font-size: 16px !important; }
  .header-search-fluid form button { right: 6px; }
}

/* Homepage copy: call bands line up with the 72ch text column. */
body .home-copy-main .acbb-cta-band { max-width: 760px !important; }

/* Homepage: lead form beside "Guides for families after an arrest" (right column; after the text on phones). */
body .home-copy--with-form .home-copy-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 400px);
  gap: 48px;
  align-items: start;
}
body .home-copy--with-form .home-copy-main { max-width: none; margin: 0; }
.acbb-form-panel--side {
  display: block;
  max-width: none;
  margin: 0;
  padding: 26px 24px;
  position: sticky;
  top: 120px;
}
.acbb-form-panel--side .acbb-form-panel__title { font-size: 24px !important; margin-bottom: 6px !important; }
.acbb-form-panel__lede { margin: 0 0 16px !important; color: #fff; font-size: 16px; line-height: 1.5; }
@media (max-width: 991px) {
  body .home-copy--with-form .home-copy-split { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .acbb-form-panel--side { position: static; }
}

/* Homepage form panel: Andy's photo beside the title. */
.acbb-form-panel__head { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.acbb-form-panel__photo {
  flex: 0 0 auto;
  width: 72px !important;
  height: 72px !important;
  border-radius: 50%;
  border: 3px solid #fff;
  object-fit: cover;
}
.acbb-form-panel__head .acbb-form-panel__lede { margin: 0 !important; }

/* Homepage: centre the content column (it sat on the left with empty space on the right). */
body .home-copy:not(.home-copy--faq):not(.home-copy--with-form) .home-copy-main {
  max-width: 820px;
  margin-left: auto !important;
  margin-right: auto !important;
}
body .home-copy-main .acbb-cta-band { max-width: none !important; }
body .home-copy--with-form .home-copy-split { max-width: 1200px; margin-left: auto; margin-right: auto; }

/* Homepage: the "How bail works" timeline is centred to the same reading column as the rest of the copy. */
body .home-arrest-process > .container { max-width: 1000px; margin-left: auto; margin-right: auto; }

/* Homepage: wider centred content (client: use more of the white space on both sides). Overrides the 820px column,
   the 72ch line cap and the 1000px timeline above. */
body .home-copy:not(.home-copy--faq):not(.home-copy--with-form) .home-copy-main { max-width: 1140px; }
body .home-copy-main :is(p, ul, ol) { max-width: none; }
body .home-arrest-process > .container { max-width: 1140px; }
body .home-copy--with-form .home-copy-split { max-width: 1260px; }
