/* Modulo Commerce — Stock Visuel (texte / pastille / barre)
   Couleurs (--mstock-color-in/low/out) injectées séparément dans l'attribut style
   (valeurs réglées dans l'admin) — ce fichier ne contient que la structure. */

/* Texte coloré (styles text + dot) — fiche produit */
.stock.modulo-stock-in{color:var(--mstock-color-in)!important;font-weight:600;}
.stock.modulo-stock-low{color:var(--mstock-color-low)!important;font-weight:600;}
.stock.modulo-stock-out{color:var(--mstock-color-out)!important;font-weight:600;}

/* Pastille — fiche produit et archive */
.modulo-stock-dot{
    display:inline-block;width:9px;height:9px;border-radius:50%;
    margin-right:7px;vertical-align:middle;
}
.modulo-stock-dot--in{background:var(--mstock-color-in);}
.modulo-stock-dot--low{background:var(--mstock-color-low);}
.modulo-stock-dot--out{background:var(--mstock-color-out);}

/* Badge archive (carte produit) */
.modulo-stock-arc-wrap{display:flex;margin-top:6px;}
.modulo-stock-arc-wrap--left{justify-content:flex-start;}
.modulo-stock-arc-wrap--center{justify-content:center;}
.modulo-stock-arc-wrap--right{justify-content:flex-end;}
.modulo-stock-arc{
    display:inline-flex;align-items:center;
    padding:3px 9px;
    border-radius:999px;
    font-size:11px;font-weight:700;
    line-height:1.4;
    color:#fff;
}
.modulo-stock-arc--low{background:var(--mstock-color-low);}
.modulo-stock-arc--out{background:var(--mstock-color-out);}

/* Wrapper barre — fiche produit uniquement */
.modulo-stock-bar-wrap{margin:6px 0 14px;}

/* Barre — largeur fixe pilotée par --mstock-maxw (largeur explicite, pas
   max-width seul : un enfant en pourcentage a besoin d'une base définie
   pour se calculer, et une largeur fixe permet à justify-content du
   parent de centrer/aligner la barre normalement). */
.modulo-stock-bar{
    position:relative;
    width:var(--mstock-maxw,220px);
    height:22px;
    background:#b0b8c4;
    border-radius:999px;
    overflow:hidden;
}
.modulo-stock-bar__fill{
    height:100%;
    width:var(--mstock-pct,0%);
    background:var(--mstock-color,var(--mstock-color-in));
    border-radius:999px;
    transition:width .5s ease;
    min-width:0;
}
.modulo-stock-bar__label{
    position:absolute;
    top:0;left:0;right:0;bottom:0;
    display:flex;align-items:center;justify-content:center;
    font-size:11px;font-weight:700;
    color:#fff;
    white-space:nowrap;
    line-height:1;
    text-shadow:0 1px 3px rgba(0,0,0,.45);
    pointer-events:none;
}

/* Variante pastille sur cartes archives : pilule claire, point + texte colorés */
.modulo-stock-arc--dot{
    background:#fff;
    border:1px solid rgba(0,0,0,.12);
    gap:6px;
}
.modulo-stock-arc--dot.modulo-stock-arc--low{color:var(--mstock-color-low);}
.modulo-stock-arc--dot.modulo-stock-arc--out{color:var(--mstock-color-out);}

/* Variante barre compacte sur cartes archives */
.modulo-stock-bar--card{
    --mstock-maxw:120px;
    height:16px;
}
.modulo-stock-bar--card .modulo-stock-bar__label{font-size:9px;}

/* Indicateur texte/pastille sur cartes : compact, sans marges parasites */
.modulo-stock-arc-wrap .modulo-stock{
    margin:0;
    font-size:12px;
    display:inline-flex;
    align-items:center;
    gap:6px;
}
