.chat-message {
    margin: 10px;
    padding: 10px;
    border-radius: 10px;
    max-width: 80%;
    word-wrap: break-word;
    background-color: rgba(255, 255, 255, 0.9) !important;
}

.user-message {
    background-color: rgba(0, 123, 255, 0.9) !important;
    color: white;
    margin-left: auto;
}

.ai-message {
    background-color: #f1f1f1;
    color: #333;
    margin-right: auto;
}

.error-message {
    background-color: #dc3545;
    color: white;
    margin: 10px auto;
    text-align: center;
    width: 90%;
}

.product-message {
    background-color: rgba(232, 245, 233, 0.9) !important;
    color: #2e7d32 !important;
    margin-right: auto;
}

.product-recommendation {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 8px;
    margin-top: 10px;
    border: 1px solid #e9ecef;
}

.product-recommendation img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
}

.product-recommendation .product-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.product-recommendation .product-name {
    font-weight: 600;
    color: #1a73e8;
    text-decoration: none;
    line-height: 1.2;
}

.product-recommendation .product-name:hover {
    text-decoration: underline;
}

.product-recommendation .product-price {
    color: #34a853;
    font-weight: 500;
}

#ai-chat-messages {
    height: calc(100% - 110px);
    overflow-y: auto;
    padding: 10px;
    background: white;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

#ai-chat-form {
    height: 60px;
    padding: 10px;
    background: white;
    display: flex;
    align-items: center;
    gap: 8px;
    border-top: 1px solid #eee;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    box-sizing: border-box;
}

#ai-chat-input {
    flex: 1;
    min-width: 0;
    height: 38px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin: 0;
}

#ai-chat-send {
    height: 38px;
    padding: 0 16px;
    white-space: nowrap;
    min-width: 70px;
    border: none;
    border-radius: 5px;
    background: var(--button-color, #0073aa);
    color: white;
    cursor: pointer;
}

#ai-chat-send:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

@media (max-width: 480px) {
    #ai-chat-container {
        width: 90% !important;
        right: 5% !important;
        height: 70vh !important;
    }

    .product-recommendation {
        flex-direction: column;
        align-items: flex-start;
    }

    .product-recommendation img {
        width: 100%;
        height: auto;
        max-height: 150px;
    }
}

