/* Richiesta di preventivo (shortcode [salvia_preventivo]). Dal mockup docs/mockups/preventivo-sito.html
   di Salvia OS. Un solo aspetto, quello chiaro del sito: colori sempre espliciti, niente tema scuro.
   Tutto sotto .ssp, con qualche azzeramento contro gli stili del tema (Salient) su bottoni e campi.
   I caratteri sono quelli del sito (Inter Tight, Ubuntu Mono) se li carica già: niente Google Fonts da qui. */
.ssp {
  color-scheme: light;
  --ssp-scroll-offset: 110px; /* testata fissa di Salient: ciò che prende il fuoco non ci finisce sotto */
  --ssp-bg: #f0f2f0;
  --ssp-paper: #fbfaf9;
  --ssp-ink: #201f1f;
  --ssp-muted: #5f615f;
  --ssp-line: #d6d9d6;
  --ssp-line-strong: #7d807d; /* bordi di opzioni e tasti: almeno 3:1 sul fondo */
  --ssp-accent-ink: #2f6463;
  --ssp-accent-tint: #e1ecea;
  --ssp-error: #a3352b;
  --ssp-font: 'Inter Tight', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --ssp-mono: 'Ubuntu Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --ssp-t-q: clamp(1.75rem, 1.1rem + 2vw, 2.75rem);
  --ssp-t-hero: clamp(2.5rem, 1.2rem + 4.2vw, 4.75rem);
  --ssp-ease: cubic-bezier(0.16, 1, 0.3, 1);

  box-sizing: border-box;
  max-width: 780px; margin: 0 auto; padding-inline: 16px; padding-block: clamp(24px, 6vh, 72px) 32px;
  min-height: calc(100vh - var(--ssp-top, 0px)); min-height: calc(100svh - var(--ssp-top, 0px)); /* a tutto schermo sotto la testata (--ssp-top dal JS) */
  display: flex; flex-direction: column;
  background: var(--ssp-bg); color: var(--ssp-ink); font-family: var(--ssp-font); font-size: 16px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; text-align: left;
}
.ssp *, .ssp *::before, .ssp *::after { box-sizing: border-box; }
.ssp, .ssp * { scroll-margin-top: var(--ssp-scroll-offset); scroll-margin-bottom: 96px; }
.ssp.ssp p { padding: 0; }
.ssp button, .ssp input, .ssp textarea { font: inherit; color: inherit; letter-spacing: normal; text-transform: none; box-shadow: none; margin: 0; }
.ssp :focus-visible { outline: 2px solid var(--ssp-accent-ink); outline-offset: 3px; }
.ssp [tabindex="-1"]:focus { outline: none; }
.ssp p, .ssp h1, .ssp h2 { color: var(--ssp-ink); font-family: var(--ssp-font); }
.ssp a { color: var(--ssp-ink); }

.ssp-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-family: var(--ssp-mono); font-size: 14px; letter-spacing: .05em; text-transform: uppercase; color: var(--ssp-muted); }
.ssp-group { white-space: nowrap; }
.ssp-bar { height: 2px; background: var(--ssp-line); margin-top: 12px; overflow: hidden; border-radius: 2px; }
.ssp-bar i { display: block; height: 100%; background: var(--ssp-accent-ink); transform-origin: left; transform: scaleX(0); transition: transform 400ms var(--ssp-ease); }
.ssp-stage { flex: 1; padding-top: clamp(28px, 6vh, 64px); margin: 0; }
.ssp-step.is-entering { animation: ssp-enter 320ms var(--ssp-ease) both; }
@keyframes ssp-enter { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .ssp-step.is-entering { animation: none; } .ssp-bar i { transition: none; } }

.ssp.ssp .ssp-eyebrow { font-family: var(--ssp-mono); font-size: 14px; letter-spacing: .05em; color: var(--ssp-accent-ink); margin: 0 0 14px; }
.ssp.ssp .ssp-q { overflow-wrap: anywhere; font-size: var(--ssp-t-q); font-weight: 400; letter-spacing: -.025em; line-height: 1.12; margin: 0; text-wrap: balance; }
.ssp.ssp .ssp-hero { overflow-wrap: anywhere; font-size: var(--ssp-t-hero); font-weight: 400; letter-spacing: -.035em; line-height: 1.02; margin: 0; text-wrap: balance; }
.ssp.ssp .ssp-help { overflow-wrap: anywhere; color: var(--ssp-muted); font-size: 17px; margin: 14px 0 0; max-width: 58ch; }
.ssp-answer { margin-top: 32px; }

.ssp-opts { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ssp-opts li { margin: 0; padding: 0; list-style: none; }
.ssp .ssp-opt { width: 100%; min-height: 56px; display: flex; align-items: center; gap: 14px; padding: 12px 16px; text-align: left; background: var(--ssp-paper); border: 1px solid var(--ssp-line-strong); border-radius: 10px; font-size: 18px; font-weight: 400; line-height: 1.35; cursor: pointer; transition: border-color 150ms, background-color 150ms, transform 150ms; touch-action: manipulation; color: var(--ssp-ink); height: auto; }
.ssp .ssp-opt:hover { border-color: var(--ssp-ink); background: var(--ssp-paper); }
.ssp .ssp-opt:active { transform: scale(.99); }
.ssp-opt .ssp-key { flex: none; width: 26px; height: 26px; display: grid; place-items: center; font-family: var(--ssp-mono); font-size: 14px; border: 1px solid var(--ssp-line-strong); border-radius: 6px; color: var(--ssp-muted); }
.ssp-opt .ssp-txt { flex: 1; }
.ssp-opt .ssp-sub { display: block; font-size: 15px; color: var(--ssp-muted); }
.ssp-opt .ssp-tick { flex: none; width: 20px; height: 20px; opacity: 0; color: var(--ssp-accent-ink); transition: opacity 150ms; }
.ssp-opt.has-viz { flex-wrap: wrap; row-gap: 12px; padding-block: 14px; }
.ssp-viz { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.ssp-viz figure { margin: 0; display: grid; gap: 3px; justify-items: center; }
.ssp-viz svg { display: block; width: 132px; height: 66px; background: #fff; border: 1px solid var(--ssp-line); border-radius: 6px; }
.ssp-viz figcaption { font-family: var(--ssp-mono); font-size: 12px; color: var(--ssp-muted); }
.ssp-viz .ssp-arrow { color: var(--ssp-muted); font-size: 18px; padding-bottom: 16px; }
.ssp .ssp-opt[aria-checked="true"] { background: var(--ssp-accent-tint); border-color: var(--ssp-accent-ink); box-shadow: inset 0 0 0 1px var(--ssp-accent-ink); }
.ssp-opt[aria-checked="true"] .ssp-key { background: var(--ssp-accent-ink); border-color: var(--ssp-accent-ink); color: var(--ssp-paper); }
.ssp-opt[aria-checked="true"] .ssp-tick { opacity: 1; }

.ssp.ssp .ssp-field { width: 100%; border: 0; border-bottom: 2px solid var(--ssp-ink); background: transparent; padding: 10px 0; font-size: clamp(1.25rem, 1rem + 1vw, 1.625rem); font-weight: 400; border-radius: 0; height: auto; min-height: 0; }
.ssp.ssp .ssp-field:focus { outline: none; border-bottom: 3px solid var(--ssp-accent-ink); padding-bottom: 9px; background: transparent; }
.ssp.ssp .ssp-field:focus-visible { outline: 2px solid var(--ssp-accent-ink); outline-offset: 4px; }
.ssp.ssp .ssp-field[aria-invalid="true"] { border-bottom-color: var(--ssp-error); }
.ssp.ssp .ssp-field::placeholder { color: #6a6d6a; opacity: 1; }
.ssp textarea.ssp-field { min-height: 132px; resize: vertical; line-height: 1.4; }
.ssp-extra { margin-top: 18px; }
.ssp-extra label { display: block; font-size: 15px; color: var(--ssp-muted); margin-bottom: 4px; }
.ssp.ssp .ssp-err { color: var(--ssp-error); font-size: 15px; margin: 12px 0 0; min-height: 1.5em; }

.ssp-nav { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; padding-block: 14px calc(14px + env(safe-area-inset-bottom, 0px)); background: var(--ssp-bg); border-top: 1px solid var(--ssp-line); }
.ssp-nav[hidden] { display: none; }
.ssp-hint { font-size: 14px; color: var(--ssp-muted); margin-left: auto; }
.ssp-hint kbd { font-family: var(--ssp-mono); font-size: 13px; border: 1px solid var(--ssp-line-strong); border-radius: 4px; padding: 0 5px; background: transparent; color: inherit; box-shadow: none; }
.ssp .ssp-btn { min-height: 48px; height: auto; padding: 0 26px; border-radius: 999px; border: 1px solid var(--ssp-ink); background: var(--ssp-ink); color: var(--ssp-paper); font-size: 16px; font-weight: 500; line-height: 1.2; cursor: pointer; display: inline-flex; align-items: center; gap: 10px; transition: background-color 150ms, transform 150ms; }
.ssp .ssp-btn:hover { background: #000; color: var(--ssp-paper); }
.ssp .ssp-btn:active { transform: scale(.98); }
.ssp .ssp-btn[disabled] { opacity: .6; cursor: progress; }
.ssp .ssp-btn-ghost { background: transparent; color: var(--ssp-ink); border-color: transparent; padding: 0 10px; }
.ssp .ssp-btn-ghost:hover { background: var(--ssp-line); color: var(--ssp-ink); }
.ssp .ssp-btn[hidden] { display: none; }

.ssp-meta { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-top: 28px; font-family: var(--ssp-mono); font-size: 15px; color: var(--ssp-muted); }
.ssp .ssp-mail { color: var(--ssp-ink); }

.ssp-summary { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ssp-line); }
.ssp-summary li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; padding: 14px 0; margin: 0; border-bottom: 1px solid var(--ssp-line); list-style: none; }
.ssp-summary .ssp-k { font-size: 14px; color: var(--ssp-muted); grid-column: 1; }
.ssp-summary .ssp-v { font-size: 17px; grid-column: 1; overflow-wrap: anywhere; }
.ssp .ssp-summary button { grid-column: 2; grid-row: 1 / span 2; align-self: center; background: none; border: 0; padding: 0 4px; color: var(--ssp-accent-ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: 15px; min-height: 44px; }
.ssp .ssp-recap { margin-top: 28px; }
.ssp .ssp-recap > summary { cursor: pointer; width: fit-content; min-height: 44px; display: flex; align-items: center; font-size: 15px; color: var(--ssp-accent-ink); text-decoration: underline; text-underline-offset: 3px; }
.ssp .ssp-recap[open] > summary { margin-bottom: 8px; }
.ssp.ssp .ssp-privacy { font-size: 15px; color: var(--ssp-muted); margin-top: 20px; max-width: 60ch; }
.ssp-live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; margin: 0; }
.ssp.ssp .ssp-foot { margin: 16px 0 0; font-size: 14px; color: var(--ssp-muted); }
.ssp-foot[hidden] { display: none; }
.ssp-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

@media (max-width: 640px) {
  .ssp { min-height: 0; }
  .ssp-nav { margin-inline: -16px; padding-inline: 16px; }
  .ssp-hint { display: none; }
  .ssp-nav .ssp-btn:not(.ssp-btn-ghost) { flex: 1; justify-content: center; }
  .ssp .ssp-opt { font-size: 17px; }
  .ssp-opt.has-viz .ssp-viz { order: 3; width: 100%; margin-left: 40px; }
  .ssp-viz figure { flex: 1; }
  .ssp-viz svg { width: 100%; height: auto; aspect-ratio: 2 / 1; }
}
