/* NIKKI_FAVORITE_UI_V1 — composant visuel commun */
.nikki-favorite-control {
    position: relative;
    display: grid;
    width: 2rem;
    height: 2rem;
    flex: 0 0 2rem;
    place-items: center;
    border-radius: 9999px;
    color: #6f6258;
    transition:
        color .16s ease,
        background-color .16s ease,
        transform .16s ease,
        opacity .16s ease;
}

.nikki-favorite-control[aria-pressed="true"] {
    color: #e25562;
}

.nikki-favorite-control:hover {
    color: #e25562;
    background: #f9e8eb;
    transform: scale(1.05);
}

.nikki-favorite-control:active {
    transform: scale(.94);
}

.nikki-favorite-control:disabled {
    opacity: .58;
    cursor: wait;
    pointer-events: none;
}

.nikki-favorite-control svg {
    width: 1rem;
    height: 1rem;
    overflow: visible;
}

.nikki-favorite-control [data-nikki-favorite-heart],
.nikki-favorite-control path {
    transition: fill .16s ease, stroke .16s ease;
}

.nikki-favorite-count {
    align-self: center;
    flex: 0 0 auto;
    color: #64748b;
    font-size: .875rem;
    font-weight: 600;
    line-height: 1;
    transition: color .16s ease;
}

.nikki-favorite-count.is-active,
.nikki-favorite-count[data-favorite-active="1"] {
    color: #e25562;
}

.nikki-favorite-control.is-feedback::before {
    content: "";
    position: absolute;
    inset: .15rem;
    border: 1px solid currentColor;
    border-radius: 9999px;
    pointer-events: none;
    animation: nikki-favorite-feedback .34s ease-out forwards;
}

@keyframes nikki-favorite-feedback {
    0% { opacity: .48; transform: scale(.7); }
    55% { opacity: .18; transform: scale(1); }
    100% { opacity: 0; transform: scale(1.18); }
}

@media (prefers-reduced-motion: reduce) {
    .nikki-favorite-control,
    .nikki-favorite-control svg {
        transition: none !important;
    }

    .nikki-favorite-control:hover,
    .nikki-favorite-control:active {
        transform: none;
    }

    .nikki-favorite-control.is-feedback::before {
        animation: none;
        display: none;
    }
}

/* Fiche produit : même langage visuel, sans transformer le bouton texte en bouton rond. */
.product-favorite-btn[aria-pressed="true"],
.product-favorite-btn[aria-pressed="true"] [data-favorite-label],
.product-favorite-btn[aria-pressed="true"] svg {
    color: #e25562 !important;
}

.product-favorite-btn[aria-pressed="true"] svg {
    fill: currentColor !important;
    stroke: currentColor !important;
}

/* NIKKI_FAVORITE_CLUSTER_V2 */
.nikki-favorite-cluster {
    display: inline-flex;
    min-width: 0;
    flex: 0 0 auto;
    align-items: center;
    justify-content: flex-end;
    gap: 1px;
    margin-top: -4px;
    margin-right: -4px;
}

.nikki-favorite-cluster .nikki-favorite-count {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    justify-content: center;
    padding-top: 1px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
}

.nikki-favorite-cluster .nikki-favorite-count.hidden {
    display: none;
}

.nikki-favorite-cluster .nikki-favorite-control {
    margin: 0 !important;
}
