/* Smart Chatbot CSS */
.chatbot-trigger {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: #4caf50;
    color: #fff;
    border: none;
    border-radius: 50%;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    font-size: 24px;
    cursor: pointer;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
    animation: bounceIn 0.5s ease;
}

.chatbot-trigger:hover {
    transform: scale(1.1);
    background: #388e3c;
}

.chatbot-trigger.has-notification::after {
    content: '';
    position: absolute;
    top: 5px;
    right: 5px;
    width: 12px;
    height: 12px;
    background: #ff3b30;
    border-radius: 50%;
    border: 2px solid #fff;
}

.chatbot-container {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 350px;
    max-width: calc(100vw - 40px);
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    z-index: 9999;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.chatbot-container.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.chatbot-header {
    background: #4caf50;
    color: #fff;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbot-avatar {
    width: 40px;
    height: 40px;
    background: #fff;
    color: #4caf50;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    margin-right: 12px;
}

.chatbot-title h5 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.chatbot-title span {
    font-size: 12px;
    opacity: 0.8;
}

.chatbot-title span::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #a5d6a7;
    border-radius: 50%;
    margin-right: 5px;
}

.chatbot-close {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    transition: transform 0.2s;
}

.chatbot-close:hover {
    transform: scale(1.1);
}

.chatbot-messages {
    height: 300px;
    padding: 20px;
    overflow-y: auto;
    background: #f9f9f9;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.chat-bubble {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 15px;
    font-size: 14px;
    line-height: 1.5;
    position: relative;
    animation: fadeIn 0.3s ease forwards;
}

.chat-bot {
    background: #e8f5e9;
    color: #2e7d32;
    align-self: flex-start;
    border-bottom-left-radius: 5px;
}

.chat-user {
    background: #4caf50;
    color: #fff;
    align-self: flex-end;
    border-bottom-right-radius: 5px;
}

.typing-indicator {
    background: #e8f5e9;
    padding: 12px 16px;
    border-radius: 15px;
    border-bottom-left-radius: 5px;
    align-self: flex-start;
    display: flex;
    gap: 5px;
    align-items: center;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: #4caf50;
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }
.typing-dot:nth-child(3) { animation-delay: 0s; }

.chatbot-suggestions {
    padding: 15px;
    background: #fff;
    border-top: 1px solid #eee;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.chatbot-suggest-btn {
    background: #fff;
    border: 1px solid #4caf50;
    color: #4caf50;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chatbot-suggest-btn:hover {
    background: #4caf50;
    color: #fff;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes bounceIn {
    0% { transform: scale(0); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@keyframes typingBounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

.chatbot-input {
    display: flex;
    padding: 15px;
    background: #fff;
    border-top: 1px solid #eee;
    gap: 10px;
}

.chatbot-input input {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 8px 15px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
}

.chatbot-input input:focus {
    border-color: #4caf50;
}

.chatbot-input button {
    background: #4caf50;
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background 0.3s;
}

.chatbot-input button:hover {
    background: #388e3c;
}

/* Mobile responsive */
@media (max-width: 480px) {
    .chatbot-container {
        width: calc(100vw - 40px);
        right: 20px;
        bottom: 90px;
    }
}
