/* ── WhatsApp-Style Chatbot ────────────────────────────── */
.chatbot-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #25D366;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 9990;
    box-shadow: 0 4px 12px rgba(37,211,102,0.4);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.chatbot-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37,211,102,0.5);
}
.chatbot-btn .badge-dot {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    background: #ff4444;
    border-radius: 50%;
    border: 2px solid #000;
}

.chatbot-panel {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 370px;
    max-height: 520px;
    background: #0b141a;
    border-radius: 16px;
    overflow: hidden;
    z-index: 9991;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    display: none;
    flex-direction: column;
    border: 1px solid rgba(255,255,255,0.08);
}
.chatbot-panel.open {
    display: flex;
}

.chatbot-header {
    background: #1f2c34;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.chatbot-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #D4AF37, #f0c800);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #000;
    font-weight: bold;
    flex-shrink: 0;
}
.chatbot-header-info {
    flex: 1;
}
.chatbot-header-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
}
.chatbot-header-status {
    font-size: 0.65rem;
    color: #25D366;
}
.chatbot-close {
    background: none;
    border: none;
    color: #888;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px;
}
.chatbot-close:hover { color: #fff; }

.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 280px;
    max-height: 340px;
    background: #0b141a url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3Cpattern id='p' width='60' height='60' patternUnits='userSpaceOnUse'%3E%3Cpath d='M30 5 L35 15 L30 10 L25 15Z' fill='%23ffffff' opacity='0.015'/%3E%3C/pattern%3E%3C/defs%3E%3Crect fill='url(%23p)' width='60' height='60'/%3E%3C/svg%3E");
}
.chat-bubble {
    max-width: 85%;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.82rem;
    line-height: 1.4;
    word-wrap: break-word;
}
.chat-bubble.bot {
    background: #1f2c34;
    color: #e1e1e1;
    align-self: flex-start;
    border-top-left-radius: 0;
}
.chat-bubble.user {
    background: #005c4b;
    color: #fff;
    align-self: flex-end;
    border-top-right-radius: 0;
}
.chat-bubble .chat-time {
    font-size: 0.6rem;
    color: #888;
    text-align: right;
    margin-top: 4px;
}

.chat-typing {
    align-self: flex-start;
    padding: 10px 16px;
    background: #1f2c34;
    border-radius: 8px;
    border-top-left-radius: 0;
}
.chat-typing span {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: #888;
    border-radius: 50%;
    margin: 0 1px;
    animation: typing-dot 1.4s infinite;
}
.chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing-dot {
    0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
    30% { opacity: 1; transform: translateY(-4px); }
}

.chat-quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 16px 8px;
}
.chat-quick-btn {
    background: transparent;
    border: 1px solid #25D366;
    color: #25D366;
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 0.72rem;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.chat-quick-btn:hover {
    background: #25D366;
    color: #000;
}

.chatbot-input {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background: #1f2c34;
    border-top: 1px solid rgba(255,255,255,0.05);
    gap: 8px;
}
.chatbot-input input {
    flex: 1;
    background: #0b141a;
    border: none;
    border-radius: 20px;
    padding: 8px 14px;
    color: #fff;
    font-size: 0.82rem;
    outline: none;
}
.chatbot-input input::placeholder { color: #666; }
.chatbot-input button {
    background: #25D366;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

@media (max-width: 480px) {
    .chatbot-panel {
        width: calc(100% - 20px);
        right: 10px;
        bottom: 80px;
        max-height: 70vh;
    }
    .chatbot-btn {
        bottom: 15px;
        right: 15px;
        width: 50px;
        height: 50px;
    }
}
