/* =============================================================
   KS LP Blocks – Stats Block Styles
   ============================================================= */

/* ---------------------------------------------------------------
   Block wrapper
--------------------------------------------------------------- */
.kslp-stats-block {
    padding: 80px 20px;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
}

/* ---------------------------------------------------------------
   Overlay
--------------------------------------------------------------- */
.kslp-stats-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

/* ---------------------------------------------------------------
   Inner container
--------------------------------------------------------------- */
.kslp-stats-inner {
    position: relative;
    z-index: 1;
    width: 100%;
}

/* ---------------------------------------------------------------
   Header / text area
--------------------------------------------------------------- */
.kslp-stats-header {
    margin-bottom: 48px;
}

.kslp-stats-sub {
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 12px;
    display: block;
}

.kslp-stats-title {
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 16px;
    margin-top: 0;
}

.kslp-stats-desc {
    line-height: 1.6;
}

/* ---------------------------------------------------------------
   Stats Grid
--------------------------------------------------------------- */
.kslp-stats-grid {
    display: grid;
    /* cols & gap are set inline per block instance */
    gap: 24px;
    align-items: start;
}

/* ---------------------------------------------------------------
   Stat Item Card
--------------------------------------------------------------- */
.kslp-stats-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    box-sizing: border-box;
}

/* Divider (opt-in via JS-injected class or SSR inline rule) */
.kslp-stats-grid--divider .kslp-stats-item + .kslp-stats-item {
    border-left-width: 1px;
    border-left-style: solid;
}

/* ---------------------------------------------------------------
   Icon
--------------------------------------------------------------- */
.kslp-stats-icon {
    margin-bottom: 16px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.kslp-stats-icon .dashicons {
    width: 1em;
    height: 1em;
    font-size: inherit;
}

.kslp-stats-icon .bi {
    line-height: 1;
}

/* ---------------------------------------------------------------
   Number row
--------------------------------------------------------------- */
.kslp-stats-number-wrap {
    display: flex;
    align-items: baseline;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 8px;
}

.kslp-stats-number {
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.kslp-stats-prefix,
.kslp-stats-suffix {
    opacity: 0.9;
    line-height: 1;
}

/* ---------------------------------------------------------------
   Label
--------------------------------------------------------------- */
.kslp-stats-label {
    line-height: 1.4;
    margin: 0;
}

/* ---------------------------------------------------------------
   Animation base states (KSLP animation system)
--------------------------------------------------------------- */
/* Standard animations handled globally by assets/anim.css */

/* ---------------------------------------------------------------
   Editor-only styles (loaded inside <editor> context)
--------------------------------------------------------------- */
.kslp-icon-picker {
    padding: 12px;
    min-width: 240px;
    max-height: 300px;
    overflow-y: auto;
}

.kslp-icon-picker__label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #757575;
    margin-bottom: 6px;
}

.kslp-icon-picker-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.kslp-icon-picker-grid .components-button {
    min-width: 36px;
    height: 36px;
    font-size: 18px;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ---------------------------------------------------------------
   Responsive – tablet
--------------------------------------------------------------- */
@media (max-width: 1024px) {
    .kslp-stats-block {
        padding: 60px 24px;
    }
}

/* ---------------------------------------------------------------
   Responsive – mobile (granular overrides injected per-block
   via inline <style> in render.php; these are the fallbacks)
--------------------------------------------------------------- */
@media (max-width: 767px) {
    .kslp-stats-block {
        padding: 60px 20px;
    }

    .kslp-stats-header {
        margin-bottom: 32px;
    }

    .kslp-stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .kslp-stats-number-wrap {
        flex-wrap: nowrap;
    }

    /* Remove side dividers on mobile */
    .kslp-stats-item + .kslp-stats-item {
        border-left: none !important;
    }
}

@media (max-width: 480px) {
    .kslp-stats-grid {
        grid-template-columns: 1fr !important;
    }
}
