/* ============================================
   QUESTION QUALITY OPTIMIZER
   ============================================ */

.question-quality-widget {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.05), rgba(236, 72, 153, 0.05));
    border: 2px solid rgba(139, 92, 246, 0.2);
    border-radius: 12px;
    padding: 1rem;
    margin: 1rem 0;
}

/* ========================================
   HEADER & SCORE
   ======================================== */

.quality-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.quality-header h3 {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 700;
    color: #1a202c;
}

.quality-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.score-circle {
    width: 48px;
    height: 48px;
}

.score-circle.pulse {
    animation: scorePulse 0.6s ease;
}

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

.circular-chart {
    display: block;
    max-width: 100%;
    max-height: 100%;
}

.circular-chart .circle-bg {
    stroke: rgba(139, 92, 246, 0.1);
}

.circular-chart .circle {
    stroke-linecap: round;
    transition: stroke-dasharray 0.5s ease, stroke 0.3s ease;
}

.score-text {
    font-size: 0.75rem;
    font-weight: 700;
    fill: #1a202c;
}

.score-label {
    font-size: 0.75rem;
    font-weight: 700;
    transition: color 0.3s ease;
}

/* ========================================
   CHECKLIST
   ======================================== */

.quality-checklist {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.375rem;
    margin-bottom: 0.5rem;
}

/* Stack on mobile */
@media (max-width: 768px) {
    .quality-checklist {
        grid-template-columns: 1fr;
    }
}

.check-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.5rem;
    background: white;
    border-radius: 6px;
    border: 1px solid rgba(139, 92, 246, 0.1);
    transition: all 0.3s ease;
}

.check-item.passed {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05), rgba(5, 150, 105, 0.05));
    border-color: rgba(16, 185, 129, 0.3);
}

.check-item.passed .check-icon {
    background: #10B981;
    color: white;
}

.check-item.passed .check-text {
    color: #065F46;
    font-weight: 600;
}

.check-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(139, 92, 246, 0.1);
    color: #8B5CF6;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.check-text {
    flex: 1;
    font-size: 0.8125rem;
    color: #4a5568;
    transition: all 0.3s ease;
    line-height: 1.3;
}

/* ========================================
   SUGGESTIONS
   ======================================== */

.quality-suggestions {
    padding-top: 0.5rem;
    border-top: 1px solid rgba(139, 92, 246, 0.1);
    margin-top: 0.5rem;
}

.quality-suggestions h4 {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    margin: 0 0 0.375rem 0;
    font-size: 0.8125rem;
    font-weight: 700;
    color: #F59E0B;
}

.quality-suggestions h4 svg {
    color: #F59E0B;
    flex-shrink: 0;
    width: 14px;
    height: 14px;
}

.suggestions-list {
    margin: 0;
    padding-left: 1.25rem;
    list-style: none;
}

.suggestions-list li {
    position: relative;
    padding: 0.125rem 0;
    font-size: 0.75rem;
    color: #4a5568;
    font-weight: 500;
    line-height: 1.3;
}

.suggestions-list li::before {
    content: '→';
    position: absolute;
    left: -1.25rem;
    color: #F59E0B;
    font-weight: 700;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
    .question-quality-widget {
        padding: 1.25rem;
    }

    .quality-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .quality-score {
        align-self: center;
    }
}

@media (max-width: 480px) {
    .check-item {
        padding: 0.625rem 0.875rem;
    }

    .check-text {
        font-size: 0.8125rem;
    }

    .score-circle {
        width: 60px;
        height: 60px;
    }
}

/* ========================================
   ACCESSIBILITY
   ======================================== */

.check-item:focus-within {
    outline: 2px solid #8B5CF6;
    outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .circular-chart .circle,
    .check-item,
    .score-circle.pulse {
        transition: none;
        animation: none;
    }
}

