/* Contact only: keep first-visit consent below the mobile header and above initial contact actions. */
@media (max-width: 699px) {
  html:has(link[rel="canonical"][href="https://tech4service.ca/contact/"]) .t4s-cookie-banner {
    top: 64px;
    bottom: auto;
    left: .5rem;
    right: .5rem;
    width: calc(100vw - 1rem);
    max-height: min(232px, calc(100dvh - 170px));
    padding: .5rem .65rem;
  }
  html:has(link[rel="canonical"][href="https://tech4service.ca/contact/"]) .t4s-cookie-banner h2 {
    font-size: 1rem;
    line-height: 1.25;
    margin-bottom: .25rem;
  }
  html:has(link[rel="canonical"][href="https://tech4service.ca/contact/"]) .t4s-cookie-banner p {
    font-size: .81rem;
    line-height: 1.37;
    margin: .15rem 0 .3rem;
  }
  html:has(link[rel="canonical"][href="https://tech4service.ca/contact/"]) .t4s-cookie-choice {
    margin: .2rem 0;
    font-size: .84rem;
  }
  html:has(link[rel="canonical"][href="https://tech4service.ca/contact/"]) .t4s-cookie-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .38rem;
    margin-top: .3rem;
  }
  html:has(link[rel="canonical"][href="https://tech4service.ca/contact/"]) .t4s-cookie-actions button {
    min-height: 44px;
    padding: .4rem .22rem;
    font-size: .78rem;
    line-height: 1.2;
    overflow-wrap: break-word;
  }
}

/* Keep the privacy settings reachable above the mobile sticky call/book bar. */
@media (max-width: 1023px) {
  body:has(.wf-sticky-cta) .t4s-cookie-settings-anchor {
    padding-bottom: calc(7rem + env(safe-area-inset-bottom, 0px));
  }
}
/* The original compact banner rule stops at 440px; preserve quick actions on wider phones. */
@media (min-width: 441px) and (max-width: 699px) {
  .t4s-cookie-banner {
    bottom: calc(4.7rem + env(safe-area-inset-bottom, 0px));
    max-height: calc(100dvh - 5.8rem - env(safe-area-inset-bottom, 0px));
  }
}

/* Mobile: keep the consent panel below the header and clear of initial lead actions. */
@media (max-width: 699px) {
  html body .t4s-cookie-banner {
    top: 64px;
    bottom: auto;
    left: .5rem;
    right: .5rem;
    width: calc(100vw - 1rem);
    max-height: min(232px, calc(100dvh - 170px));
    padding: .5rem .65rem;
  }
  html body .t4s-cookie-banner h2 {
    font-size: 1rem;
    line-height: 1.25;
    margin-bottom: .25rem;
  }
  html body .t4s-cookie-banner p {
    font-size: .81rem;
    line-height: 1.37;
    margin: .15rem 0 .3rem;
  }
  html body .t4s-cookie-choice {
    margin: .2rem 0;
    font-size: .84rem;
  }
  html body .t4s-cookie-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .38rem;
    margin-top: .3rem;
  }
  html body .t4s-cookie-actions button {
    min-height: 44px;
    padding: .4rem .22rem;
    font-size: .78rem;
    line-height: 1.2;
    overflow-wrap: break-word;
  }
}
