/* =====================================================================
 * CmPOS – Landing: form contatti (sezione #contatto e popup)
 * ===================================================================== */
.lp-cta__grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.lp-cta__intro .cta__tel { margin-top: 2rem; }
.lp-cta__form { min-width: 0; }
.lp-cta__form .lf { padding: clamp(1.1rem, 2.4vw, 2rem); border-radius: var(--r); background: rgba(255,255,255,.035); border: 1px solid var(--line); }

/* Popup */
.lp-modal__body { flex: 1; min-height: 0; overflow: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: clamp(14px, 3vw, 26px); }
.lp-modal__body .lf { padding: 0; background: none; border: 0; }

/* Form */
.lf { --lf-bg: rgba(255,255,255,.05); --lf-bd: rgba(255,255,255,.14); }
.lf__form { display: grid; gap: 1.1rem; }
.lf__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem 1rem; }
.lf__f { display: grid; gap: .35rem; min-width: 0; }
.lf__f > span, .lf__set legend { font: 500 .74rem var(--f-m); letter-spacing: .06em; text-transform: uppercase; color: var(--fg-2); }
.lf input[type="text"], .lf input[type="tel"], .lf input[type="email"], .lf select, .lf textarea {
  width: 100%; min-height: 48px; padding: .7rem .85rem; border-radius: 12px; border: 1px solid var(--lf-bd); background: var(--lf-bg);
  color: var(--fg); font: inherit; font-size: 16px; line-height: 1.35; transition: border-color .2s, background .2s, box-shadow .2s; -webkit-appearance: none; appearance: none; }
.lf textarea { min-height: 92px; resize: vertical; }
.lf select { padding-right: 2.4rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a0a4b8' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .8rem center; background-size: 18px; cursor: pointer; }
.lf select option { background: #15161d; color: #fff; }
.lf input::placeholder, .lf textarea::placeholder { color: rgba(255,255,255,.32); }
.lf input:hover, .lf select:hover, .lf textarea:hover { border-color: rgba(255,255,255,.26); }
.lf input:focus-visible, .lf select:focus-visible, .lf textarea:focus-visible { outline: none; border-color: var(--acc); background: rgba(255,255,255,.07); box-shadow: 0 0 0 3px rgba(44,240,44,.18); }

.lf__set { margin: 0; padding: 0; border: 0; min-width: 0; }
.lf__set legend { padding: 0; margin-bottom: .45rem; }
.lf__chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.lf__chip { position: relative; cursor: pointer; }
.lf__chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.lf__chip span { display: inline-flex; align-items: center; gap: .45rem; min-height: 44px; padding: .55rem .95rem; border-radius: 999px; border: 1px solid var(--lf-bd); background: var(--lf-bg); font-size: .92rem; line-height: 1.2; transition: background .2s, border-color .2s, color .2s; }
.lf__chip input[type="checkbox"] + span::before { content: ''; width: 16px; height: 16px; flex: none; border-radius: 5px; border: 1.5px solid rgba(255,255,255,.4); transition: background .2s, border-color .2s; }
.lf__chip input[type="radio"] + span::before { content: ''; width: 14px; height: 14px; flex: none; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.4); transition: background .2s, border-color .2s, box-shadow .2s; }
.lf__chip:hover span { border-color: rgba(255,255,255,.3); }
.lf__chip input:checked + span { border-color: var(--acc); background: rgba(44,240,44,.1); }
.lf__chip input[type="checkbox"]:checked + span::before { border-color: var(--acc); background: var(--acc) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23031503' stroke-width='3.4'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 12px no-repeat; }
.lf__chip input[type="radio"]:checked + span::before { border-color: var(--acc); background: var(--acc); box-shadow: inset 0 0 0 3px #111; }
.lf__chip input:focus-visible + span { box-shadow: 0 0 0 3px rgba(44,240,44,.3); }

.lf__ck { position: relative; display: grid; grid-template-columns: 22px 1fr; gap: .7rem; align-items: start; font-size: .9rem; line-height: 1.45; color: var(--fg-2); cursor: pointer; }
.lf__ck input { width: 22px; height: 22px; margin: 0; border-radius: 6px; border: 1.5px solid rgba(255,255,255,.4); background: var(--lf-bg); -webkit-appearance: none; appearance: none; cursor: pointer; transition: background .2s, border-color .2s; }
.lf__ck input:checked { border-color: var(--acc); background: var(--acc) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23031503' stroke-width='3.4'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 14px no-repeat; }
.lf__ck input:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(44,240,44,.3); }
.lf__ck a { color: var(--fg); text-decoration: underline; text-underline-offset: 2px; }
.lf__ck a:hover { color: var(--acc); }

/* Errori */
.lf .is-err input:not([type="checkbox"]):not([type="radio"]), .lf .is-err select, .lf .is-err textarea, .lf__ck.is-err input { border-color: #ff5d5d; box-shadow: 0 0 0 3px rgba(255,93,93,.18); }
.lf__set.is-err .lf__chip span { border-color: rgba(255,93,93,.7); }
.lf__set.is-err legend, .lf__f.is-err > span, .lf__ck.is-err { color: #ff8b8b; }

/* Trappole anti-bot: nascoste via CSS */
.lf__hp { position: absolute !important; left: -10000px !important; top: auto !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }

/* Invio */
.lf__send { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1.2rem; margin-top: .2rem; }
.lf__btn { position: relative; min-height: 52px; }
.lf__btn:disabled { opacity: .75; cursor: progress; }
.lf__spin { display: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: lfspin .7s linear infinite; }
.lf__btn.is-sending .lf__spin { display: inline-block; }
@keyframes lfspin { to { transform: rotate(360deg); } }
.lf__msg { flex: 1 1 240px; margin: 0; padding: .65rem .85rem; border-radius: 10px; background: rgba(255,93,93,.1); border: 1px solid rgba(255,93,93,.35); color: #ffb3b3; font-size: .92rem; line-height: 1.45; }
.lf__msg a { color: #fff; font-weight: 600; white-space: nowrap; }
.lf__req { margin: 0; color: var(--fg-3); }

/* Grazie */
.lf__ok { display: grid; justify-items: start; gap: .6rem; padding: clamp(.5rem, 2vw, 1.5rem) 0; outline: none; }
.lf__ok[hidden] { display: none; }
.lf__okico { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; background: var(--acc); color: var(--acc-ink); animation: lfpop .5s cubic-bezier(.2,1.4,.4,1); }
.lf__okico svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.lf__okt { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem); font-weight: 600; letter-spacing: -.03em; color: var(--fg); }
.lf__ok p { margin: 0; color: var(--fg-2); }
.lf__ok a { color: var(--acc); font-weight: 600; }
@keyframes lfpop { from { transform: scale(.4); opacity: 0; } }

@media (max-width: 900px) {
  .lp-cta__grid { grid-template-columns: minmax(0, 1fr); }
  .lp-cta__intro .cta__tel { margin-top: 1.4rem; }
}
@media (max-width: 600px) {
  .lf__grid { grid-template-columns: minmax(0, 1fr); }
  .lf__chip { flex: 1 1 100%; }
  .lf__chip span { width: 100%; }
  .lf__chips--seg .lf__chip { flex: 1 1 calc(50% - .5rem); }
  .lf__btn { width: 100%; justify-content: center; }
  .lp-modal { padding: 0; place-items: end stretch; }
  .lp-modal__box { width: 100%; max-height: 100svh; height: 100svh; border-radius: 0; }
}
@media (prefers-reduced-motion: reduce) { .lf__okico { animation: none; } .lf__spin { animation-duration: 2s; } }
