/* AI Components Styles */

/* AI Assistant Widget */
.ai-assistant-widget {
    font-family: inherit;
}

.ai-assistant-btn {
    backdrop-filter: blur(10px);
}

.ai-assistant-panel {
    backdrop-filter: blur(20px);
}

.ai-assistant-messages::-webkit-scrollbar {
    width: 6px;
}

.ai-assistant-messages::-webkit-scrollbar-track {
    background: transparent;
}

.ai-assistant-messages::-webkit-scrollbar-thumb {
    background: hsl(var(--muted-foreground) / 0.3);
    border-radius: 3px;
}

.ai-assistant-messages::-webkit-scrollbar-thumb:hover {
    background: hsl(var(--muted-foreground) / 0.5);
}

/* AI Loading States */
@keyframes ai-pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.ai-loading-spinner {
    animation: ai-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* AI Result Card */
.ai-result-card {
    transition: all 0.2s ease;
}

.ai-result-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.ai-result-content {
    line-height: 1.6;
}

.ai-result-content p {
    margin-bottom: 0.75rem;
}

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

/* AI Suggestion Chips */
.ai-suggestion-chips button {
    white-space: nowrap;
}

/* AI Floating Button */
.ai-floating-btn {
    backdrop-filter: blur(10px);
}

/* AI Error Message */
.ai-error-message {
    animation: shake 0.5s ease;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

/* Responsive Adjustments */
@media (max-width: 640px) {
    .ai-assistant-panel {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
        width: auto;
    }

    .ai-assistant-btn {
        bottom: 1rem;
        right: 1rem;
    }
}

/* Dark mode support (if using) */
@media (prefers-color-scheme: dark) {
    .ai-assistant-panel {
        background: rgba(0, 0, 0, 0.9);
    }
}

/* AI Search Enhancements */
.ai-highlight {
    background-color: #fef3c7;
    color: #92400e;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: 600;
}

.dark-mode .ai-highlight {
    background-color: #78350f;
    color: #fef3c7;
}

.ai-relevance-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
}

.ai-result-explanation {
    border-left: 3px solid hsl(var(--primary));
}

/* AI Study Assistant */
.ai-tutor-btn {
    backdrop-filter: blur(10px);
}

.ai-study-panel {
    backdrop-filter: blur(20px);
}

.ai-chapters button:hover {
    background-color: hsl(var(--secondary));
}

.quiz-question {
    transition: all 0.2s ease;
}

.quiz-question:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}