/* Chatbot Styles */
.chatbot-container {
    position: fixed;
    bottom: 70px;
    right: 20px;
    z-index: 1000;
    font-family: Arial, sans-serif;
}

.chatbot-icon {
    background-color: #007bff;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    font-size: 24px;
    transition: all 0.3s ease;
}

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

.chatbot-box {
    position: absolute;
    bottom: 90px;
    right: 0;
    width: 350px;
    height: 500px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.chatbot-header {
    background-color: #007bff;
    color: white;
    padding: 10px 15px;
    display: flex;
    align-items: center;
}

.chatbot-logo {
    height: 30px;
    margin-right: 10px;
}

.chatbot-title {
    flex: 1;
    font-weight: bold;
}

.chatbot-close {
    cursor: pointer;
    padding: 5px;
}

.chatbot-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.message {
    max-width: 80%;
    padding: 10px 15px;
    border-radius: 20px;
    margin-bottom: 10px;
    word-break: break-word;
}

.bot-message {
    background-color: #f1f0f0;
    align-self: flex-start;
    border-top-left-radius: 5px;
}

.user-message {
    background-color: #007bff;
    color: white;
    align-self: flex-end;
    border-top-right-radius: 5px;
}

.chatbot-quick-replies {
    padding: 10px 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: center;
}

.quick-reply {
    background-color: #f1f0f0;
    border: none;
    border-radius: 20px;
    padding: 8px 15px;
    margin: 3px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    white-space: nowrap;
    text-align: center;
}

.quick-reply:hover {
    background-color: #e0e0e0;
}

.chatbot-input {
    border-top: 1px solid #e0e0e0;
    padding: 10px;
    display: flex;
}

#chat-input {
    flex: 1;
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 20px;
    outline: none;
}

#chat-send {
    background-color: #007bff;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-left: 10px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
}

#chat-send:hover {
    background-color: #0069d9;
}

/* Typing indicator */
.typing-indicator {
    display: flex;
    padding: 10px 15px;
    background-color: #f1f0f0;
    border-radius: 20px;
    width: fit-content;
    align-self: flex-start;
    margin-bottom: 10px;
}

.typing-indicator span {
    height: 8px;
    width: 8px;
    background-color: #888;
    border-radius: 50%;
    display: inline-block;
    margin: 0 1px;
    animation: typing 1s infinite ease-in-out;
}

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

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

@keyframes typing {

    0%,
    60%,
    100% {
        transform: translateY(0);
    }

    30% {
        transform: translateY(-5px);
    }
}

/* Mobile responsive styles */
@media (max-width: 576px) {
    .chatbot-box {
        width: calc(100vw - 40px);
        height: 60vh;
        bottom: 90px;
        right: 0;
        /* left: 0; */
        margin: 0 auto;
        max-width: 350px;
    }

    .chatbot-icon {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }

    .quick-reply {
        font-size: 12px;
        padding: 6px 12px;
    }

    .chatbot-quick-replies {
        max-height: 120px;
        overflow-y: auto;
    }
}

/* WhatsApp form */
.whatsapp-form {
    background-color: #f8f9fa;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
    align-self: stretch;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.whatsapp-form .form-group {
    margin-bottom: 15px;
}

.whatsapp-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    font-size: 14px;
}

.whatsapp-form input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.whatsapp-form .input-group {
    display: flex;
}

.whatsapp-form .input-group-prepend {
    background-color: #f1f1f1;
    border: 1px solid #ddd;
    border-right: none;
    border-radius: 5px 0 0 5px;
    padding: 8px 12px;
    font-size: 14px;
}

.whatsapp-form .input-group input {
    border-radius: 0 5px 5px 0;
}

.whatsapp-form .form-text {
    font-size: 12px;
    margin-top: 5px;
    color: #777;
}

.whatsapp-form button {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
}

.whatsapp-form #submit-whatsapp {
    background-color: #25D366;
    color: white;
}

.whatsapp-form #submit-whatsapp:hover {
    background-color: #1ca552;
}

.whatsapp-form #cancel-whatsapp {
    background-color: #f8f9fa;
    border: 1px solid #ddd;
}

.whatsapp-form #cancel-whatsapp:hover {
    background-color: #e9ecef;
}

/* Product cards */
.product-cards-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 10px 0;
    width: 100%;
}

.product-card {
    background-color: #f7f7f9;
    border-radius: 10px;
    padding: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: all 0.2s;
}

.product-card:hover {
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.product-name {
    font-weight: bold;
    margin-bottom: 5px;
    color: #333;
}

.product-spec, .product-price {
    font-size: 0.9em;
    margin-bottom: 5px;
    color: #555;
}

.product-detail-btn {
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 15px;
    padding: 5px 12px;
    font-size: 0.85em;
    cursor: pointer;
    margin-top: 5px;
    transition: background-color 0.2s;
}

.product-detail-btn:hover {
    background-color: #0069d9;
}

/* Quick reply buttons */
.chatbot-quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
    max-width: 100%;
    overflow-x: auto;
    padding-bottom: 8px;
}

.quick-reply {
    background-color: #f0f2f5;
    border: none;
    border-radius: 18px;
    padding: 8px 14px;
    font-size: 13px;
    color: #333;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
}

.quick-reply:hover {
    background-color: #e4e6e9;
}

/* Responsive fixes */
@media (max-width: 480px) {
    .chatbot-box {
        width: 300px;
    }
    
    .product-card {
        padding: 10px;
    }
    
    .product-name, .product-spec, .product-price {
        font-size: 0.9em;
    }
    
    .quick-reply {
        padding: 6px 10px;
        font-size: 12px;
    }
}
