/* ===== CHATBOT STYLES ===== */

/* Chatbot Toggle Button */
.chatbot-toggle {
    position: fixed;
    bottom: 80px;
    right: var(--spacing-md);
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    z-index: 1000;
    border: none;
}

.chatbot-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.2);
}

.chatbot-toggle i {
    font-size: 24px;
    color: white;
    transition: transform 0.3s ease;
}

.chatbot-toggle.active i {
    transform: rotate(180deg);
}

/* Chatbot Container */
.chatbot-container {
    position: fixed;
    bottom: 150px;
    right: var(--spacing-md);
    width: 350px;
    height: 500px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 999;
    animation: slideUp 0.3s ease;
}

.chatbot-container.active {
    display: flex;
}

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

/* Chatbot Header */
.chatbot-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: var(--spacing-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chatbot-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.chatbot-close {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.chatbot-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Chatbot Messages */
.chatbot-messages {
    flex: 1;
    padding: var(--spacing-md);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    background: #f8f9fa;
}

.message {
    max-width: 80%;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: 18px;
    font-size: 0.9rem;
    line-height: 1.4;
    animation: fadeIn 0.3s ease;
}

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

.message.bot {
    background: white;
    color: var(--text-color);
    align-self: flex-start;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.message.user {
    background: var(--primary-color);
    color: white;
    align-self: flex-end;
}

/* Chatbot Options */
.chatbot-options {
    padding: var(--spacing-sm) var(--spacing-md);
    background: white;
    border-top: 1px solid #e9ecef;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.option-button {
    background: white;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    text-align: center;
}

.option-button:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-1px);
}

.option-button:active {
    transform: translateY(0);
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: var(--spacing-sm) var(--spacing-md);
    background: white;
    border-radius: 18px;
    align-self: flex-start;
    border: 1px solid #e9ecef;
}

.typing-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary-color);
    animation: typing 1.4s infinite ease-in-out;
}

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

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

/* WhatsApp Button in Chat */
.whatsapp-chat-btn {
    background: #25D366;
    color: white;
    border: none;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    transition: all 0.3s ease;
    margin-top: var(--spacing-xs);
}

.whatsapp-chat-btn:hover {
    background: #128C7E;
    transform: translateY(-1px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .chatbot-container {
        width: calc(100vw - 2rem);
        right: 1rem;
        left: 1rem;
        height: 450px;
    }
    
    .chatbot-toggle {
        right: var(--spacing-sm);
        bottom: 70px;
    }
}

@media (max-width: 480px) {
    .chatbot-container {
        height: 400px;
        bottom: 130px;
    }
    
    .chatbot-toggle {
        width: 50px;
        height: 50px;
        right: var(--spacing-xs);
    }
    
    .chatbot-toggle i {
        font-size: 20px;
    }
}

/* Scrollbar Styling */
.chatbot-messages::-webkit-scrollbar {
    width: 4px;
}

.chatbot-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 2px;
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 2px;
}

.chatbot-messages::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}