.ai-chatbot-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 350px;
    height: 500px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    transition: all 0.3s ease;
}

.ai-chatbot-widget.dragging {
    cursor: grabbing;
    opacity: 0.9;
}

.ai-chatbot-widget.resizing {
    cursor: nwse-resize;
}

.chatbot-header {
    padding: 15px;
    background: #0073aa;
    color: #fff;
    border-radius: 10px 10px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: grab;
}

.chatbot-header:active {
    cursor: grabbing;
}

.chatbot-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.minimize-button {
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.minimize-button:hover {
    transform: scale(1.1);
}

.chatbot-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background: #f9f9f9;
    scroll-behavior: smooth;
}

.message {
    margin-bottom: 15px;
    padding: 10px 15px;
    border-radius: 15px;
    max-width: 80%;
    word-wrap: break-word;
    animation: message-appear 0.3s ease;
}

@keyframes message-appear {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.system {
    background: #e3f2fd;
    color: #0d47a1;
    margin-right: auto;
}

.message.user {
    background: #0073aa;
    color: #fff;
    margin-left: auto;
}

.message.ai {
    background: #fff;
    color: #333;
    margin-right: auto;
    border: 1px solid #ddd;
}

.message.error {
    background: #ffebee;
    color: #c62828;
    margin-right: auto;
}

.chatbot-input {
    padding: 15px;
    background: #fff;
    border-top: 1px solid #ddd;
    display: flex;
    align-items: flex-end;
    gap: 10px;
    transition: opacity 0.2s;
}

.chatbot-input textarea {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 10px 15px;
    resize: none;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.4;
    max-height: 100px;
    overflow-y: auto;
    transition: border-color 0.2s;
}

.chatbot-input textarea:focus {
    outline: none;
    border-color: #0073aa;
}

.send-button {
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.send-button:hover {
    background: #005177;
    transform: scale(1.05);
}

.send-button:active {
    transform: scale(0.95);
}

.send-button .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

/* Minimized state */
.ai-chatbot-widget.minimized {
    height: 60px;
}

.ai-chatbot-widget.minimized .chatbot-messages,
.ai-chatbot-widget.minimized .chatbot-input {
    display: none;
}

/* Loading state */
.chatbot-input.loading textarea {
    opacity: 0.7;
    pointer-events: none;
}

.chatbot-input.loading .send-button {
    opacity: 0.7;
    pointer-events: none;
}

/* Typing indicator */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 10px 15px;
    background: #fff;
    border-radius: 15px;
    margin-right: auto;
    width: fit-content;
    animation: message-appear 0.3s ease;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: #0073aa;
    border-radius: 50%;
    animation: typing 1s infinite ease-in-out;
}

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

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

@keyframes typing {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

/* Resize handle */
.resize-handle {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 20px;
    height: 20px;
    cursor: nwse-resize;
}

.resize-handle::after {
    content: '';
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 8px;
    height: 8px;
    border-right: 2px solid #ddd;
    border-bottom: 2px solid #ddd;
}

/* Mobile responsiveness */
@media (max-width: 480px) {
    .ai-chatbot-widget {
        width: 100%;
        height: 100%;
        bottom: 0;
        right: 0;
        border-radius: 0;
    }
    
    .chatbot-header {
        border-radius: 0;
    }
    
    .resize-handle {
        display: none;
    }
} 