/* conversion.css — componenti per contatti e conversione (modulo, azioni rapide, CTA strumenti, barra mobile).
 * Usa le variabili di home-proposal.css (--hp-*). Caricato dopo di esso. */

/* ---- modulo di contatto ---- */
.hp-form-wrap { min-width: 0; }
.hp-quick { margin: 0 0 18px; }
.hp-quick-title { margin: 0 0 9px; color: var(--hp-muted); font-size: 0.88rem; }
.hp-quick .hp-button-row { display: flex; flex-wrap: wrap; gap: 10px; }
.hp-quick .hp-button { flex: 1 1 auto; text-align: center; }

.hp-optional { margin: 0 0 18px; border: 1px solid var(--hp-line); border-radius: 10px; padding: 0 16px; background: var(--hp-soft); }
.hp-optional > summary { cursor: pointer; padding: 13px 0; font-weight: 500; color: var(--hp-slate); }
.hp-optional[open] > summary { border-bottom: 1px solid var(--hp-line); margin-bottom: 16px; }
.hp-optional[open] { padding-bottom: 2px; }

/* honeypot: fuori schermo, non display:none (alcuni bot lo ignorano) */
.hp-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

.hp-form-reply { margin: 12px 0 0; text-align: center; font-weight: 500; color: var(--hp-slate); }
.hp-form-status { margin: 12px 0 0; padding: 11px 14px; border-radius: 8px; font-size: 0.95rem; }
.hp-form-status[data-kind="ok"] { background: #e6f7f4; color: #005f55; border: 1px solid var(--hp-teal); }
.hp-form-status[data-kind="error"] { background: #fdecec; color: #8a1c1c; border: 1px solid #e5a3a3; }
.hp-form-status[data-kind="info"] { background: var(--hp-soft); color: var(--hp-slate); }
.hp-form-status[hidden] { display: none; }
.hp-form input:invalid:not(:placeholder-shown):not(:focus),
.hp-form textarea:invalid:not(:placeholder-shown):not(:focus) { border-color: #c0392b; }

@media (max-width: 560px) { .hp-field-row { grid-template-columns: 1fr; } }

@media (prefers-color-scheme: dark) {
  .hp-optional { background: #0a1522; border-color: #33475e; }
  .hp-optional > summary { color: #eaf2fa; }
  .hp-optional[open] > summary { border-bottom-color: #33475e; }
  .hp-form-reply { color: #eaf2fa; }
  .hp-form-status[data-kind="ok"] { background: #0c2a2a; color: #7ff0e0; }
  .hp-form-status[data-kind="error"] { background: #2d1417; color: #ffb4b4; border-color: #7a3a3f; }
  .hp-form-status[data-kind="info"] { background: #0a1522; color: #b9c7d6; }
}

/* ---- barra fissa mobile: Richiedi preventivo + WhatsApp ---- */
.hp-sticky-cta { display: none; }
@media (max-width: 768px) {
  .hp-sticky-cta {
    display: flex; gap: 10px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 900;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
    background: #0c2039; border-top: 1px solid #24364b; box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.35);
  }
  .hp-sticky-cta a { flex: 1 1 0; text-align: center; padding: 12px 8px; border-radius: 8px; font-weight: 600; text-decoration: none; line-height: 1.2; }
  .hp-sticky-cta .hp-sticky-quote { background: var(--hp-teal); color: #04201d; }
  .hp-sticky-cta .hp-sticky-wa { background: transparent; color: #fff; border: 1px solid #5d7490; }
  body:has(.hp-sticky-cta) { padding-bottom: 76px; }
  /* il widget "AI Support" sale sopra la barra */
  body:has(.hp-sticky-cta) #elman-chat-launcher { bottom: 88px !important; }
}

/* ---- CTA a meta' pagina prodotto ---- */
.hp-mid-cta { padding: 28px 0; }
.hp-mid-cta .hp-contact-inner { align-items: center; }
.hp-mid-cta p { margin: 0; }

/* ---- mini-modulo home ---- */
.hp-miniform { display: grid; grid-template-columns: 1fr 1.4fr auto; gap: 14px; align-items: end; margin-top: 8px; }
.hp-miniform .hp-field { margin: 0; }
.hp-miniform .hp-button { width: auto; margin: 0; white-space: nowrap; }
.hp-miniform-status { grid-column: 1 / -1; }
@media (max-width: 760px) {
  .hp-miniform { grid-template-columns: 1fr; }
  .hp-miniform .hp-button { width: 100%; }
}

/* ---- riga prove di affidabilita' sotto i numeri ---- */
.hp-proof-line { margin: 18px 0 0; text-align: center; font-weight: 500; color: var(--hp-slate); }

/* ---- tabella di confronto (display.html) ---- */
.hp-compare-wrap { overflow-x: auto; margin-top: 24px; border: 1px solid var(--hp-line); border-radius: 12px; }
.hp-compare { width: 100%; min-width: 620px; border-collapse: collapse; font-size: 0.95rem; }
.hp-compare th, .hp-compare td { padding: 13px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--hp-line); }
.hp-compare thead th { background: var(--hp-soft); font-weight: 600; }
.hp-compare tbody th { font-weight: 600; white-space: nowrap; color: var(--hp-slate); }
.hp-compare tr:last-child th, .hp-compare tr:last-child td { border-bottom: 0; }
.hp-compare-cta { margin-top: 22px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.hp-compare-cta p { margin: 0; font-weight: 500; }
@media (prefers-color-scheme: dark) { .hp-compare thead th { background: #101f31; } }
