.ai-chat-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background-color: #4F46E5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    z-index: 9999;
}

.ai-chat-button:hover {
    transform: scale(1.1);
    background-color: #4338CA;
}

.ai-chat-window {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 370px;
    max-width: 95vw;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    z-index: 10000;
    overflow: hidden;
    display: none;
    border: 1px solid rgba(79, 70, 229, 0.1);
}

.ai-chat-header {
    background: #4F46E5;
    color: white;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ai-chat-messages {
    height: 400px;
    overflow-y: auto;
    padding: 20px;
    background: #F9FAFB;
}

.ai-message, .user-message {
    margin-bottom: 16px;
    padding: 12px 16px;
    border-radius: 16px;
    max-width: 85%;
    line-height: 1.5;
    font-size: 0.95rem;
    /* Removed white-space: pre-line to allow HTML rendering */
}

.ai-message {
    white-space: normal !important;
}

.ai-message a {
    display: inline-block;
    background: #25D366;
    color: #fff !important;
    padding: 8px 16px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    margin-top: 8px;
    margin-bottom: 4px;
    pointer-events: auto;
    transition: background 0.2s;
}
.ai-message a:hover {
    background: #128C7E;
}

.ai-message {
    background: #EEF2FF;
    margin-right: auto;
    color: #1F2937;
    border: 1px solid rgba(79, 70, 229, 0.1);
}

.user-message {
    background: #4F46E5;
    color: white;
    margin-left: auto;
    box-shadow: 0 2px 4px rgba(79, 70, 229, 0.1);
}

.ai-chat-input {
    padding: 16px;
    border-top: 1px solid #E5E7EB;
    background: white;
}

.ai-chat-input form {
    display: flex;
    gap: 8px;
}

.ai-chat-input input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #E5E7EB;
    border-radius: 24px;
    outline: none;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.ai-chat-input input:focus {
    border-color: #4F46E5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.ai-chat-input button {
    background: #4F46E5;
    color: white;
    padding: 12px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-chat-input button:hover {
    background: #4338CA;
    transform: scale(1.05);
}

.product-suggestion {
    background: white;
    padding: 16px;
    border-radius: 12px;
    margin: 12px 0;
    border: 1px solid #E5E7EB;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.product-suggestion:hover {
    border-color: #4F46E5;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.15);
}

.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 8px 12px;
    background: #EEF2FF;
    border-radius: 12px;
    margin-bottom: 12px;
    width: fit-content;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background: #4F46E5;
    border-radius: 50%;
    animation: typing 1s infinite;
}

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

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-4px);
    }
}

/* Scrollbar styling */
.ai-chat-messages::-webkit-scrollbar {
    width: 6px;
}

.ai-chat-messages::-webkit-scrollbar-track {
    background: #F9FAFB;
}

.ai-chat-messages::-webkit-scrollbar-thumb {
    background: #E5E7EB;
    border-radius: 3px;
}

.ai-chat-messages::-webkit-scrollbar-thumb:hover {
    background: #D1D5DB;
}

.ai-chat-feedback {
    padding: 12px 16px;
    border-top: 1px solid #E5E7EB;
    background: white;
    text-align: center;
}

.ai-chat-feedback button {
    transition: all 0.2s ease;
}

.ai-chat-feedback button:hover {
    transform: scale(1.05);
}

/* --- WhatsApp Button & Box --- */
#whatsapp-widget {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 9999;
}

#whatsapp-chat {
    position: fixed;
    bottom: 80px;
    left: 20px;
    width: 370px;
    max-width: 95vw;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    border-radius: 16px;
    overflow: hidden;
    z-index: 10000;
}

/* --- Mobile View --- */
@media (max-width: 600px) {
    .ai-chat-button {
        right: 10px !important;
        bottom: 10px !important;
    }
    .ai-chat-window {
        right: 2.5vw !important;
        left: 2.5vw !important;
        bottom: 70px !important;
        width: 95vw !important;
        max-width: 95vw !important;
        border-radius: 12px 12px 0 0;
    }
    #whatsapp-widget {
        left: 10px !important;
        bottom: 10px !important;
    }
    #whatsapp-chat {
        left: 2.5vw !important;
        right: 2.5vw !important;
        bottom: 70px !important;
        width: 95vw !important;
        max-width: 95vw !important;
        border-radius: 12px 12px 0 0;
    }
} 