/* public/css/chatbot.css */

.chatbot { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 1000; font-family: 'Lato', sans-serif; }
.chatbot__toggle { width: 56px; height: 56px; border-radius: 50%; background: var(--wa-green, #25D366); color: #fff; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 20px rgba(37,211,102,.4); transition: transform .2s, box-shadow .2s; }
.chatbot__toggle:hover { transform: scale(1.08); box-shadow: 0 6px 24px rgba(37,211,102,.5); }
.chatbot__toggle svg { width: 24px; height: 24px; }
.chatbot__panel { position: absolute; bottom: 70px; right: 0; width: 420px; height: 580px; background: #fff; border-radius: 16px; box-shadow: 0 8px 40px rgba(0,0,0,.18); display: flex; flex-direction: column; overflow: hidden; max-height: min(580px, calc(100vh - 100px)); }
.chatbot__header { background: var(--wa-green, #25D366); color: #fff; padding: .85rem 1rem; display: flex; align-items: center; justify-content: space-between; height: 64px; min-height: 64px; }
.chatbot__header-info { display: flex; align-items: center; gap: .7rem; }
.chatbot__avatar { font-size: 1.6rem; }
.chatbot__header-info strong { display: block; font-size: 16px; }
.chatbot__status { font-size: 13px; opacity: .85; }
.chatbot__close-btn { background: transparent; border: none; color: #fff; font-size: 1.1rem; cursor: pointer; padding: .25rem; opacity: .8; }
.chatbot__close-btn:hover { opacity: 1; }
.chatbot__messages { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: .75rem; background: #f0f0f0; scrollbar-width: thin; scrollbar-color: var(--admin-accent, #c9a227) transparent; }
.chatbot__messages::-webkit-scrollbar { width: 4px; }
.chatbot__messages::-webkit-scrollbar-track { background: transparent; }
.chatbot__messages::-webkit-scrollbar-thumb { background: var(--admin-accent, #c9a227); border-radius: 4px; }
.chatbot__msg { max-width: 82%; }
.chatbot__msg--bot { align-self: flex-start; }
.chatbot__msg--user { align-self: flex-end; }
.chatbot__msg-text { display: inline-block; padding: 12px 16px; border-radius: 16px; font-size: 15px; line-height: 1.6; }
.chatbot__msg--bot .chatbot__msg-text { background: #fff; color: #2d2d2d; border-bottom-left-radius: 4px; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.chatbot__msg--user .chatbot__msg-text { background: #25D366; color: #fff; border-bottom-right-radius: 4px; }
.chatbot__msg-text a { color: #0066cc; text-decoration: underline; }
.chatbot__msg--user .chatbot__msg-text a { color: #fff; }
.chatbot__typing { color: #888; font-style: italic; display: inline-flex; align-items: center; gap: 1px; }
.chatbot__typing-dots span { animation: chatbot-typing-blink 1.4s infinite; opacity: .2; }
.chatbot__typing-dots span:nth-child(2) { animation-delay: .2s; }
.chatbot__typing-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes chatbot-typing-blink { 0%, 60%, 100% { opacity: .2; } 30% { opacity: 1; } }
.chatbot__quick-replies { padding: .5rem .75rem; display: flex; flex-wrap: wrap; gap: .4rem; background: #fff; border-top: 1px solid #eee; }
.quick-reply-btn { background: #fff; border: 1px solid #25D366; color: #25D366; border-radius: 20px; padding: 8px 14px; font-size: 13px; cursor: pointer; transition: all .2s; font-family: inherit; white-space: nowrap; }
.quick-reply-btn:hover { background: #25D366; color: #fff; }
.chatbot__input-wrap { display: flex; align-items: flex-end; gap: .5rem; padding: .85rem .75rem; background: #fff; border-top: 1px solid #eee; }
.chatbot__input { flex: 1; border: 1px solid #ddd; border-radius: 18px; padding: 12px 16px; font-size: 15px; min-height: 52px; max-height: 120px; line-height: 1.4; outline: none; font-family: inherit; resize: none; overflow-y: auto; }
.chatbot__input:focus { border-color: #25D366; }
.chatbot__send-btn { width: 36px; height: 36px; border-radius: 50%; background: #25D366; color: #fff; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: background .2s; }
.chatbot__send-btn:hover { background: #1ebe5b; }

@media (max-width: 480px) {
  .chatbot__panel { position: fixed; width: 100vw; height: 70vh; max-height: 70vh; bottom: 0; right: 0; left: 0; border-radius: 16px 16px 0 0; }
  .chatbot { bottom: .75rem; right: .75rem; }
}
