/* ==========================================================================
   mv-compare.css  —  PrestaShop-style product COMPARE controls (additive)
   --------------------------------------------------------------------------
   Styles the product-card "Ajouter au comparateur" toggle button (.mv-compare-btn)
   and the comparator-page per-column remove button (.cmp-remove). The header
   compare icon + RED count badge (.mv-hdr-compare / .mv-icon-link / .mv-badge)
   are styled by css/header-icons.css (shared with cart/favorites). The small
   fallback rules below only apply if header-icons.css is not present, so the
   badge still shows when this branch is exercised on its own.

   Wired via <sys:css file="css/mv-compare.css" /> in templates/parts/full-header.html.
   ========================================================================== */

/* --- Card toggle button ---------------------------------------------------- */
.mv-compare-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    padding: 4px 10px;
    font: 600 12px/1.2 Arial, Helvetica, sans-serif;
    color: #555;
    background: #fff;
    border: 1px solid #cdcdcd;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.mv-compare-btn:hover,
.mv-compare-btn:focus {
    color: #222;
    border-color: #999;
    background: #f6f6f6;
}
/* Active (in the compare set): filled state set by mv-compare.js (.is-added). */
.mv-compare-btn.is-added {
    color: #fff;
    background: #d0021b;
    border-color: #d0021b;
}
.mv-compare-btn::before {
    content: "";
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10 3v2H8v14H6V5H4V3h6zm10 0v2h-2v14h-2V5h-2V3h6zM3 9h6l-3 5-3-5zm12 0h6l-3 5-3-5z'/%3E%3C/svg%3E") center/contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10 3v2H8v14H6V5H4V3h6zm10 0v2h-2v14h-2V5h-2V3h6zM3 9h6l-3 5-3-5zm12 0h6l-3 5-3-5z'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* --- Comparator page: per-column remove button ----------------------------- */
.comparator-table .cmp-head {
    position: relative;
}
.cmp-remove {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 24px;
    height: 24px;
    line-height: 20px;
    padding: 0;
    font-size: 18px;
    color: #fff;
    background: #d0021b;
    border: 2px solid #fff;
    border-radius: 999px;
    cursor: pointer;
    z-index: 5;
}
.cmp-remove:hover,
.cmp-remove:focus {
    background: #a80115;
}

/* --- Fallback header badge (only matters if header-icons.css is absent) ----- */
.mv-hdr-compare {
    position: relative;
    display: inline-flex;
    align-items: center;
}
.mv-hdr-compare .mv-icon-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: inherit;
    text-decoration: none;
}
.mv-hdr-compare .mv-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    box-sizing: border-box;
    display: none;
    align-items: center;
    justify-content: center;
    background: #d0021b;
    color: #fff;
    font: 700 11px/1 Arial, Helvetica, sans-serif;
    border-radius: 999px;
    border: 2px solid #fff;
    z-index: 2;
    pointer-events: none;
}
.mv-hdr-compare .mv-badge.is-on {
    display: inline-flex;
}
