#atti-chat, #atti-chat * { box-sizing: border-box; }
#atti-chat { position: fixed; right: 22px; bottom: 22px; z-index: 999999; font-family: Arial, Helvetica, sans-serif; }
.atti-chat-toggle { width: 68px; height: 68px; border-radius: 50%; border: none; cursor: pointer; background: linear-gradient(135deg, var(--atti-primary), var(--atti-secondary)); color: #fff; box-shadow: 0 12px 30px rgba(0,0,0,.24); font-weight: 800; font-size: 17px; }
.atti-chat-panel { display: none; width: 370px; max-width: calc(100vw - 28px); height: 620px; max-height: calc(100vh - 100px); background: #fff; border-radius: 22px; box-shadow: 0 18px 55px rgba(0,0,0,.28); overflow: hidden; flex-direction: column; border: 1px solid rgba(0,0,0,.08); }
#atti-chat.is-open .atti-chat-panel { display: flex; }
#atti-chat.is-open .atti-chat-toggle { display: none; }
.atti-chat-header { display: flex; justify-content: space-between; align-items: center; padding: 18px 18px; color: #fff; background: linear-gradient(135deg, var(--atti-primary), var(--atti-secondary)); }
.atti-chat-header strong { display: block; font-size: 18px; line-height: 1.2; }
.atti-chat-header small { display: block; opacity: .9; margin-top: 3px; }
.atti-chat-close { background: rgba(255,255,255,.18); border: none; color: #fff; width: 34px; height: 34px; border-radius: 50%; font-size: 24px; cursor: pointer; line-height: 1; }
.atti-chat-messages { flex: 1; overflow-y: auto; padding: 18px; background: #f6f8fb; }
.atti-message { display: flex; margin: 0 0 12px; }
.atti-message span { display: inline-block; padding: 12px 14px; border-radius: 16px; max-width: 86%; font-size: 14px; line-height: 1.42; white-space: pre-wrap; }
.atti-message.bot { justify-content: flex-start; }
.atti-message.bot span { background: #fff; color: #1d2430; border: 1px solid rgba(0,0,0,.06); border-bottom-left-radius: 5px; }
.atti-message.user { justify-content: flex-end; }
.atti-message.user span { background: var(--atti-primary); color: #fff; border-bottom-right-radius: 5px; }
.atti-chat-quick-actions { display: flex; gap: 8px; overflow-x: auto; padding: 10px 14px; border-top: 1px solid rgba(0,0,0,.06); background: #fff; }
.atti-chat-quick-actions button { flex: 0 0 auto; border: 1px solid rgba(11,78,162,.18); background: #fff; color: var(--atti-primary); padding: 9px 11px; border-radius: 999px; cursor: pointer; font-size: 13px; }
.atti-chat-form { display: flex; gap: 9px; padding: 12px 14px; background: #fff; border-top: 1px solid rgba(0,0,0,.06); }
.atti-chat-input { resize: none; flex: 1; border: 1px solid rgba(0,0,0,.14); border-radius: 14px; padding: 11px 12px; font: inherit; min-height: 45px; outline: none; }
.atti-chat-input:focus { border-color: var(--atti-primary); box-shadow: 0 0 0 3px rgba(11,78,162,.12); }
.atti-chat-send { border: none; background: var(--atti-secondary); color: #fff; padding: 0 15px; border-radius: 14px; font-weight: 700; cursor: pointer; }
.atti-chat-send:disabled { opacity: .55; cursor: not-allowed; }
.atti-chat-privacy { margin: 0; padding: 0 14px 13px; background: #fff; color: #657084; font-size: 11px; line-height: 1.35; }
.atti-typing span { color: #657084; font-style: italic; }
@media (max-width: 480px) {
  #atti-chat { right: 12px; bottom: 12px; }
  .atti-chat-panel { width: calc(100vw - 24px); height: calc(100vh - 35px); max-height: none; border-radius: 18px; }
}
