/* ----------------------------------------------------------------
   ai-chat.css - AI 智能客服悬浮窗
---------------------------------------------------------------- */

.ai-chat-widget { 
    position: fixed; 
    top: 0; left: 0; 
    width: 100%; height: 100dvh; 
    background: white; 
    z-index: 2500; 
    display: none; 
    flex-direction: column;
    touch-action: none;
}

.chat-header { 
    background: #ff6b35; 
    color: white; 
    padding: 15px; 
    padding-top: max(15px, env(safe-area-inset-top)); 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}

.chat-messages { 
    flex: 1; 
    padding: 15px; 
    overflow-y: auto; 
    background: #f9f9f9; 
    display: flex; 
    flex-direction: column; 
    gap: 10px; 
}

.message { 
    max-width: 80%; 
    padding: 10px 14px; 
    border-radius: 12px; 
    font-size: 15px; 
    word-wrap: break-word; 
}

.message.bot { 
    align-self: flex-start; 
    background: white; 
    border: 1px solid #eee; 
}

.message.user { 
    align-self: flex-end; 
    background: #ff6b35; 
    color: white; 
}

.chat-input-area { 
    padding: 10px; 
    border-top: 1px solid #eee; 
    display: flex; 
    gap: 8px; 
    padding-bottom: max(10px, env(safe-area-inset-bottom)); 
}

.chat-input-area input { 
    flex: 1; 
    padding: 10px; 
    border: 1px solid #ddd; 
    border-radius: 20px; 
    outline: none; 
}

.chat-input-area button { 
    background: #ff6b35; 
    color: white; 
    border: none; 
    padding: 0 20px; 
    border-radius: 20px; 
}

/* Chat product card styles (from JS) */
.chat-product-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 8px;
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.chat-product-card img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
}
.chat-product-info {
    flex: 1;
}
.chat-product-name {
    font-size: 13px;
    font-weight: 600;
    color: #333;
}
.chat-product-price {
    font-size: 13px;
    color: #ff6b35;
    font-weight: bold;
}