/* Course Pilot AI Assistant Chatbot Styles */

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

#chatbot-container.chatbot-hidden {
    display: none;
}

#chatbot-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2e7d32 0%, #1b5e20 100%);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
}

#chatbot-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.chatbot-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff5722;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

#chatbot-window {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 380px;
    height: 550px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.3s ease;
    transform: translateY(0) scale(1);
    opacity: 1;
}

#chatbot-window.chatbot-window-hidden {
    transform: translateY(20px) scale(0.95);
    opacity: 0;
    pointer-events: none;
}

.chatbot-header {
    background: linear-gradient(135deg, #2e7d32 0%, #1b5e20 100%);
    color: white;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbot-header-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 16px;
}

#chatbot-close {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

#chatbot-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

#chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f5f5f5;
}

.chatbot-message {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    animation: messageSlide 0.3s ease;
}

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

.message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.bot-message .message-avatar {
    background: #e8f5e9;
}

.user-message {
    flex-direction: row-reverse;
}

.user-message .message-avatar {
    background: #e3f2fd;
}

.message-content {
    background: white;
    padding: 12px 16px;
    border-radius: 12px;
    max-width: 75%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.user-message .message-content {
    background: #2e7d32;
    color: white;
}

.message-content p {
    margin: 0 0 8px 0;
}

.message-content p:last-child {
    margin-bottom: 0;
}

.chatbot-list {
    margin: 8px 0;
    padding-left: 20px;
}

.chatbot-list li {
    margin: 4px 0;
    line-height: 1.5;
}

.chatbot-link {
    display: inline-block;
    margin-top: 8px;
    color: #2e7d32;
    text-decoration: none;
    font-weight: 600;
    padding: 6px 12px;
    background: #e8f5e9;
    border-radius: 6px;
    transition: all 0.2s;
}

.user-message .chatbot-link {
    color: white;
    background: rgba(255, 255, 255, 0.2);
}

.chatbot-link:hover {
    background: #c8e6c9;
    transform: translateX(4px);
}

.chatbot-footer {
    margin-top: 8px;
    font-size: 13px;
    color: #666;
}

.quick-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

.quick-action {
    background: #e8f5e9;
    border: 1px solid #c8e6c9;
    color: #2e7d32;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
    text-align: left;
}

.quick-action:hover {
    background: #c8e6c9;
    transform: translateX(4px);
}

.chatbot-input-container {
    display: flex;
    gap: 8px;
    padding: 16px;
    background: white;
    border-top: 1px solid #e0e0e0;
}

#chatbot-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 24px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

#chatbot-input:focus {
    border-color: #2e7d32;
}

#chatbot-send {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #2e7d32;
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

#chatbot-send:hover {
    background: #1b5e20;
    transform: scale(1.05);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    #chatbot-window {
        width: calc(100vw - 40px);
        height: calc(100vh - 120px);
        bottom: 80px;
        right: 20px;
    }
}
