/*
 * Wolboerderij Product Filter — Frontend widget-stijlen
 * Bevat stijlen voor zowel het kleurfilter (wbcf-*) als het
 * attribuutfilter (wbpf-attribute-filter).
 */

/* ══════════════════════════════════════════════════════════════════════════
   Kleurfilter widget (backwards-compat: behoudt wbcf-* klassen)
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Lijst ────────────────────────────────────────────────────────────────── */

.wbpf-color-filter,
.wbcf-color-filter {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 8px;
}

/* ── Item ─────────────────────────────────────────────────────────────────── */

.wbcf-swatch-item a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    text-decoration: none;
    color: inherit;
}

.wbcf-swatch-item a:hover {
    text-decoration: none;
}

/* ── Kleurbol ─────────────────────────────────────────────────────────────── */

.wbcf-swatch {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid transparent;
    box-shadow: 0 0 0 1px rgba( 0, 0, 0, 0.18 );
    position: relative;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
    flex-shrink: 0;
}

.wbcf-swatch-item a:hover .wbcf-swatch {
    box-shadow: 0 0 0 2px #333;
    transform: scale( 1.08 );
}

.wbcf-swatch-item--active .wbcf-swatch {
    box-shadow: 0 0 0 2px #111;
}

/* ── Vinkje bij actieve kleur ─────────────────────────────────────────────── */

.wbcf-checkmark {
    font-size: 14px;
    line-height: 1;
    color: #fff;
    text-shadow: 0 1px 3px rgba( 0, 0, 0, 0.55 );
    pointer-events: none;
}

/* ── "Alle kleuren" reset-bol ─────────────────────────────────────────────── */

.wbcf-swatch--all {
    background: #f0f0f0;
    position: relative;
}

.wbcf-swatch--all::before,
.wbcf-swatch--all::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 52%;
    height: 2px;
    background: #888;
    border-radius: 1px;
    transform-origin: center;
}

.wbcf-swatch--all::before {
    transform: translate( -50%, -50% ) rotate( 45deg );
}

.wbcf-swatch--all::after {
    transform: translate( -50%, -50% ) rotate( -45deg );
}

.wbcf-swatch-item--reset a:hover .wbcf-swatch--all {
    background: #e8e8e8;
}

.wbcf-swatch-item--reset a:hover .wbcf-swatch--all::before,
.wbcf-swatch-item--reset a:hover .wbcf-swatch--all::after {
    background: #444;
}

/* ── Label ────────────────────────────────────────────────────────────────── */

.wbcf-label {
    font-size: 11px;
    line-height: 1.2;
    text-align: center;
    max-width: 52px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wbcf-swatch-item--active .wbcf-label {
    font-weight: 600;
}

.wbcf-swatch-item--reset a {
    opacity: 0.75;
}

.wbcf-swatch-item--reset a:hover {
    opacity: 1;
}

/* ── Staalgrootte-varianten ───────────────────────────────────────────────── */

.wbcf-color-filter--klein .wbcf-swatch {
    width: 24px;
    height: 24px;
}

.wbcf-color-filter--klein .wbcf-label {
    font-size: 10px;
    max-width: 36px;
}

.wbcf-color-filter--groot .wbcf-swatch {
    width: 44px;
    height: 44px;
}

.wbcf-color-filter--groot .wbcf-checkmark {
    font-size: 18px;
}

.wbcf-color-filter--groot .wbcf-label {
    font-size: 12px;
    max-width: 64px;
}

/* ── Staalvorm-varianten ──────────────────────────────────────────────────── */

.wbcf-color-filter--afgerond .wbcf-swatch {
    border-radius: 4px;
}

.wbcf-color-filter--vierkant .wbcf-swatch {
    border-radius: 0;
}

/* ── Verticale indeling ───────────────────────────────────────────────────── */

.wbcf-color-filter--verticaal {
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 6px 0;
}

.wbcf-color-filter--verticaal .wbcf-swatch-item a {
    flex-direction: row;
    gap: 10px;
    align-items: center;
}

.wbcf-color-filter--verticaal .wbcf-label {
    max-width: none;
    white-space: normal;
    text-align: left;
    font-size: 13px;
}

/* ── Productaantal ────────────────────────────────────────────────────────── */

.wbcf-count {
    opacity: 0.6;
    font-size: 0.88em;
}

/* ── Kleurbol in WooCommerce Actieve Filters widget ───────────────────────── */

.wbcf-active-swatch,
.wbpf-active-swatch {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1px solid rgba( 0, 0, 0, 0.2 );
    vertical-align: middle;
    margin-right: 5px;
    flex-shrink: 0;
}

/* ══════════════════════════════════════════════════════════════════════════
   Attribuutfilter widget
   ══════════════════════════════════════════════════════════════════════════ */

.wbpf-attribute-filter {
    list-style: none;
    margin: 0;
    padding: 0;
}

.wbpf-attr-item {
    margin: 0;
    padding: 2px 0;
}

.wbpf-attr-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    text-decoration: none;
    color: inherit;
    transition: color 0.12s ease;
}

.wbpf-attr-link:hover {
    color: #333;
    text-decoration: none;
}

.wbpf-attr-item--active .wbpf-attr-link {
    font-weight: 600;
}

.wbpf-attr-item--reset .wbpf-attr-link {
    font-size: 0.88em;
    opacity: 0.7;
    margin-bottom: 4px;
}

.wbpf-attr-item--reset .wbpf-attr-link:hover {
    opacity: 1;
}

/* ── Checkbox-indicatie (bij multiselect) ─────────────────────────────────── */

.wbpf-attr-checkbox {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border: 1px solid #aaa;
    border-radius: 2px;
    background: #fff;
    font-size: 11px;
    line-height: 1;
    color: #333;
    flex-shrink: 0;
    transition: background 0.12s ease, border-color 0.12s ease;
}

.wbpf-attr-item--active .wbpf-attr-checkbox {
    background: #333;
    border-color: #333;
    color: #fff;
}

.wbpf-attr-link:hover .wbpf-attr-checkbox {
    border-color: #333;
}

/* ── Naam ─────────────────────────────────────────────────────────────────── */

.wbpf-attr-name {
    flex: 1;
}

/* ── Productaantal ────────────────────────────────────────────────────────── */

.wbpf-attr-count {
    opacity: 0.6;
    font-size: 0.88em;
    margin-left: auto;
}
