/* Product Passport directory controls: collapsible filters + custom dropdowns. */
.fg-passport-filter-panel {
    padding: 0;
    overflow: visible;
}

.fg-passport-filter-panel__search {
    padding: 22px 22px 18px;
}

.fg-passport-filter-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 15px 22px;
    border-top: 1px solid #e8eee9;
    border-bottom: 1px solid #e8eee9;
    background: #fafcf9;
}

.fg-passport-filter-toolbar__title {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
}

.fg-passport-filter-toolbar__icon {
    display: grid;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    place-items: center;
    border-radius: 10px;
    color: #135f3d;
    background: #e8f6ec;
    font-size: 15px;
}

.fg-passport-filter-toolbar__title strong,
.fg-passport-filter-toolbar__title small {
    display: block;
}

.fg-passport-filter-toolbar__title strong {
    color: #20352a;
    font-size: 13px;
    font-weight: 800;
}

.fg-passport-filter-toolbar__title small {
    margin-top: 2px;
    color: #77837c;
    font-size: 10px;
    line-height: 1.35;
}

.fg-passport-filter-toolbar__actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.fg-passport-filter-count {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    color: #155b3b;
    background: #eaffc7;
    font-size: 10px;
    font-weight: 800;
    white-space: nowrap;
}

.fg-passport-filter-toggle {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 14px;
    border: 1px solid #ccd9d0;
    border-radius: 999px;
    color: #244437;
    background: #fff;
    font: inherit;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
    transition: border-color .18s ease, background .18s ease, color .18s ease, box-shadow .18s ease;
}

.fg-passport-filter-toggle:hover,
.fg-passport-filter-toggle:focus-visible {
    border-color: #16804e;
    color: #0f603b;
    background: #f4fbf6;
    box-shadow: 0 0 0 3px rgba(22,128,78,.08);
}

.fg-passport-filter-toggle i {
    transition: transform .2s ease;
}

.fg-passport-filter-toggle[aria-expanded="false"] i {
    transform: rotate(180deg);
}

.fg-passport-filter-collapse {
    padding: 20px 22px 22px;
}

.fg-passport-filter-collapse[hidden] {
    display: none !important;
}

.fg-passport-filter-grid {
    margin-top: 0;
}

.fg-passport-filter-grid > label {
    min-width: 0;
}

.fg-passport-filter-grid label > span {
    margin-bottom: 8px;
    color: #365044;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .015em;
}

.fg-passport-filter-grid input.fg-control {
    min-height: 50px;
    border: 1px solid #d6e1d9;
    border-radius: 13px;
    color: #20352a;
    background: #fff;
    box-shadow: none;
    font-size: 13px;
}

.fg-passport-filter-grid input.fg-control:focus {
    border-color: #55a779;
    box-shadow: 0 0 0 3px rgba(31,138,80,.09);
}

/* Keep the native select in the form for submission/accessibility, but replace its visual UI. */
.fg-select-native {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    clip-path: inset(50%) !important;
    border: 0 !important;
    white-space: nowrap !important;
}

.fg-select {
    position: relative;
    width: 100%;
}

.fg-select__trigger {
    display: grid;
    width: 100%;
    min-height: 50px;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 11px 14px 11px 15px;
    border: 1px solid #d6e1d9;
    border-radius: 13px;
    color: #20352a;
    background: #fff;
    font: inherit;
    font-size: 13px;
    text-align: left;
    cursor: pointer;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.fg-select__trigger:hover {
    border-color: #b5cabd;
    background: #fcfefc;
}

.fg-select__trigger:focus-visible,
.fg-select.is-open .fg-select__trigger {
    border-color: #4c9d70;
    outline: 0;
    box-shadow: 0 0 0 3px rgba(31,138,80,.11);
}

.fg-select__trigger-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fg-select__chevron {
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
    border-radius: 7px;
    color: #527063;
    background: #f2f7f3;
    font-size: 10px;
    transition: transform .18s ease, background .18s ease;
}

.fg-select.is-open .fg-select__chevron {
    transform: rotate(180deg);
    background: #e5f4e9;
}

.fg-select__menu {
    position: absolute;
    z-index: 400;
    top: calc(100% + 7px);
    right: 0;
    left: 0;
    max-height: 270px;
    padding: 6px;
    overflow-y: auto;
    border: 1px solid #d5e2d9;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 18px 45px rgba(8,45,29,.14);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-5px);
    transition: opacity .15s ease, transform .15s ease, visibility .15s ease;
    scrollbar-width: thin;
    scrollbar-color: #a9c6b4 transparent;
}

.fg-select.is-open .fg-select__menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.fg-select__option {
    display: grid;
    width: 100%;
    min-height: 42px;
    grid-template-columns: minmax(0, 1fr) 20px;
    align-items: center;
    gap: 10px;
    padding: 9px 11px;
    border: 0;
    border-radius: 9px;
    color: #2a4035;
    background: transparent;
    font: inherit;
    font-size: 12px;
    text-align: left;
    cursor: pointer;
}

.fg-select__option:hover,
.fg-select__option:focus-visible {
    outline: 0;
    color: #0d5635;
    background: #f0f8f2;
}

.fg-select__option.is-selected {
    color: #0c5836;
    background: #e8f6ec;
    font-weight: 800;
}

.fg-select__option i {
    justify-self: end;
    color: #198353;
    opacity: 0;
}

.fg-select__option.is-selected i {
    opacity: 1;
}

.fg-select.is-disabled .fg-select__trigger {
    color: #9aa49e;
    border-color: #e2e7e3;
    background: #f6f8f6;
    cursor: not-allowed;
}

.fg-passport-filter-panel__actions {
    min-height: 100%;
    padding-top: 18px;
}

.fg-passport-filter-panel__actions .fg-btn {
    min-height: 50px;
    justify-content: center;
}

@media (max-width: 1199.98px) {
    .fg-passport-filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .fg-passport-filter-panel__search {
        grid-template-columns: 1fr;
        padding: 16px;
    }

    .fg-passport-filter-panel__search > i {
        top: 41px;
    }

    .fg-passport-filter-panel__search .fg-btn {
        width: 100%;
    }

    .fg-passport-filter-toolbar {
        align-items: flex-start;
        padding: 13px 16px;
    }

    .fg-passport-filter-toolbar__title small {
        display: none;
    }

    .fg-passport-filter-toolbar__actions {
        margin-left: auto;
    }

    .fg-passport-filter-count {
        display: none;
    }

    .fg-passport-filter-toggle {
        min-height: 36px;
        padding-inline: 12px;
    }

    .fg-passport-filter-collapse {
        padding: 16px;
    }

    .fg-passport-filter-grid {
        grid-template-columns: 1fr;
        gap: 13px;
    }

    .fg-passport-filter-panel__actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        padding-top: 4px;
    }

    .fg-select__menu {
        max-height: 230px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .fg-select__menu,
    .fg-select__chevron,
    .fg-passport-filter-toggle i {
        transition: none !important;
    }
}
