/* Colors, typography, and theming for WinaltChat */
/* Reviewer note: this file contains aesthetic overrides (color/visual treatments)
 * and should not introduce layout-critical positioning rules.
 */

/* Amazon button styling */
.ai-amazon-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    background: #FF9900 !important;
    color: #111 !important;
    text-decoration: none !important;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 700;
    border: 1px solid #CC7A00;
}

/* Fix SVG alignment */
.ai-amazon-btn svg {
    margin-right: 10px;
    flex-shrink: 0; /* Prevents SVG from squishing */
    display: block;
}

.ai-amazon-btn span {
    line-height: 1;
}

/* Hover state for Amazon button */
.ai-amazon-btn:hover {
    background: #e68a00 !important;
}

/* Link styling in assistant bubbles */
.ai-bubble.assistant a:not(.ai-amazon-btn) {
    color: #667eea;
    font-weight: 600;
}

/* Launcher button theming */
.ai-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white; 
    font-size: 26px; 
}

/* Chat window theming */
.ai-window {
    background: var(--ai-primary) !important;
    border-radius: 24px !important;
    border: none !important;
}

/* Header theming */
.ai-header { 
    background: #667eea; 
    color: white; 
    padding: 15px; 
    flex-shrink: 0; 
    border-top-left-radius: 24px !important;
    border-top-right-radius: 24px !important;
}

.ai-title-wrap strong {
    display: block;
    font-size: 16px;
    line-height: 1.2;
}

.ai-title-wrap span {
    font-size: 11px;
    opacity: 0.9;
}

.ai-title-subtitle {
    display: flex !important;
    align-items: center;
    justify-content: center; /* subtitle is a block-level flex row spanning
        the centered title-wrap's full width, so its own content needs
        explicit centering — text-align on the parent only centers inline
        content, not a flex child's internal layout. */
    gap: 4px;
    margin-top: 2px;
    line-height: 1;
}
.ai-title-status-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #4ade80;
    flex-shrink: 0;
}

/* Header buttons theming */
.ai-action-btn { 
    background: rgba(255,255,255,0.2); 
    color: white; 
}

.ai-action-btn:hover { 
    background: rgba(255,255,255,0.3); 
}

/* Bubble theming */
.ai-bubble { 
    padding: 10px 14px; 
    border-radius: 15px; 
    max-width: 85%; 
    font-size: 15px; 
    line-height: 1.4; 
    word-wrap: break-word; 
}

.ai-bubble.assistant { 
    background: white; 
    border: 1px solid #e2e8f0; 
    color: #334155; 
}

.ai-bubble.user { 
    background: #667eea; 
    color: white; 
}

/* Input area theming */
.ai-input-area { 
    padding: 15px; 
    border-top: 1px solid #eee; 
    background: white; 
    flex-shrink: 0; 
}

.ai-input-wrapper input { 
    border: 1px solid #ddd; 
    padding: 10px 15px; 
    border-radius: 20px; 
    outline: none; 
    font-size: 16px; 
}

.ai-input-wrapper button { 
    background: #667eea; 
    color: white; 
}

/* Mobile portal header theming */
.ai-header-portal {
    background: #667eea;
    color: white;
}

.portal-btn {
    background: rgba(255,255,255,0.2);
    color: white;
}

/* Product card theming — structural rules live in chat-layout.css. */
.winalt-pc {
    border: 1px solid #e9ecef;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(0,0,0,.07);
    background: #fff;
}
.winalt-pc-media {
    background: linear-gradient(135deg, #e8f0fe, #dbeafe);
}
.winalt-pc-media-fallback {
    color: #93a5c7;
}
.winalt-pc-badge {
    background: #ef4444;
    color: #fff;
}
.winalt-pc-title {
    color: #1e293b;
}
.winalt-pc-price {
    color: #16a34a;
}
.winalt-pc-price-old {
    color: #9ca3af;
}
.winalt-pc-stars {
    color: #e5e7eb; /* empty-star color */
}
.winalt-pc-stars::before {
    color: #f59e0b; /* filled-star color, overlaid via width percentage */
}
.winalt-pc-reviews {
    color: #94a3b8;
}
.winalt-pc-desc {
    color: #64748b;
}
.winalt-pc-btn-view {
    background: var(--ai-primary);
    color: #fff !important;
}
.winalt-pc-btn-view:hover {
    opacity: .9;
}
.winalt-pc-btn-cart {
    background: #10b981;
    color: #fff !important;
}
.winalt-pc-btn-cart:hover {
    background: #059669;
}

/* Message avatar theming — bot (AI) vs. connected live agent. */
.winalt-msg-avatar-bot {
    background: var(--ai-primary);
    color: #fff;
}
.winalt-msg-avatar-agent {
    background: #10b981;
    color: #fff;
}

/* Quick-reply chip theming */
.ai-input-chip {
    border: 1.5px solid #e5e7eb !important;
    color: #374151 !important;
    background: #f9fafb !important;
}
.ai-input-chip:hover {
    border-color: var(--ai-primary) !important;
    color: var(--ai-primary) !important;
}