/**
 * ========================================
 * SPARKLINE CHARTS STYLES
 * ========================================
 * أنماط الرسوم البيانية Sparklines
 * 
 * @package TeamPortal
 * @subpackage Assets/CSS
 * @since 3.3.1
 */

/* حاوية Sparkline */
.stat-sparkline-container {
    width: 80px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    transition: all 0.3s ease;
}

/* Canvas Element */
.stat-sparkline {
    display: block;
    max-width: 100%;
    height: auto;
}

/* تأثير Hover */
.stat-sparkline-container:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: scale(1.02);
}

/* Loading State */
.stat-sparkline-container.loading {
    opacity: 0.5;
    pointer-events: none;
}

.stat-sparkline-container.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* وضع الشاشات الصغيرة */
@media (max-width: 768px) {
    .stat-sparkline-container {
        width: 60px;
    }
    
    .stat-sparkline {
        width: 60px;
        height: 45px;
    }
}

/* الوضع الليلي */
body.dark-mode .stat-sparkline-container {
    background: rgba(0, 0, 0, 0.2);
}

body.dark-mode .stat-sparkline-container:hover {
    background: rgba(0, 0, 0, 0.3);
}
