/* Chatbot Widget */
.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: none;
    flex-direction: column;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.chatbot-widget.open {
    display: flex;
}

/* Header */
.chatbot-header {
    background: #0078d4;
    color: white;
    padding: 15px;
    border-radius: 10px 10px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbot-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
}

.chatbot-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Messages */
#chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    background: #f5f5f5;
}

.chatbot-message {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
}

.chatbot-message.user {
    align-items: flex-end;
}

.chatbot-message.bot {
    align-items: flex-start;
}

.message-content {
    max-width: 70%;
    padding: 10px 15px;
    border-radius: 18px;
    word-wrap: break-word;
}

.chatbot-message.user .message-content {
    background: #0078d4;
    color: white;
}

.chatbot-message.bot .message-content {
    background: white;
    color: #333;
    border: 1px solid #e0e0e0;
}

.message-time {
    font-size: 11px;
    color: #666;
    margin-top: 5px;
}

/* Input */
.chatbot-input-container {
    padding: 15px;
    border-top: 1px solid #e0e0e0;
    background: white;
    border-radius: 0 0 10px 10px;
}

#chatbot-form {
    display: flex;
    gap: 10px;
}

#chatbot-input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    outline: none;
    font-size: 14px;
}

#chatbot-input:focus {
    border-color: #0078d4;
}

.chatbot-submit {
    background: #0078d4;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}

.chatbot-submit:hover {
    background: #005a9e;
}

/* Toggle Button */
.chatbot-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: #0078d4;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    z-index: 9998;
    border: none;
}

.chatbot-toggle:hover {
    background: #005a9e;
}

.chatbot-toggle svg {
    width: 30px;
    height: 30px;
    fill: white;
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    padding: 10px 15px;
    gap: 4px;
    background: white;
    border-radius: 18px;
    width: fit-content;
    border: 1px solid #e0e0e0;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: #666;
    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);
        opacity: 0.5;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* Mobile Responsive */
@media (max-width: 450px) {
    .chatbot-widget {
        width: 100%;
        height: 100%;
        bottom: 0;
        right: 0;
        border-radius: 0;
        max-width: 100vw;
        max-height: 100vh;
    }
    
    .chatbot-header {
        border-radius: 0;
    }
    
    .chatbot-input-container {
        border-radius: 0;
    }
}