/* VIGI Solutions – widget di chat pubblico */
#vs-chat-launcher {
  position: fixed; right: 1.1rem; bottom: 1.1rem; z-index: 900;
  width: 60px; height: 60px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--blue, #1F5BD8); color: #fff; box-shadow: 0 10px 30px rgba(11,36,71,.35);
  display: flex; align-items: center; justify-content: center; transition: transform .15s;
}
#vs-chat-launcher:hover { transform: scale(1.05); }
#vs-chat-launcher svg { width: 26px; height: 26px; }
#vs-chat-panel svg { width: 20px; height: 20px; display: block; }
#vs-chat-launcher .vs-chat-dot { position: absolute; top: 6px; right: 6px; width: 12px; height: 12px; border-radius: 50%; background: #E4572E; border: 2px solid #fff; display: none; }
#vs-chat-panel {
  position: fixed; right: 1.1rem; bottom: 5.3rem; z-index: 900; width: min(360px, calc(100vw - 2.2rem));
  height: min(540px, calc(100vh - 7rem)); background: #fff; border-radius: 14px; overflow: hidden;
  box-shadow: 0 20px 50px rgba(11,36,71,.3); display: none; flex-direction: column; font-family: "Manrope", system-ui, sans-serif;
}
#vs-chat-panel.is-open { display: flex; }
.vs-chat-head { background: var(--navy, #0B2447); color: #fff; padding: .9rem 1rem; display: flex; align-items: center; justify-content: space-between; }
.vs-chat-head strong { font-size: .95rem; }
.vs-chat-head span { display: block; font-size: .75rem; opacity: .75; }
.vs-chat-head button { background: none; border: 0; color: #fff; opacity: .8; cursor: pointer; padding: .3rem; }
.vs-chat-body { flex: 1; overflow-y: auto; padding: .9rem; background: #F6F8FB; display: flex; flex-direction: column; gap: .5rem; }
.vs-chat-msg { max-width: 82%; padding: .55rem .75rem; border-radius: 12px; font-size: .88rem; line-height: 1.4; white-space: pre-wrap; overflow-wrap: anywhere; }
.vs-chat-msg.visitor { align-self: flex-end; background: var(--blue, #1F5BD8); color: #fff; border-bottom-right-radius: 3px; }
.vs-chat-msg.admin, .vs-chat-msg.ai { align-self: flex-start; background: #fff; border: 1px solid #E1E6ED; color: #101820; border-bottom-left-radius: 3px; }
.vs-chat-msg time { display: block; font-size: .68rem; opacity: .6; margin-top: .2rem; }
.vs-chat-pre { padding: 1rem; display: flex; flex-direction: column; gap: .6rem; }
.vs-chat-pre p { margin: 0; font-size: .85rem; color: #6B7685; }
.vs-chat-pre input { padding: .6rem .7rem; border: 1px solid #C9D1DC; border-radius: 8px; font: inherit; font-size: .88rem; }
.vs-chat-pre input[name="website"] { position: absolute; left: -9999px; }
.vs-chat-foot { border-top: 1px solid #E1E6ED; padding: .6rem; display: flex; gap: .5rem; }
.vs-chat-foot textarea { flex: 1; resize: none; border: 1px solid #C9D1DC; border-radius: 10px; padding: .55rem .7rem; font: inherit; font-size: .88rem; max-height: 90px; }
.vs-chat-foot button { background: var(--blue, #1F5BD8); color: #fff; border: 0; border-radius: 10px; padding: 0 1rem; font-weight: 700; cursor: pointer; }
.vs-chat-foot button:disabled { opacity: .5; cursor: default; }
.vs-chat-closed { padding: .9rem 1rem; background: #FFF4E5; color: #B86E00; font-size: .85rem; text-align: center; }
@media (max-width: 480px) {
  #vs-chat-panel { right: .6rem; left: .6rem; width: auto; bottom: 4.9rem; }
  #vs-chat-launcher { right: .8rem; bottom: .8rem; }
}
