/* =========================================================
   BC STICKY CTA — mobile appointment bar
   Scope: global; visible only on mobile.
   ========================================================= */

.bc-sticky-cta-bar {
  display: none !important;
}

@media (max-width: 767px) {
  .bc-sticky-cta-bar {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 9990 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    min-height: 58px !important;
    padding: 8px 24px calc(8px + env(safe-area-inset-bottom)) !important;
    background: var(--bc-brown, #B0947E) !important;
    box-sizing: border-box !important;
  }

  .bc-sticky-cta-bar .bc-sticky-cta-btn {
    font-family: var(--font-b, sans-serif) !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 38px !important;
    border-radius: 999px !important;
    box-sizing: border-box !important;
  }

  .bc-sticky-cta-bar .bc-sticky-cta-primary {
    flex: 1 1 auto !important;
    max-width: 290px !important;
    padding: 0 22px !important;
    background: var(--bc-cream, #F7F4EF) !important;
    color: var(--bc-brown, #B0947E) !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.08em !important;
    line-height: 1 !important;
  }

  .bc-sticky-cta-bar .bc-sticky-cta-primary span {
    display: block !important;
    color: inherit !important;
  }

  .bc-sticky-cta-bar .bc-sticky-cta-phone {
    flex: 0 0 38px !important;
    width: 38px !important;
    min-width: 38px !important;
    padding: 0 !important;
    color: var(--bc-cream, #F7F4EF) !important;
    background: transparent !important;
  }

  .bc-sticky-cta-bar .bc-sticky-cta-phone svg {
    width: 19px !important;
    height: 19px !important;
    display: block !important;
  }
}

/* Mobile final override: force sticky CTA visible when viewport is mobile */
@media (max-width: 767px) {
  body.brx-body .bc-sticky-cta-bar {
    display: flex !important;
  }

  body.brx-body {
    padding-bottom: calc(66px + env(safe-area-inset-bottom)) !important;
  }

  #brx-footer .bc-footer-bottom,
  footer .bc-footer-bottom {
    padding-bottom: calc(76px + env(safe-area-inset-bottom)) !important;
  }
}

/* Mobile polish: center primary CTA independently from phone icon */
@media (max-width: 767px) {
  body.brx-body .bc-sticky-cta-bar {
    justify-content: center !important;
    padding-left: 20px !important;
    padding-right: 54px !important;
  }

  body.brx-body .bc-sticky-cta-bar .bc-sticky-cta-primary {
    flex: 0 0 auto !important;
    width: min(224px, calc(100vw - 96px)) !important;
    max-width: 224px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  body.brx-body .bc-sticky-cta-bar .bc-sticky-cta-phone {
    position: absolute !important;
    right: 18px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    margin: 0 !important;
  }
}

/* Final mobile CTA alignment: center primary against the viewport */
@media (max-width: 767px) {
  body.brx-body .bc-sticky-cta-bar {
    justify-content: center !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  body.brx-body .bc-sticky-cta-bar .bc-sticky-cta-primary {
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    flex: 0 0 auto !important;
    width: min(224px, calc(100vw - 112px)) !important;
    max-width: 224px !important;
    margin: 0 !important;
  }

  body.brx-body .bc-sticky-cta-bar .bc-sticky-cta-phone {
    position: absolute !important;
    right: 16px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    margin: 0 !important;
  }
}

/* Footer bottom: wrap tablet navigation and reserve mobile CTA space */
@media (min-width: 768px) and (max-width: 1024px) {
  #brx-footer .bc-footer-bottom,
  footer .bc-footer-bottom {
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    padding-left: 24px !important;
    padding-right: 24px !important;
    display: flex !important;
    justify-content: center !important;
  }

  #brx-footer .bc-footer-bottom .bricks-nav-menu,
  footer .bc-footer-bottom .bricks-nav-menu {
    width: 100% !important;
    max-width: calc(100vw - 48px) !important;
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 8px 22px !important;
    margin: 0 auto !important;
    padding: 0 !important;
  }

  #brx-footer .bc-footer-bottom .menu-item a,
  footer .bc-footer-bottom .menu-item a {
    white-space: normal !important;
    text-align: center !important;
  }
}

@media (max-width: 767px) {
  #brx-footer .bc-footer-bottom,
  footer .bc-footer-bottom {
    min-height: 0 !important;
    padding-top: 22px !important;
    padding-bottom: calc(78px + env(safe-area-inset-bottom)) !important;
    align-items: flex-start !important;
    justify-content: center !important;
    box-sizing: border-box !important;
  }

  #brx-footer .bc-footer-bottom .bricks-nav-menu,
  footer .bc-footer-bottom .bricks-nav-menu {
    margin-top: 0 !important;
    align-self: flex-start !important;
  }
}

/* Mobile polish: compact footer legal area above sticky CTA */
@media (max-width: 767px) {
  #brx-footer .bc-footer-bottom,
  footer .bc-footer-bottom {
    padding-top: 14px !important;
    padding-bottom: calc(62px + env(safe-area-inset-bottom)) !important;
    min-height: 0 !important;
  }

  #brx-footer .bc-footer-bottom .bricks-nav-menu,
  footer .bc-footer-bottom .bricks-nav-menu {
    gap: 6px 12px !important;
  }

  #brx-footer .bc-footer-bottom .menu-item a,
  footer .bc-footer-bottom .menu-item a {
    line-height: 1.22 !important;
  }
}
