/**
 * Organization Statistics Styles
 * Displays statistics cards with icons, values, and labels
 */

.edmark-org-statistics {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 30px 0;
    padding: 0;
}

.edmark-org-statistics .stat-card {
    flex: 1;
    min-width: 200px;
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.edmark-org-statistics .stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--stat-color, #2271b1);
    transition: width 0.3s ease;
}

.edmark-org-statistics .stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.edmark-org-statistics .stat-card:hover::before {
    width: 8px;
}

.edmark-org-statistics .stat-icon {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--stat-color-light, rgba(34, 113, 177, 0.1));
    border-radius: 50%;
    color: var(--stat-color, #2271b1);
}

.edmark-org-statistics .stat-icon .dashicons {
    font-size: 28px;
    width: 28px;
    height: 28px;
}

.edmark-org-statistics .stat-content {
    flex: 1;
}

.edmark-org-statistics .stat-value {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.2;
    color: #1e1e1e;
    margin-bottom: 4px;
}

.edmark-org-statistics .stat-suffix {
    font-size: 24px;
    font-weight: 600;
    color: var(--stat-color, #2271b1);
    margin-left: 2px;
}

.edmark-org-statistics .stat-label {
    font-size: 16px;
    font-weight: 500;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Color variations for each stat type */
.edmark-org-statistics .stat-years {
    --stat-color: #9b59b6;
    --stat-color-light: rgba(155, 89, 182, 0.1);
}

.edmark-org-statistics .stat-students {
    --stat-color: #3498db;
    --stat-color-light: rgba(52, 152, 219, 0.1);
}

.edmark-org-statistics .stat-success {
    --stat-color: #f39c12;
    --stat-color-light: rgba(243, 156, 18, 0.1);
}

.edmark-org-statistics .stat-band {
    --stat-color: #27ae60;
    --stat-color-light: rgba(39, 174, 96, 0.1);
}

/* Theme color override - when used on batch pages */
.edmark-org-statistics[style*="--stat-theme-color"] .stat-card {
    --stat-color: var(--stat-theme-color);
    --stat-color-light: rgba(var(--stat-theme-color-rgb), 0.1);
}

/* Admin page specific styles */
.wrap .edmark-org-statistics {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

/* Batch page specific styles */
.edmark-batch-single .edmark-batch-org-stats {
    margin: 30px 0;
}

.edmark-batch-single .edmark-batch-org-stats .edmark-org-statistics {
    max-width: 1200px;
    margin: 0 auto;
}

/* Responsive design */
@media (max-width: 1200px) {
    .edmark-org-statistics .stat-card {
        min-width: calc(50% - 10px);
    }
}

@media (max-width: 768px) {
    .edmark-org-statistics {
        gap: 15px;
    }
    
    .edmark-org-statistics .stat-card {
        min-width: 100%;
        padding: 15px;
    }
    
    .edmark-org-statistics .stat-icon {
        width: 40px;
        height: 40px;
    }
    
    .edmark-org-statistics .stat-icon .dashicons {
        font-size: 24px;
        width: 24px;
        height: 24px;
    }
    
    .edmark-org-statistics .stat-value {
        font-size: 28px;
    }
    
    .edmark-org-statistics .stat-suffix {
        font-size: 20px;
    }
    
    .edmark-org-statistics .stat-label {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .edmark-org-statistics .stat-card {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .edmark-org-statistics .stat-value {
        font-size: 24px;
    }
}

/* Animation on load */
@keyframes statFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.edmark-org-statistics .stat-card {
    animation: statFadeIn 0.5s ease-out forwards;
}

.edmark-org-statistics .stat-card:nth-child(1) {
    animation-delay: 0.1s;
}

.edmark-org-statistics .stat-card:nth-child(2) {
    animation-delay: 0.2s;
}

.edmark-org-statistics .stat-card:nth-child(3) {
    animation-delay: 0.3s;
}

.edmark-org-statistics .stat-card:nth-child(4) {
    animation-delay: 0.4s;
}

/* Print styles */
@media print {
    .edmark-org-statistics .stat-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .edmark-org-statistics .stat-card:hover {
        transform: none;
    }
}
