/* WC Sample Orders Pro Chatbot Styles */

/* Chatbot Toggle Button */
.chatbot-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, #3858E9, #2d47c7);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 15px 20px;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(56, 88, 233, 0.3);
    transition: all 0.3s ease;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 14px;
}

.chatbot-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(56, 88, 233, 0.4);
}

.chatbot-toggle.active {
    background: #ff4757;
}

.chatbot-toggle i {
    font-size: 18px;
}

/* Chatbot Container */
.wc-chatbot {
    position: fixed;
    bottom: 150px;
    right: 30px;
    width: 380px;
    height: 500px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    transform: translateY(100px) scale(0.8);
    opacity: 0;
    transition: all 0.3s ease;
    overflow: hidden;
}

.wc-chatbot.open {
    transform: translateY(50px) scale(1);
    opacity: 1;
}

/* Chatbot Header */
.chatbot-header {
    background: linear-gradient(135deg, #3858E9, #2d47c7);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 20px 20px 0 0;
}

.chatbot-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 16px;
}

.chatbot-title i {
    font-size: 20px;
}

.chatbot-close {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.chatbot-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Chatbot Messages */
.chatbot-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.message {
    display: flex;
    margin-bottom: 10px;
}

.user-message {
    justify-content: flex-end;
}

.bot-message {
    justify-content: flex-start;
}

.message-content {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 18px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
}

.user-message .message-content {
    background: linear-gradient(135deg, #3858E9, #2d47c7);
    color: white;
    border-bottom-right-radius: 5px;
}

.bot-message .message-content {
    background: #f8f9ff;
    color: #333;
    border-bottom-left-radius: 5px;
    border: 1px solid #e9ecef;
}

/* Chatbot Input */
.chatbot-input {
    padding: 20px;
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: 10px;
    align-items: center;
}

.chatbot-input input {
    flex: 1;
    border: 1px solid #e9ecef;
    border-radius: 25px;
    padding: 12px 16px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s ease;
}

.chatbot-input input:focus {
    border-color: #3858E9;
}

.chatbot-input button {
    background: linear-gradient(135deg, #3858E9, #2d47c7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chatbot-input button:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(56, 88, 233, 0.3);
}

/* Chatbot Suggestions */
.chatbot-suggestions {
    padding: 15px 20px;
    border-top: 1px solid #e9ecef;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.suggestion-btn {
    background: #f8f9ff;
    border: 1px solid #e9ecef;
    border-radius: 20px;
    padding: 6px 12px;
    font-family: 'Poppins', sans-serif;
    font-size: 12px;
    color: #3858E9;
    cursor: pointer;
    transition: all 0.3s ease;
}

.suggestion-btn:hover {
    background: #3858E9;
    color: white;
    transform: translateY(-1px);
}

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

.chatbot-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

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

.chatbot-messages::-webkit-scrollbar-thumb:hover {
    background: #2d47c7;
}

/* Responsive Design */
@media (max-width: 768px) {
    .wc-chatbot {
        width: calc(100vw - 40px);
        height: calc(100vh - 120px);
        right: 20px;
        bottom: 80px;
    }
    
    .chatbot-toggle {
        right: 20px;
        bottom: 20px;
        padding: 12px 16px;
    }
    
    .chatbot-toggle span {
        display: none;
    }
    
    .message-content {
        max-width: 90%;
        font-size: 13px;
    }
    
    .chatbot-suggestions {
        padding: 10px 15px;
    }
    
    .suggestion-btn {
        font-size: 11px;
        padding: 5px 10px;
    }
}

@media (max-width: 480px) {
    .wc-chatbot {
        width: calc(100vw - 20px);
        right: 10px;
        bottom: 70px;
    }
    
    .chatbot-toggle {
        right: 10px;
        bottom: 10px;
        width: 50px;
        height: 50px;
        border-radius: 50%;
        padding: 0;
        justify-content: center;
    }
    
    .chatbot-toggle i {
        font-size: 20px;
    }
}

/* Animation for new messages */
@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message {
    animation: messageSlideIn 0.3s ease;
}

/* Typing indicator */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 12px 16px;
    background: #f8f9ff;
    border-radius: 18px;
    border-bottom-left-radius: 5px;
    border: 1px solid #e9ecef;
    max-width: 80px;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: #3858E9;
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes typing {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .wc-chatbot {
        background: #2d3748;
        color: #e2e8f0;
    }
    
    .bot-message .message-content {
        background: #4a5568;
        color: #e2e8f0;
        border-color: #718096;
    }
    
    .chatbot-input {
        border-top-color: #718096;
    }
    
    .chatbot-input input {
        background: #4a5568;
        border-color: #718096;
        color: #e2e8f0;
    }
    
    .chatbot-input input:focus {
        border-color: #3858E9;
    }
    
    .suggestion-btn {
        background: #4a5568;
        border-color: #718096;
        color: #e2e8f0;
    }
    
    .suggestion-btn:hover {
        background: #3858E9;
        color: white;
    }
}
