/* TapGOrder – modulo "Richiedi una demo" (usa le variabili colore del sito) */
.demo-dialog {
  border: 0; padding: 0; margin: auto; width: min(640px, calc(100% - 1.5rem));
  max-height: calc(100dvh - 1.5rem); border-radius: var(--radius-lg, 1.75rem);
  background: var(--white, #fff); color: var(--ink, #0f1f2e);
  box-shadow: var(--shadow-lg, 0 24px 64px rgba(15,31,46,.16)); overflow: hidden;
  font-family: var(--font-body, system-ui, sans-serif);
}
.demo-dialog::backdrop { background: rgba(6,13,23,.62); backdrop-filter: blur(3px); }
.demo-dialog[open] { display: flex; flex-direction: column; }
.demo-head { padding: 1.5rem 1.75rem 1rem; position: relative; border-bottom: 1px solid var(--border, #dce4ed); }
.demo-head h2 { font-family: var(--font-display, Georgia, serif); font-weight: 400; font-size: 1.65rem; line-height: 1.2; padding-right: 2.5rem; }
.demo-head p { color: var(--ink-soft, #4a5f72); font-size: .95rem; margin-top: .4rem; }
.demo-close {
  position: absolute; top: 1.1rem; right: 1.1rem; width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--border, #dce4ed); background: transparent; color: var(--ink-soft, #4a5f72);
  font-size: 1.05rem; cursor: pointer; display: grid; place-items: center;
}
.demo-close:hover { color: var(--blue, #1455a4); border-color: var(--blue, #1455a4); }
.demo-body { padding: 1.25rem 1.75rem 1.5rem; overflow-y: auto; }
.demo-notice {
  display: flex; gap: .75rem; align-items: flex-start; background: var(--accent-soft, #fff3d6);
  border: 1px solid var(--accent, #f0a500); border-radius: var(--radius-sm, .6rem);
  padding: .85rem 1rem; font-size: .93rem; line-height: 1.45; margin-bottom: 1.25rem;
}
.demo-notice i { color: var(--accent, #f0a500); margin-top: .2rem; }
.demo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem 1rem; }
.demo-field { display: flex; flex-direction: column; gap: .3rem; }
.demo-field.full { grid-column: 1 / -1; }
.demo-field label { font-size: .84rem; font-weight: 600; color: var(--ink, #0f1f2e); }
.demo-field label .opt { font-weight: 400; color: var(--ink-faint, #7c93a8); }
.demo-field input, .demo-field select, .demo-field textarea {
  font: inherit; font-size: .96rem; color: var(--ink, #0f1f2e); background: var(--surface, #f7f9fc);
  border: 1.5px solid var(--border, #dce4ed); border-radius: var(--radius-sm, .6rem);
  padding: .65rem .8rem; width: 100%;
}
.demo-field textarea { resize: vertical; min-height: 74px; }
.demo-field input:focus, .demo-field select:focus, .demo-field textarea:focus {
  outline: none; border-color: var(--blue, #1455a4); box-shadow: 0 0 0 3px rgba(20,85,164,.18);
}
.demo-field .hint { font-size: .78rem; color: var(--ink-faint, #7c93a8); }
.demo-field input:user-invalid, .demo-field select:user-invalid { border-color: #c0392b; }
.demo-check { display: flex; gap: .6rem; align-items: flex-start; font-size: .86rem; color: var(--ink-soft, #4a5f72); line-height: 1.45; }
.demo-check input { margin-top: .25rem; width: 17px; height: 17px; flex: none; accent-color: var(--blue, #1455a4); }
.demo-actions { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; margin-top: 1.25rem; }
.demo-submit {
  background: var(--accent, #f0a500); color: #1b1305; border: 0; cursor: pointer; font: inherit; font-weight: 700;
  font-size: .98rem; padding: .85rem 1.7rem; border-radius: 2rem; display: inline-flex; gap: .5rem; align-items: center;
  box-shadow: 0 8px 24px rgba(240,165,0,.3); transition: transform .15s, box-shadow .15s;
}
.demo-submit:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(240,165,0,.4); }
.demo-cancel { background: none; border: 0; cursor: pointer; font: inherit; color: var(--ink-soft, #4a5f72); padding: .6rem .9rem; }
.demo-cancel:hover { color: var(--blue, #1455a4); }
.demo-fine { font-size: .78rem; color: var(--ink-faint, #7c93a8); margin-top: .9rem; line-height: 1.45; }
.demo-done { display: none; text-align: center; padding: .5rem 0 .25rem; }
.demo-done.show { display: block; }
.demo-done .big { width: 60px; height: 60px; border-radius: 50%; background: var(--blue-light, #e8f0fb); color: var(--blue, #1455a4); display: grid; place-items: center; font-size: 1.6rem; margin: 0 auto 1rem; }
.demo-done h3 { font-family: var(--font-display, Georgia, serif); font-weight: 400; font-size: 1.4rem; margin-bottom: .6rem; }
.demo-done p { color: var(--ink-soft, #4a5f72); font-size: .95rem; margin-bottom: .6rem; }
.demo-done .demo-notice { text-align: left; margin: 1rem 0; }
.demo-copy {
  border: 1.5px solid var(--blue, #1455a4); color: var(--blue, #1455a4); background: transparent; cursor: pointer;
  font: inherit; font-weight: 600; font-size: .9rem; padding: .6rem 1.2rem; border-radius: 2rem;
}
.demo-copy:hover { background: var(--blue-light, #e8f0fb); }
.cta-note { margin-top: 1.1rem; font-size: .88rem; color: rgba(255,255,255,.7); }
.cta-note i { color: var(--accent, #f0a500); margin-right: .35rem; }
@media (max-width: 560px) {
  .demo-grid { grid-template-columns: 1fr; }
  .demo-head, .demo-body { padding-left: 1.2rem; padding-right: 1.2rem; }
}

.demo-label { font-size: .84rem; font-weight: 600; color: var(--ink, #0f1f2e); }
.demo-choice { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.demo-choice label { cursor: pointer; }
.demo-choice input { position: absolute; opacity: 0; pointer-events: none; }
.demo-choice span {
  display: flex; flex-direction: column; gap: .15rem; padding: .8rem 1rem; border-radius: var(--radius-sm, .6rem);
  border: 1.5px solid var(--border, #dce4ed); background: var(--surface, #f7f9fc); font-weight: 600; font-size: .95rem;
}
.demo-choice span i { color: var(--blue, #1455a4); margin-right: .4rem; }
.demo-choice small { font-weight: 400; font-size: .78rem; color: var(--ink-faint, #7c93a8); }
.demo-choice input:checked + span { border-color: var(--blue, #1455a4); background: var(--blue-light, #e8f0fb); box-shadow: 0 0 0 3px rgba(20,85,164,.15); }
.demo-choice input:focus-visible + span { outline: 2px solid var(--accent, #f0a500); outline-offset: 2px; }

.demo-check a { color: var(--blue, #1455a4); text-decoration: underline; }
