/* Vobler Brand Filter — list of brands (product_brand) with links to archives */

.vbf {
    --vbf-text: #222222;
    --vbf-muted: #8a8a8a;
    --vbf-accent: #0073aa;
    --vbf-hover-bg: #f2f2f2;
    --vbf-active-bg: #e9f3f8;
    --vbf-radius: 6px;

    font-family: inherit;
    font-size: 14px;
    color: var(--vbf-text);
}

.vbf__title {
    font-weight: 700;
    font-size: 15px;
    margin: 0 0 8px;
}

/* Hidden checkbox toggle */
.vbf__toggle-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.vbf__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.vbf__item {
    margin: 0;
}

.vbf__link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px 7px 0;
    color: var(--vbf-text);
    text-decoration: none;
    border-radius: var(--vbf-radius);
    line-height: 1.3;
    transition: background 0.15s, color 0.15s;
}

/* Radio indicator */
.vbf__link::before {
    content: '';
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    box-sizing: border-box;
    border: 2px solid #c4c4c4;
    border-radius: 50%;
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.vbf__link:hover::before {
    border-color: var(--vbf-accent);
}

/* Selected brand — filled radio */
.vbf__item--active .vbf__link::before {
    border-color: var(--vbf-accent);
    background: var(--vbf-accent);
    box-shadow: inset 0 0 0 3px #fff;
}

.vbf__name {
    flex: 1 1 auto;
    min-width: 0;
}

.vbf__count {
    flex: 0 0 auto;
    font-size: 12px;
    color: var(--vbf-muted);
}

.vbf__link:hover {
    background: var(--vbf-hover-bg);
    color: var(--vbf-accent);
}

.vbf__link:hover .vbf__count {
    color: var(--vbf-accent);
}

/* Active brand (on its archive) */
.vbf__item--active .vbf__link {
    background: var(--vbf-active-bg);
    color: var(--vbf-accent);
    font-weight: 600;
}

/* Hidden brands (beyond limit) — shown on click of "show all" */
.vbf__item--extra {
    display: none;
}

.vbf__toggle-input:checked ~ .vbf__list .vbf__item--extra {
    display: block;
}

/* Toggle button */
.vbf__more {
    display: inline-block;
    margin-top: 8px;
    padding: 6px 10px;
    color: var(--vbf-accent);
    font-weight: 600;
    cursor: pointer;
    user-select: none;
}

.vbf__more:hover {
    text-decoration: underline;
}

.vbf__more-hide {
    display: none;
}

.vbf__toggle-input:checked ~ .vbf__more .vbf__more-show {
    display: none;
}

.vbf__toggle-input:checked ~ .vbf__more .vbf__more-hide {
    display: inline;
}

/* ===== Scroll mode: full page-height list with mouse-wheel scrolling ===== */
.vbf--scroll {
    position: sticky;
    top: var(--vbf-top, 16px);
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - var(--vbf-top, 16px) - 16px);
}

.vbf--scroll .vbf__title {
    flex: 0 0 auto;
}

.vbf--scroll .vbf__list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #c4c4c4 transparent;
    padding-right: 4px;
}

.vbf--scroll .vbf__list::-webkit-scrollbar {
    width: 8px;
}

.vbf--scroll .vbf__list::-webkit-scrollbar-thumb {
    background: #c4c4c4;
    border-radius: 4px;
}

.vbf--scroll .vbf__list::-webkit-scrollbar-track {
    background: transparent;
}

/* Price-range block sits above the brand list in the catalogue sidebar. */
.vbf-wrap--hind,
.vbf-wrap--attr {
	margin-bottom: 1.5em;
}

/* Multi-select filter (Sihtkala): "All" stays a radio, the values are square check boxes */
.vbf--multi .vbf__item:not(.vbf__item--all) .vbf__link::before {
    border-radius: 3px;
}

.vbf--multi .vbf__item--active:not(.vbf__item--all) .vbf__link::before {
    content: '\2713';
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 11px;
    line-height: 1;
    box-shadow: none;
}

/* Price slider (WooCommerce jQuery UI slider) */
.vbf-price .price_slider_wrapper { padding: 6px 8px 0; }
.vbf-price .price_slider { position: relative; height: 4px; margin: 14px 10px 18px; background: #dcdcdc; border-radius: 3px; border: 0; }
.vbf-price .price_slider .ui-slider-range { position: absolute; top: 0; height: 100%; background: var(--vbf-accent); border-radius: 3px; }
.vbf-price .price_slider .ui-slider-handle {
	position: absolute; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; box-sizing: border-box;
	background: #fff; border: 2px solid var(--vbf-accent); border-radius: 50%; cursor: grab; outline: 0; touch-action: none; z-index: 2;
}
.vbf-price .price_slider .ui-slider-handle:focus-visible, .vbf-price .price_slider .ui-slider-handle.ui-state-active { box-shadow: 0 0 0 4px var(--vbf-active-bg); }
.vbf-price .price_slider_amount { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.vbf-price .price_slider_amount input[type="text"] { display: none; }
.vbf-price .price_label { display: block !important; order: -1; flex: 0 0 100%; font-weight: 600; font-size: 14px; color: var(--vbf-accent); margin: 0 0 4px; }
.vbf-price .vbf-price__btn { padding: 8px 18px; }
.vbf-price .vbf-price__reset { font-size: 13px; color: #555; text-decoration: underline; }
.vbf-price .clear { display: none; }
/* bigger invisible touch area around the small handle */
.vbf-price .price_slider .ui-slider-handle::after { content: ""; position: absolute; left: -11px; top: -11px; right: -11px; bottom: -11px; border-radius: 50%; }
