/* Maven Chat Widget Styles */

.maven-chat-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 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;
    font-size: 24px;
    transition: all 0.3s ease;
    z-index: 1000;
}

.maven-chat-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.maven-chat-window {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 380px;
    height: 500px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    display: none;
    flex-direction: column;
    z-index: 1000;
    overflow: hidden;
}

.maven-chat-window.open {
    display: flex;
}

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

.maven-chat-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.maven-chat-header small {
    display: block;
    opacity: 0.9;
    font-size: 12px;
    margin-top: 2px;
}

.maven-chat-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;
}

.maven-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: #f5f5f5;
}

.maven-message {
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
}

.maven-message.user {
    align-items: flex-end;
}

.maven-message.assistant {
    align-items: flex-start;
}

.maven-message-bubble {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 12px;
    word-wrap: break-word;
}

.maven-message.user .maven-message-bubble {
    background: #667eea;
    color: white;
}

.maven-message.assistant .maven-message-bubble {
    background: white;
    color: #333;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.maven-message-time {
    font-size: 11px;
    color: #999;
    margin-top: 4px;
}

.maven-typing-indicator {
    display: none;
    padding: 10px 14px;
    background: white;
    border-radius: 12px;
    max-width: 60px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.maven-typing-indicator.active {
    display: block;
}

.maven-typing-indicator span {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #999;
    margin-right: 4px;
    animation: typing 1.4s infinite;
}

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

.maven-typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
    margin-right: 0;
}

@keyframes typing {
    0%, 60%, 100% {
        opacity: 0.3;
    }
    30% {
        opacity: 1;
    }
}

.maven-chat-input-area {
    padding: 12px;
    background: white;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 8px;
}

.maven-chat-input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 14px;
    outline: none;
    resize: none;
    font-family: inherit;
    max-height: 80px;
}

.maven-chat-input:focus {
    border-color: #667eea;
}

.maven-chat-send {
    background: #667eea;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.maven-chat-send:hover {
    background: #5568d3;
}

.maven-chat-send:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.maven-login-prompt {
    text-align: center;
    padding: 20px;
    color: #666;
}

.maven-login-prompt button {
    margin-top: 12px;
    padding: 10px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

.maven-login-prompt button:hover {
    background: #5568d3;
}

.maven-citation {
    font-size: 11px;
    color: #666;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #e0e0e0;
}

.maven-citation-title {
    font-weight: 600;
    margin-bottom: 4px;
}
