/* CSS for AI Tutor Integration */

.chat-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 220px);
    background-color: #f9fbfd;
    border: 1px solid #dbe3eb;
    border-radius: 6px;
    padding: 10px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
}

.chat-messages {
    flex-grow: 1;
    overflow-y: auto;
    padding-right: 5px;
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Scrollbar styling */
.chat-messages::-webkit-scrollbar {
    width: 4px;
}
.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}
.chat-messages::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 2px;
}

.chat-message {
    display: flex;
    width: 100%;
}

.chat-message.tutor {
    justify-content: flex-start;
}

.chat-message.student {
    justify-content: flex-end;
}

.chat-bubble {
    max-width: 85%;
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    line-height: 1.35;
    position: relative;
    word-break: break-word;
    animation: fadeInBubble 0.25s ease-out forwards;
}

.chat-message.tutor .chat-bubble {
    background: #e9f2fc;
    color: #1e3a5f;
    border-bottom-left-radius: 2px;
    border: 1px solid #cfe2f9;
}

.chat-message.student .chat-bubble {
    background: #3e8ed0;
    color: #ffffff;
    border-bottom-right-radius: 2px;
}

.quick-prompts {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
    border-top: 1px dashed #dbe3eb;
    padding-top: 10px;
}

.quick-prompt-btn {
    font-size: 0.75rem !important;
    border-radius: 12px !important;
    padding: 2px 8px !important;
    height: auto !important;
    background-color: #ffffff !important;
    border: 1px solid #dbe3eb !important;
    color: #4a5568 !important;
    transition: all 0.2s ease;
}

.quick-prompt-btn:hover {
    background-color: #e9f2fc !important;
    border-color: #3e8ed0 !important;
    color: #3e8ed0 !important;
}

.chat-input-area {
    display: flex;
    gap: 6px;
    border-top: 1px solid #e2e8f0;
    padding-top: 10px;
}

.chat-input-area input {
    flex-grow: 1;
    border-radius: 4px;
    border: 1px solid #cbd5e1;
    padding: 6px 10px;
    font-size: 0.8rem;
    outline: none;
    transition: border-color 0.2s;
}

.chat-input-area input:focus {
    border-color: #3e8ed0;
}

/* Typing Indicator Animation */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 14px;
}

.typing-indicator span {
    display: inline-block;
    width: 6px;
    height: 6px;
    background-color: #94a3b8;
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.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.0);
    }
}

@keyframes fadeInBubble {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
