/*
 * Meu Lar — Módulo reutilizável de estatísticas do perfil
 * O cabeçalho do Ultimate Member não é alterado por este arquivo.
 */

.meular-profile-stats {
    --ml-stats-green: #0d5c2f;
    --ml-stats-green-soft: #eaf5ee;
    --ml-stats-ink: #15251d;
    --ml-stats-muted: #66736c;
    --ml-stats-border: #e6ece8;
    --ml-stats-shadow: 0 10px 28px rgba(13, 92, 47, 0.08);
    box-sizing: border-box;
    clear: both;
    width: 100%;
    max-width: 1180px;
    margin: 16px auto 24px;
    padding: 0 24px;
    position: relative;
    z-index: 2;
    background: transparent !important;
    box-shadow: none !important;
}

.meular-profile-stats-social {
    background: transparent !important;
    background-color: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
}

.meular-profile-stats-social > .meular-profile-stats {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

.meular-profile-stats,
.meular-profile-stats * {
    box-sizing: border-box;
}

.meular-profile-stats__grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    width: 100%;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid var(--ml-stats-border);
    border-radius: 16px;
    box-shadow: var(--ml-stats-shadow);
}

.meular-profile-stat {
    display: flex;
    min-width: 0;
    min-height: 100px;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 18px 16px;
    border-right: 1px solid var(--ml-stats-border);
    background: #ffffff;
    text-align: left;
    transition: background-color 180ms ease, transform 180ms ease;
}

.meular-profile-stat:last-child {
    border-right: 0;
}

.meular-profile-stat:hover {
    background: #fbfdfb;
}

.meular-profile-stat.meular-open-list {
    cursor: pointer;
}

.meular-profile-stat.meular-open-list:focus-visible {
    position: relative;
    z-index: 1;
    outline: 3px solid rgba(13, 92, 47, 0.28);
    outline-offset: -3px;
}

.meular-profile-stat__icon {
    display: inline-flex;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: var(--ml-stats-green);
    background: var(--ml-stats-green-soft);
}

.meular-profile-stat__icon svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
}

.meular-profile-stat__content {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 3px;
}

.meular-profile-stat__number {
    display: block;
    color: var(--ml-stats-ink);
    font-size: clamp(1rem, 1.4vw, 1.25rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.meular-profile-stat__label {
    display: block;
    color: var(--ml-stats-muted);
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.35;
}

/* No desktop, a barra acompanha toda a largura do perfil. O cartão mais
 * compacto permanece reservado ao mobile, onde o layout aprovado usa margem
 * lateral e três colunas. */
@media (min-width: 768px) {
    .meular-profile-stats-social {
        position: relative;
        left: calc(50% - 50vw);
        width: 100vw !important;
        max-width: 100% !important;
        overflow: visible !important;
        transform: none;
    }

    .meular-profile-stats {
        width: 100% !important;
        max-width: none;
        margin: 24px 0 !important;
        padding: 0 32px !important;
        background: #ffffff;
    }

    .meular-profile-stats__grid {
        width: 100% !important;
        border-radius: 0;
        border: 0;
        box-shadow: none;
        background: #ffffff;
    }

    .meular-profile-stat {
        min-height: 112px;
        justify-content: center;
        gap: 14px;
        padding-right: 20px;
        padding-left: 20px;
        background: #ffffff;
        border-right: 1px solid #edf1ee;
    }

    .meular-profile-stat:hover {
        background: #ffffff;
    }
}

@media (max-width: 767px) {
    .meular-profile-stats-social {
        position: relative;
        left: 50%;
        width: 100vw !important;
        max-width: 100vw !important;
        transform: translateX(-50%);
    }

    .meular-profile-stats {
        width: 100% !important;
        max-width: 100% !important;
        margin: 8px auto 14px;
        padding: 0 10px;
    }

    .meular-profile-stats__grid {
        width: 100%;
        max-width: 100%;
        margin-right: auto;
        margin-left: auto;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        border-radius: 14px;
    }

    .meular-profile-stat:nth-child(3n) {
        border-right: 0;
    }

    .meular-profile-stat:nth-child(n + 4) {
        border-top: 1px solid var(--ml-stats-border);
    }

    .meular-profile-stat {
        min-height: 86px;
        flex-direction: column;
        gap: 5px;
        padding: 10px 5px 9px;
        text-align: center;
    }

    .meular-profile-stat__icon {
        width: 30px;
        height: 30px;
        flex-basis: 30px;
        border-radius: 10px;
    }

    .meular-profile-stat__icon svg {
        width: 16px;
        height: 16px;
        stroke-width: 1.8;
    }

    .meular-profile-stat__content {
        align-items: center;
        gap: 2px;
    }

    .meular-profile-stat__number {
        font-size: 1rem;
    }

    .meular-profile-stat__label {
        max-width: 92px;
        font-size: 0.64rem;
        line-height: 1.25;
    }
}

@media (max-width: 360px) {
    .meular-profile-stats {
        padding-right: 8px;
        padding-left: 8px;
    }

    .meular-profile-stat {
        padding-right: 3px;
        padding-left: 3px;
    }

    .meular-profile-stat__label {
        font-size: 0.6rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .meular-profile-stat {
        transition: none;
    }
}
