/**
 * Student Video Progress Tracker - Styles
 * استایل‌های افزونه ردیابی پیشرفت ویدیو
 */

/* ========================
   تنظیمات عمومی و RTL
   ======================== */
.svpt-widget-container {
    direction: rtl;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 400px;
    animation: svptSlideIn 0.5s ease-out;
}

@keyframes svptSlideIn {
    from {
        transform: translateX(450px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ========================
   کارت اصلی ویجت
   ======================== */
.svpt-widget-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    transition: all 0.3s ease;
}

.svpt-widget-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.4);
}

/* ========================
   هدر ویجت
   ======================== */
.svpt-widget-header {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
}

.svpt-widget-title {
    color: #ffffff;
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    flex: 1;
}

.svpt-icon {
    font-size: 24px;
    line-height: 1;
}

.svpt-close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #ffffff;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    padding: 0;
    line-height: 1;
}

.svpt-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* ========================
   محتوای ویجت
   ======================== */
.svpt-widget-content {
    padding: 20px;
    background: #ffffff;
}

/* اطلاعات درس */
.svpt-lesson-info,
.svpt-video-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.svpt-lesson-info:hover,
.svpt-video-info:hover {
    background: #e9ecef;
    transform: translateX(-5px);
}

.svpt-icon-small {
    font-size: 18px;
    line-height: 1;
}

.svpt-lesson-title,
.svpt-video-title {
    color: #2c3e50;
    font-weight: 600;
    font-size: 14px;
    flex: 1;
    line-height: 1.4;
}

/* ========================
   نوار پیشرفت
   ======================== */
.svpt-progress-container {
    margin: 20px 0;
}

.svpt-progress-bar {
    width: 100%;
    height: 10px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.svpt-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    transition: width 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* انیمیشن درخشش نوار پیشرفت */
.svpt-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: svptShine 2s infinite;
}

@keyframes svptShine {
    to {
        left: 100%;
    }
}

/* متن پیشرفت */
.svpt-progress-text {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    color: #6c757d;
    font-size: 13px;
    font-weight: 500;
}

.svpt-time-separator {
    margin: 0 5px;
}

.svpt-percentage {
    color: #667eea;
    font-weight: 700;
}

/* ========================
   دکمه ادامه تماشا
   ======================== */
.svpt-continue-btn {
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.svpt-continue-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.svpt-continue-btn:active {
    transform: translateY(0);
}

.svpt-btn-icon {
    font-size: 18px;
    line-height: 1;
}

/* ========================
   دیالوگ تایید ادامه
   ======================== */
.svpt-confirm-dialog {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    animation: svptFadeIn 0.3s ease;
}

@keyframes svptFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.svpt-confirm-content {
    background: #ffffff;
    padding: 30px;
    border-radius: 16px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    direction: rtl;
    animation: svptScaleIn 0.3s ease;
}

@keyframes svptScaleIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.svpt-confirm-message {
    font-size: 18px;
    color: #2c3e50;
    margin-bottom: 25px;
    line-height: 1.6;
    font-weight: 600;
}

.svpt-confirm-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.svpt-confirm-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.svpt-confirm-yes {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.svpt-confirm-yes:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.svpt-confirm-no {
    background: #e9ecef;
    color: #6c757d;
}

.svpt-confirm-no:hover {
    background: #dee2e6;
}

/* ========================
   نمایش ریسپانسیو
   ======================== */
@media (max-width: 768px) {
    .svpt-widget-container {
        bottom: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .svpt-widget-title {
        font-size: 16px;
    }
    
    .svpt-continue-btn {
        font-size: 14px;
        padding: 12px 16px;
    }
}

@media (max-width: 480px) {
    .svpt-widget-header {
        padding: 12px 15px;
    }
    
    .svpt-widget-content {
        padding: 15px;
    }
    
    .svpt-lesson-info,
    .svpt-video-info {
        padding: 10px;
    }
    
    .svpt-progress-text {
        font-size: 12px;
    }
}

