/* ==========================================================================
   Ofertele: alegerea „Doar pompa / Instalație completă" și pagina ofertei.

   Doar reguli noi, pe tokenurile din chofu.css (--casing, --divider, --r-btn,
   --r-card, --tint-1, --text-muted). Componentele machetei rămân neatinse:
   alegerea folosește .segs/.seg, pagina ofertei .cart/.ctab/.csum.
   Ținte de cel puțin 44 px, fără etichete gri rotunjite, fără culoare singură
   ca semnal (fiecare stare are și text).
   ========================================================================== */

/* --- Alegerea de lângă preț -------------------------------------------- */

.pchoice { margin-top: 1.1rem; }
.pchoice__set { margin: 0; padding: 0; border: 0; min-width: 0; }
.pchoice__lg { padding: 0; margin-bottom: .55rem; font-size: var(--fs-micro); font-weight: 700;
               letter-spacing: .07em; text-transform: uppercase; color: var(--text-muted); }
.pchoice__opts { gap: .5rem; }
.pchoice__opt > span { min-height: 64px; padding: .75rem .95rem; gap: .2rem; }
.pchoice__row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
                gap: .15rem 1rem; }
.pchoice__row b { font-size: var(--fs-body); }
.pchoice__amt { font-size: var(--fs-body); font-weight: 700; color: var(--ink); white-space: nowrap; }
.pchoice__from { font-size: var(--fs-small); font-weight: 500; color: var(--text-muted); }
.pchoice__amt--tbd { font-size: var(--fs-small); font-weight: 600; color: var(--text-muted); }
.pchoice__opt small { font-size: var(--fs-micro); }

/* Panourile: arătate după opțiunea bifată, fără script; scriptul pune și o
   clasă, pentru browserele fără :has(). */
.pchoice__panel { display: none; }
.pchoice__panel--pompa:has(*) { margin-top: .9rem; }
.pchoice:has(input[value="pompa"]:checked) .pchoice__panel--pompa,
.pchoice.is-pompa .pchoice__panel--pompa { display: block; }
.pchoice:has(input[value="complet"]:checked) .pchoice__panel--complet,
.pchoice.is-complet .pchoice__panel--complet { display: block; }
.pchoice__panel--complet { margin-top: .9rem; padding: clamp(1rem, 1.8vw, 1.25rem);
                           border: 1px solid var(--divider); border-radius: var(--r-btn);
                           background: var(--tint-1); }

.pchoice__k { margin: 0 0 .45rem; font-size: var(--fs-small); font-weight: 700; color: var(--ink); }
.pchoice__inc { display: grid; gap: .35rem; margin: 0 0 .85rem; padding: 0; list-style: none; }
.pchoice__inc li { position: relative; padding-left: 1.5rem; font-size: var(--fs-small); line-height: 1.45; }
.pchoice__inc li::before { content: ""; position: absolute; left: .15rem; top: .3em; width: .45rem; height: .8rem;
                           border: solid var(--chofu-green); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.pchoice__note { margin: 0 0 1rem; font-size: var(--fs-micro); line-height: 1.5; color: var(--text-muted); }
.pchoice__note b { color: var(--ink); font-weight: 600; }

.pchoice__f { display: grid; gap: 0 .75rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 520px) { .pchoice__f { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pchoice__f .field { margin-bottom: .75rem; min-width: 0; }
.pchoice__f .field > label { font-size: var(--fs-small); font-weight: 600; }
.pchoice__f input[type="text"], .pchoice__f input[type="tel"], .pchoice__f input[type="email"] {
  width: 100%; max-width: none; min-height: 48px; }
.pchoice__f input[aria-invalid="true"] { border-color: var(--chofu-red); }
.pchoice__ok, .pchoice__go, .pchoice__msg, .pchoice__f noscript { grid-column: 1 / -1; }
.pchoice__ok { display: flex; align-items: flex-start; gap: .6rem; min-height: 44px; margin: .1rem 0 .9rem;
               font-size: var(--fs-micro); line-height: 1.5; color: var(--text-muted); cursor: pointer; }
.pchoice__ok input { flex: none; width: 22px; height: 22px; margin: 0; accent-color: var(--casing); }
.pchoice__ok a { color: var(--chofu-cyan); }
.pchoice__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.pchoice__go[aria-busy="true"] { opacity: .7; cursor: progress; }
.pchoice__msg { margin: .6rem 0 0; font-size: var(--fs-small); }
.pchoice__msg:empty { display: none; }
.pchoice__msg.is-error { color: var(--chofu-red); font-weight: 600; }
.pchoice__done { padding-top: .25rem; }
.pchoice__done:focus { outline: none; }
.pchoice__done p:last-child { margin: 0; font-size: var(--fs-small); }

/* --- Alegerea în configurator ---------------------------------------------
   chofu.js mută alegerea în cardul-răspuns (.cfg__out), care e închis la
   culoare (--casing). Regulile configuratorului din chofu.css prind și
   opțiunile ei: `.cfg .seg > span` le dă înălțime fixă de 50 px (a doua
   opțiune ieșea tăiată, iar `.cfg .seg small` ascundea explicațiile), iar
   fundalul alb cu textul alb moștenit o făcea invizibilă. Aici alegerea
   primește înălțimea după conținut și varianta pe fond închis: colțuri
   drepte, text alb sau aproape alb (≥ 7:1 pe --casing), opțiunea aleasă
   inversată (alb, text --ink) și marcată și printr-un pătrat bifat, ținte
   de cel puțin 44 px, fără etichete gri rotunjite. */

.cfg .pchoice__opt > span { display: grid; height: auto; min-height: 64px; padding: .75rem .95rem;
                            align-content: center; justify-content: stretch; text-align: left; }
.cfg .pchoice__opt small { display: block; }
.cfg .pchoice__row b { overflow-wrap: anywhere; }

.cfg__out .pchoice { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,.25); color: #fff; }
.cfg__out .pchoice__lg { color: rgba(255,255,255,.78); }
.cfg__out .pchoice .pchoice__opt > span { border: 1px solid rgba(255,255,255,.55); border-radius: 0;
                                          background: transparent; color: #fff; box-shadow: none; }
.cfg__out .pchoice .pchoice__opt:hover > span { border-color: #fff; }
.cfg__out .pchoice__amt { color: #fff; }
.cfg__out .pchoice__from, .cfg__out .pchoice__amt--tbd { color: rgba(255,255,255,.78); }
.cfg__out .pchoice__opt small { color: rgba(255,255,255,.78); }

/* opțiunea aleasă: inversată, cu pătratul bifat în fața numelui */
.cfg__out .pchoice__row b { display: inline-flex; align-items: center; gap: .55rem; }
.cfg__out .pchoice__row b::before { content: ""; flex: none; width: 14px; height: 14px; box-sizing: border-box;
                                    border: 2px solid currentColor; background: transparent; }
.cfg__out .pchoice .seg input:checked + span { border-color: #fff; background: #fff; color: var(--ink); box-shadow: none; }
.cfg__out .pchoice .seg input:checked + span .pchoice__amt { color: var(--ink); }
.cfg__out .pchoice .seg input:checked + span .pchoice__from,
.cfg__out .pchoice .seg input:checked + span .pchoice__amt--tbd,
.cfg__out .pchoice .seg input:checked + span small { color: var(--grey); }
.cfg__out .pchoice .seg input:checked + span .pchoice__row b::before {
  border-color: var(--ink); background: var(--ink)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M2 5.2 4.1 7.3 8 3' fill='none' stroke='%23fff' stroke-width='1.6'/%3E%3C/svg%3E") center / 10px no-repeat; }
.cfg__out .pchoice .seg input:focus-visible + span { outline: 3px solid #fff; outline-offset: 2px; }

/* panoul „Instalație completă" și formularul, pe fond închis */
.cfg__out .pchoice__panel--complet { border: 1px solid rgba(255,255,255,.25); border-radius: 0;
                                     background: rgba(255,255,255,.06); }
.cfg__out .pchoice__k, .cfg__out .pchoice__note b { color: #fff; }
.cfg__out .pchoice__inc li { color: rgba(255,255,255,.9); }
.cfg__out .pchoice__inc li::before { border-color: #fff; }
.cfg__out .pchoice__note { color: rgba(255,255,255,.78); }
.cfg__out .pchoice__f .field > label { color: #fff; }
.cfg__out .pchoice__f input[type="text"], .cfg__out .pchoice__f input[type="tel"],
.cfg__out .pchoice__f input[type="email"] { border: 1px solid #fff; border-radius: 0; background: #fff; color: var(--ink); }
.cfg__out .pchoice__f input:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.cfg__out .pchoice__f input[aria-invalid="true"] { border-color: #ff8a8f; box-shadow: 0 0 0 2px #ff8a8f; }
.cfg__out .pchoice__ok { color: rgba(255,255,255,.85); }
.cfg__out .pchoice__ok input { accent-color: #fff; }
.cfg__out .pchoice__ok a { color: #fff; text-decoration: underline; }
.cfg__out .pchoice__go, .cfg__out .pchoice__buy .btn { min-height: 48px; border: 1px solid #fff; border-radius: 0;
                                                       background: #fff; color: var(--casing); }
.cfg__out .pchoice__go:hover, .cfg__out .pchoice__buy .btn:hover { border-color: var(--tint-3); background: var(--tint-3); color: var(--casing); }
.cfg__out .pchoice__go:focus-visible, .cfg__out .pchoice__buy .btn:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.cfg__out .pchoice__msg { color: #fff; }
.cfg__out .pchoice__msg.is-error { color: #ff8a8f; }
.cfg__out .pchoice__done p:last-child { color: rgba(255,255,255,.9); }

/* Pe telefon cardul-răspuns stă lipit sub antet, peste formularul
   configuratorului. Rămâne scurt: explicația apare doar la opțiunea aleasă.
   Cu formularul „Instalație completă" deschis, cardul nu mai stă lipit,
   altfel ar acoperi tot ecranul. */
@media (max-width: 999px) {
  .cfg__out .pchoice .seg input:not(:checked) + span small { display: none; }
  .cfg__out:has(.pchoice input[value="complet"]:checked),
  .cfg__out:has(.pchoice.is-complet) { position: relative; top: auto; }
}

/* --- Pagina ofertei ------------------------------------------------------ */

.ofr-facts { display: grid; gap: 1rem 2rem; margin: 0 0 1.25rem; padding: 0;
             grid-template-columns: repeat(auto-fit, minmax(min(100%, 9.5rem), 1fr)); }
.ofr-facts > div { min-width: 0; }
.ofr-facts dt { font-size: var(--fs-micro); font-weight: 700; letter-spacing: .07em;
                text-transform: uppercase; color: var(--text-muted); }
.ofr-facts dd { margin: .2rem 0 0; font-weight: 600; }
.ofr-intro { margin: 0; }

/* Starea: un punct și cuvântul, nu o etichetă colorată. */
.ofr-state { display: inline-flex; align-items: center; gap: .45rem; }
.ofr-state::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--edge); flex: none; }
.ofr-state--trimisa::before, .ofr-state--ciorna::before { background: var(--chofu-cyan); }
.ofr-state--acceptata::before { background: var(--chofu-navy); }
.ofr-state--platita::before { background: var(--chofu-green); }
.ofr-state--expirata::before { background: var(--chofu-red); }

.ofr-flash { margin-bottom: 1.5rem; }
.ofr-flash p { margin: 0; }
.ofr-tab__p { display: grid; gap: .2rem; min-width: 0; }
.ofr-tab__n { font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.ofr-tab__p small { font-size: var(--fs-micro); color: var(--text-muted); font-weight: 400; }
.ofr-tab .ctab__c, .ofr-tab .ctab__r { white-space: nowrap; }
.ofr-req { font-style: normal; color: var(--text-muted); }
.ofr-fine { margin: .85rem 0 0; font-size: var(--fs-micro); color: var(--text-muted); }
.ofr-note { margin-top: 1.5rem; }
.ofr-h { margin: 0 0 .6rem; font-size: var(--fs-h3); }
.ofr-cols { display: grid; gap: 1.5rem 2.5rem; margin-top: clamp(2rem, 3.5vw, 3rem);
            grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); }
.ofr-list { display: grid; gap: .45rem; margin: 0; padding: 0; list-style: none; }
.ofr-list li { position: relative; padding-left: 1.6rem; font-size: var(--fs-small); line-height: 1.5; }
.ofr-list--yes li::before { content: ""; position: absolute; left: .2rem; top: .25em; width: .45rem; height: .8rem;
                            border: solid var(--chofu-green); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.ofr-list--no li::before { content: "×"; position: absolute; left: .15rem; top: -.05em; font-size: 1.1rem;
                           line-height: 1.2; color: var(--text-muted); }
.ofr-terms { margin-top: clamp(2rem, 3.5vw, 3rem); max-width: 70ch; }
.ofr-terms .ofr-h { margin-top: 1.5rem; }
.ofr-terms p { font-size: var(--fs-small); color: var(--text); }

.ofr-sum .btn + .csum__fine { margin-bottom: 1rem; }
.ofr-pdf { margin-top: .75rem; }
.ofr-done { margin: 0 0 1rem; padding: .85rem 1rem; border-radius: var(--r-btn); background: var(--tint-1);
            font-size: var(--fs-small); }
.ofr-ask { margin-top: 1.25rem; padding: clamp(1.25rem, 2.2vw, 1.75rem); border: 1px solid var(--divider);
           border-radius: var(--r-card); background: var(--bg-raised); }
.ofr-ask .ofr-h { font-size: var(--fs-body); }
.ofr-ask .ofr-fine { margin: 0 0 1rem; }
.ofr-ask textarea { width: 100%; min-height: 110px; }
.ofr-ask .field { margin-bottom: .9rem; }
.ofr-ask .field > label { font-size: var(--fs-small); font-weight: 600; }

/* Pe telefon, totalul și „Accept" vin înaintea tabelului lung. */
@media (max-width: 979px) {
  .ofr-cart .cart__side { order: -1; }
  .ofr-cart { display: flex; flex-direction: column; }
}

/* --- „Cere ofertă completă", pe pagina produsului (#oferta) --------------
   views/partials/product-offer.twig, în caseta de cumpărare, sub butoane.
   Închisă, nu ocupă loc: „Adaugă în coș" rămâne unde era. Deschisă, e o
   continuare a casetei (o linie de separare, nu încă o cutie), cu o singură
   coloană pe telefon și două pe coloana lată. Refolosește .field, .segs/.seg,
   .qty, .consent și confirmarea .csend__ok. Ținte de cel puțin 44 px, fără
   etichete gri rotunjite, starea fiecărei alegeri are și semn, nu doar culoare. */

.oq { container-type: inline-size; padding-top: clamp(1.1rem, 2vw, 1.5rem);
      border-top: 1px solid var(--divider);
      scroll-margin-top: calc(var(--navh, 80px) + 1rem); }
.oq[hidden], .pchoice__jump[hidden], .oq [hidden] { display: none; }
.oq__t { margin: 0 0 1rem; font-size: var(--fs-h3); line-height: 1.25; letter-spacing: -.015em; }
.oq__t:focus { outline: none; }
.oq__t:focus-visible { outline: 3px solid var(--ink); outline-offset: 4px; }

/* the disclosure button: its chevron turns when the box is open */
.oq-toggle__ic { width: 1.1em; height: 1.1em; flex: none; transition: transform .3s var(--quad); }
.oq-toggle[aria-expanded="true"] .oq-toggle__ic { transform: rotate(180deg); }
.oq-toggle[aria-expanded="true"] { border-color: var(--ink); }

.oq__f { display: grid; gap: 0 .85rem; grid-template-columns: minmax(0, 1fr); margin: 0; }
@container (min-width: 30rem) { .oq__f { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.oq__f .field--wide { grid-column: 1 / -1; }
.oq__f .field { display: flex; flex-direction: column; justify-content: flex-end; gap: 7px;
                min-width: 0; margin: 0 0 1rem; }
.oq__f .field > label { font-size: var(--fs-small); font-weight: 600; }
.oq__f input[type="text"], .oq__f input[type="tel"], .oq__f input[type="email"], .oq__f textarea {
  width: 100%; max-width: none; min-height: 48px; }
.oq__f textarea { min-height: 96px; }
.oq__f input[aria-invalid="true"], .oq__f textarea[aria-invalid="true"] { border-color: var(--chofu-red); }
.oq__opt { font-weight: 400; color: var(--text-muted); }

/* accesoriul: pe ce se montează, două alegeri cu un cerc în față */
.oq__sys { margin: 0 0 1rem; padding: 0; border: 0; min-width: 0; }
.oq__lg { padding: 0; margin-bottom: .6rem; font-size: var(--fs-small); font-weight: 700; color: var(--ink); }
.oq__opts { gap: .5rem; }
@container (min-width: 30rem) { .oq__opts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.oq__opts > .seg { display: flex; }
.oq__opts .seg > span { position: relative; flex: 1; min-height: 64px; padding: .8rem .95rem .8rem 2.75rem;
                        gap: .2rem; align-content: start; }
.oq__opts .seg b { font-size: var(--fs-body); }
.oq__opts .seg small { font-size: var(--fs-small); line-height: 1.4; font-weight: 400; }
.oq__opts .seg > span::before { content: ""; position: absolute; left: .95rem; top: 1rem; width: 18px; height: 18px;
                                box-sizing: border-box; border: 2px solid var(--grey); border-radius: 50%;
                                background: var(--bg-raised); }
.oq__opts .seg input:checked + span::before { border-color: var(--ink); background: var(--ink);
                                              box-shadow: inset 0 0 0 4px var(--bg-raised); }
.oq__opts .seg input[aria-invalid="true"] + span { border-color: var(--chofu-red); }
.oq__sys .field-err:empty { display: none; }
.oq__qty .qty { align-self: flex-start; }
.oq__qty .qty input { font-size: var(--fs-body); font-weight: 600; text-align: center; }

/* pompa: casa, din calculator. Etichetă mică deasupra valorii, fără cutii gri. */
.oq__house { margin: 0 0 1.1rem; padding: 1rem 1.1rem; border: 1px solid var(--divider);
             border-radius: var(--r-btn); background: var(--tint-1); }
.oq__househd { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 1rem; }
.oq__k { margin: 0; font-size: var(--fs-small); font-weight: 700; color: var(--ink); }
.oq__edit { display: inline-flex; align-items: center; min-height: 44px; font-size: var(--fs-small); font-weight: 600;
            color: var(--chofu-cyan); text-decoration: underline; text-underline-offset: .2em; }
.oq__sum { display: grid; gap: .6rem 1.25rem; margin: .35rem 0 0; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.oq__sum > div { min-width: 0; }
.oq__sum dt { font-size: var(--fs-micro); font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
              color: var(--text-muted); }
.oq__sum dd { margin: .15rem 0 0; font-size: var(--fs-small); font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.oq__sum [data-row="need"] { grid-column: 1 / -1; padding-top: .6rem; border-top: 1px solid var(--divider); }
.oq__sum [data-row="need"] dd { font-size: var(--fs-body); }
@container (min-width: 30rem) { .oq__sum { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.oq__hint { margin: .75rem 0 0; font-size: var(--fs-micro); line-height: 1.5; color: var(--text-muted); }

.oq__f .consent { margin: 0 0 1rem; font-size: var(--fs-small); }
.oq__f .consent a { color: var(--chofu-cyan); text-decoration: underline; text-underline-offset: .2em; }
.oq__foot { display: grid; gap: .6rem; }
.oq__go { min-height: 54px; }
.oq__go[aria-busy="true"] { opacity: .7; cursor: progress; }
.oq__fine { margin: 0; font-size: var(--fs-micro); line-height: 1.5; color: var(--text-muted); }
.oq__msg { margin: .75rem 0 0; font-size: var(--fs-small); font-weight: 600; color: var(--chofu-red); }
.oq__msg:empty { display: none; }

/* sent: the badge arrives and the tick settles, once */
.oq__ok { margin: 0; }
.oq__ok:focus { outline: none; }
.oq__ok .oq__okic { color: #fff; }
@keyframes oq-pop { from { opacity: 0; transform: scale(.5); } }
.oq__ok:not([hidden]) .oq__okic { animation: oq-pop .45s var(--expo) both; }

/* Pe o pagină de produs, alegerea din configurator nu are formular propriu:
   doar legătura spre caseta #oferta a pompei ei (offers.js). */
.pchoice.is-linked .pchoice__f, .pchoice.is-linked .pchoice__done { display: none; }

@media (prefers-reduced-motion: reduce) {
  .oq-toggle__ic, .oq__okic { transition: none !important; animation: none !important; }
}
