/* Ikona i licznik porównywarki */

#comparator-counter {
    display: none;
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 140;
    background: #fff;
    border: 2px solid var(--color-brand-red);
    border-radius: 24px;
    padding: 10px 14px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    align-items: center;
    gap: 8px;
}

#comparator-counter.is-visible {
    display: flex;
}

body:has(.comparator-shell) #comparator-counter {
    display: none !important;
}

#comparator-counter .js-comparator-link {
    color: var(--color-brand-red);
    font-weight: 700;
    text-decoration: none;
}

#comparator-counter .js-comparator-count {
    display: inline-flex;
    min-width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--color-brand-red);
    color: #fff;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    margin-left: 6px;
}

#comparator-counter .js-comparator-clear {
    border: 0;
    background: transparent;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    color: #606060;
}

@media (max-width: 767px) {
    #comparator-counter {
        left: auto;
        right: 12px;
        bottom: 76px;
        padding: 8px 10px;
        z-index: 900;
    }

    body:has(#comparator-counter.is-visible) .products-scroll-top {
        bottom: 130px;
    }
}

.product-ulub-add.product-compare-icon {
    z-index: 3;
    padding: 0;
}

.product-ulub-add.product-compare-icon .icon,
.product-ulub-add.product-compare-icon .icon:hover {
    height: 100%;
    width: 100%;
    background-image: url(../skins/20/img/icon_compare.svg);
    background-repeat: no-repeat;
    background-position: 50% 50%;
    background-size: 70%;
}

.product-ulub-add.product-compare-icon.is-active {
    border-color: var(--color-brand-red);
}

.product-ulub-add.product-compare-icon.is-active .icon,
.product-ulub-add.product-compare-icon.is-active .icon:hover {
    background-image: url(../skins/20/img/icon_compare_active.svg);
}

.photo-container:has(.product-compare-icon) .product-ulub-add:not(.product-compare-icon):not(.mobile),
.photo-container:has(.product-compare-icon) .product-ulub-delete:not(.mobile) {
    top: 3.75em;
}

.product-list nav .item-product .photo-container:has(.product-compare-icon) .zoom:not(.mobile),
.photo-container:has(.product-compare-icon) .product-photo-zoom {
    top: 7em;
}

.photo-container:has(.product-compare-icon) .togglePauseButton:not(.mobile) {
    top: 10.5em;
}

.photo-container:has(.product-compare-icon) .togglePauseButton.mobile {
    top: 8em;
}

.photo-container:has(.product-compare-icon.mobile) .product-ulub-add.mobile:not(.product-compare-icon),
.photo-container:has(.product-compare-icon.mobile) .product-ulub-delete.mobile {
    top: 3em;
}

.photo-container:has(.product-compare-icon.mobile) .product-ulub-add.mobile:not(.product-compare-icon) .icon,
.photo-container:has(.product-compare-icon.mobile) .product-ulub-delete.mobile .icon {
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
}

.product-list nav .item-product .photo-container:has(.product-compare-icon) .zoom.mobile {
    top: 5.5em;
}

.product-compare-icon.mobile .tooltip,
.comparator-slide.mobile .tooltip {
    display: none;
}

.comparator-slide {
    position: absolute;
    z-index: 3;
    top: 0.5em;
    left: 3.75em;
    display: flex;
    gap: 0.25em;
    height: 2.5em;
    clip-path: inset(0 100% 0 0);
    transition: clip-path 0.3s ease;
}

.product-compare-icon.is-active + .comparator-slide {
    clip-path: inset(-10em);
}

.comparator-slide.right {
    left: auto;
    right: 3.75em;
    clip-path: inset(0 0 0 100%);
}

.comparator-slide.mobile {
    left: 2.75em;
    height: 2em;
}

.comparator-slide-link {
    display: inline-flex;
    align-items: center;
    padding: 0 1em;
    border-radius: 3em;
    background-color: var(--color-brand-red);
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    text-decoration: none;
}

.comparator-slide-remove {
    flex-shrink: 0;
    height: 100%;
    aspect-ratio: 1;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background-color: #f0f0f0;
}

.comparator-slide-remove::before {
    content: '';
    display: block;
    height: 100%;
    background-color: #000000;
    mask: url(../skins/20/img/icon-close.svg) no-repeat 50% 50% / 40%;
}

.comparator-slide-remove:hover::before {
    background-color: var(--color-brand-red);
}

.js-comparator-toggle.is-active:not(.product-compare-icon) {
    font-weight: 700;
}
