/* Form qualifica lead — Andrea Della Porta.
   Personalizzazione: sovrascrivere le variabili --adp-* sul contenitore o su :root. */
.adp-form {
  --adp-accent: #0e6e6a;
  --adp-accent-ink: #ffffff;
  --adp-accent-soft: #e6f2f1;
  --adp-bg: #ffffff;
  --adp-ink: #1d2433;
  --adp-muted: #5f6878;
  --adp-line: #dfe3ea;
  --adp-danger: #b42318;
  --adp-ok: #137a3d;
  --adp-radius: 14px;
  --adp-shadow: 0 10px 30px rgba(20, 30, 50, 0.08);
  font: inherit;
  color: var(--adp-ink);
  max-width: 560px;
  margin: 0 auto;
}
.adp-form *, .adp-form *::before, .adp-form *::after { box-sizing: border-box; }
.adp-card {
  background: var(--adp-bg);
  border: 1px solid var(--adp-line);
  border-radius: var(--adp-radius);
  box-shadow: var(--adp-shadow);
  padding: clamp(20px, 5vw, 32px);
}
.adp-center { text-align: center; }
/* messaggio finale senza calendario: frase principale grande e al centro */
.adp-done { display: grid; justify-items: center; gap: 18px; padding-block: 24px; }
.adp-done h2 { max-width: 30ch; }
.adp-big { font-size: 1.3rem; line-height: 1.45; font-weight: 500; max-width: 28ch; margin: 0 auto; color: var(--adp-ink, inherit); }
.adp-form h2 { font-size: clamp(1.25rem, 3.6vw, 1.55rem); line-height: 1.25; margin: 0 0 8px; outline: none; }
.adp-form h2.adp-title-big { font-size: clamp(1.55rem, 5vw, 2rem); line-height: 1.2; margin-bottom: 10px; }
.adp-sub { color: var(--adp-muted); margin: 0 0 20px; line-height: 1.5; }
.adp-muted { color: var(--adp-muted); font-size: 0.92rem; }
.adp-kicker { text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.75rem; font-weight: 600; color: var(--adp-accent); margin: 0 0 6px; }
.adp-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .adp-row { grid-template-columns: 1fr; gap: 0; } }
.adp-field { margin-bottom: 14px; }
.adp-field > label { display: block; font-weight: 600; font-size: 0.92rem; margin-bottom: 6px; }
.adp-form input[type="text"], .adp-form input:not([type]), .adp-form input[type="tel"] {
  width: 100%; font: inherit; font-size: 16px; /* 16px: niente zoom automatico su iOS */
  padding: 12px 14px; border: 1px solid var(--adp-line); border-radius: 10px; background: #fff; color: var(--adp-ink);
}
.adp-form input:focus { outline: 2px solid var(--adp-accent); outline-offset: 1px; border-color: transparent; }
.adp-form input[aria-invalid="true"] { border-color: var(--adp-danger); }
.adp-field-err { color: var(--adp-danger); font-size: 0.85rem; margin: 4px 0 0; min-height: 0; }
.adp-field-err:empty { display: none; }
.adp-form-err { color: var(--adp-danger); font-size: 0.92rem; margin: 8px 0; }
.adp-form-err:empty { display: none; }
/* .adp-field > .adp-check: deve battere ".adp-field > label" (display:block, grassetto) */
.adp-field > .adp-check, .adp-check { display: flex; gap: 10px; align-items: flex-start; font-size: 0.9rem; font-weight: 400; color: var(--adp-muted); line-height: 1.45; cursor: pointer; margin-bottom: 0; }
.adp-check input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--adp-accent); flex: none; }
.adp-check a { color: var(--adp-accent); }
.adp-combo { position: relative; }
.adp-sugg {
  position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 4px; list-style: none;
  background: #fff; border: 1px solid var(--adp-line); border-radius: 10px; box-shadow: var(--adp-shadow); max-height: 280px; overflow: auto;
}
.adp-sugg li { padding: 10px 12px; border-radius: 8px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.adp-sugg li span { color: var(--adp-muted); font-size: 0.85rem; }
.adp-sugg li:hover, .adp-sugg li.is-active { background: var(--adp-accent-soft); }
.adp-turnstile:empty { display: none; }
.adp-turnstile { margin: 6px 0 10px; }
.adp-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  font: inherit; font-weight: 700; font-size: 1.02rem; padding: 14px 18px; margin-top: 6px;
  color: var(--adp-accent-ink); background: var(--adp-accent); border: 0; border-radius: 10px; cursor: pointer; text-decoration: none;
  transition: filter 0.15s, transform 0.05s;
}
.adp-btn:hover { filter: brightness(1.08); }
.adp-btn:active { transform: translateY(1px); }
.adp-btn:disabled { opacity: 0.75; cursor: progress; }
.adp-btn-ghost { background: transparent; color: var(--adp-accent); border: 1.5px solid var(--adp-accent); width: auto; }
.adp-btn.is-loading::before, .adp-spinner {
  content: ""; width: 18px; height: 18px; border-radius: 50%;
  border: 2.5px solid currentColor; border-right-color: transparent; animation: adp-spin 0.8s linear infinite;
}
.adp-spinner { display: block; width: 36px; height: 36px; margin: 8px auto 16px; color: var(--adp-accent); }
@keyframes adp-spin { to { transform: rotate(360deg); } }
.adp-progress { height: 6px; background: var(--adp-accent-soft); border-radius: 99px; overflow: hidden; margin: 0 0 18px; }
.adp-progress > div { height: 100%; background: var(--adp-accent); border-radius: inherit; transition: width 0.3s; }
.adp-options { display: grid; gap: 10px; margin: 18px 0 8px; }
.adp-opt {
  font: inherit; text-align: left; padding: 14px 16px; border: 1.5px solid var(--adp-line); border-radius: 10px; background: #fff;
  color: var(--adp-ink); cursor: pointer; transition: border-color 0.15s, background 0.15s;
}
.adp-opt:hover { border-color: var(--adp-accent); }
.adp-opt.is-on { border-color: var(--adp-accent); background: var(--adp-accent-soft); font-weight: 600; }
.adp-opt-check { padding-left: 44px; position: relative; }
.adp-opt-check::before {
  content: ""; position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; margin-top: -9px;
  border: 1.5px solid var(--adp-line); border-radius: 5px; background: #fff;
}
.adp-opt-check.is-on::before { background: var(--adp-accent); border-color: var(--adp-accent); box-shadow: inset 0 0 0 3px #fff; }
.adp-back { font: inherit; background: none; border: 0; color: var(--adp-muted); cursor: pointer; padding: 8px 0; margin-top: 6px; }
.adp-back:hover { color: var(--adp-ink); }
.adp-ok { color: var(--adp-ok); font-weight: 600; margin: 0 0 14px; }
.adp-ok:empty { display: none; }
.adp-icon { font-size: 2.2rem; margin-bottom: 6px; }
/* calendario precaricato: rimane nella pagina (così si carica davvero) ma invisibile e senza occupare spazio */
.adp-form { position: relative; }
.adp-cal-host.is-pre { position: absolute; left: 0; right: 0; top: 0; height: 0; overflow: hidden; visibility: hidden; pointer-events: none; }
/* passo 3 fuori dal pop-up: scheda del testo e calendario sembrano un'unica card */
.adp-card-cal { border-bottom: 0; border-radius: var(--adp-radius) var(--adp-radius) 0 0; box-shadow: none; padding-bottom: 4px; }
.adp-cal-host:not(.is-pre) { background: var(--adp-bg); border: 1px solid var(--adp-line); border-top: 0; border-radius: 0 0 var(--adp-radius) var(--adp-radius); padding: 0 clamp(20px, 5vw, 32px) clamp(20px, 5vw, 32px); }
.adp-cal { min-width: 280px; margin-top: 8px; }
.adp-cal-frame { display: block; width: 100%; min-height: 720px; border: 0; overflow: hidden; }
@media (max-width: 480px) { .adp-cal-frame { min-height: 860px; } }
.adp-form :focus-visible { outline: 2px solid var(--adp-accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .adp-form * { transition: none !important; animation-duration: 0s !important; } }
