/* Chatbot Styles */

.aipcg-chatbot-widget {
    position: fixed;
    z-index: 99999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

.aipcg-chatbot-widget[data-position="bottom-right"] {
    bottom: 20px;
    right: 20px;
}

.aipcg-chatbot-widget[data-position="bottom-left"] {
    bottom: 20px;
    left: 20px;
}

.chatbot-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    border-radius: 50px;
    color: white;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    transition: transform 0.2s, box-shadow 0.2s;
}

.chatbot-toggle:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.chatbot-icon {
    font-size: 24px;
}

.chatbot-label {
    font-size: 14px;
    font-weight: 500;
}

.chatbot-container {
    position: absolute;
    bottom: 70px;
    width: 350px;
    height: 500px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 30px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: chatbotSlideIn 0.3s ease;
}

.aipcg-chatbot-widget[data-position="bottom-right"] .chatbot-container {
    right: 0;
}

.aipcg-chatbot-widget[data-position="bottom-left"] .chatbot-container {
    left: 0;
}

@keyframes chatbotSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chatbot-header {
    padding: 15px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbot-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.chatbot-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
    line-height: 1;
}

.chatbot-close:hover {
    opacity: 1;
}

.chatbot-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background: #f5f7fa;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.message {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.4;
    word-wrap: break-word;
    animation: messageFadeIn 0.3s ease;
}

@keyframes messageFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.bot {
    background: white;
    color: #333;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.message.user {
    background: #667eea;
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.message-time {
    font-size: 10px;
    margin-top: 5px;
    opacity: 0.6;
}

.message.user .message-time {
    text-align: right;
}

.typing-indicator {
    display: inline-block;
    width: 40px;
    text-align: center;
}

.typing-indicator:after {
    content: '...';
    animation: typing 1.5s infinite;
}

@keyframes typing {
    0%, 20% { content: '.'; }
    40%, 60% { content: '..'; }
    80%, 100% { content: '...'; }
}

.suggested-questions {
    padding: 10px 15px;
    background: #f5f7fa;
    border-top: 1px solid #e5e9f0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.suggested-question {
    background: white;
    border: 1px solid #e5e9f0;
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.suggested-question:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.chatbot-input {
    padding: 12px;
    border-top: 1px solid #e5e9f0;
    display: flex;
    gap: 10px;
    background: white;
}

.chatbot-input input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #e5e9f0;
    border-radius: 25px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.chatbot-input input:focus {
    border-color: #667eea;
}

.send-message {
    background: #667eea;
    color: white;
    border: none;
    border-radius: 25px;
    padding: 0 18px;
    cursor: pointer;
    font-size: 16px;
    transition: transform 0.2s, background 0.2s;
}

.send-message:hover {
    transform: scale(1.02);
}

@media (max-width: 480px) {
    .chatbot-container {
        width: calc(100vw - 40px);
        right: 0;
        left: auto;
        bottom: 70px;
    }
}