/**
 * Organization Statistics Banner Style
 * Modern card-based design with white cards on colored background
 */

/* Prevent horizontal scroll */
body:has(.edmark-org-statistics-banner) {
    overflow-x: hidden;
}

.edmark-org-statistics-banner {
    width: 100%;
    max-width: 100%;
    padding: 50px 20px;
    background: linear-gradient(135deg, #16a34a 0%, #22c55e 100%);
    margin: 0;
    overflow-x: hidden;
    box-sizing: border-box;
}

.edmark-org-statistics-banner .stats-container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 20px;
    box-sizing: border-box;
}

.edmark-org-statistics-banner .stat-item {
    flex: 1;
    min-width: 0;
    max-width: 280px;
    background: #ffffff;
    border-radius: 12px;
    padding: 24px 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
}

.edmark-org-statistics-banner .stat-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.edmark-org-statistics-banner .stat-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(22, 163, 74, 0.1);
    border-radius: 10px;
}

.edmark-org-statistics-banner .stat-icon .dashicons {
    width: 28px;
    height: 28px;
    font-size: 28px;
    color: #16a34a;
}

.edmark-org-statistics-banner .stat-content {
    flex: 1;
    min-width: 0;
    text-align: left;
}

.edmark-org-statistics-banner .stat-value {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.2;
    color: #1F2937;
    margin-bottom: 4px;
    word-break: break-word;
    overflow-wrap: break-word;
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.edmark-org-statistics-banner .stat-suffix {
    font-size: 24px;
    font-weight: 700;
    color: #16a34a;
    word-break: break-word;
}

.edmark-org-statistics-banner .stat-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6B7280;
    margin: 0;
}

/* Theme color override */
.edmark-org-statistics-banner[style*="--stat-theme-color"] {
    background: var(--stat-theme-color);
}

/* Gradient with theme color */
.edmark-org-statistics-banner.with-theme-color {
    background: linear-gradient(135deg, var(--stat-theme-color) 0%, var(--stat-theme-color-light, var(--stat-theme-color)) 100%);
}

/* Responsive design */
@media (max-width: 992px) {
    .edmark-org-statistics-banner .stats-container {
        gap: 16px;
    }
    
    .edmark-org-statistics-banner .stat-item {
        max-width: 240px;
        padding: 20px 16px;
    }
    
    .edmark-org-statistics-banner .stat-value {
        font-size: 28px;
    }
    
    .edmark-org-statistics-banner .stat-suffix {
        font-size: 20px;
    }
    
    .edmark-org-statistics-banner .stat-icon {
        width: 44px;
        height: 44px;
    }
    
    .edmark-org-statistics-banner .stat-icon .dashicons {
        width: 24px;
        height: 24px;
        font-size: 24px;
    }
}

@media (max-width: 768px) {
    .edmark-org-statistics-banner {
        padding: 30px 15px;
    }
    
    .edmark-org-statistics-banner .stats-container {
        flex-wrap: wrap;
        gap: 12px;
        padding: 0 10px;
    }
    
    .edmark-org-statistics-banner .stat-item {
        flex: 1 1 calc(50% - 6px);
        min-width: 0;
        max-width: calc(50% - 6px);
        padding: 16px 12px;
        gap: 12px;
    }
    
    .edmark-org-statistics-banner .stat-icon {
        width: 40px;
        height: 40px;
    }
    
    .edmark-org-statistics-banner .stat-icon .dashicons {
        width: 22px;
        height: 22px;
        font-size: 22px;
    }
    
    .edmark-org-statistics-banner .stat-value {
        font-size: 24px;
    }
    
    .edmark-org-statistics-banner .stat-suffix {
        font-size: 18px;
    }
    
    .edmark-org-statistics-banner .stat-label {
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    .edmark-org-statistics-banner {
        padding: 25px 10px;
    }
    
    .edmark-org-statistics-banner .stats-container {
        gap: 10px;
        padding: 0 5px;
    }
    
    .edmark-org-statistics-banner .stat-item {
        flex: 1 1 100%;
        min-width: 0;
        max-width: 100%;
        padding: 14px 12px;
        gap: 12px;
    }
    
    .edmark-org-statistics-banner .stat-icon {
        width: 36px;
        height: 36px;
    }
    
    .edmark-org-statistics-banner .stat-icon .dashicons {
        width: 20px;
        height: 20px;
        font-size: 20px;
    }
    
    .edmark-org-statistics-banner .stat-value {
        font-size: 22px;
    }
    
    .edmark-org-statistics-banner .stat-suffix {
        font-size: 16px;
    }
    
    .edmark-org-statistics-banner .stat-label {
        font-size: 9px;
    }
}

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

.edmark-org-statistics-banner .stat-item {
    animation: statFadeInBanner 0.6s ease-out forwards;
    opacity: 0;
}

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

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

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

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

/* Counter animation effect */
.edmark-org-statistics-banner .stat-value {
    transition: all 0.3s ease;
}

.edmark-org-statistics-banner .stat-item:not(.counted) .stat-value {
    opacity: 0.5;
}

.edmark-org-statistics-banner .stat-item.counted .stat-value {
    opacity: 1;
}

/* Print styles */
@media print {
    .edmark-org-statistics-banner {
        background: #e74c3c !important;
        box-shadow: none;
    }
}
