/*
 * Empora skin of the AjaxFilters plugin (the plugin adds Themes/<active theme>/Content/AjaxFilters.css, else DefaultClean).
 * Written for the filter panel Empora opens from the "Filter" button (empora.css: .page-category .filters-holder), on
 * categories, manufacturers, vendors, tags and search. Mechanics (what shows, what hides) are the plugin's own, the
 * look is the theme's: --line rules, Barlow 14px, plum for what is on, square boxes and swatches, no images.
 * Colours come from the theme tokens (empora.css :root), breakpoints from the theme (none needed here), logical
 * properties for the inline axis, so AjaxFilters.rtl.css has nothing to change.
 */

.nopAjaxFilters7Spikes a {
    cursor: pointer;
}

.nopAjaxFilters7Spikes .filtersTitlePanel,
.product-filters {
    display: none; /* the plugin's own title and the empty default filters */
}

/* ---- one block per filter: title row (name, "Clear", chevron) over its options ---- */
.nopAjaxFilters7Spikes .block {
    margin: 0;
    border-block-end: 1px solid var(--line);
}

.nopAjaxFilters7Spikes .block .title {
    position: relative;
    margin: 0;
    padding: 0;
    background: none;
}

.nopAjaxFilters7Spikes .block .title a.toggleControl {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 52px;
    padding-inline: 0 36px;
    color: var(--ink);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: calc(.08em * var(--tracking));
}

.nopAjaxFilters7Spikes .block .title a.toggleControl::after {
    content: "";
    position: absolute;
    inset-inline-end: 6px;
    inset-block-start: 50%;
    width: 8px;
    height: 8px;
    margin-block-start: -3px;
    border: solid currentColor;
    border-width: 0 1.5px 1.5px 0;
    transform: rotate(-135deg);
    transition: transform .2s;
}

/* open: the chevron points up; closed: down */
.nopAjaxFilters7Spikes .block .title a.toggleControl.closed::after {
    margin-block-start: -6px;
    transform: rotate(45deg);
}

.nopAjaxFilters7Spikes .block .title a.clearFilterOptions,
.nopAjaxFilters7Spikes .block .title a.clearPriceRangeFilter {
    position: absolute;
    inset-inline-end: 36px;
    inset-block-start: 50%;
    margin-block-start: -9px;
    color: var(--muted);
    font-size: 12px;
    line-height: 18px;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.nopAjaxFilters7Spikes .block .filtersGroupPanel {
    position: relative;
    padding: 0 0 16px;
    overflow: hidden;
}

/* ---- options as check boxes: label with a square box, plum when checked ---- */
.nopAjaxFilters7Spikes .checkbox-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.nopAjaxFilters7Spikes .checkbox-list li {
    position: relative;
    display: block;
    min-height: 0;
}

.nopAjaxFilters7Spikes .checkbox-list input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.nopAjaxFilters7Spikes .checkbox-list label {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 44px;
    padding-inline-start: 30px;
    color: var(--ink);
    font-size: 14px;
    cursor: pointer;
}

.nopAjaxFilters7Spikes .checkbox-list label::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    inset-block-start: 50%;
    width: 18px;
    height: 18px;
    margin-block-start: -9px;
    border: 1px solid var(--stone);
    background: var(--white);
    transition: background-color .15s, border-color .15s;
}

.nopAjaxFilters7Spikes .checkbox-list .checked label::before {
    border-color: var(--plum);
    background: var(--plum);
}

.nopAjaxFilters7Spikes .checkbox-list .checked label::after {
    content: "";
    position: absolute;
    inset-inline-start: 6px;
    inset-block-start: 50%;
    width: 5px;
    height: 9px;
    margin-block-start: -6px;
    border: solid var(--ivory);
    border-width: 0 1.5px 1.5px 0;
    transform: rotate(45deg);
}

.nopAjaxFilters7Spikes .checkbox-list input:focus-visible + label {
    outline: 2px solid var(--plum);
    outline-offset: 2px;
}

.nopAjaxFilters7Spikes .checkbox-list .disabled label {
    opacity: .45;
}

/* colours: a square swatch instead of the box (an image option shows its picture); ringed in plum when on */
.nopAjaxFilters7Spikes .filtersGroupPanel.colorOptions .checkbox-list label::before,
.nopAjaxFilters7Spikes .filtersGroupPanel.colorOptions .checkbox-list .checked label::after {
    display: none;
}

.nopAjaxFilters7Spikes .filtersGroupPanel.colorOptions .color,
.nopAjaxFilters7Spikes .filtersGroupPanel.imageOptions .color {
    position: absolute;
    inset-inline-start: 0;
    inset-block-start: 50%;
    width: 18px;
    height: 18px;
    margin-block-start: -9px;
    border: 1px solid var(--line);
    font-size: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.nopAjaxFilters7Spikes .filtersGroupPanel.imageOptions .color {
    width: 30px;
    height: 30px;
    margin-block-start: -15px;
}

.nopAjaxFilters7Spikes .imageOptions .checkbox-list label {
    padding-inline-start: 42px;
}

.nopAjaxFilters7Spikes .filtersGroupPanel.colorOptions .checkbox-list .checked .color,
.nopAjaxFilters7Spikes .filtersGroupPanel.imageOptions .checkbox-list .checked .color {
    outline: 2px solid var(--plum);
    outline-offset: 2px;
}

/* a colour without a value of its own: a corner-split square (CSS, the plugin's picture is not used) */
.nopAjaxFilters7Spikes .filtersGroupPanel.colorOptions .defaultColor {
    background: linear-gradient(135deg, var(--ivory) 50%, var(--stone) 50%);
}

/* ---- price and specification sliders (jQuery UI): a thin line, a plum range, round handles; always left to right ---- */
.priceRangeFilterPanel7Spikes .ui-slider,
.specificationFilterPanel7Spikes .ui-slider {
    direction: ltr;
    position: relative;
    height: 2px;
    margin: 12px 9px 28px;
    border: 0;
    border-radius: 0;
    background: var(--line);
}

.priceRangeFilterPanel7Spikes .ui-slider-range,
.specificationFilterPanel7Spikes .ui-slider-range {
    position: absolute;
    top: 0;
    height: 2px;
    border: 0;
    background: var(--plum);
}

.priceRangeFilterPanel7Spikes .ui-slider-handle,
.specificationFilterPanel7Spikes .ui-slider-handle {
    position: absolute;
    top: -8px !important;
    width: 18px !important;
    height: 18px !important;
    margin: 0 0 0 -9px !important;
    padding: 0 !important;
    border: 2px solid var(--plum) !important;
    border-radius: 50% !important;
    background: var(--ivory) !important;
    cursor: pointer !important;
    touch-action: none;
}

.priceRangeFilterPanel7Spikes .priceRangeMinMaxPanel,
.specificationFilterPanel7Spikes .specification-min-max-panel,
.priceRangeFilterPanel7Spikes .priceRangeCurrentPricesPanel,
.specificationFilterPanel7Spikes .specification-current-value-panel {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-block-end: 8px;
}

.priceRangeMinPanel,
.priceRangeMaxPanel,
.specification-min-panel,
.specification-max-panel {
    color: var(--muted);
    font-size: 12px;
}

.currentMinPrice,
.currentMaxPrice,
.current-min-value,
.current-max-value {
    color: var(--ink);
    font-size: 14px;
    font-weight: 600;
}

.has-specification-slider .checkbox-list {
    display: none;
}

/* ---- dropdown mode: the theme's field look comes from the select itself ---- */
.filtersDropDownPanel {
    overflow: visible !important;
}

.filtersDropDownPanel select {
    width: 100%;
    min-height: 48px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 0;
    background: var(--white);
    color: var(--ink);
    font-size: 16px;
    cursor: pointer;
}

.filtersDropDownPanel.disabled select {
    opacity: .5;
    cursor: default;
}

/* ---- selected options (the plugin can list them above the filters) ---- */
.selected-options-list {
    margin: 0 0 12px;
    padding: 0;
    list-style: none;
}

.selected-options-list > li {
    margin-block-start: 10px;
    font-size: 13px;
}

.selected-options-list > li:first-child {
    margin-block-start: 0;
}

.selected-options-list > li label {
    display: block;
    margin-block-end: 4px;
    color: var(--muted2);
    font-size: 12px;
}

.selected-options-list > li span {
    display: inline-block;
    margin-inline-end: 8px;
    padding: 6px 10px;
    border: 1px solid var(--plum);
    color: var(--plum);
    cursor: pointer;
}

.selected-options-list > li span::after {
    content: "\00d7";
    margin-inline-start: 8px;
}

/* ---- the tools row: the plugin's own selectors are not used (Empora's are radios and links), keep its helpers hidden ---- */
.product-selectors .product-page-size {
    display: none;
}

.number-of-returned-products.active {
    display: none;
}

/* ---- "No results found" window (shown by the plugin when the filters match nothing) ---- */
.ajaxFilters.k-window {
    position: absolute;
    padding: 0 !important;
    border: 1px solid var(--line);
    background: var(--ivory);
    color: var(--ink);
    text-align: start;
    z-index: calc(var(--z-sheet) + 1) !important;
}

.ajaxFilters .k-window-titlebar {
    position: relative;
    display: block;
    margin: 0 !important;
    padding: 14px 44px 14px 16px;
    border-block-end: 1px solid var(--line);
    background: var(--sand);
    color: var(--plum);
    font-family: var(--font-serif);
    font-size: 20px;
    font-weight: 600;
}

.ajaxFilters .k-window-actions {
    position: absolute;
    inset-inline-end: 8px;
    inset-block-start: 8px;
    font-size: 0;
}

.ajaxFilters .k-window-actions a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.ajaxFilters .k-window-actions .k-icon::before {
    content: "\00d7";
    color: var(--plum);
    font-family: var(--font-sans);
    font-size: 24px;
    line-height: 1;
}

.ajaxFilters .k-window-content {
    padding: 16px;
    font-size: 14px;
}

/* ---- loading ---- */
.productPanelAjaxBusy {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: var(--ivory-veil) url('../../../images/ajaxLoader.gif') no-repeat 50% 50%;
}

.infinite-scroll-loader {
    display: none;
    height: 100px;
    clear: both;
    background: var(--ivory-veil) url('../../../images/ajaxLoader.gif') no-repeat 50% 50%;
    font-size: 0;
    z-index: 2;
}

.item-box.dummy-box::before {
    content: "";
    position: absolute;
    inset-block-start: 50%;
    inset-inline-start: 50%;
    z-index: 9999;
    width: 32px;
    height: 32px;
    background: url('../../../images/ajaxLoader.gif') no-repeat 50% 50%;
    transform: translate(-50%, -50%);
}

.item-box.dummy-box .product-item {
    opacity: 0;
}
