/* ============================================
   سری‌سازی مقالات - افزونه وردپرس
   کپی‌رایت (c) 2025 AliReza EbadiMajd
   وب‌سایت: https://ebadimajd.ir
   مجوز: GPL v2 or later
   ============================================ */

/* باکس اصلی */
.sidebar-series-box {
    background: #ffffff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
    border: 1px solid #e9ecef;
}

/* ============================================
   هدر: نام دوره و تعداد جلسات
   ============================================ */

.series-header {
    margin-bottom: 15px;
}

.series-header .series-title {
    margin: 0;
    color: #1a1a1a;
    font-size: 1.4rem;
    font-weight: bold;
    line-height: 1.4;
}

.series-header .series-count {
    display: inline-block;
    margin-top: 4px;
    color: #6c757d;
    font-size: 14px;
    font-weight: normal;
}

/* ============================================
   نوار پیشرفت
   ============================================ */

.series-progress {
    margin-bottom: 15px;
    background: #f8f9fa;
    padding: 10px;
    border-radius: 6px;
    text-align: center;
}

.series-progress-text {
    font-size: 13px;
    color: #6c757d;
}

.series-progress-bar {
    width: 100%;
    height: 4px;
    background: #e9ecef;
    border-radius: 2px;
    margin-top: 8px;
    overflow: hidden;
}

.series-progress-fill {
    height: 100%;
    background: #3c9e64;
    border-radius: 2px;
    transition: width 0.5s ease;
}

/* ============================================
   لیست جلسات
   ============================================ */

.series-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 400px;
}

/* اسکرول‌بار */
.series-list::-webkit-scrollbar {
    width: 4px;
}
.series-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 2px;
}
.series-list::-webkit-scrollbar-thumb {
    background: #3c9e64;
    border-radius: 2px;
}
.series-list::-webkit-scrollbar-thumb:hover {
    background: #1e7e34;
}

/* هر آیتم لیست */
.series-item {
    padding: 10px 12px;
    margin-bottom: 4px;
    border-radius: 6px;
    transition: all 0.2s ease;
    border-right: 3px solid transparent;
}

/* هاور روی آیتم‌ها */
.series-item:hover {
    transform: translateX(-4px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* لینک داخل آیتم */
.series-item a {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

/* ============================================
   وضعیت‌های مختلف آیتم‌ها
   ============================================ */

/* 1. مقاله جاری - سبز */
.series-item.current {
    background: #f0fff4 !important;
    border-right-color: #28a745 !important;
}

.series-item.current .series-badge {
    background: #3c9e64 !important;
    color: #ffffff !important;
}

.series-item.current .series-item-title {
    color: #3c9e64 !important;
    font-weight: bold !important;
}

/* 2. جلسات خوانده شده - خط خورده */
.series-item.read {
    background: #f8f9fa !important;
}

.series-item.read .series-badge {
    background: #dee2e6 !important;
    color: #6c757d !important;
}

.series-item.read .series-item-title {
    color: #6c757d !important;
    text-decoration: line-through !important;
}

/* 3. جلسات نخوانده - مشکی معمولی */
.series-item:not(.current):not(.read) .series-badge {
    background: #e9ecef !important;
    color: #495057 !important;
}

.series-item:not(.current):not(.read) .series-item-title {
    color: #1a1a1a !important;
    font-weight: normal !important;
}

/* ============================================
   برچسب شماره جلسه
   ============================================ */

.series-badge {
    display: inline-block;
    min-width: 55px;
    text-align: center;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    flex-shrink: 0;
}

/* ============================================
   عنوان مقاله
   ============================================ */

.series-item-title {
    flex: 1;
    transition: color 0.2s ease;
}

/* ============================================
   تیک جلسات خوانده شده
   ============================================ */

.series-check {
    color: #28a745;
    font-size: 14px;
    flex-shrink: 0;
}

/* ============================================
   واکنش‌گرایی (موبایل)
   ============================================ */

@media (max-width: 768px) {
    .sidebar-series-box {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .series-header .series-title {
        font-size: 1.3rem;
    }
    
    .series-item a {
        font-size: 13px;
        gap: 8px;
        flex-wrap: wrap;
    }
    
    .series-badge {
        min-width: 45px;
        font-size: 10px;
        padding: 2px 6px;
    }
    
    .series-item {
        padding: 8px 10px;
    }
}

@media (max-width: 480px) {
    .sidebar-series-box {
        padding: 12px;
    }
    
    .series-item a {
        font-size: 12px;
        gap: 6px;
    }
    
    .series-badge {
        min-width: 40px;
        font-size: 9px;
        padding: 1px 5px;
    }
}