/* Gemini Chatbot Styles */
.gemini-chatbot-wrapper {
    min-height: 80vh;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.gemini-chatbot-container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 75vh;
}

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

.chatbot-header h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
}

.clear-chat {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.clear-chat:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 30px;
    background: #f8f9fa;
}

.message {
    display: flex;
    margin-bottom: 20px;
    animation: fadeIn 0.3s ease;
}

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

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

.message-content {
    max-width: 70%;
    padding: 15px 20px;
    border-radius: 18px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.message-content br {
    display: block;
    content: "";
    margin: 8px 0;
}

.message-content ul {
    margin: 10px 0;
    padding-left: 20px;
}

.message-content li {
    margin: 5px 0;
}

.message.bot .message-content {
    background: white;
    color: #333;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.message.user .message-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-bottom-right-radius: 4px;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin: 0 10px;
    flex-shrink: 0;
}

.message.bot .message-avatar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.message.user .message-avatar {
    background: #e0e0e0;
    color: #666;
}

.chatbot-input-area {
    padding: 20px 30px;
    background: white;
    border-top: 1px solid #e0e0e0;
}

#chatForm {
    display: flex;
    gap: 10px;
}

#userMessage {
    flex: 1;
    border: 2px solid #e0e0e0;
    border-radius: 24px;
    padding: 12px 20px;
    font-size: 15px;
    resize: none;
    font-family: inherit;
    max-height: 120px;
    transition: border-color 0.3s ease;
}

#userMessage:focus {
    outline: none;
    border-color: #667eea;
}

#sendButton {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 24px;
    padding: 12px 30px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
}

#sendButton:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

#sendButton:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.typing-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 15px 20px;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #667eea;
    animation: bounce 1.4s infinite ease-in-out;
}

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

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

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

.error-message {
    background: #fee;
    color: #c33;
    padding: 15px 20px;
    border-radius: 8px;
    margin: 10px 0;
    border-left: 4px solid #c33;
}

/* Responsive Design */
@media (max-width: 768px) {
    .gemini-chatbot-wrapper {
        padding: 10px;
    }
    
    .gemini-chatbot-container {
        height: 85vh;
        border-radius: 12px;
    }
    
    .chatbot-header {
        padding: 15px 20px;
    }
    
    .chatbot-header h1 {
        font-size: 20px;
    }
    
    .chatbot-messages {
        padding: 20px;
    }
    
    .message-content {
        max-width: 85%;
    }
    
    .chatbot-input-area {
        padding: 15px 20px;
    }
}