#virtual-advisor-widget {
    position: fixed;
    bottom: 20px;
    right: 110px;
    z-index: 10000;
    font-family: 'Open Sans', sans-serif;
}

#virtual-advisor-btn {
    width: 60px;
    height: 60px;
    background-color: #650e7d;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s ease, background-color 0.3s;
}

#virtual-advisor-btn:hover {
    transform: scale(1.1);
    background-color: #d672f1;
}

#virtual-advisor-btn svg {
    width: 32px;
    height: 32px;
    fill: white;
}

#virtual-advisor-chat {
    display: none;
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 500px;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    flex-direction: column;
    overflow: hidden;
    transform-origin: bottom right;
    transform: scale(0);
    opacity: 0;
    transition: all 0.3s ease;
}

#virtual-advisor-chat.open {
    display: flex;
    transform: scale(1);
    opacity: 1;
}

.va-header {
    background-color: #650e7d;
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.va-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.va-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

.va-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background-color: #f9f9f9;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.va-message {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.4;
}

.va-message.bot {
    background-color: #e9e9e9;
    color: #333;
    border-bottom-left-radius: 2px;
    align-self: flex-start;
}

.va-message.user {
    background-color: #650e7d;
    color: white;
    border-bottom-right-radius: 2px;
    align-self: flex-end;
    margin-left: auto;
}

.va-input-area {
    padding: 10px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
    background-color: white;
}

.va-input-area input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 20px;
    outline: none;
    font-size: 14px;
}

.va-input-area input:focus {
    border-color: #650e7d;
}

.va-input-area button {
    background-color: #650e7d;
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.2s;
}

.va-input-area button:hover {
    background-color: #d672f1;
}

/* Product Card in Chat */
.va-product-card {
    background: white;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 10px;
    margin-top: 5px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.va-product-card img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

.va-product-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.va-product-name {
    font-weight: 600;
    font-size: 13px;
    color: #333;
}

.va-product-price {
    color: #650e7d;
    font-weight: bold;
    font-size: 14px;
}

.va-product-status {
    font-size: 11px;
    color: #666;
    margin-top: 2px;
    display: block;
}

.va-action-link {
    color: #650e7d;
    text-decoration: underline;
    font-size: 12px;
    margin-top: 2px;
    display: inline-block;
}

.va-feedback-btn {
    background: none;
    border: none;
    outline: none; 
    border-radius: 50%;
    width: 28px;
    height: 28px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    pointer-events: auto;
    position: relative;
    z-index: 10;
    padding: 0;
}

.va-feedback-btn:focus {
    outline: none;        /* ← por si acaso */
}

/* Mobile Adaptation */
@media (max-width: 768px) {
    #virtual-advisor-widget {
        left: 20px;
        /* Aligned to left edge to avoid WhatsApp on right */
        right: auto;
        bottom: 20px;
    }

    #virtual-advisor-btn {
        width: 50px;
        height: 50px;
    }

    #virtual-advisor-chat {
        position: fixed;
        /* Fixed viewport */
        width: 90%;
        /* Responsive width */
        height: 80vh;
        /* Responsive height */
        left: 5%;
        /* Centered horizontally */
        bottom: 80px;
        /* Above the input area or standard bottom margin */
        right: auto;
        /* Reset right */
        top: auto;
        /* Reset top */
        border-radius: 12px;
        /* Restore rounded corners */
        transform-origin: bottom center;
        z-index: 10002;
        /* Above everything */
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
        /* Stronger shadow for modal feel */
    }

    .va-header {
        padding: 15px;
        height: 60px;
        /* Explicit height */
        border-top-left-radius: 12px;
        border-top-right-radius: 12px;
    }

    .va-messages {
        padding: 10px;
    }

    .va-message {
        max-width: 85%;
        font-size: 16px;
        /* Better readability */
    }

    .va-input-area {
        padding: 10px;
        background: #fff;
    }

    .va-input-area input {
        font-size: 16px;
        /* Prevent zoom on ios */
    }

    #va-reset-btn {
    pointer-events: auto;
    position: relative;
    z-index: 10;
    }

.va-feedback-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    padding: 4px 8px;
    background: #fffde7;
    border-radius: 6px;
}

.va-feedback-label {
    font-size: 11px;
    color: #aaa;
}


.va-feedback-btn:hover {
    background: #fff9c4;
}
.va-feedback-thanks {
    font-size: 12px;
    color: #666;
}

}