/* Cashbook Finance v2.8.4 — targeted mobile form, product CTA, portal and accent refinements */

/* Homepage and Contact quote forms: the full example text remains visible on mobile. */
@media (max-width:760px){
  body[data-page="home"] #contact .quote-form-card #fDetails,
  body[data-page="contact"] #enquiry .quote-form-card #fDetails{
    display:block!important;
    width:100%!important;
    min-height:138px!important;
    height:auto!important;
    padding:15px 16px!important;
    font-size:16px!important;
    line-height:1.55!important;
    white-space:pre-wrap!important;
    overflow-y:auto!important;
    resize:vertical!important;
    box-sizing:border-box!important;
  }
  body[data-page="home"] #contact .quote-form-card #fDetails::placeholder,
  body[data-page="contact"] #enquiry .quote-form-card #fDetails::placeholder{
    white-space:normal!important;
    overflow:visible!important;
    text-overflow:clip!important;
    opacity:1!important;
  }
}
@media (max-width:360px){
  body[data-page="home"] #contact .quote-form-card #fDetails,
  body[data-page="contact"] #enquiry .quote-form-card #fDetails{min-height:154px!important}
}

/* Product-page closing actions: equal widths, equal spacing and no inline-offset drift. */
.product-footer-actions{
  margin-top:40px!important;
  display:flex!important;
  align-items:stretch!important;
  justify-content:center!important;
  flex-wrap:wrap!important;
  gap:12px!important;
}
.product-footer-actions .btn{
  margin:0!important;
  min-height:52px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
}
@media (max-width:760px){
  .product-footer-actions{
    width:100%!important;
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    gap:10px!important;
    margin-top:32px!important;
  }
  .product-footer-actions .btn{
    width:100%!important;
    min-width:0!important;
    min-height:54px!important;
    padding:12px 16px!important;
    line-height:1.25!important;
    white-space:normal!important;
    text-align:center!important;
  }
}

/* Affiliate headline: the underline/fade belongs only beneath “heavy lifting”. */
body[data-page="affiliates"] .affiliate-heavy-lifting{
  display:inline-block!important;
  white-space:nowrap!important;
}
body[data-page="affiliates"] .affiliate-heavy-lifting::after{
  left:0!important;
  right:0!important;
  width:100%!important;
  transform:scaleX(1)!important;
  transform-origin:left center!important;
}

/* Apply page: remove the outer lined rectangle while preserving two clear choices. */
body[data-page="apply"] .apply-product-choice .seg{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:10px!important;
  width:100%!important;
  height:auto!important;
  min-height:0!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  overflow:visible!important;
}
body[data-page="apply"] .apply-product-choice .seg label{
  min-width:0!important;
  width:100%!important;
  margin:0!important;
  padding:0!important;
}
body[data-page="apply"] .apply-product-choice .seg .opt{
  width:100%!important;
  min-height:54px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  margin:0!important;
  padding:10px 12px!important;
  box-sizing:border-box!important;
}
@media (max-width:520px){
  body[data-page="apply"] .apply-product-choice .seg{
    grid-template-columns:minmax(0,1fr)!important;
    gap:9px!important;
  }
  body[data-page="apply"] .apply-product-choice .seg .opt{min-height:52px!important}
}

/* Secure portal: all sections render immediately and mobile scrolling stays native/easy. */
body[data-page="portal"] .portal-shell .rv,
body[data-page="portal"] .portal-layout .rv,
body[data-page="portal"] .portal-form .rv{
  opacity:1!important;
  transform:none!important;
  transition:none!important;
  animation:none!important;
}
body[data-page="portal"],
body[data-page="portal"] main,
body[data-page="portal"] .portal-shell,
body[data-page="portal"] .portal-layout,
body[data-page="portal"] .portal-form{
  overflow-y:visible!important;
  max-height:none!important;
}
@media (max-width:820px){
  html:has(body[data-page="portal"]),
  body[data-page="portal"]{
    height:auto!important;
    min-height:100%!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
    -webkit-overflow-scrolling:touch!important;
    overscroll-behavior-y:auto!important;
    touch-action:pan-y!important;
  }
  body[data-page="portal"] main,
  body[data-page="portal"] .portal-shell,
  body[data-page="portal"] .portal-layout,
  body[data-page="portal"] .portal-form,
  body[data-page="portal"] .portal-card{
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    touch-action:pan-y!important;
  }
  body[data-page="portal"] .portal-rail{
    position:relative!important;
    top:auto!important;
    z-index:2!important;
    margin-bottom:16px!important;
  }
  body[data-page="portal"] .portal-steps{
    overscroll-behavior:auto!important;
    touch-action:pan-y!important;
  }
  body[data-page="portal"] input[type="file"]{
    max-width:100%!important;
    min-height:54px!important;
  }
}

/* v2.8.6 portal scroll correction: the progress observer must never recenter the page vertically. */
@media (max-width:820px){
  html, body[data-page="portal"]{
    position:static!important;
    height:auto!important;
    min-height:100%!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
    touch-action:pan-y pinch-zoom!important;
  }
  body[data-page="portal"] .portal-rail,
  body[data-page="portal"] .portal-steps,
  body[data-page="portal"] .portal-step{
    touch-action:pan-y pinch-zoom!important;
  }
  body[data-page="portal"] .portal-rail{
    position:relative!important;
    top:auto!important;
  }
  body[data-page="portal"] :is(.portal-field,.upload-box,input[type="file"],select,textarea){
    touch-action:pan-y pinch-zoom!important;
  }
  body[data-page="portal"] .legal-panel{
    max-height:none!important;
    overflow:visible!important;
    touch-action:pan-y pinch-zoom!important;
  }
}
