/* Embo AI Assistant — Widget Styles */
#embo-ai-bubble {
    position: fixed; bottom: 28px; right: 28px;
    width: 60px; height: 60px; background: #FF6B35;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    cursor: pointer; box-shadow: 0 4px 20px rgba(255,107,53,0.45);
    z-index: 999998; transition: transform 0.2s, box-shadow 0.2s;
    border: none; padding: 0;
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
#embo-ai-bubble:hover { transform: scale(1.08); box-shadow: 0 6px 28px rgba(255,107,53,0.55); }
.embo-ai-ping {
    position: absolute; top: -4px; right: -4px;
    width: 18px; height: 18px; background: #00B4A0;
    border-radius: 50%; border: 2px solid white;
    animation: embo-ai-ping 1.5s ease-in-out infinite;
}
@keyframes embo-ai-ping {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.7; }
}

#embo-ai-window {
    position: fixed; bottom: 100px; right: 28px;
    width: 380px; max-height: 600px; height: 600px;
    background: white; border-radius: 24px;
    box-shadow: 0 12px 48px rgba(0,0,0,0.18);
    display: flex; flex-direction: column;
    z-index: 999999; overflow: hidden;
    transform: scale(0.85) translateY(20px);
    opacity: 0; pointer-events: none;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-origin: bottom right;
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #2D2D2D;
}
#embo-ai-window.open { transform: scale(1) translateY(0); opacity: 1; pointer-events: all; }

.embo-ai-header {
    background: linear-gradient(135deg, #FF6B35, #FF8C5A);
    padding: 18px 20px; display: flex; align-items: center; gap: 12px; flex-shrink: 0;
}
.embo-ai-avatar {
    width: 44px; height: 44px; background: rgba(255,255,255,0.25);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 22px; flex-shrink: 0;
}
.embo-ai-header-info { flex: 1; }
.embo-ai-header-name { font-weight: 800; color: white; font-size: 16px; line-height: 1.2; }
.embo-ai-header-status { font-size: 13px; color: rgba(255,255,255,0.85); display: flex; align-items: center; gap: 5px; margin-top: 2px; }
.embo-ai-status-dot { width: 7px; height: 7px; background: #5DCAA5; border-radius: 50%; }
.embo-ai-close {
    background: rgba(255,255,255,0.2); border: none; color: white;
    width: 32px; height: 32px; border-radius: 50%; cursor: pointer;
    font-size: 16px; display: flex; align-items: center; justify-content: center;
    transition: background 0.15s; padding: 0;
}
.embo-ai-close:hover { background: rgba(255,255,255,0.35); }

#embo-ai-messages {
    flex: 1; overflow-y: auto; padding: 20px 16px;
    display: flex; flex-direction: column; gap: 12px; min-height: 0;
}
#embo-ai-messages::-webkit-scrollbar { width: 4px; }
#embo-ai-messages::-webkit-scrollbar-thumb { background: #E5E7EB; border-radius: 4px; }

.embo-ai-msg { display: flex; gap: 8px; align-items: flex-end; }
.embo-ai-msg.user { flex-direction: row-reverse; }
.embo-ai-msg-avatar {
    width: 30px; height: 30px; border-radius: 50%; background: #FFF0EB;
    font-size: 16px; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.embo-ai-msg.user .embo-ai-msg-avatar { background: #E0F7F5; }
.embo-ai-bubble {
    max-width: 78%; padding: 12px 16px; border-radius: 18px;
    font-size: 14px; line-height: 1.55; color: #2D2D2D;
}
.embo-ai-msg.bot .embo-ai-bubble { background: #F7F5F2; border-bottom-left-radius: 6px; }
.embo-ai-msg.user .embo-ai-bubble { background: #FF6B35; color: white; border-bottom-right-radius: 6px; }

.embo-ai-product-grid { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.embo-ai-product-card {
    background: white; border: 1.5px solid #F0EDE8; border-radius: 14px;
    padding: 12px 14px; display: flex; align-items: center; gap: 12px;
    text-decoration: none; color: #2D2D2D;
    transition: border-color 0.15s, transform 0.15s; cursor: pointer;
}
.embo-ai-product-card:hover { border-color: #FF6B35; transform: translateX(2px); }
.embo-ai-product-emoji { font-size: 26px; min-width: 36px; text-align: center; }
.embo-ai-product-info { flex: 1; }
.embo-ai-product-name { font-weight: 700; font-size: 13px; color: #1A2B4A; margin-bottom: 2px; }
.embo-ai-product-desc { font-size: 12px; color: #6B7280; line-height: 1.4; }
.embo-ai-product-arrow { color: #FF6B35; font-size: 16px; }

.embo-ai-quick-replies { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.embo-ai-quick-reply {
    background: white; border: 1.5px solid #FF6B35; color: #FF6B35;
    border-radius: 50px; padding: 7px 16px; font-size: 13px; font-weight: 700;
    cursor: pointer; transition: all 0.15s;
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, sans-serif;
}
.embo-ai-quick-reply:hover { background: #FF6B35; color: white; }

.embo-ai-typing .embo-ai-bubble { display: flex; gap: 5px; align-items: center; padding: 14px 18px; }
.embo-ai-dot { width: 7px; height: 7px; background: #CCC; border-radius: 50%; animation: embo-ai-bounce 1.2s infinite; }
.embo-ai-dot:nth-child(2) { animation-delay: 0.2s; }
.embo-ai-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes embo-ai-bounce { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-6px); background: #FF6B35; } }

.embo-ai-input-area {
    padding: 14px 16px; border-top: 1px solid #F0EDE8;
    display: flex; gap: 10px; align-items: flex-end; flex-shrink: 0; background: white;
}
#embo-ai-input {
    flex: 1; border: 1.5px solid #E5E7EB; border-radius: 16px;
    padding: 10px 16px; font-size: 14px;
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, sans-serif;
    resize: none; height: 42px; max-height: 100px;
    outline: none; transition: border-color 0.15s;
    line-height: 1.4; overflow: hidden;
    color: #2D2D2D; background: white;
}
#embo-ai-input:focus { border-color: #FF6B35; }
#embo-ai-send {
    width: 42px; height: 42px; flex-shrink: 0;
    background: #FF6B35; border: none; border-radius: 50%;
    color: white; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.15s, transform 0.1s; padding: 0;
}
#embo-ai-send:hover { background: #D94F1B; transform: scale(1.05); }
#embo-ai-send:disabled { background: #E5E7EB; cursor: not-allowed; transform: none; }

@media (max-width: 440px) {
    #embo-ai-window { width: calc(100vw - 24px); right: 12px; bottom: 88px; height: calc(100vh - 120px); max-height: calc(100vh - 120px); }
    #embo-ai-bubble { right: 16px; bottom: 16px; }
}
