body, #profitbuyz-widget { font-family: Tahoma, Arial, sans-serif; }

/* Chat Bubble - Base Styles */
#profitbuyz-bubble {
    position: fixed;
    right: 20px;
    width: 60px;
    height: 60px;
    background: #030C18;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    cursor: pointer;
    z-index: 999999;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Bubble Position Variants - Applied by JavaScript */
#profitbuyz-bubble.position-top {
    top: 20px;
    bottom: auto;
}

#profitbuyz-bubble.position-middle {
    top: 50%;
    transform: translateY(-50%);
    bottom: auto;
}

#profitbuyz-bubble.position-bottom {
    bottom: 20px;
    top: auto;
}

#profitbuyz-bubble:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 35px rgba(0,0,0,0.35);
}

/* Middle position needs special hover */
#profitbuyz-bubble.position-middle:hover {
    transform: translateY(-50%) scale(1.05);
}

/* Widget Container - Base Styles */
#profitbuyz-widget {
    position: fixed;
    right: 20px;
    width: 340px;
    height: 480px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    z-index: 999999;
    font-family: Arial, sans-serif;
}

/* Widget Position Variants - Applied by JavaScript */
#profitbuyz-widget.position-top {
    top: 90px;
    bottom: auto;
}

#profitbuyz-widget.position-middle {
    top: 50%;
    transform: translateY(-50%);
    bottom: auto;
}

#profitbuyz-widget.position-bottom {
    bottom: 20px;
    top: auto;
}

/* Hidden state */
#profitbuyz-widget.hidden {
    display: none;
}

/* Header */
#profitbuyz-header {
    background: #030C18;
    color: #fff;
    padding: 12px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 12px 12px 0 0;
}

#profitbuyz-close {
    cursor: pointer;
    font-size: 16px;
    opacity: 0.9;
    transition: opacity 0.2s ease;
}

#profitbuyz-close:hover {
    opacity: 1;
}

/* Messages */
#profitbuyz-messages {
    flex: 1;
    padding: 10px;
    overflow-y: auto;
    font-size: 14px;
}

#profitbuyz-messages::-webkit-scrollbar {
    width: 6px;
}

#profitbuyz-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
}

#profitbuyz-messages::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

#profitbuyz-messages::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

/* Input */
#profitbuyz-input {
    display: flex;
    border-top: 1px solid #ddd;
}

#profitbuyz-text {
    flex: 1;
    border: none;
    padding: 10px;
    outline: none;
    font-size: 14px;
}

#profitbuyz-send {
    background: #030C18;
    color: white;
    border: none;
    padding: 10px 16px;
    cursor: pointer;
    font-weight: 500;
    transition: opacity 0.2s ease;
}

#profitbuyz-send:hover {
    opacity: 0.9;
}

#profitbuyz-send:active {
    opacity: 0.8;
}


/* ---------- WhatsApp-style message bubbles ---------- */
#profitbuyz-messages {
    display: flex;
    flex-direction: column;
    gap: 6px;
}


.phixtra-label{
    font-size: 11px;
    font-weight: 900;
    opacity: 0.65;
    margin-bottom: 4px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}
.phixtra-user .phixtra-label{
    text-align: right;
}
.phixtra-agent .phixtra-label{
    text-align: left;
}
.phixtra-body{
    white-space: normal;
}

.phixtra-msg {
    max-width: 85%;
    padding: 10px 12px;
    border-radius: 14px;
    line-height: 1.35;
    word-wrap: break-word;
    overflow-wrap: anywhere;
    white-space: normal;
}

.phixtra-user {
    align-self: flex-end;
    background: rgba(3, 12, 24, 0.08);
    border-top-right-radius: 6px;
}

.phixtra-agent {
    align-self: flex-start;
    background: rgba(0, 0, 0, 0.04);
    border-top-left-radius: 6px;
}

.phixtra-agent strong {
    font-weight: 900;
}

.phixtra-typing {
    background: rgba(0, 0, 0, 0.03);
}


/* ═══════════════════════════════════════════════════════════════════
   PRODUCT RECOMMENDATION CARDS  (NEW — added below existing styles)
   These styles are completely separate and do not affect any existing
   widget styles above.
═══════════════════════════════════════════════════════════════════ */

/* Horizontal scrolling row that holds all product cards */
.phixtra-product-row {
    display: flex;
    flex-direction: row;
    gap: 10px;
    overflow-x: auto;
    padding: 10px 4px 6px 4px;
    margin: 4px 0 2px 0;
    align-self: stretch;          /* full width of messages column */
    width: 100%;
    box-sizing: border-box;
    /* Hide scrollbar on most browsers but keep scroll functional */
    scrollbar-width: thin;
    scrollbar-color: #d1d5db transparent;
}

.phixtra-product-row::-webkit-scrollbar {
    height: 4px;
}
.phixtra-product-row::-webkit-scrollbar-track {
    background: transparent;
}
.phixtra-product-row::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 2px;
}

/* Individual product card */
.phixtra-product-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 10px 8px 10px 8px;
    min-width: 130px;
    max-width: 130px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    flex-shrink: 0;
    transition: box-shadow 0.2s ease, transform 0.15s ease;
    box-sizing: border-box;
}

.phixtra-product-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.14);
    transform: translateY(-2px);
}

/* Product thumbnail image */
.phixtra-product-img {
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 7px;
    background: #f3f4f6;   /* placeholder colour while image loads */
    display: block;
}

/* Product name — truncate at 2 lines */
.phixtra-product-name {
    font-size: 12px;
    font-weight: 600;
    color: #111827;
    text-align: center;
    margin-bottom: 4px;
    line-height: 1.3;
    /* Clamp to 2 lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    width: 100%;
}

/* Product price */
.phixtra-product-price {
    font-size: 13px;
    font-weight: 700;
    color: #059669;    /* green — makes price feel positive */
    text-align: center;
    margin-bottom: 8px;
}

/* Shared button base */
.phixtra-btn {
    width: 100%;
    border: none;
    border-radius: 6px;
    padding: 6px 4px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.1s ease;
    margin-bottom: 5px;
    letter-spacing: 0.01em;
    box-sizing: border-box;
}

.phixtra-btn:last-child {
    margin-bottom: 0;
}

.phixtra-btn:hover {
    opacity: 0.88;
}

.phixtra-btn:active {
    transform: scale(0.97);
}

.phixtra-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Add to Cart — dark outlined style */
.phixtra-btn-cart {
    background: #ffffff;
    color: #030C18;
    border: 2px solid #030C18;
}

.phixtra-btn-cart:hover {
    background: #030C18;
    color: #ffffff;
    opacity: 1;
}

/* State after successfully adding to cart */
.phixtra-btn-added {
    background: #d1fae5 !important;
    color: #065f46 !important;
    border-color: #059669 !important;
}

/* Buy Now — solid accent colour */
.phixtra-btn-buy {
    background: #030C18;
    color: #ffffff;
    border: 2px solid #030C18;
}

.phixtra-btn-buy:hover {
    background: #1a2840;
    border-color: #1a2840;
    opacity: 1;
}

/* Footer below cards */
.phixtra-product-footer {
    width: 100%;
    text-align: right;
    padding: 2px 2px 0 0;
    margin-top: 2px;
}
