/**
 * Stats & Achievements Section
 * Key metrics and numbers display
 *
 * @package MediaKit_Lite
 */

.mkp-stats-section {
    padding: var(--mkp-spacing-xxl) 0;
}

.mkp-stats-section .mkp-container {
    padding-left: var(--mkp-spacing-md);
    padding-right: var(--mkp-spacing-md);
}

/* Stats Grid */
.mkp-stats__grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--mkp-spacing-xl) var(--mkp-spacing-lg);
    max-width: 100%;
    margin: 0 auto;
}

/* Stat Item */
.mkp-stat-item {
    text-align: center;
    padding: var(--mkp-spacing-lg) var(--mkp-spacing-md);
    transition: transform 0.3s ease;
    flex: 0 0 auto;
    width: max-content;
    max-width: 340px;
    overflow-wrap: break-word;
}

.mkp-stat-item:hover {
    transform: translateY(-5px);
}

/* Stat Icon */
.mkp-stat__icon {
    margin-bottom: var(--mkp-spacing-md);
}

.mkp-stat__icon .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
    display: inline-block;
    opacity: 0.8;
}

/* Stat Number */
.mkp-stat__number {
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--mkp-spacing-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.1rem;
}

.mkp-stat__prefix,
.mkp-stat__suffix {
    font-size: 1.5rem;
    font-weight: 500;
    opacity: 0.8;
}

.mkp-stat__value {
    display: inline-block;
    min-width: 0;
    max-width: 100%;
    word-break: break-word;
}

/* Stat Label */
.mkp-stat__label {
    font-size: 1.125rem;
    font-weight: 500;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Placeholder for customizer */
.mkp-stats__placeholder {
    text-align: center;
    padding: var(--mkp-spacing-xxl);
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    color: var(--mkp-text-muted);
}

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

.mkp-stat__value {
    animation: countUp 0.5s ease-out;
}

/* Tablet styles */
@media (max-width: 768px) {
    .mkp-stat__number {
        font-size: 2rem;
    }

    .mkp-stat__prefix,
    .mkp-stat__suffix {
        font-size: 1.375rem;
    }

    .mkp-stat__label {
        font-size: 1rem;
    }

    .mkp-stat__icon .dashicons {
        font-size: 40px;
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    .mkp-stat-item {
        max-width: 160px;
    }

    .mkp-stat__number {
        font-size: 1.75rem;
    }

    .mkp-stat__prefix,
    .mkp-stat__suffix {
        font-size: 1.25rem;
    }
}

/* Dark background adjustments */
[style*="background-color: #000"],
[style*="background-color: rgb(0, 0, 0)"],
[style*="background-color: black"] {
    .mkp-stats__placeholder {
        background-color: rgba(255, 255, 255, 0.05);
    }
}