/* AREGOLADARTE — demo per visitatore: pagina di ingresso (demo.php) e barra dentro il gestionale.
   Sta fuori da assets/css/app/ perché serve solo alla copia che fa da demo. Usa le variabili del tema. */

/* ------------------------------------------------------------------ ingresso */
.demo-enter-brand { color: #fff; position: relative; }
.demo-enter-form { display: grid; gap: 14px; }
.demo-enter-trap { position: absolute; left: -200vw; width: 1px; height: 1px; overflow: hidden; }
.demo-enter-types { max-height: none; }
.demo-enter-go { position: sticky; bottom: 0; display: grid; gap: 12px; padding: 14px 0 4px; background: linear-gradient(to bottom, transparent, var(--bg) 18px); } /* il colore della pagina, non quello delle schede: sotto il pulsante non deve nascere un riquadro */
.demo-enter-notes { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: var(--text-sm); color: var(--muted); }
.demo-enter-notes li { position: relative; padding-left: 16px; }
.demo-enter-notes li::before { content: ''; position: absolute; left: 2px; top: .55em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent-500); }
.demo-enter-actions { display: grid; gap: 10px; margin-top: 14px; }
.demo-enter-next { display: grid; gap: 10px; padding: 14px; margin: 0 0 14px; border-radius: var(--r-md); background: var(--surface-2); }
.demo-enter-next p { margin: 0; }

/* ------------------------------------------------------------------ barra dentro il gestionale */
.demo-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 14px; border-radius: var(--r-lg); background: var(--dark-800); color: #fff; margin: 14px 20px 0; box-shadow: var(--shadow-sm); }
.demo-bar[hidden] { display: none; }
.demo-bar + .main-content { padding-top: 14px; }
.demo-bar-what { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1 1 220px; font-size: var(--text-sm); }
.demo-bar-what strong { font-weight: 700; white-space: nowrap; }
.demo-bar-what span { color: rgba(255, 255, 255, .78); min-width: 0; }
.demo-bar-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--accent-500); box-shadow: 0 0 0 4px rgba(255, 255, 255, .12); }
.demo-bar-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.demo-bar .btn { min-height: 34px; padding: 6px 12px; font-size: var(--text-sm); }
.demo-bar .btn-ghost { background: rgba(255, 255, 255, .1); color: #fff; border-color: rgba(255, 255, 255, .18); }
.demo-bar .btn-ghost:hover { background: rgba(255, 255, 255, .18); }
.demo-bar .btn-ghost[aria-expanded="true"] { background: #fff; color: var(--dark-900); }
.demo-bar form { margin: 0; }

.demo-panel { flex: 1 1 100%; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 14px; padding: 12px 0 6px; border-top: 1px solid rgba(255, 255, 255, .14); }
.demo-panel[hidden] { display: none; }
.demo-panel h3 { margin: 0 0 8px; font-size: var(--text-sm); font-weight: 700; color: rgba(255, 255, 255, .78); }
.demo-tasks { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.demo-bar .demo-tasks li a { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 8px; align-items: start; padding: 8px 10px; border-radius: var(--r-md); background: rgba(255, 255, 255, .08); color: #fff; text-decoration: none; transition: background var(--motion-fast) var(--ease-out); }
.demo-tasks a:hover { background: rgba(255, 255, 255, .16); }
.demo-tasks a strong { display: block; font-size: var(--text-sm); }
.demo-tasks a small { display: block; font-size: var(--text-xs); color: rgba(255, 255, 255, .72); }
.demo-tasks .demo-task-n { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--accent-600); font-size: var(--text-xs); font-weight: 700; }
.demo-tasks a.is-done .demo-task-n { background: #fff; color: var(--accent-700, var(--accent-600)); }
.demo-phone { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 12px; align-items: center; }
.demo-phone-qr { width: 112px; height: 112px; padding: 6px; border-radius: var(--r-md); background: #fff; }
.demo-phone-qr svg { display: block; width: 100%; height: 100%; }
.demo-phone p { margin: 0; font-size: var(--text-sm); color: rgba(255, 255, 255, .82); }
.demo-bar :focus-visible { outline-color: #fff; }

@media (max-width: 900px) {
    /* due righe: che cos'è (con «Esci» in alto a destra), poi le due azioni affiancate */
    .demo-bar { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 8px 10px 10px; margin: 12px 14px 0; }
    .demo-bar-what { grid-column: 1 / -1; min-height: 34px; padding-right: 64px; }
    .demo-bar-what strong { overflow: hidden; text-overflow: ellipsis; }
    .demo-bar-what span:last-child { display: none; } /* la riga lunga sta nel pannello */
    .demo-bar-actions { display: contents; }
    .demo-bar .btn { min-height: 38px; }
    .demo-bar #demoBarExit { position: absolute; top: 6px; right: 8px; }
    .demo-bar #demoBarExit .btn { min-height: 34px; }
    .demo-bar #demoBarMore:nth-last-child(2) { grid-column: 1 / -1; } /* senza il sito a cui rimandare resta un pulsante solo */
    .demo-bar-long { display: none; }
    .demo-panel { grid-column: 1 / -1; grid-template-columns: 1fr; }
    .demo-phone { display: none; } /* sul telefono ci si è già */
    .demo-panel > div:last-child { display: none; }
}
@media print { .demo-bar { display: none; } }
.demo-panel-note { margin: 10px 0 0; font-size: var(--text-xs); color: rgba(255, 255, 255, .7); }
