/**
 * Filter UX styles for AJAX filters – overlay, loader, pointer, hover, animations.
 */

.filterValues {font-size: .75em; margin-left: -10px;}
.filterLine {padding: .15em 0;}
.filterLine a,
.filterLine span {display: inline-block; text-decoration: none; vertical-align: middle;}
.filterLine a {cursor: pointer; transition: opacity 0.15s ease; border-radius: 3px; position: relative; margin-left: 10px;}
.filterLine span.off {margin-left: 10px;}
.filterLine a:not(.hide):not(.applied_list)::before {
    content: "";
    position: absolute;
    width: 28px;
    height: 28px;
    left: -6px;
    top: -4px;
    border-radius: 50%;
    background: transparent;
    transition: background-color 0.2s ease, transform 0.2s ease;
    transform: scale(0.6);
    pointer-events: none;
}
.filterLine a:not(.hide):not(.applied_list):hover::before {
    background-color: rgba(0, 0, 0, 0.06);
    transform: scale(1);
}
.filterLine a:not(.hide):not(.applied_list):active::before {
    background-color: rgba(0, 0, 0, 0.1);
    transform: scale(0.95);
}
.filterLine a:hover {opacity: .85;}
.filterLine a span {transition: color 0.15s ease;}
.filterPopup {display: none;}
.filterItemMore {font-size: .6875em; font-weight: 700; padding: .4em 0 0;}
.filterItemMore .filter-more {text-decoration: none; cursor: pointer; transition: opacity 0.15s ease;}
.filterItemMore .filter-more:hover {opacity: .6;}
.filterItem.active .filterPopup {display: block;}
.filterItem.active .filterItemMore {display: none;}
.filterLine a.selected {font-weight: bold;}
.filter-animate-in .filterLine a.selected {animation: filterCheckPop 0.35s ease-out 0.2s both;}
@keyframes filterCheckPop {
    0% {transform: scale(0.8); opacity: 0.4;}
    60% {transform: scale(1.1); opacity: 1;}
    100% {transform: scale(1);}
}
.filterLine a.applied_list {color: #c00;}
.filterLine a span {color: #c6c6c8;}
.filterLine span.off {color: #c6c6c8;}
.filterLine span.selected {display: none;}
.filterLine span.applied_list {display: none;}
.selectedFiltersRemove a {cursor: pointer; transition: opacity 0.15s ease;margin-left: 10px;}
.selectedFiltersRemove a:hover {opacity: .6;}
.block-filter .angle {cursor: pointer;}
.block-filter .allFilterTitle {cursor: pointer;}
.block-filter .filterTitle {cursor: pointer;}

@keyframes filterFadeIn {
    from {opacity: 0; transform: translateY(-6px);}
    to {opacity: 1; transform: translateY(0);}
}
@keyframes filterItemStagger {
    from {opacity: 0; transform: translateY(-4px);}
    to {opacity: 1; transform: translateY(0);}
}
@keyframes ajaxContentFade {
    from {opacity: 0;}
    to {opacity: 1;}
}
.filter-animate-in {animation: filterFadeIn 0.25s ease-out both;}
.filter-animate-in .filterItem {animation: filterItemStagger 0.2s ease-out both;}
.filter-animate-in .filterItem:nth-child(2) {animation-delay: 0.04s;}
.filter-animate-in .filterItem:nth-child(3) {animation-delay: 0.08s;}
.filter-animate-in .filterItem:nth-child(4) {animation-delay: 0.12s;}
.filter-animate-in .filterItem:nth-child(5) {animation-delay: 0.16s;}
.filter-animate-in .filterItem:nth-child(6) {animation-delay: 0.20s;}
.ajax-content-fade {animation: ajaxContentFade 0.3s ease-out both;}

#filter_overlay {
    background: rgba(0,0,0,0.5);
    bottom: 0;
    display: none;
    left: 0;
    position: fixed;
    right: 0;
    top: 0;
    z-index: 1000;
    transition: opacity 0.2s ease;
}
body.filter-loading #filter_overlay {
    display: block !important;
}
.ajax-filter-layout {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    width: 100%;
}
.ajax-filter-sidebar {
    width: 280px;
    flex-shrink: 0;
    overflow: visible;
}
.ajax-filter-sidebar:not([style*="display: none"]):not([style*="display:none"]):empty {
    display: none !important;
}
.ajax-filter-layout .block-products-list {
    flex: 1;
    min-width: 0;
}
@media (max-width: 768px) {
    .ajax-filter-layout {
        flex-direction: column;
    }
    .ajax-filter-sidebar {
        width: 100%;
    }
}
#loader {
    animation: filter-spin 2s linear infinite;
    border: 6px solid transparent;
    border-top-color: #0177bd;
    border-radius: 50%;
    display: block;
    height: 60px;
    left: 50%;
    margin: -30px 0 0 -30px;
    position: relative;
    top: 50%;
    width: 60px;
    z-index: 1001;
}
#loader:before {
    animation: filter-spin 3s linear infinite;
    content: "";
    border: 4px solid transparent;
    border-top-color: #082a4d;
    border-radius: 50%;
    bottom: 4px;
    left: 4px;
    position: absolute;
    right: 4px;
    top: 4px;
}
@keyframes filter-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.ajax-filter-sidebar .block-filter {margin-bottom: 0; width: 100% !important;}

/* View All / Show Pages – pointer and hover (JS-only control) */
.navigation .showall .showall-toggle {
    cursor: pointer;
    transition: opacity 0.2s ease, color 0.2s ease, text-decoration-color 0.2s ease;
}
.navigation .showall .showall-toggle:hover {
    opacity: 0.85;
    text-decoration: underline;
}
.navigation .showall .showall-toggle:focus {
    outline: 1px dotted currentColor;
    outline-offset: 2px;
}
