/* assets/css/sales_popup.css */
#sales-popup-container {
    position: fixed;
    bottom: 20px;
    left: -400px; /* Start hidden */
    z-index: 9999;
    width: 320px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: left 0.5s ease-in-out;
    border: 1px solid rgba(255,255,255,0.3);
    font-family: 'Inter', sans-serif;
    cursor: pointer;
}

#sales-popup-container.show {
    left: 20px;
}

#sales-popup-container .product-img {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    background: #f0f0f0;
}

#sales-popup-container .content {
    flex: 1;
    overflow: hidden;
}

#sales-popup-container .buyer-name {
    font-size: 13px;
    font-weight: 700;
    color: #333;
    margin-bottom: 2px;
    display: block;
}

#sales-popup-container .product-name {
    font-size: 12px;
    color: #1982f9; /* Primary color */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    font-weight: 600;
}

#sales-popup-container .meta {
    font-size: 11px;
    color: #888;
    margin-top: 4px;
}

#sales-popup-container .close-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 14px;
    color: #ccc;
    cursor: pointer;
    line-height: 1;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    #sales-popup-container {
        background: rgba(30, 30, 30, 0.9);
        border: 1px solid rgba(255,255,255,0.1);
    }
    #sales-popup-container .buyer-name {
        color: #eee;
    }
    #sales-popup-container .meta {
        color: #aaa;
    }
}

/* Mobile responsive - Centering */
@media (max-width: 768px) {
    #sales-popup-container {
        left: 50% !important;
        transform: translateX(-50%) !important;
        bottom: 80px; /* Tránh đè lên thanh điều hướng hoặc nút chat */
        width: 92%;
        max-width: 340px;
        transition: transform 0.5s ease-in-out, opacity 0.5s, bottom 0.5s;
    }
    #sales-popup-container:not(.show) {
        transform: translateX(-50%) translateY(100px) !important;
        opacity: 0;
    }
    #sales-popup-container.show {
        transform: translateX(-50%) translateY(0) !important;
        opacity: 1;
    }
}
