/* W4S Chatbot Styling */

#w4s-chatbot-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Toggle Button */
.w4s-chatbot-toggle {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    border-radius: 25px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.w4s-chatbot-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.w4s-chatbot-icon {
    font-size: 20px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

.w4s-chatbot-text {
    font-weight: 600;
    font-size: 14px;
}

/* Chat Window */
.w4s-chatbot-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    height: 500px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.w4s-chatbot-open .w4s-chatbot-window {
    display: flex;
}

.w4s-chatbot-closed .w4s-chatbot-window {
    display: none;
}

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

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

.w4s-chatbot-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.w4s-chatbot-close:hover {
    opacity: 0.8;
}

/* Messages */
.w4s-chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f8f9fa;
}

.w4s-chatbot-message {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
}

.w4s-chatbot-message p {
    margin: 0 0 10px 0;
    padding: 12px 16px;
    border-radius: 18px;
    max-width: 85%;
    line-height: 1.4;
}

.w4s-chatbot-message ul {
    margin: 0;
    padding-left: 20px;
}

.w4s-chatbot-message li {
    margin-bottom: 5px;
}

/* Bot Messages */
.w4s-chatbot-bot p {
    background: white;
    color: #333;
    border: 1px solid #e1e8ed;
    border-radius: 18px 18px 18px 4px;
}

/* User Messages */
.w4s-chatbot-user {
    justify-content: flex-end;
}

.w4s-chatbot-user p {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 18px 18px 4px 18px;
}

/* Input */
.w4s-chatbot-input {
    display: flex;
    padding: 15px;
    background: white;
    border-top: 1px solid #e1e8ed;
    gap: 10px;
}

#w4s-chatbot-query {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #e1e8ed;
    border-radius: 20px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s ease;
}

#w4s-chatbot-query:focus {
    border-color: #667eea;
}

#w4s-chatbot-send {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

#w4s-chatbot-send:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

#w4s-chatbot-send:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Loading */
.w4s-chatbot-loading {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: white;
    border-radius: 18px 18px 18px 4px;
    border: 1px solid #e1e8ed;
}

.w4s-chatbot-loading::after {
    content: '...';
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { content: '...'; }
    33% { content: '...'; }
    66% { content: '...'; }
    100% { content: '...'; }
}

/* Responsive */
@media (max-width: 480px) {
    .w4s-chatbot-window {
        width: 320px;
        height: 450px;
    }
    
    #w4s-chatbot-widget {
        bottom: 10px;
        right: 10px;
    }
    
    .w4s-chatbot-toggle {
        padding: 12px 16px;
    }
    
    .w4s-chatbot-text {
        display: none;
    }
}

/* Scrollbar styling */
.w4s-chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

.w4s-chatbot-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.w4s-chatbot-messages::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.w4s-chatbot-messages::-webkit-scrollbar-thumb:hover {
    background: #555;
}