.bsftfav-button {
    display: inline-flex;
    align-items: center;
    justify-content: var(--bsftfav-justify, center);
    gap: var(--bsftfav-gap, 6px);
    min-height: 0;
    margin: var(--bsftfav-margin, 0);
    padding: var(--bsftfav-padding, 8px 12px);
    border: var(--bsftfav-border-width, 1px) solid var(--bsftfav-border-color, currentColor);
    border-radius: var(--bsftfav-border-radius, 999px);
    background: var(--bsftfav-background, transparent);
    color: var(--bsftfav-text-color, inherit);
    cursor: pointer;
    line-height: 1.2;
    text-decoration: none;
    transition: background-color .2s ease, color .2s ease, opacity .2s ease, box-shadow 0.2s ease;
}

.bsftfav-button:hover {
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}

.bsftfav-button--link:hover {
    background: var(--bsftfav-hover-background, var(--bsftfav-background, transparent));
    color: var(--bsftfav-hover-text-color, var(--bsftfav-text-color, inherit));
}

.bsftfav-button--link:hover .bsftfav-button__icon {
    color: var(--bsftfav-hover-icon-color, var(--bsftfav-icon-color, currentColor));
}

.bsftfav-button--link.bsftfav-button--active:hover {
    background: var(--bsftfav-hover-background, var(--bsftfav-active-background, var(--bsftfav-background, transparent)));
    color: var(--bsftfav-hover-text-color, var(--bsftfav-active-text-color, var(--bsftfav-text-color, inherit)));
}

.bsftfav-button--link.bsftfav-button--active:hover .bsftfav-button__icon {
    color: var(--bsftfav-hover-icon-color, var(--bsftfav-active-icon-color, var(--bsftfav-icon-color, currentColor)));
}

.bsftfav-button--active {
    background: var(--bsftfav-active-background, var(--bsftfav-background, transparent));
    color: var(--bsftfav-active-text-color, var(--bsftfav-text-color, inherit));
}

.bsftfav-button--loading {
    cursor: wait;
    opacity: .65;
}

.bsftfav-button__icon {
    display: inline-flex;
    flex: 0 0 auto;
    width: var(--bsftfav-icon-width, 20px);
    height: var(--bsftfav-icon-height, 20px);
    color: var(--bsftfav-icon-color, currentColor);
    line-height: 1;
}

.bsftfav-button--active .bsftfav-button__icon {
    color: var(--bsftfav-active-icon-color, var(--bsftfav-icon-color, currentColor));
}

.bsftfav-button__icon svg {
    display: block;
    width: 100%;
    height: 100%;
}

.bsftfav-button__icon svg path {
    transition: fill .2s ease, stroke .2s ease;
}

.bsftfav-button:not(.bsftfav-button--dual-icon-color) .bsftfav-button__icon svg .bsftfav-icon__path--stroke {
    stroke: currentColor;
}

.bsftfav-button:not(.bsftfav-button--dual-icon-color) .bsftfav-button__icon svg .bsftfav-icon__path--fill {
    fill: currentColor;
}

.bsftfav-button--dual-icon-color .bsftfav-button__icon svg .bsftfav-icon__path--stroke {
    fill: none !important;
    stroke: var(--bsftfav-icon-stroke-color, currentColor) !important;
}

.bsftfav-button--dual-icon-color .bsftfav-button__icon svg .bsftfav-icon__path--fill {
    fill: var(--bsftfav-icon-fill-color, currentColor) !important;
    stroke: var(--bsftfav-icon-stroke-color, currentColor) !important;
    stroke-width: 2px;
    paint-order: stroke fill;
}

.bsftfav-button--dual-icon-color.bsftfav-button--active .bsftfav-button__icon svg .bsftfav-icon__path--stroke {
    stroke: var(--bsftfav-active-icon-stroke-color, var(--bsftfav-icon-stroke-color, currentColor)) !important;
}

.bsftfav-button--dual-icon-color.bsftfav-button--active .bsftfav-button__icon svg .bsftfav-icon__path--fill {
    fill: var(--bsftfav-active-icon-fill-color, var(--bsftfav-icon-fill-color, currentColor)) !important;
    stroke: var(--bsftfav-active-icon-stroke-color, var(--bsftfav-icon-stroke-color, currentColor)) !important;
}

.bsftfav-button--dual-icon-color.bsftfav-button--link:hover .bsftfav-button__icon svg .bsftfav-icon__path--stroke {
    stroke: var(--bsftfav-hover-icon-color, var(--bsftfav-icon-stroke-color, currentColor)) !important;
}

.bsftfav-button--dual-icon-color.bsftfav-button--link:hover .bsftfav-button__icon svg .bsftfav-icon__path--fill {
    stroke: var(--bsftfav-hover-icon-color, var(--bsftfav-icon-stroke-color, currentColor)) !important;
}

.bsftfav-button--active:not(.bsftfav-button--link):not(.bsftfav-button--active-icon-custom):not(.bsftfav-button--dual-icon-color) .bsftfav-button__icon svg path[fill="none"] {
    fill: currentColor;
}

.bsftfav-button__icon-variant {
    display: inline-flex;
    width: 100%;
    height: 100%;
}

.bsftfav-button__icon-variant--active {
    display: none;
}

.bsftfav-button--active .bsftfav-button__icon--variant-switch .bsftfav-button__icon-variant--default {
    display: none;
}

.bsftfav-button--active .bsftfav-button__icon--variant-switch .bsftfav-button__icon-variant--active {
    display: inline-flex;
}

.bsftfav-button__label {
    color: inherit;
    font-size: var(--bsftfav-text-size, 14px);
    text-align: var(--bsftfav-text-align, center);
}

.bsftfav-button--icon-right {
    flex-direction: row-reverse;
}

.bsftfav-button--type-icon {
    width: auto;
    aspect-ratio: 1 / 1;
}

.bsftfav-button:not(.bsftfav-button--link).bsftfav-button--type-icon .bsftfav-button__count {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    font-size: 11px;
}

.bsftfav-button__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.4em;
    padding: 0 .35em;
    border-radius: 999px;
    background: var(--bsftfav-active-background, currentColor);
    color: var(--bsftfav-active-text-color, #fff);
    font-size: calc(var(--bsftfav-text-size, 14px) * .85);
    font-weight: 700;
    line-height: 1.4;
}

.bsftfav-button--active .bsftfav-button__count {
    background: var(--bsftfav-active-text-color, #fff);
    color: var(--bsftfav-active-background, currentColor);
}

.bsftfav-button--link.bsftfav-button--type-icon {
    aspect-ratio: auto;
    width: auto;
    min-width: 0;
    padding: var(--bsftfav-padding, 8px 12px);
}

.bsftfav-button--link.bsftfav-button--type-icon:not(.bsftfav-button--count-over-icon) .bsftfav-button__count {
    position: static;
    top: auto;
    right: auto;
    min-width: 1.4em;
    height: auto;
}

.bsftfav-button--link .bsftfav-button__count {
    box-sizing: border-box;
    width: var(--bsftfav-count-width, auto);
    min-width: var(--bsftfav-count-width, 1.4em);
    height: var(--bsftfav-count-height, auto);
    min-height: var(--bsftfav-count-height, auto);
    padding: var(--bsftfav-count-padding, 4px);
    border-radius: var(--bsftfav-count-border-radius, 999px);
    background: var(--bsftfav-count-background, var(--bsftfav-active-background, currentColor));
    color: var(--bsftfav-count-text-color, var(--bsftfav-active-text-color, #fff));
    font-size: var(--bsftfav-count-text-size, 12px);
    font-weight: var(--bsftfav-count-font-weight, 700);
}

.bsftfav-button--link.bsftfav-button--active .bsftfav-button__count {
    background: var(--bsftfav-count-background, var(--bsftfav-active-background, currentColor));
    color: var(--bsftfav-count-text-color, var(--bsftfav-active-text-color, #fff));
}

.bsftfav-button--link.bsftfav-button--count-over-icon .bsftfav-button__icon-stack {
    position: relative;
    display: inline-block;
    flex: 0 0 auto;
    width: var(--bsftfav-icon-width, 20px);
    height: var(--bsftfav-icon-height, 20px);
    line-height: 0;
    vertical-align: middle;
}

.bsftfav-button--link.bsftfav-button--count-over-icon .bsftfav-button__icon-stack .bsftfav-button__icon {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.bsftfav-button--link.bsftfav-button--count-over-icon .bsftfav-button__icon-stack .bsftfav-button__icon svg {
    display: block;
    width: 100%;
    height: 100%;
}

.bsftfav-button--link.bsftfav-button--count-over-icon .bsftfav-button__icon-stack .bsftfav-button__count {
    position: absolute;
    z-index: 2;
    top: var(--bsftfav-count-position-top, -4px);
    right: var(--bsftfav-count-position-right, -4px);
    bottom: auto;
    left: auto;
    box-sizing: border-box;
    width: var(--bsftfav-count-width, auto);
    min-width: var(--bsftfav-count-width, 16px);
    max-width: none;
    height: var(--bsftfav-count-height, auto);
    min-height: var(--bsftfav-count-height, auto);
    padding: var(--bsftfav-count-padding, 2px 4px);
    line-height: 1;
    white-space: nowrap;
    transform: none;
}

.bsftfav-button--link {
    position: relative;
    overflow: visible;
    cursor: pointer;
}

/* Расширяем область наведения для компактной icon-кнопки со счётчиком */
.bsftfav-button--link.bsftfav-button--type-icon:has([data-bsftfav-count]):not(.bsftfav-button--count-over-icon)::after {
    content: '';
    position: absolute;
    top: -8px;
    right: -12px;
    bottom: -4px;
    left: -4px;
    z-index: 1;
}

.bsftfav-button--link .bsftfav-button__icon,
.bsftfav-button--link .bsftfav-button__label {
    position: relative;
    z-index: 2;
    cursor: inherit;
    pointer-events: none;
}

.bsftfav-button--link .bsftfav-button__count {
    z-index: 2;
    cursor: inherit;
    pointer-events: none;
}

.bsftfav-button--link .bsftfav-button__icon svg {
    pointer-events: none;
}

.bsftfav-link-slot[hidden] {
    display: none !important;
}

.bsftfav-loop-button,
.bsftfav-single-button {
    display: block;
}

/* Absolute placement is available only for the standard WooCommerce hooks.
   Tuning uses its own layout wrappers and does not receive these modifiers. */
li.product:has(> .bsftfav-loop-button--absolute),
.summary.entry-summary:has(> .bsftfav-single-button--absolute) {
    position: relative;
}

.bsftfav-loop-button--absolute,
.bsftfav-single-button--absolute {
    position: absolute;
    top: var(--bsftfav-absolute-top, auto);
    right: var(--bsftfav-absolute-right, auto);
    bottom: var(--bsftfav-absolute-bottom, auto);
    left: var(--bsftfav-absolute-left, auto);
    z-index: 20;
    width: max-content;
    max-width: 100%;
}

.bsftfav-page {
    width: 100%;
}

.bsftfav-page ul.products li.product.bsftfav-page-item {
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.bsftfav-page ul.products li.product.bsftfav-page-item > .bsftfav-remove-link-wrap {
    flex: 0 0 auto;
}

.bsftfav-page ul.products li.product.bsftfav-page-item > .bsftfav-page-item__card {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    width: 100%;
    min-height: 0;
}

.bsftfav-page ul.products li.product.bsftfav-page-item > .bsftfav-page-item__card > .bsfttune_product_link {
    flex: 1 1 auto;
    width: 100%;
}

.bsftfav-remove-link-wrap {
    display: block;
    width: 100%;
    margin: 8px 0 0;
    padding: 0px 10px;
}

.bsftfav-remove-link {
    display: inline;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    color: #dc2626;
    font: inherit;
    line-height: inherit;
    text-decoration: underline;
    cursor: pointer;
}

.bsftfav-remove-link:hover {
    color: #991b1b;
    box-shadow: none;
}

.bsftfav-remove-link.bsftfav-button--loading {
    cursor: wait;
    opacity: .65;
    text-decoration: none;
}

.bsftfav-empty__link {
    text-decoration: none;
}

.bsftfav-empty,
.bsftfav-notice {
    padding: 28px;
    border: 1px solid rgba(0, 0, 0, .08);
    border-radius: 16px;
    text-align: center;
}

.bsftfav-empty__icon {
    color: #dc2626;
    font-size: 42px;
    line-height: 1;
}

.bsftfav-empty__title {
    margin-top: 10px;
    font-size: 20px;
    font-weight: 700;
}

.bsftfav-button--page-unconfigured {
    cursor: pointer;
}

.bsftaccahub-section.bsftfav-accaunthub-tab {
    padding: 0;
    border: 0;
}
