/* Maxweb Smart Filter v1.6.3 — scoped frontend-only styles. */

/* Make the entire checkbox/radio label visibly clickable on any theme,
   including themes that reset the cursor on form labels and native inputs. */
.mwsf .mwsf__choices .mwsf__choice,
.mwsf .mwsf__choices .mwsf__choice > span,
.mwsf .mwsf__choices .mwsf__choice > input[type="checkbox"],
.mwsf .mwsf__choices .mwsf__choice > input[type="radio"] {
    cursor: pointer !important;
}

/* The hover treatment does not alter spacing or override the site's colors. */
@media (hover: hover) {
    .mwsf .mwsf__choices .mwsf__choice:hover {
        background-color: rgba(0, 0, 0, 0.035);
        border-radius: 4px;
    }
}

/* Avoid the large border around an entire choice after mouse click.
   Native checkbox/radio focus rings should only appear for keyboard focus. */
.mwsf .mwsf__choices .mwsf__choice:focus-within {
    outline: none !important;
    box-shadow: none !important;
}
.mwsf .mwsf__choices .mwsf__choice > input[type="checkbox"]:focus:not(:focus-visible),
.mwsf .mwsf__choices .mwsf__choice > input[type="radio"]:focus:not(:focus-visible) {
    outline: none !important;
    box-shadow: none !important;
}
.mwsf .mwsf__choices .mwsf__choice > input[type="checkbox"]:focus-visible,
.mwsf .mwsf__choices .mwsf__choice > input[type="radio"]:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.mwsf .mwsf__choices .mwsf__choice > input:disabled {
    cursor: not-allowed !important;
}

/* Field accordion: active only when label and field option are enabled. */
.mwsf .mwsf__field--collapsible > .mwsf__toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 12px;
    text-align: left;
    cursor: pointer;
    background: transparent;
    border: 0;
    padding: 8px 0;
    color: inherit;
    font: inherit;
    line-height: 1.4;
    box-shadow: none;
    text-transform: none;
}
.mwsf .mwsf__toggle-icon {
    width: 17px;
    height: 17px;
    flex: 0 0 17px;
    transform: rotate(180deg);
    transition: transform .2s ease;
}
.mwsf .mwsf__toggle[aria-expanded="false"] .mwsf__toggle-icon {
    transform: rotate(0);
}
.mwsf .mwsf__field--collapsible > .mwsf__control[hidden] {
    display: none !important;
}
.mwsf .mwsf__toggle:focus:not(:focus-visible) {
    outline: none !important;
    box-shadow: none !important;
}
.mwsf .mwsf__toggle:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
    .mwsf .mwsf__toggle-icon {
        transition: none;
    }
}


/* Shortcode [maxweb_filter_toolbar], scoped to its own markup. */
.mwsf-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px 20px;
    width: 100%;
    margin: 0 0 15px;
}
.mwsf-toolbar__count {
    font-size: 14px;
    line-height: 1.5;
    color: inherit;
}
.mwsf-toolbar__ordering {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.mwsf-toolbar__ordering label {
    margin: 0;
    font-size: 14px;
    font-weight: 400;
    white-space: nowrap;
}
.mwsf-toolbar__sort {
    display: block;
    width: auto;
    min-width: 175px;
    max-width: 100%;
    height: 40px;
    margin: 0;
    padding: 0 34px 0 12px;
    border: 1px solid #dedede;
    border-radius: 5px;
    background-color: #fff;
    color: inherit;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.4;
    cursor: pointer;
    box-shadow: none;
}
.mwsf-toolbar__sort:focus {
    outline: none;
    box-shadow: none;
}
/* Mobile filter toggle: opens Flatsome's existing shop off-canvas. */
.mwsf-toolbar__filter,
.mwsf-toolbar__filter[hidden] {
    display: none !important;
}
.mwsf-toolbar__filter-icon {
    display: block;
    width: 19px;
    height: 19px;
    flex: 0 0 19px;
}
/* Flatsome hides the product sidebar on medium screens (tablet + phone).
   Show the same funnel toggle at its 849px breakpoint, never on desktop. */
@media (max-width: 849px) {
    .mwsf-toolbar {
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        gap: 8px;
    }
    .mwsf-toolbar__count {
        flex: 1 1 auto;
        min-width: 0;
    }
    .mwsf-toolbar__ordering {
        flex: 0 0 auto;
        flex-wrap: nowrap;
        width: auto;
        min-width: 0;
        max-width: 45%;
        gap: 0;
    }
    .mwsf-toolbar__ordering label {
        display: none;
    }
    .mwsf-toolbar__sort {
        flex: none;
        width: 175px;
        max-width: 100%;
        min-width: 0;
        height: 35px;
    }
    .mwsf-toolbar button.mwsf-toolbar__filter:not([hidden]) {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        flex: 0 0 35px;
        width: 35px;
        min-width: 35px;
        max-width: 35px;
        height: 35px;
        min-height: 35px;
        margin: 0;
        padding: 0;
        border: 1px solid #dedede;
        border-radius: 5px;
        background: #fff;
        color: inherit;
        line-height: 1;
        box-shadow: none;
        cursor: pointer;
    }
    .mwsf-toolbar button.mwsf-toolbar__filter:hover {
        background: #f7f7f7;
        border-color: #bdbdbd;
        color: inherit;
    }
    .mwsf-toolbar button.mwsf-toolbar__filter:focus:not(:focus-visible) {
        outline: none;
        box-shadow: none;
    }
    .mwsf-toolbar button.mwsf-toolbar__filter:focus-visible {
        outline: 2px solid currentColor;
        outline-offset: 2px;
    }
}
/* Narrow phones retain the compact count / sort / funnel arrangement. */
@media (max-width: 549px) {
    .mwsf-toolbar {
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        margin-bottom: 12px;
    }
    .mwsf-toolbar__count {
        flex: 1 1 auto;
        min-width: 0;
        font-size: 12px;
        line-height: 1.4;
    }
    .mwsf-toolbar__ordering {
        display: flex;
        flex: 0 0 auto;
        align-items: center;
        justify-content: flex-end;
        flex-wrap: nowrap;
        width: auto;
        max-width: 44%;
        min-width: 0;
        gap: 0;
    }
    .mwsf-toolbar__ordering label {
        display: none;
    }
    .mwsf-toolbar__sort {
        display: block;
        flex: none;
        width: 145px;
        max-width: 100%;
        min-width: 0;
        height: 35px;
        margin: 0;
        padding: 0 25px 0 8px;
        font-size: 12px;
    }
}
@media (max-width: 359px) {
    .mwsf-toolbar__count,
    .mwsf-toolbar__sort { font-size: 11px; }
    .mwsf-toolbar__sort { width: 124px; }
}

/* Fallback drawer for a custom product archive without Flatsome's native trigger.
   The real sidebar is moved (not cloned) into this panel and restored on close. */
@media (max-width: 849px) {
    body.mwsf-filter-drawer-open { overflow: hidden; }
    .mwsf-filter-drawer {
        position: fixed;
        inset: 0;
        z-index: 999999;
        display: flex;
        justify-content: flex-start;
    }
    .mwsf-filter-drawer__backdrop {
        position: absolute;
        inset: 0;
        background: rgba(0,0,0,.46);
        border: 0;
        width: 100%;
        height: 100%;
        cursor: pointer;
    }
    .mwsf-filter-drawer__panel {
        position: relative;
        display: flex;
        flex-direction: column;
        width: min(340px, 88vw);
        height: 100%;
        min-height: 0;
        background: #fff;
        overflow: hidden;
        box-shadow: 3px 0 18px rgba(0,0,0,.18);
        outline: none;
    }
    /* An independent corner control, immune to Flatsome's button sizing. */
    .mwsf-filter-drawer__panel button.mwsf-filter-drawer__close {
        position: absolute;
        top: 8px;
        right: 10px;
        z-index: 2;
        display: flex !important;
        align-items: center;
        justify-content: center;
        flex: none;
        box-sizing: border-box;
        width: 32px !important;
        min-width: 32px !important;
        max-width: 32px !important;
        height: 32px !important;
        min-height: 32px !important;
        max-height: 32px !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        border-radius: 4px;
        background: #fff;
        color: #333;
        font-size: 26px;
        font-weight: 400;
        line-height: 1 !important;
        text-align: center;
        text-transform: none;
        box-shadow: none !important;
        cursor: pointer;
    }
    .mwsf-filter-drawer__panel button.mwsf-filter-drawer__close:hover {
        background: #f2f3f5;
        color: #111;
    }
    .mwsf-filter-drawer__panel button.mwsf-filter-drawer__close:focus-visible {
        outline: 2px solid currentColor;
        outline-offset: 2px;
    }
    .mwsf-filter-drawer__content {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        overscroll-behavior: contain;
        padding: 48px 18px 24px;
    }
    .mwsf-filter-drawer__source,
    .mwsf-filter-drawer__source.col,
    .mwsf-filter-drawer__source.large-3 {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }
}
