/**
 * Betformatics Stats Shortcode Styles
 *
 * Styled statistics display grid.
 *
 * Dependencies: betformatics-variables (loaded via PHP)
 *
 * @package Betformatics
 */

/* =============================================================================
   RESET - Prevent theme interference
   ============================================================================= */
.bf-stats,
.bf-stats * {
    box-sizing: border-box;
}

/* =============================================================================
   CONTAINER
   ============================================================================= */
.bf-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
    margin: 1.5em 0;
    font-family: var(--bf-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
}

/* Fixed column layouts */
.bf-stats--cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.bf-stats--cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.bf-stats--cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* =============================================================================
   STAT ITEM
   ============================================================================= */
.bf-stats__item {
    text-align: center;
    padding: 20px 16px;
}

/* =============================================================================
   CARDS STYLE (default)
   ============================================================================= */
.bf-stats--cards .bf-stats__item {
    background: var(--bf-white, #ffffff);
    border: 1px solid var(--bf-border, #e5e7eb);
    border-radius: var(--bf-radius-lg, 12px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* =============================================================================
   MINIMAL STYLE
   ============================================================================= */
.bf-stats--minimal .bf-stats__item {
    background: transparent;
    border: none;
    padding: 16px 12px;
}

/* =============================================================================
   HIGHLIGHT STYLE (dark background)
   ============================================================================= */
.bf-stats--highlight .bf-stats__item {
    background: linear-gradient(135deg, var(--bf-primary, #1a1a2e) 0%, #2d2d44 100%);
    border-radius: var(--bf-radius-lg, 12px);
    color: var(--bf-white, #ffffff);
}

.bf-stats--highlight .bf-stats__value {
    color: var(--bf-accent, #FFCC00);
}

.bf-stats--highlight .bf-stats__label {
    color: rgba(255, 255, 255, 0.8);
}

.bf-stats--highlight .bf-stats__icon {
    color: var(--bf-accent, #FFCC00);
}

/* =============================================================================
   ICON
   ============================================================================= */
.bf-stats__icon {
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
    color: var(--bf-accent, #FFCC00);
}

.bf-stats__icon svg {
    width: 32px;
    height: 32px;
}

/* =============================================================================
   VALUE
   ============================================================================= */
.bf-stats__value {
    font-size: 2rem;
    font-weight: var(--bf-font-weight-bold, 700);
    color: var(--bf-primary, #1a1a2e);
    line-height: 1.2;
    margin-bottom: 6px;
}

.bf-stats__prefix,
.bf-stats__suffix {
    font-size: 1.25rem;
    font-weight: var(--bf-font-weight-semibold, 600);
}

/* =============================================================================
   LABEL
   ============================================================================= */
.bf-stats__label {
    font-size: 0.875rem;
    color: var(--bf-text-muted, #6b7280);
    font-weight: var(--bf-font-weight-medium, 500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* =============================================================================
   MOBILE RESPONSIVE
   ============================================================================= */
@media (max-width: 768px) {
    .bf-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .bf-stats--cols-3,
    .bf-stats--cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .bf-stats__item {
        padding: 16px 12px;
    }

    .bf-stats__value {
        font-size: 1.5rem;
    }

    .bf-stats__prefix,
    .bf-stats__suffix {
        font-size: 1rem;
    }

    .bf-stats__icon svg {
        width: 28px;
        height: 28px;
    }

    .bf-stats__label {
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .bf-stats__value {
        font-size: 1.35rem;
    }

    .bf-stats__item {
        padding: 14px 10px;
    }
}

/* =============================================================================
   PAGE BUILDER COMPATIBILITY
   ============================================================================= */
.elementor-widget-container .bf-stats,
.elementor-element .bf-stats,
.wp-block .bf-stats {
    margin-left: 0;
    margin-right: 0;
    max-width: 100%;
}

/* =============================================================================
   ACCESSIBILITY
   ============================================================================= */
@media (prefers-reduced-motion: reduce) {
    .bf-stats,
    .bf-stats * {
        transition: none !important;
    }
}
