
/* =========================================
   PBK PROJEKTFILTER – GRUNDLAYOUT
========================================= */

.pbk-filter-builder {
    width: 100%;
}

.pbk-filter-wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 20px;
    width: 100%;
}

.pbk-filter-builder.pbk-filter-column .pbk-filter-wrap {
    flex-direction: column;
}

.pbk-filter-builder.pbk-filter-row .pbk-filter-wrap {
    flex-direction: row;
}

.pbk-filter-builder.pbk-filter-grid .pbk-filter-wrap {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* =========================================
   FILTERGRUPPEN
========================================= */

.pbk-filter-group {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 10px;
}

.pbk-filter-group-label,
.pbk-filter-label {
    display: block;
    margin: 0;
}

.pbk-filter-options {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

/* =========================================
   BUTTON-FILTER
========================================= */

.pbk-filter-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition:
        color .2s ease,
        background-color .2s ease,
        border-color .2s ease;
}

.pbk-filter-button.is-active {
    position: relative;
}

/* =========================================
   CHECKBOX-FILTER
========================================= */

.pbk-filter-checkbox-option,
.pbk-filter-checkbox-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.pbk-filter-checkbox {
    flex: 0 0 auto;
    margin: 0;
    cursor: pointer;
}

/* =========================================
   CUSTOM DROPDOWN
========================================= */

.pbk-filter-select-wrap {
    position: relative;
    display: inline-block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    z-index: 2;
}

.pbk-filter-select-wrap.is-open {
    z-index: 1000;
}

.pbk-filter-select-native {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    min-height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.pbk-dropdown-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    min-width: 0;
    text-align: left;
    cursor: pointer;
    box-sizing: border-box;
    transition:
        color .2s ease,
        background-color .2s ease,
        border-color .2s ease;
}

.pbk-dropdown-current-label {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pbk-filter-select-icon {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.pbk-filter-select-icon svg {
    display: block;
    width: 1em;
    height: 1em;
}

.pbk-dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    left: 0;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 100%;
    max-height: 280px;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 5px;
    margin: 0;
    background: #fff;
    border: 1px solid #dedede;
    border-radius: 3px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
    box-sizing: border-box;
}

.pbk-dropdown-menu[hidden] {
    display: none !important;
}

.pbk-dropdown-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    width: 100%;
    padding: 10px 12px;
    margin: 0;
    color: inherit;
    background: transparent;
    border: 0;
    border-radius: 2px;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition:
        color .18s ease,
        background-color .18s ease;
}

.pbk-dropdown-option:hover,
.pbk-dropdown-option:focus-visible {
    background: #f3f3f0;
}

.pbk-dropdown-option-label {
    flex: 1 1 auto;
    min-width: 0;
}

.pbk-dropdown-option-check {
    flex: 0 0 auto;
    opacity: 0;
}

.pbk-dropdown-option.is-selected .pbk-dropdown-option-check {
    opacity: 1;
}

.pbk-dropdown-option:focus-visible,
.pbk-dropdown-trigger:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

/* =========================================
   RESET
========================================= */

.pbk-filter-reset-wrap {
    display: flex;
    width: 100%;
}

.pbk-filter-reset {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
}

.pbk-filter-reset-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.pbk-filter-reset-icon svg {
    display: block;
    width: 1em;
    height: 1em;
}

/* =========================================
   AJAX-STATUS
========================================= */

#prj-projekt-grid {
    transition: opacity .25s ease;
}

#prj-projekt-grid.pbk-filter-loading {
    opacity: .45;
    pointer-events: none;
}

/* =========================================
   RESPONSIVE
========================================= */

@media (max-width: 1024px) {
    .pbk-filter-builder.pbk-filter-grid .pbk-filter-wrap {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .pbk-filter-builder.pbk-filter-grid .pbk-filter-wrap {
        grid-template-columns: minmax(0, 1fr);
    }

    .pbk-filter-wrap {
        width: 100%;
    }

    .pbk-filter-group {
        max-width: 100%;
    }

    .pbk-filter-select-wrap {
        width: 100%;
    }
}
