/* mastery.css - Styles for mastery progress indicators */

/* ==========================================
   LINE BUTTON MASTERY STATES
   ========================================== */

/* Mastered line button - golden state */
.line-button.mastered {
    background: linear-gradient(145deg, #ffd700, #ffb800);
    color: #5d4000;
    border-color: #cc9900;
    box-shadow: 
        0 2px 8px rgba(255, 215, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    font-weight: bold;
    position: relative;
}

/* Mastered + Selected state */
.line-button.mastered.selected {
    background: linear-gradient(145deg, #ffe44d, #ffc700);
    border-color: #22652b;
    box-shadow: 
        0 0 0 2px #22652b,
        0 2px 8px rgba(255, 215, 0, 0.5);
}

/* Hover state for mastered buttons */
.line-button.mastered:hover {
    transform: scale(1.05);
    box-shadow: 
        0 4px 12px rgba(255, 215, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

/* ==========================================
   RECENT TEXTS DROPDOWN MASTERY
   ========================================== */

.recent-text-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.recent-text-item:hover {
    background-color: rgba(34, 101, 43, 0.1);
}

.recent-text-preview {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
}

.recent-text-mastery {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    padding: 2px 6px;
    background: linear-gradient(145deg, #e8f5e9, #c8e6c9);
    color: #2e7d32;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}

.recent-text-mastery.complete {
    background: linear-gradient(145deg, #fff9c4, #ffeb3b);
    color: #5d4000;
    padding: 2px 4px;
    font-size: 14px;
}

.recent-text-lines {
    font-size: 11px;
    color: #888;
    white-space: nowrap;
}

/* ==========================================
   SAVED LESSONS MASTERY INDICATOR
   ========================================== */

.saved-lesson-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.saved-lesson-title-row .saved-lesson-title {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.saved-lesson-mastery {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    flex-shrink: 0;
}

.saved-lesson-mastery.in-progress {
    background: linear-gradient(145deg, #e3f2fd, #bbdefb);
    color: #1565c0;
}

.saved-lesson-mastery.complete {
    background: linear-gradient(145deg, #fff9c4, #ffeb3b);
    color: #5d4000;
    padding: 2px 6px;
    font-size: 14px;
}

.saved-lesson-mastery.not-started {
    background: #f5f5f5;
    color: #888;
}

/* Mastery progress bar for saved lessons */
.saved-lesson-progress {
    height: 3px;
    background: #e0e0e0;
    border-radius: 2px;
    margin-top: 6px;
    overflow: hidden;
}

.saved-lesson-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4caf50, #8bc34a);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.saved-lesson-progress-fill.complete {
    background: linear-gradient(90deg, #ffd700, #ffeb3b);
}

/* ==========================================
   LESSON INFO BAR MASTERY
   ========================================== */

.lesson-info-bar .lesson-mastery {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: 12px;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.lesson-info-bar .lesson-mastery-icon {
    font-size: 14px;
}

.lesson-info-bar .lesson-mastery-text {
    color: #555;
}

/* ==========================================
   ANIMATIONS
   ========================================== */

/* Mastery celebration pulse */
@keyframes masteryPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 4px 16px rgba(255, 215, 0, 0.6);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
    }
}

.line-button.mastered.just-mastered {
    animation: masteryPulse 0.5s ease-out;
}

/* Star for complete mastery - scaled down, no animation */
.recent-text-mastery.complete {
    transform: scale(0.75);
}

/* ==========================================
   RESPONSIVE ADJUSTMENTS
   ========================================== */

@media (max-width: 480px) {
    .recent-text-item {
        padding: 12px;
    }
    
    .recent-text-preview {
        font-size: 13px;
    }
    
    .recent-text-mastery {
        font-size: 10px;
        min-width: 28px;
    }
    
    .recent-text-lines {
        display: none;
    }
}