/* The solar pool heating price estimator (_estimator.py, estimator.js), on Home and /solar-pool-heating/. Loaded on
   every page after water.css. ONE SCREEN (Jéan, 26 Oct 2026): the WhatsApp label, heading, five fields, panels and
   Estimated Total, the message preview, the send button and the disclaimer all fit in view at once, below the sticky
   header (139px desktop, 99px phone) and above the phone's bottom bar (67px), down to 1366x768 and 360x740.
   The site's own parts: navy result band, Oswald for the big figures, amber on navy, WhatsApp's own green with white
   text. Colours only from the :root tokens (plus WhatsApp's green). */
.est-sec{--sec:clamp(40px,7vh,88px)}

/* the heading: what it is (an estimator) and what it does (a ready-made WhatsApp message), in one short block */
.est-head{display:flex;align-items:flex-end;justify-content:space-between;gap:16px 48px;max-width:1120px;margin:0 auto 24px}
.est-head h2{margin-top:10px;font-size:clamp(30px,2.6vw,38px);line-height:1.1;color:var(--deep)}
.est-lede{max-width:44ch;font-size:16px;line-height:1.5;color:var(--muted)}
.est-tag{display:inline-flex;align-items:center;gap:7px;height:28px;padding:0 12px 0 9px;border-radius:var(--r-pill);background:#25D366;color:#fff;font-size:13px;font-weight:700;letter-spacing:.01em;text-shadow:0 1px 2px rgba(0,0,0,.2)}   /* WhatsApp's own green and white */
.est-tag svg{width:16px;height:16px;flex:none}

/* the card: form left, live result right */
.est{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);max-width:1120px;margin:0 auto;background:#fff;border:1px solid var(--line);border-radius:var(--r-card);overflow:hidden;box-shadow:0 30px 60px -36px rgba(var(--dark-rgb),.45)}

/* the form side */
.est-f{display:flex;flex-direction:column;gap:22px;padding:32px 36px}
.est-g{border:0;min-width:0;margin:0;padding:0}
.est-g legend{padding:0;margin-bottom:12px;font-family:var(--display);font-weight:600;font-size:17px;letter-spacing:.04em;text-transform:uppercase;color:var(--deep)}
.est-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:14px 16px}
.est-row .full{grid-column:1/-1}
.est label{display:grid;gap:5px;font-size:13px;font-weight:600;line-height:1.3;color:var(--ink)}
.est input{font:inherit;font-size:15px;font-weight:400;color:var(--ink);background:var(--ground);border:1px solid var(--line);border-radius:10px;height:46px;padding:0 14px;width:100%;min-width:0;-moz-appearance:textfield}
.est input::-webkit-outer-spin-button,.est input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}
.est input::placeholder{color:var(--muted);opacity:.8}
.est input:focus{outline:2px solid var(--acc);outline-offset:1px;background:#fff}
.est input:user-invalid{border-color:var(--bad)}
.est-u{position:relative;display:block}
.est-u input{padding-right:38px}
.est-u i{position:absolute;right:14px;top:50%;transform:translateY(-50%);font-style:normal;font-weight:600;color:var(--muted);pointer-events:none}
.est-hint{margin-top:auto;padding-top:14px;border-top:1px solid var(--line);font-size:13px;line-height:1.5;color:var(--muted)}

/* the live result: the navy band, panels and the rand total side by side, the message preview, then send */
.est-res{display:flex;flex-direction:column;padding:32px 36px;background:linear-gradient(160deg,var(--deep),var(--deep-ink));color:#fff}
.est-out{display:grid;grid-template-columns:auto minmax(0,1fr);gap:4px 32px;align-items:end}
.est-tot{padding-left:32px;border-left:1px solid rgba(255,255,255,.16)}
.est-k{font-size:12px;font-weight:600;letter-spacing:.12em;text-transform:uppercase;color:var(--on-deep)}
.est-n,.est-t{margin-top:6px;font-family:var(--display);font-weight:600;font-size:clamp(46px,4vw,58px);line-height:1;white-space:nowrap;font-variant-numeric:tabular-nums}
.est-t{color:var(--on-dark)}
.est-custom .est-t{font-size:clamp(34px,2.9vw,42px);line-height:1.38}
.est-l{grid-column:1/-1;margin-top:12px;font-size:14px;line-height:1.5;color:rgba(255,255,255,.84)}
.est:not(.est-has) .est-n,.est:not(.est-has) .est-t{opacity:.4}

/* a preview of the pre-filled WhatsApp message, as a chat bubble */
.est-msg{margin-top:20px;padding-top:18px;border-top:1px solid rgba(255,255,255,.16)}
.est-bub{position:relative;margin-top:10px;padding:10px 14px;border-radius:12px 12px 12px 3px;background:color-mix(in srgb,#25D366 14%,#fff);color:var(--ink);font-size:13.5px;line-height:1.5}
.est-bub span{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.est-bub span:first-child{color:var(--ink-2)}
.est .est-send{width:100%;height:54px;margin-top:18px;padding:0 20px;gap:10px;justify-content:center;background:#25D366;color:#fff;font-size:16px;text-shadow:0 1px 2px rgba(0,0,0,.2)}   /* WhatsApp's own green and white, always */
.est .est-send svg{width:22px;height:22px;flex:none}
.est .est-send[aria-disabled=true]{opacity:.55;transform:none}
.est-need{margin-top:8px;font-size:13px;text-align:center;color:rgba(255,255,255,.78)}
.est-fine{margin-top:10px;font-size:12.5px;line-height:1.45;text-align:center;color:rgba(255,255,255,.66)}

@media (max-width:1100px){
  .est-f,.est-res{padding:28px}
  .est-tot{padding-left:24px}
  .est-out{column-gap:24px}
}

/* phones and tablets: stacked and compact, the form first, then the result strip right above the send button */
@media (max-width:900px){
  .est-sec{--sec:12px;padding-bottom:calc(var(--cut,7vw) + 28px)}   /* the next section's angled cut overlaps this much */
  .est-head{display:block;margin-bottom:12px}
  .est-head h2{margin-top:8px;font-size:23px;line-height:1.15}
  .est-lede{margin-top:4px;font-size:14px;line-height:1.35}
  .est-tag{height:22px;padding:0 10px 0 7px;font-size:12px;gap:6px}
  .est-tag svg{width:14px;height:14px}
  .est{grid-template-columns:minmax(0,1fr);border-radius:18px}
  .est-f{gap:8px;padding:12px 12px 12px}
  .est-g legend{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}   /* the labels say it; kept for screen readers */
  .est-row{gap:8px 10px}
  .est label{gap:3px;font-size:12.5px;line-height:1.2}
  .est input{font-size:16px;height:44px;padding:0 12px}   /* 16px stops iOS zooming in; 44px is the tap floor */
  .est-u input{padding-right:32px}
  .est-u i{right:12px}
  .est-hint{display:none}
  .est-res{padding:10px 12px}
  .est-out{grid-template-columns:auto minmax(0,1fr);column-gap:16px;align-items:center}
  .est-tot{padding-left:16px}
  .est-k{font-size:10.5px;line-height:1.25;letter-spacing:.1em}
  .est-n,.est-t{margin-top:2px;font-size:30px}
  .est-custom .est-t{font-size:24px;line-height:1.25}
  .est-l{margin-top:4px;font-size:12.5px;line-height:1.35}
  .est-msg{display:none}
  .est .est-send{height:48px;margin-top:8px;font-size:15px}
  .est .est-send svg{width:20px;height:20px}
  .est-need{margin-top:4px;font-size:12px;line-height:1.3}
  .est-fine{margin-top:4px;font-size:11.5px;line-height:1.35}
}
/* taller phones have room for the message preview too */
@media (max-width:900px) and (min-height:800px){
  .est-msg{display:block;margin-top:10px;padding-top:8px}
  .est-msg .est-k{display:none}
  .est-bub{margin-top:0;padding:7px 11px;font-size:12.5px;line-height:1.4}
  .est-bub span:nth-child(3){display:none}
}
@media (prefers-reduced-motion:reduce){.est .est-send{transition:none}}
