/* ===========================
   AQUALAB - Resultados por categoría
   =========================== */

/* Paleta por categoría (solo CSS, el JS las lee por variables) */
:root {
    --hh-cat-hogar: #3f51b5;
    --hh-cat-higiene: #f08155;
    --hh-cat-limpieza: #c863e7;
    --hh-cat-riego: #00a5df;
    /*9c27b0*/
    --hh-cat-mascotas: #a06944;
    /*ff6e6e*/
    --hh-cat-alimentacion: #ff6e6e;
    --hh-cat-transporte: #ff9800;
    --hh-cat-indumentaria: #8bc34a;
    --hh-cat-tecnologia: #26c6da;
    --hh-cat-reciclaje: #4caf50;
}

.hh-cat__title {
    color: #00a5df;
    font-weight: 700;
    font-size: 1.4rem;
}

.hh-cat__subtitle {
    font-size: 1.1rem;
    color: #5f6b7b;
    max-width: 620px;
    margin-left: auto;
    margin-right: auto;
}

/* Layout general */
.hh-cat-layout__row--top .hh-cat-card,
.hh-cat-layout__row--bottom .hh-cat-card {
    background-color: #eff8fd;
    border-radius: 1.5rem;
    border: 3px solid #e1edf5;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    padding: 1.5rem 1.5rem 1.75rem;
}

.hh-cat-card__title {
    font-weight: 700;
    color: #02558b;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    text-align: center;
}

/* ===========================
   Lista de barras por categoría
   =========================== */

.hh-catbars {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.hh-catbar {
    display: grid;
    grid-template-columns: auto minmax(90px, 120px) minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.5rem;
}

.hh-catbar__icon img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.hh-catbar__label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #02558b;
}

.hh-catbar__bar-track {
    position: relative;
    width: 100%;
    height: 12px;
    border-radius: 999px;
    background-color: #dbeaf6;
    overflow: hidden;
}

.hh-catbar__bar-fill {
    position: absolute;
    inset: 0;
    width: 0;
    border-radius: 999px;
    transform-origin: left center;
    transition: width 0.15s linear;
}

/* Valor numérico */
.hh-catbar__value {
    text-align: right;
    min-width: 90px;
    font-size: 0.8rem;
    color: #5f6b7b;
    white-space: nowrap;
}

.hh-catbar__litros {
    font-weight: 600;
    color: #02558b;
}

.hh-catbar__font {
    font-weight: 600;
    color: #02558b;
}

/* Colores por categoría (solo CSS) */
.hh-catbar--hogar .hh-catbar__bar-fill {
    background-color: var(--hh-cat-hogar);
}

.hh-catbar--higiene .hh-catbar__bar-fill {
    background-color: var(--hh-cat-higiene);
}

.hh-catbar--limpieza .hh-catbar__bar-fill {
    background-color: var(--hh-cat-limpieza);
}

.hh-catbar--riego .hh-catbar__bar-fill {
    background-color: var(--hh-cat-riego);
}

.hh-catbar--mascotas .hh-catbar__bar-fill {
    background-color: var(--hh-cat-mascotas);
}

.hh-catbar--alimentacion .hh-catbar__bar-fill {
    background-color: var(--hh-cat-alimentacion);
}

.hh-catbar--transporte .hh-catbar__bar-fill {
    background-color: var(--hh-cat-transporte);
}

.hh-catbar--indumentaria .hh-catbar__bar-fill {
    background-color: var(--hh-cat-indumentaria);
}

.hh-catbar--tecnologia .hh-catbar__bar-fill {
    background-color: var(--hh-cat-tecnologia);
}

.hh-catbar--reciclaje .hh-catbar__bar-fill {
    background-color: var(--hh-cat-reciclaje);
}

/* Wrapper de charts (torta + líneas) */
.hh-cat-chart-wrapper {
    width: 100%;
    height: 260px;
    position: relative;
}

@media (min-width: 992px) {
    .hh-cat-chart-wrapper {
        height: 280px;
    }
}

/* Mobile tweaks */
@media (max-width: 576px) {

    .hh-cat-layout__row--top .hh-cat-card,
    .hh-cat-layout__row--bottom .hh-cat-card {
        padding: 1.25rem 1rem 1.5rem;
    }

    .hh-catbar {
        grid-template-columns: auto minmax(80px, 100px) minmax(0, 1fr) auto;
        gap: 0.4rem;
    }

    .hh-catbar__icon img {
        width: 28px;
        height: 28px;
    }

    /* Valor numérico */
    .hh-catbar__value {
        text-align: right;
        font-size: 0.8rem;
        color: #5f6b7b;
        white-space: nowrap;
    }
}