#ai-support-pilot-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

#ai-chat-bubble {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
}

#ai-chat-bubble:hover {
    transform: scale(1.1);
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.5);
}

#ai-chat-bubble svg {
    width: 30px;
    height: 30px;
    color: white;
}

#ai-chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    height: 550px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#ai-chat-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#ai-chat-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

#ai-chat-close {
    background: transparent;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

#ai-chat-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

#ai-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f9fafb;
}

.ai-message,
.user-message {
    margin-bottom: 16px;
    display: flex;
    gap: 10px;
}

.user-message {
    flex-direction: row-reverse;
}

.message-bubble {
    max-width: 75%;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
}

.ai-message .message-bubble {
    background: white;
    color: #1f2937;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.ai-message .message-bubble a {
    color: var(--ai-widget-color, #667eea);
    text-decoration: underline;
    word-break: break-all;
}

.user-message .message-bubble {
    background: var(--ai-widget-color, linear-gradient(135deg, #667eea 0%, #764ba2 100%));
    color: white;
    border-bottom-right-radius: 4px;
}

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.ai-message .message-avatar {
    background: var(--ai-widget-color, linear-gradient(135deg, #667eea 0%, #764ba2 100%));
}

.user-message .message-avatar {
    background: #e5e7eb;
}

#ai-chat-input-wrapper {
    padding: 16px;
    background: white;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 10px;
}

#ai-chat-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 24px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

#ai-chat-input:focus {
    border-color: var(--ai-widget-color, #667eea);
}

#ai-chat-send {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

#ai-chat-send:hover {
    transform: scale(1.05);
}

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

.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: #9ca3af;
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-10px);
    }
}

@media (max-width: 480px) {
    #ai-chat-window {
        width: calc(100vw - 40px);
        height: calc(100vh - 100px);
    }
}
