/* AI Chat Window Styles */
#jd-ai-chat-window {
    position: fixed;
    bottom: 90px;
    right: 30px;
    width: 350px;
    max-width: calc(100vw - 40px);
    height: 500px;
    max-height: calc(100vh - 120px);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 10000;
    transition: all 0.3s ease;
    opacity: 1;
    transform: translateY(0);
}

#jd-ai-chat-window.jd-ai-chat-closed {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

.jd-ai-chat-header {
    background: #007bff;
    color: #fff;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
}

.jd-ai-close-btn {
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
}

.jd-ai-chat-body {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.jd-ai-message {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 15px;
    font-size: 14px;
    line-height: 1.5;
}

.jd-ai-msg-bot {
    background: #fff;
    color: #333;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.jd-ai-msg-user {
    background: #007bff;
    color: #fff;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.jd-ai-chat-footer {
    padding: 15px;
    background: #fff;
    display: flex;
    gap: 10px;
    border-top: 1px solid #eee;
}

#jd-ai-chat-input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 20px;
    outline: none;
    font-size: 14px;
}

#jd-ai-chat-input:focus {
    border-color: #007bff;
}

#jd-ai-chat-send {
    background: #007bff;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

#jd-ai-chat-send:disabled {
    background: #ccc;
    cursor: not-allowed;
}

#jd-ai-chat-send svg {
    width: 20px;
    height: 20px;
}

.jd-ai-typing {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    background: #fff;
    border-radius: 15px;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.jd-ai-typing span {
    width: 6px;
    height: 6px;
    background: #999;
    border-radius: 50%;
    animation: jd-ai-bounce 1.4s infinite ease-in-out both;
}

.jd-ai-typing span:nth-child(1) { animation-delay: -0.32s; }
.jd-ai-typing span:nth-child(2) { animation-delay: -0.16s; }

@keyframes jd-ai-bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}
