/* Filter groups — js/si-filter-groups.js (3.31.30)
   Opt-in via the `si-filter-groups` class on a Taxonomy Filter widget.

   Every control is a <button>, and the Elementor kit styles buttons globally
   (blue fill, padding, border). Selectors are scoped under .si-fg and the
   visual properties marked !important so kit styles can't leak in — same
   reason si-nav.css does it. */

/* Hide Elementor's own pills once the grouped bar is built. Until then (or if
   JS fails) the original pills still show and still work. */
.si-filter-groups.si-fg-ready .e-filter {
    display: none !important;
}

.si-filter-groups .elementor-widget-container {
    display: flex;
    justify-content: center;
}

.si-fg {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px 14px;
    max-width: 100%;
    font-family: inherit;
}

.si-fg__pills,
.si-fg__tools {
    display: flex;
    align-items: center;
    gap: 6px;
}

.si-fg__tools {
    gap: 10px;
    padding-left: 14px;
    border-left: 1px solid rgba(255, 255, 255, .08);
}

/* Shared button reset */
.si-fg .si-fg__pill,
.si-fg .si-fg__trigger,
.si-fg .si-fg__option,
.si-fg .si-fg__toggle {
    margin: 0 !important;
    font: inherit !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    box-shadow: none !important;
    min-height: 0 !important;
    cursor: pointer;
}

/* ── Pills ─────────────────────────────────────────────────────────────── */
.si-fg .si-fg__pill {
    height: 30px !important;
    padding: 0 12px !important;
    border-radius: 7px !important;
    border: 1px solid rgba(255, 255, 255, .08) !important;
    background: #1b1c21 !important;
    color: #a9abb4 !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    line-height: 1 !important;
    white-space: nowrap;
    transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}

.si-fg .si-fg__pill:hover {
    border-color: rgba(255, 255, 255, .18) !important;
    color: #fff !important;
}

/* Selected: a tint of the brand blue rather than a solid fill — the same
   treatment as a card tag on hover (css/si-card-tags.css). (3.31.32) */
.si-fg .si-fg__pill[aria-pressed="true"],
.si-fg .si-fg__pill[aria-pressed="true"]:hover {
    background: rgba(22, 42, 228, .16) !important;
    border-color: rgba(22, 42, 228, .7) !important;
    color: #dfe2ff !important;
}

/* ── Style dropdown ────────────────────────────────────────────────────── */
.si-fg__menu {
    position: relative;
}

.si-fg .si-fg__trigger {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 30px !important;
    padding: 0 10px 0 12px !important;
    border-radius: 7px !important;
    border: 1px solid rgba(255, 255, 255, .1) !important;
    background: #1b1c21 !important;
    color: #f2f2f4 !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    line-height: 1 !important;
    transition: border-color .2s ease, background-color .2s ease;
}

.si-fg .si-fg__trigger:hover,
.si-fg__menu.is-open .si-fg__trigger,
.si-fg__menu.is-filtered .si-fg__trigger {
    border-color: rgba(22, 42, 228, .6) !important;
    background: #1e2028 !important;
}

.si-fg__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: #162ae4;
    color: #fff;
    font-size: 11px;
}

.si-fg__count[hidden] { display: none; }

.si-fg__chev {
    width: 12px;
    height: 12px;
    color: #8b8d96;
    transition: transform .2s ease;
}

.si-fg__menu.is-open .si-fg__chev { transform: rotate(180deg); }

.si-fg__panel {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 300;
    width: 230px;
    max-height: min(60vh, 440px);
    overflow-y: auto;
    padding: 6px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, .08);
    background: #1b1c21;
    box-shadow: 0 24px 48px -16px rgba(0, 0, 0, .7);
}

.si-fg__panel[hidden] { display: none; }

.si-fg__heading {
    padding: 8px 10px 4px;
    color: #6b6d76;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.si-fg__divider {
    height: 1px;
    margin: 6px 6px 2px;
    background: rgba(255, 255, 255, .06);
}

.si-fg .si-fg__option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100% !important;
    padding: 8px 10px !important;
    border: 0 !important;
    border-radius: 7px !important;
    background: transparent !important;
    color: #d9dae0 !important;
    font-size: 13px !important;
    line-height: 1.2 !important;
    text-align: left !important;
}

.si-fg .si-fg__option:hover,
.si-fg .si-fg__option:focus {
    background: rgba(255, 255, 255, .05) !important;
    color: #fff !important;
}

.si-fg .si-fg__option[aria-pressed="true"] { color: #fff !important; }

.si-fg__check {
    flex: 0 0 16px;
    height: 16px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, .2);
    transition: background-color .15s ease, border-color .15s ease;
}

.si-fg__option[aria-pressed="true"] .si-fg__check {
    border-color: #162ae4;
    background: #162ae4 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5 7 11l5-6' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat;
}

/* ── Free only switch ──────────────────────────────────────────────────── */
.si-fg .si-fg__toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 30px !important;
    padding: 0 4px !important;
    border: 0 !important;
    border-radius: 7px !important;
    background: transparent !important;
    color: #a9abb4 !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    line-height: 1 !important;
    white-space: nowrap;
}

.si-fg .si-fg__toggle:hover { color: #fff !important; }
.si-fg .si-fg__toggle[aria-checked="true"] { color: #fff !important; }

.si-fg__switch {
    position: relative;
    flex: 0 0 28px;
    height: 16px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .14);
    transition: background-color .2s ease;
}

.si-fg__switch::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #fff;
    transition: transform .2s ease;
}

.si-fg__toggle[aria-checked="true"] .si-fg__switch { background: #162ae4; }
.si-fg__toggle[aria-checked="true"] .si-fg__switch::after { transform: translateX(12px); }

/* Focus rings for keyboard users only. .si-fg--pointer is set by the JS
   after a mouse/touch press, so a click never leaves a ring behind. (3.31.31) */
.si-fg.si-fg--pointer .si-fg__pill:focus-visible,
.si-fg.si-fg--pointer .si-fg__trigger:focus-visible,
.si-fg.si-fg--pointer .si-fg__option:focus-visible,
.si-fg.si-fg--pointer .si-fg__toggle:focus-visible {
    outline: none !important;
}

/* Focus rings for keyboard users */
.si-fg .si-fg__pill:focus-visible,
.si-fg .si-fg__trigger:focus-visible,
.si-fg .si-fg__option:focus-visible,
.si-fg .si-fg__toggle:focus-visible {
    outline: 2px solid #162ae4 !important;
    outline-offset: 2px;
}

/* ── Mobile: pills scroll sideways, tools sit on their own line ───────── */
@media (max-width: 767px) {
    .si-fg {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        width: 100%;
    }
    .si-fg__pills {
        justify-content: flex-start;
        overflow-x: auto;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 2px;
    }
    .si-fg__pills::-webkit-scrollbar { display: none; }
    .si-fg__tools {
        justify-content: space-between;
        padding-left: 0;
        border-left: 0;
    }
    .si-fg__panel {
        left: 0;
        right: auto;
        width: min(280px, calc(100vw - 32px));
    }
}

@media (prefers-reduced-motion: reduce) {
    .si-fg .si-fg__pill,
    .si-fg .si-fg__trigger,
    .si-fg__chev,
    .si-fg__switch,
    .si-fg__switch::after { transition: none !important; }
}
