/* /isp-proxies/<paese>/: configuratore ISP dopo l'hero (bozza B approvata da Aldo il 16/10/2026, research/isp-configurator).
   Componenti di tools/tools.css (.tool .tool-grid .rg-check .cc-tab .btn-ghost .ua-table .qd-code-block .cta-inline),
   qui solo il posto nella pagina ISP, i colori del tema chiaro e le parti che gli strumenti non hanno. Scritto da
   isp-pages-build.mjs (--specs); collegato solo dalle pagine col configuratore, dentro i marker qd-isp-cfg. */
#qcfg{position:relative;max-width:1140px;margin:40px auto 0;padding:0 20px;color:var(--text,#0E1220)}
/* la striscia dei fatti sale di 76px sull'hero (isp-country.css): dopo il configuratore resta sotto, senza coprirlo */
main > #qcfg + .facts-wrap{margin-top:48px}
/* il configuratore sostituisce il bottone "Choose a city" della sezione #cities (isp-city-pages-build.mjs): tabella e
   testo restano (accordo con la sessione Custom ISP launch, 17/10) */
body:has(#qcfg) main #cities > .cta-row{display:none}
#qcfg *,#qcfg *::before,#qcfg *::after{box-sizing:border-box}
#qcfg [hidden]{display:none!important}
#qcfg :is(h2,h3){font-family:var(--font-head,system-ui,sans-serif);color:#0E1220;margin:0}
#qcfg p{margin:0}

/* intestazione come l'hero dei tool */
#qcfg .qc-head{margin:0 0 20px;max-width:760px}
#qcfg .qc-eyebrow{display:flex;align-items:center;gap:10px;font-size:13px;font-weight:600;letter-spacing:.02em;color:#5A6377}
#qcfg .qc-flag{display:block;flex:none;width:21px;height:14px;border-radius:2px;box-shadow:0 0 0 1px rgba(14,18,32,.16)}
#qcfg h2{font-size:clamp(26px,2.8vw,36px);line-height:1.12;letter-spacing:-.028em;font-weight:600;margin:10px 0 8px;max-width:none}
#qcfg .qc-lead{font-size:17px;line-height:1.6;color:#3A4256}
#qcfg .qc-note{font-size:14px;color:#5A6377;margin-top:10px}

/* lo strumento */
#qcfg .tool{border-radius:18px}
#qcfg .qc-steps{margin:0 0 20px}
#qcfg .qc-steps .cc-tab{display:inline-flex;align-items:center;gap:8px}
#qcfg .qc-steps .cc-tab b{display:inline-grid;place-items:center;width:20px;height:20px;border-radius:50%;border:1px solid var(--line);font-size:.72rem;font-weight:600;font-variant-numeric:tabular-nums}
#qcfg .qc-steps .cc-tab.is-on b{border-color:rgba(37,227,194,.6)}
#qcfg .qc-steps .cc-tab[data-done] b{background:#F1F3F8}
#qcfg .tool-grid{grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr);align-items:start}
#qcfg .qc-step > .tool-label{font-size:.95rem;font-family:var(--font-head,system-ui,sans-serif)}
#qcfg .qc-step{display:flex;flex-direction:column;gap:10px;min-width:0}
#qcfg .qc-opts{display:grid;gap:6px}
#qcfg .rg-check{border-color:var(--line)}
#qcfg .rg-check:has(input:checked){background:#F6F7FB;border-color:rgba(14,18,32,.22)}
#qcfg .rg-check span{min-width:0}
#qcfg .rg-check i b{font-weight:600;color:#0E1220}
#qcfg .qc-tag{font-size:.74rem!important;font-weight:600;letter-spacing:.02em;color:#5A6377}
#qcfg .rg-check .qc-badges{display:flex;flex-direction:row;flex-wrap:wrap;gap:4px;margin:3px 0 1px}
#qcfg .qc-badges u{text-decoration:none;font-size:.72rem;line-height:1.6;padding:0 6px;border:1px solid var(--line);border-radius:4px;color:#0E1220;background:#fff}
#qcfg .qc-chips{margin-top:0}
#qcfg .qc-chips .cc-tab{font-variant-numeric:tabular-nums}
#qcfg .qc-chips .qc-count{margin-left:7px;font-size:.78em;font-weight:500;color:#5B6273}
#qcfg .qc-repl{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px;max-width:360px}
#qcfg .qc-repl .cc-tab{padding:8px 0;text-align:center}
#qcfg .qc-qty{max-width:200px;font-variant-numeric:tabular-nums;font-size:1rem!important}
#qcfg .tool-actions{justify-content:space-between;margin-top:14px;padding-top:14px;border-top:1px solid var(--line)}
/* Aldo 17/10: "Next" is the step forward, so it reads as a button (filled ink, arrow), not as a twin of Back.
   Not teal: the teal stays on Buy, the one teal element of the configurator (CONVERSION_DESIGN §1) */
#qcfg .qc-next{background:#0E1220;border-color:#0E1220;color:#fff;font-weight:650;padding-left:22px;padding-right:22px;
  display:inline-flex;align-items:center;gap:8px;transition:background-color .2s ease,transform .2s ease}
#qcfg .qc-next::after{content:"\2192";font-size:1.2em;line-height:1;transition:transform .2s ease}
/* Aldo 17/10: Next pulses (a violet ring every 2 s) and its arrow nudges forward, so the step forward is obvious.
   Loop of 2 s, transform/box-shadow only, off with prefers-reduced-motion (the button stays as above) */
@keyframes qc-pulse{0%{box-shadow:0 0 0 0 rgba(75,63,214,.55)}70%{box-shadow:0 0 0 12px rgba(75,63,214,0)}100%{box-shadow:0 0 0 0 rgba(75,63,214,0)}}
@keyframes qc-nudge{0%,55%,100%{transform:none}25%{transform:translateX(5px)}}
@media (prefers-reduced-motion:no-preference){
  #qcfg .qc-next{animation:qc-pulse 2s ease-out infinite}
  #qcfg .qc-next::after{animation:qc-nudge 2s ease-in-out infinite}
}
/* hover only with a mouse: on a phone a tapped button keeps :hover, so there it must look exactly like at rest
   (the base .btn-ghost:hover of tools.css would grey the border) */
#qcfg .qc-next:hover{border-color:#0E1220;color:#fff}
@media (hover:hover){
  #qcfg .qc-next:hover{background:#2A3045;border-color:#2A3045;transform:translateY(-1px)}
  #qcfg .qc-next:hover::after{transform:translateX(3px)}
}
#qcfg .qc-next:focus-visible{outline:3px solid rgba(75,63,214,.55);outline-offset:2px}
#qcfg .qc-link{background:none;border:0;padding:0;color:#0E1220;text-decoration:underline;text-underline-offset:3px;cursor:pointer;font:inherit}

/* il risultato: "Your plan" */
#qcfg .qc-result{position:sticky;top:96px;gap:12px}
#qcfg .qc-result .tool-out-head{margin:0}
#qcfg .qc-where{display:flex;align-items:center;gap:8px;font-size:.84rem;color:#5A6377}
#qcfg .qc-where .qc-flag{width:18px;height:12px}
#qcfg .ua-table{margin:0;border-top:1px solid var(--line)}
#qcfg .ua-row{grid-template-columns:minmax(96px,36%) minmax(0,1fr)}
#qcfg .ua-row dd{color:#0E1220;font-variant-numeric:tabular-nums}
#qcfg .rt-miss{color:#8A5A00}
#qcfg .qd-code-block{border-radius:16px;background:#0B1110;border-color:#1E2A26}
#qcfg .qd-code-block .tool-code{background:transparent;border:0;border-radius:0;color:#E5EEE9;font-size:.82rem;min-height:0;white-space:pre}
#qcfg .cta-inline{margin-top:0;align-items:center}
#qcfg .cta-inline p{color:#3A4256}
#qcfg .cta-inline .qc-total{display:block;font-family:var(--font-head,system-ui,sans-serif);font-size:1.6rem;line-height:1.1;font-weight:650;letter-spacing:-.02em;color:#0E1220;font-variant-numeric:tabular-nums}
#qcfg .cta-inline .btn-cta{flex:1 1 200px;justify-content:center;text-align:center;white-space:normal;line-height:1.3;padding:10px 16px}
#qcfg .cta-inline .btn-cta[aria-disabled=true]{opacity:.55}
#qcfg .qc-fine{margin:0;font-size:.8rem}

/* blocco funzioni del pool scelto */
#qcfg .qc-feats{margin-top:26px}
#qcfg .qc-feats h3{font-size:18px}
#qcfg .qc-flist{list-style:none;margin:12px 0 0;padding:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));column-gap:28px}
#qcfg .qc-flist li{position:relative;display:grid;align-content:start;gap:3px;margin:0;padding:13px 0 13px 26px;border-top:1px solid var(--line)}
#qcfg .qc-flist li::before{content:"";position:absolute;left:3px;top:19px;width:10px;height:6px;border-left:2px solid #047857;border-bottom:2px solid #047857;transform:rotate(-45deg)}
#qcfg .qc-flist strong{font-size:15px;font-weight:600;color:#0E1220}

/* /24 interi su richiesta (solo paesi con pool Premium pronti) */
#qcfg .qc-subnet{display:flex;align-items:center;justify-content:space-between;gap:16px 28px;flex-wrap:wrap;margin-top:26px;padding:18px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
#qcfg .qc-subnet>div{flex:1 1 420px;max-width:72ch}
#qcfg .qc-subnet h3{font-size:18px;margin:0 0 6px}
#qcfg .qc-subnet p{margin:0;line-height:1.6}
#qcfg .qc-subnet-btn{flex:0 0 auto;min-height:44px;display:inline-flex;align-items:center;justify-content:center;text-decoration:none}
#qcfg .qc-fine a{color:inherit;text-decoration:underline;text-underline-offset:2px}


@media (max-width:900px){#qcfg .qc-flist{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:860px){#qcfg .tool-grid{grid-template-columns:minmax(0,1fr)}#qcfg .qc-result{position:static}}
/* the total next to Next exists only in the phone action bar (desktop shows it in "Your plan") */
#qcfg .qc-bar-sum{display:none}
@media (max-width:640px){
  #qcfg{margin-top:24px;padding:0 12px}
  #qcfg h2{font-size:26px}
  #qcfg .qc-lead{font-size:16px}
  #qcfg .tool{padding:16px}
  #qcfg .qc-steps{gap:6px}
  #qcfg .qc-steps .cc-tab{padding:7px 11px;min-height:40px}
  #qcfg .qc-flist{grid-template-columns:minmax(0,1fr)}
  #qcfg .ua-row{grid-template-columns:minmax(0,40%) minmax(0,1fr)}
  #qcfg .cta-inline .btn-cta{flex-basis:100%}
  #qcfg .qd-code-block .tool-code{font-size:.78rem;padding:14px}
  /* phones (Aldo 17/10 "da phone fa cagare"): Back, the running total and Next stay on screen while the option
     lists scroll (sticky inside the steps column, so the bar sits in place once its end is reached) */
  #qcfg .tool-actions{position:sticky;bottom:0;z-index:6;flex-wrap:nowrap;gap:10px;margin:12px -8px 0;
    padding:10px 8px calc(10px + env(safe-area-inset-bottom,0px));background:#fff;border-top:1px solid var(--line);
    box-shadow:0 -14px 24px -22px rgba(14,18,32,.55)}
  #qcfg .tool-actions [data-back]{flex:0 0 auto;min-height:46px;padding:0 14px}
  #qcfg .qc-bar-sum{display:flex;flex-direction:column;flex:1 1 auto;min-width:0;font-size:.72rem;line-height:1.25;color:#5A6377}
  #qcfg .qc-bar-sum .qc-total{display:block;margin:0;font:650 1.1rem/1.15 var(--font-head);color:#0E1220;font-variant-numeric:tabular-nums}
  #qcfg .tool-actions .qc-bar-sum[hidden]{display:none}
  #qcfg .tool-actions:has(.qc-bar-sum[hidden]) .qc-next{flex:1 1 auto;justify-content:center}
  /* the steps (up to 6) are one row that scrolls sideways, not three wrapped rows */
  #qcfg .qc-steps{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;margin-left:-16px;margin-right:-16px;padding:2px 16px 6px;
    scroll-padding-inline:16px;-webkit-mask-image:linear-gradient(90deg,#000 calc(100% - 28px),transparent);mask-image:linear-gradient(90deg,#000 calc(100% - 28px),transparent)}
  #qcfg .qc-steps::-webkit-scrollbar{display:none}
  #qcfg .qc-steps .cc-tab{flex:0 0 auto;white-space:nowrap}
  #qcfg .qc-next{flex:0 0 auto;min-height:46px;padding:0 16px;font-size:.9rem}
  /* option lists: the chosen pool keeps its description and badges, the others show tag, name and price only */
  #qcfg .rg-check:has(input[data-set="pool"]:not(:checked)) > span > b + i,
  #qcfg .rg-check:has(input[data-set="pool"]:not(:checked)) .qc-badges{display:none}
  #qcfg .rg-check{padding:9px 10px}
  /* the chat button rises above the bar while the bar is on screen (class set by isp-configurator.js) */
  html.qc-bar-on .qdA-btn{bottom:88px;transition:bottom .2s ease}
}
/* a price never breaks between "$" and its figure */
#qcfg .rg-check i b{white-space:nowrap}
