/* #62 Assistente: pannello laterale */
/* Sopra il pulsante ☰ del menu su telefono (z-index 90) e la barra di attività. */
.assistant-panel { position:fixed; top:0; right:0; bottom:0; z-index:95; width:min(440px,100vw); display:flex; flex-direction:column; background:#fff; border-left:1px solid var(--line); box-shadow:-18px 0 50px rgba(16,37,29,.16); }
.assistant-panel[hidden] { display:none; }
.assistant-head { display:flex; gap:12px; justify-content:space-between; align-items:flex-start; padding:20px 20px 14px; border-bottom:1px solid var(--line); }
.assistant-head h2 { font-size:20px; margin:0 0 4px; }
.assistant-head small { color:var(--muted); font-size:12px; line-height:1.4; }
.assistant-head-actions { display:flex; gap:8px; align-items:center; flex-shrink:0; }
.assistant-notice { margin:12px 20px 0; padding:10px 12px; border-radius:10px; background:var(--amber2); color:#7a4a0e; font-size:12px; line-height:1.45; }
.assistant-thread { flex:1; overflow-y:auto; padding:16px 20px; display:grid; align-content:start; gap:12px; background:#fafbfa; }
.assistant-empty { padding:14px; border:1px dashed var(--line); border-radius:12px; background:#fff; color:var(--muted); font-size:13px; line-height:1.5; }
.assistant-empty b { color:var(--ink); }
.assistant-empty p { margin:6px 0 0; }
.assistant-msg { max-width:100%; padding:11px 13px; border-radius:12px; font-size:13px; line-height:1.55; overflow-wrap:anywhere; }
.assistant-msg p { margin:0 0 8px; }
.assistant-msg p:last-child { margin-bottom:0; }
.assistant-msg ul, .assistant-msg ol { margin:0 0 8px; padding-left:20px; }
.assistant-msg li { margin:3px 0; }
.assistant-msg code { padding:1px 5px; border-radius:5px; background:#eef1ef; font-size:12px; }
.assistant-msg small { display:block; margin-top:8px; color:var(--muted); font-size:11px; }
.assistant-msg-user { justify-self:end; max-width:88%; background:var(--brand,#901110); color:#fff; }
.assistant-msg-user small { color:#f3d5d4; }
.assistant-msg-bot { justify-self:start; background:#fff; border:1px solid var(--line); color:var(--ink); }
.assistant-heading { font-weight:700; }
.assistant-msg-error { border-color:#efd1ce; background:var(--red2); color:var(--red); }
.assistant-thinking { color:var(--muted); font-style:italic; }
.assistant-form { padding:12px 20px 16px; border-top:1px solid var(--line); display:grid; gap:8px; background:#fff; }
.assistant-form textarea { width:100%; resize:vertical; min-height:66px; max-height:220px; border:1px solid var(--line); border-radius:10px; padding:10px 11px; font:13px 'DM Sans',sans-serif; outline:0; }
.assistant-form textarea:focus { border-color:var(--brand,#901110); box-shadow:0 0 0 3px rgba(144,17,16,.12); }
.assistant-form-foot { display:flex; gap:10px; justify-content:space-between; align-items:center; }
.assistant-form-foot label { display:flex; gap:6px; align-items:center; font-size:12px; color:var(--muted); }
.assistant-privacy { color:var(--muted); font-size:10.5px; line-height:1.4; }
.assistant-case { display:flex; gap:8px; align-items:center; justify-content:space-between; padding:6px 10px; border-radius:9px; background:#fbeeed; color:var(--brand,#901110); font-size:12px; font-weight:600; }
.assistant-case[hidden] { display:none; }
.assistant-case button { border:0; background:transparent; color:inherit; font-size:16px; cursor:pointer; }
.ch-source-ask { white-space:nowrap; }
.assistant-sr { position:absolute; width:1px; height:1px; margin:-1px; padding:0; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0; }
@media (max-width:620px) {
  .assistant-head { padding:16px; }
  .assistant-thread, .assistant-form { padding-left:16px; padding-right:16px; }
}
@media print { .assistant-panel { display:none !important; } }
