/* ==========================================================================
   TSVETOMANIA — счётчик «Избранное» в хедере
   Путь: /local/templates/main/css/favorite-counter.css

   Этот CSS работает В ПАРЕ с оригинальным style.css модуля Intensa
   (/bitrix/components/intensa.favorite/counter/templates/.default/style.css).
   Оригинал НЕ отключать — он нужен для .intensa-favorite-item (кнопка
   «в избранное» на карточках товара).

   Все селекторы — ВНУТРИ .intensa-favorite-counter, на карточки не влияют.
   Ключевые свойства с !important — чтобы перебить конфликтующие правила
   из оригинального style.css модуля.
   ========================================================================== */

/* Сброс старого CSS модуля Intensa — убираем розовые кружки со span'ов
   ВНУТРИ нашего счётчика (кроме бейджа) */
.intensa-favorite-counter span:not(.intensa-favorite-badge) {
    background: transparent !important;
    background-color: transparent !important;
    border-radius: 0 !important;
    width: auto !important;
    height: auto !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
}

/* --------------------------------------------------------------------------
   Ссылка-обёртка
   Оригинал Intensa задаёт ей display:inline-block, width:20px, height:18px —
   перебиваем с !important
   -------------------------------------------------------------------------- */
.intensa-favorite-counter {
    display: inline-flex !important;
    align-items: center !important;
    width: auto !important;
    height: auto !important;
    text-decoration: none;
    color: inherit;
}

.intensa-favorite-counter:hover,
.intensa-favorite-counter:focus-visible {
    text-decoration: none;
    outline: none;
}

/* --------------------------------------------------------------------------
   Иконка-сердце + обёртка для бейджа
   -------------------------------------------------------------------------- */
.intensa-favorite-counter .intensa-favorite-icon-wrap {
    position: relative !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 28px !important;
    height: 28px !important;
    flex-shrink: 0;
}

.intensa-favorite-counter .intensa-favorite-icon {
    width: 26px !important;
    height: 24px !important;
    display: block;
    transition: transform .15s ease;
}

/* Оригинал Intensa ставит fill: #ef4141 (розовый) — перебиваем на outline */
.intensa-favorite-counter .intensa-favorite-icon path {
    fill: none !important;
    stroke: #A11826;
    transition: fill .2s ease;
}

/* Hover — сердце заливается бордовым */
.intensa-favorite-counter:hover .intensa-favorite-icon path {
    fill: #A11826 !important;
}

.intensa-favorite-counter:active .intensa-favorite-icon {
    transform: scale(0.92);
}

/* --------------------------------------------------------------------------
   Подпись «Избранное»
   -------------------------------------------------------------------------- */
.intensa-favorite-counter .intensa-favorite-title {
    margin-left: 12px;
    color: #A11826 !important;
    font-family: 'Tilda Sans', -apple-system, BlinkMacSystemFont, Arial, sans-serif;
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Бейдж-счётчик в правом верхнем углу иконки
   -------------------------------------------------------------------------- */
.intensa-favorite-counter .intensa-favorite-badge {
    position: absolute !important;
    top: -6px !important;
    right: -8px !important;
    left: auto !important;
    bottom: auto !important;
    min-width: 18px !important;
    width: auto !important;
    height: 18px !important;
    padding: 0 5px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #A11826 !important;
    color: #fff !important;
    font-family: 'Tilda Sans', Arial, sans-serif !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    border-radius: 999px !important;
    border: 2px solid #fff !important;
    box-sizing: border-box !important;
    letter-spacing: -0.02em;
}

.intensa-favorite-counter .intensa-favorite-badge.is-empty {
    display: none !important;
}

/* --------------------------------------------------------------------------
   Адаптив — на планшетах и мобильных подпись скрывается
   -------------------------------------------------------------------------- */
@media (max-width: 1250px) {
    .intensa-favorite-counter .intensa-favorite-title {
        display: none !important;
    }
}