/* AI Chat Component Styles */

.ai-chat-container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    padding: 24px;
    margin: 40px 0;
    max-width: 900px;
}

.ai-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid #e2e8f0;
}

.ai-chat-header h3 {
    margin: 0;
    color: #1e293b;
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ai-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 20px;
    font-size: 13px;
    color: #166534;
    font-weight: 500;
}

.ai-status-badge.thinking {
    background: #fef3c7;
    border-color: #fde047;
    color: #854d0e;
}

.ai-chat-description {
    color: #64748b;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.6;
}

.ai-messages-container {
    max-height: 500px;
    overflow-y: auto;
    padding: 16px;
    background: #f8fafc;
    border-radius: 12px;
    margin-bottom: 16px;
    scroll-behavior: smooth;
}

.ai-messages-container::-webkit-scrollbar {
    width: 8px;
}

.ai-messages-container::-webkit-scrollbar-track {
    background: #e2e8f0;
    border-radius: 4px;
}

.ai-messages-container::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 4px;
}

.ai-messages-container::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

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

@keyframes fadeIn {
    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: 18px;
    flex-shrink: 0;
}

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

.message.ai .message-avatar {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.message-content {
    flex: 1;
}

.message-author {
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 4px;
}

.message-text {
    padding: 12px 16px;
    border-radius: 12px;
    line-height: 1.6;
    font-size: 14px;
    color: #1e293b;
}

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

.message.ai .message-text {
    background: white;
    border: 1px solid #e2e8f0;
    border-bottom-right-radius: 4px;
}

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

.ai-assessment-box {
    background: linear-gradient(135deg, #fef3c7 0%, #fde047 30%);
    border: 2px solid #fbbf24;
    border-radius: 12px;
    padding: 16px;
    margin-top: 12px;
}

.ai-assessment-box h4 {
    margin: 0 0 12px 0;
    color: #78350f;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.rubric-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #fbbf24;
}

.rubric-item:last-child {
    border-bottom: none;
}

.rubric-label {
    font-size: 13px;
    color: #78350f;
    font-weight: 500;
}

.rubric-score {
    font-size: 14px;
    font-weight: 700;
    color: #78350f;
}

.overall-score {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 2px solid #fbbf24;
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    color: #78350f;
}

.ai-input-area {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.ai-input-field {
    flex: 1;
    min-height: 60px;
    max-height: 150px;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.3s;
}

.ai-input-field:focus {
    outline: none;
    border-color: #667eea;
}

.ai-input-field:disabled {
    background: #f1f5f9;
    cursor: not-allowed;
}

.ai-send-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.3s;
    white-space: nowrap;
}

.ai-send-btn:hover:not(:disabled) {
    transform: translateY(-2px);
}

.ai-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.ai-welcome-prompt {
    text-align: center;
    padding: 40px 20px;
    color: #64748b;
}

.ai-welcome-prompt h4 {
    color: #1e293b;
    margin-bottom: 12px;
}

.ai-welcome-prompt p {
    font-size: 14px;
    line-height: 1.6;
    max-width: 500px;
    margin: 0 auto 20px;
}

.start-conversation-btn {
    padding: 12px 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: transform 0.2s;
}

.start-conversation-btn:hover {
    transform: translateY(-2px);
}

.typing-indicator {
    display: flex;
    gap: 6px;
    padding: 12px 16px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    width: fit-content;
}

.typing-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #94a3b8;
    animation: typingBounce 1.4s infinite ease-in-out;
}

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

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingBounce {
    0%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-8px);
    }
}

.ai-privacy-note {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    padding: 12px;
    margin-top: 16px;
    font-size: 12px;
    color: #075985;
    line-height: 1.5;
}

.ai-privacy-note strong {
    color: #0c4a6e;
}
