/* GAWELA Horizontale Produktfilter - Smartstore 6.4.12 */
#gawela-horizontal-facets-host {
    --gawela-columns-wide: 3;
    --gawela-columns-compact: 2;
    --gawela-gap: 12px;
    --gawela-dropdown-max-height: 360px;
    --gawela-header-min-height: 44px;
    --gawela-header-padding-y: 7px;
    --gawela-header-padding-x: 12px;
    --gawela-header-font-size: 15px;
    --gawela-animation-duration: 140ms;

    display: none;
    position: relative;
    z-index: 20;
    width: 100%;
    margin: 1rem 0 1.25rem;
}

#gawela-horizontal-facets-host.gawela-horizontal-active.gawela-has-facets {
    display: block;
}

#gawela-horizontal-facets-host.gawela-horizontal-active:has(.facet-toggle[aria-expanded="true"]),
#gawela-horizontal-facets-host.gawela-horizontal-active:focus-within {
    z-index: 1090;
}

#gawela-horizontal-facets-host .gawela-filter-title {
    margin: 0 0 .55rem;
    font-size: 1rem;
    line-height: 1.3;
    font-weight: 650;
    color: var(--body-color, #343a40);
}

#gawela-horizontal-facets-host > .faceted-search-container {
    width: 100%;
    margin: 0;
    position: relative;
    z-index: 1;
}

#gawela-horizontal-facets-host .faceted-search {
    display: grid;
    grid-template-columns: repeat(var(--gawela-columns-compact), minmax(0, 1fr));
    gap: var(--gawela-gap);
    align-items: start;
    overflow: visible;
    position: relative;
    z-index: 1;
}

#gawela-horizontal-facets-host.gawela-wide .faceted-search {
    grid-template-columns: repeat(var(--gawela-columns-wide), minmax(0, 1fr));
}

#gawela-horizontal-facets-host .facet-group {
    position: relative;
    z-index: 1;
    min-width: 0;
    margin: 0;
    border: 1px solid rgba(0, 0, 0, .16);
    border-radius: 3px;
    background: var(--gray-100, #f2f5f7);
}

#gawela-horizontal-facets-host .facet-group.gawela-single-option-hidden,
#gawela-horizontal-facets-host .facet-group.gawela-overflow-hidden,
#gawela-horizontal-facets-host .facet-group.gawela-non-specification-hidden {
    display: none !important;
}

/* Ausschliesslich Smartstore-Spezifikationsattribute (Facet-Key attrid*) anzeigen. */
.faceted-search-container .facet-group.gawela-non-specification-hidden {
    display: none !important;
}

#gawela-horizontal-facets-host .gawela-more-filters {
    box-sizing: border-box;
    min-width: 0;
    min-height: var(--gawela-header-min-height);
    padding: var(--gawela-header-padding-y) var(--gawela-header-padding-x);
    border: 1px solid rgba(0, 91, 170, .28);
    border-radius: 3px;
    background: #fff;
    color: var(--primary, #0069b4);
    font-size: var(--gawela-header-font-size);
    line-height: 1.25;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: background-color 120ms ease-out, border-color 120ms ease-out, box-shadow 120ms ease-out;
}

#gawela-horizontal-facets-host .gawela-more-filters:hover,
#gawela-horizontal-facets-host .gawela-more-filters:focus-visible {
    background: rgba(0, 105, 180, .045);
    border-color: rgba(0, 91, 170, .55);
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 105, 180, .10);
}

#gawela-horizontal-facets-host .facet-group:has(> .facet-toggle[aria-expanded="true"]),
#gawela-horizontal-facets-host .facet-group:focus-within {
    z-index: 50;
}

#gawela-horizontal-facets-host .facet-group-header {
    box-sizing: border-box;
    min-height: var(--gawela-header-min-height);
    padding: var(--gawela-header-padding-y) calc(var(--gawela-header-padding-x) + 1.75rem) var(--gawela-header-padding-y) var(--gawela-header-padding-x);
    font-size: var(--gawela-header-font-size);
    line-height: 1.25;
    font-weight: 500;
}

#gawela-horizontal-facets-host .facet-toggle::after {
    inset-inline-end: var(--gawela-header-padding-x);
}

#gawela-horizontal-facets-host .facet-toggle.has-selection {
    font-weight: 600;
}

@media (hover: hover) and (pointer: fine) {
    #gawela-horizontal-facets-host.gawela-hover-enabled .facet-group {
        transition:
            background-color 120ms ease-out,
            border-color 120ms ease-out,
            box-shadow 120ms ease-out,
            transform 120ms ease-out;
    }

    #gawela-horizontal-facets-host.gawela-hover-enabled .facet-group:not(:has(> .facet-toggle[aria-expanded="true"])):hover {
        background: #fff;
        border-color: rgba(229, 138, 0, .72);
        box-shadow: 0 5px 14px rgba(0, 0, 0, .10);
        transform: translate3d(0, -1px, 0);
    }
}

#gawela-horizontal-facets-host .facet-body {
    position: absolute;
    z-index: 1050;
    top: calc(100% + 2px);
    inset-inline: -1px;
    min-width: calc(100% + 2px);
    max-height: var(--gawela-dropdown-max-height);
    overflow-y: auto;
    padding: .8rem .9rem .9rem;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, .16);
    border-radius: 0 0 3px 3px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, .14);
}

#gawela-horizontal-facets-host.gawela-horizontal-active .facet-body,
#gawela-horizontal-facets-host.gawela-horizontal-active .facet-body.collapse,
#gawela-horizontal-facets-host.gawela-horizontal-active .facet-body.collapsing {
    display: block !important;
    height: auto !important;
    overflow-y: auto !important;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate3d(0, -4px, 0);
    will-change: opacity, transform;
    transition:
        opacity var(--gawela-animation-duration) ease-out,
        transform var(--gawela-animation-duration) cubic-bezier(.2, .8, .2, 1),
        visibility 0s linear var(--gawela-animation-duration) !important;
}

#gawela-horizontal-facets-host.gawela-horizontal-active .facet-toggle[aria-expanded="true"] + .facet-body {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate3d(0, 0, 0);
    transition-delay: 0s !important;
}

@media (prefers-reduced-motion: reduce) {
    #gawela-horizontal-facets-host.gawela-horizontal-active .facet-body,
    #gawela-horizontal-facets-host.gawela-horizontal-active .facet-body.collapse,
    #gawela-horizontal-facets-host.gawela-horizontal-active .facet-body.collapsing,
    #gawela-horizontal-facets-host.gawela-hover-enabled .facet-group,
    #gawela-horizontal-facets-host .gawela-more-filters {
        transition: none !important;
        transform: none !important;
    }
}

.facet-group:has(.gawela-single-numeric-marker) { display: none !important; }

/* Per-category override: prevent the already rendered upper copy from flashing/reappearing. */
.category-page .artlist-sub-categories.gawela-subcategories-above-hidden {
    display: none !important;
}
