/* --- CHATBOT WIDGET --- */
.chatbot-widget { position: fixed; right: 18px; bottom: 18px; z-index: 9999; }
.chatbot-toast {
    position: absolute;
    right: 0;
    bottom: 78px;
    background: #fff;
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 14px 30px rgba(0,0,0,0.18);
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}
.toast-icon { font-size: 14px; }
.toast-text { line-height: 1; }
.chatbot-toast.show {
    opacity: 1;
    transform: translateY(0);
}
.chatbot-fab {
    width: 64px; height: 64px; border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #2ee66b, #16a34a);
    color: #fff; border: none;
    box-shadow: 0 16px 40px rgba(0,0,0,0.25), 0 0 0 6px rgba(22,163,74,0.15);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 24px;
    animation: chatbot-pulse 2.4s ease-in-out infinite;
}
.chatbot-fab:hover { transform: translateY(-2px); }
.chatbot-badge {
    position: absolute; top: -6px; right: -4px;
    background: #ef4444; color: #fff; font-size: 11px; font-weight: 800;
    padding: 3px 7px; border-radius: 999px;
    box-shadow: 0 6px 14px rgba(0,0,0,0.2);
}
.chatbot-panel {
    width: 300px;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    position: absolute;
    right: 0;
    bottom: 80px;
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
    transition: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}
.chatbot-body {
    max-height: 260px;
    overflow-y: auto;
    display: grid;
    gap: 8px;
    padding: 12px 12px 6px;
    background: #f7faf9;
}
.chatbot-bubble {
    padding: 8px 10px;
    border-radius: 12px;
    font-size: 12px;
    line-height: 1.4;
    animation: chat-pop 0.25s ease;
}
.chatbot-bubble.bot { background: #f1f5f9; color: #111; }
.chatbot-bubble.user { background: #22c55e; color: #fff; justify-self: end; }
.chatbot-quick {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 12px 10px;
    background: #fff;
}
.chatbot-input {
    display: flex;
    gap: 8px;
    padding: 10px 12px 12px;
    border-top: 1px solid #eef2f4;
    background: #fff;
}
.chatbot-input input {
    flex: 1;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 12px;
}
.chatbot-input button {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: none;
    background: #16a34a;
    color: #fff;
}
.chatbot-panel.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.chatbot-panel.open { animation: chat-float-in 0.35s ease; }
.chatbot-header {
    background: #16a34a;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
}
.chatbot-title { display: grid; line-height: 1.1; }
.chatbot-title span { font-weight: 800; font-size: 14px; }
.chatbot-title small { font-size: 11px; opacity: 0.85; }
.chatbot-actions { display: inline-flex; align-items: center; gap: 8px; }
.chatbot-sound {
    width: 28px; height: 28px; border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.12);
    color: #fff; display: inline-flex; align-items: center; justify-content: center;
}
.chatbot-close {
    background: none; border: none; font-size: 18px; line-height: 1; cursor: pointer;
}
.chatbot-chip {
    background: #e8f7ef;
    color: #15803d;
    border: 1px solid #c9efd8;
    border-radius: 10px;
    padding: 8px 10px;
    font-weight: 700;
    font-size: 12px;
}

.chatbot-typing {
    display: inline-flex;
    gap: 4px;
    align-items: center;
    padding: 6px 10px;
    background: #f1f5f9;
    border-radius: 12px;
}
.chatbot-typing span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #94a3b8;
    animation: chat-dot 1s infinite ease-in-out;
}
.chatbot-typing span:nth-child(2) { animation-delay: 0.15s; }
.chatbot-typing span:nth-child(3) { animation-delay: 0.3s; }

@keyframes chat-pop {
    from { transform: translateY(6px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
@keyframes chat-float-in {
    from { transform: translateY(16px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
@keyframes chatbot-pulse {
    0%, 100% { box-shadow: 0 12px 30px rgba(0,0,0,0.2), 0 0 0 0 rgba(34,197,94,0.3); }
    50% { box-shadow: 0 18px 40px rgba(0,0,0,0.25), 0 0 0 10px rgba(34,197,94,0); }
}
@keyframes chat-dot {
    0%, 80%, 100% { transform: translateY(0); opacity: 0.6; }
    40% { transform: translateY(-4px); opacity: 1; }
}
