/**
 * Lofind Account Bridge 0.2.4 — Gigneo 0.1.3 directory filters.
 * Works with Service, Freelancer, Employer and Job archives, whether the
 * archive is a WordPress page or rendered via Elementor / a shortcode.
 * This stylesheet may be enqueued globally, but only styles Gigneo archive
 * components. No generic input, select, form, or WooCommerce rules.
 */

/* Contain all archive controls inside the actual width of the theme column. */
.gn-archive-filters-wrapper.gn-achive-filter-layout-1,
.gn-archive-filters-wrapper.gn-achive-filter-layout-1 .gn-archive-search-wrapper,
.gn-archive-filters-wrapper.gn-achive-filter-layout-1 .gn-archive-search-wrapper *,
.gn-archive-filters-wrapper.gn-achive-filter-layout-1 .gn-archive-filter-wrapper {
    box-sizing: border-box;
}
.gn-archive-filters-wrapper.gn-achive-filter-layout-1,
.gn-archive-filters-wrapper.gn-achive-filter-layout-1 form#gn-archive-filters-form,
.gn-archive-filters-wrapper.gn-achive-filter-layout-1 .gn-archive-search-wrapper {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

/* Gigneo 0.1.3 uses three identical direct fieldset children across archives.
   Woodmart's global form-field sizing pushes the Location control into Search.
   Grid makes field widths independent and stops the collision. */
.gn-archive-filters-wrapper.gn-achive-filter-layout-1 .gn-archive-search-wrapper > fieldset.gn-form-fields {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) max-content !important;
    align-items: end !important;
    gap: 16px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 0 !important;
}
.gn-archive-filters-wrapper.gn-achive-filter-layout-1 .gn-archive-search-wrapper > fieldset.gn-form-fields > .gn-form-field {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    flex: none !important;
    margin: 0 !important;
}
.gn-archive-filters-wrapper.gn-achive-filter-layout-1 .gn-archive-search-wrapper .gn-form-field > label {
    display: block;
    max-width: 100%;
    margin-bottom: 8px;
}
.gn-archive-filters-wrapper.gn-achive-filter-layout-1 .gn-archive-search-wrapper .gn-form-field .gn-search,
.gn-archive-filters-wrapper.gn-achive-filter-layout-1 .gn-archive-search-wrapper .gn-form-field .gn-select,
.gn-archive-filters-wrapper.gn-achive-filter-layout-1 .gn-archive-search-wrapper .gn-form-field .gn-map-address-wrapper {
    display: block;
    position: relative;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
}
.gn-archive-filters-wrapper.gn-achive-filter-layout-1 .gn-archive-search-wrapper .gn-form-field input[type="search"],
.gn-archive-filters-wrapper.gn-achive-filter-layout-1 .gn-archive-search-wrapper .gn-form-field input[type="text"],
.gn-archive-filters-wrapper.gn-achive-filter-layout-1 .gn-archive-search-wrapper .gn-form-field select {
    box-sizing: border-box;
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
}
/* Select2 writes widths in inline styles; the dropdown must obey its grid cell. */
.gn-archive-filters-wrapper.gn-achive-filter-layout-1 .gn-archive-search-wrapper .gn-select .select2-container,
.gn-archive-filters-wrapper.gn-achive-filter-layout-1 .gn-archive-search-wrapper .gn-select .gn-select2-dropdown.select2-container,
.gn-archive-filters-wrapper.gn-achive-filter-layout-1 .gn-archive-search-wrapper .gn-select .select2-selection {
    box-sizing: border-box;
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
}
.gn-archive-filters-wrapper.gn-achive-filter-layout-1 .gn-archive-search-wrapper > fieldset.gn-form-fields > button.gn-btn {
    box-sizing: border-box;
    align-self: end !important;
    justify-self: end;
    width: auto !important;
    flex: none !important;
    margin: 0 !important;
    white-space: nowrap;
}

/* Keep filter buttons and Clear/More controls in their own rows when needed. */
@media (min-width: 768px) {
    .gn-archive-filters-wrapper.gn-achive-filter-layout-1 .gn-archive-filters > .gn-body {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 10px 12px;
        min-width: 0;
        max-width: 100%;
    }
    .gn-archive-filters-wrapper.gn-achive-filter-layout-1 .gn-archive-filters .gn-filters-actions {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 10px;
        margin-left: auto;
        min-width: 0;
    }
}
@media (max-width: 1023px) {
    .gn-archive-filters-wrapper.gn-achive-filter-layout-1 .gn-archive-search-wrapper > fieldset.gn-form-fields {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
    .gn-archive-filters-wrapper.gn-achive-filter-layout-1 .gn-archive-search-wrapper > fieldset.gn-form-fields > button.gn-btn {
        grid-column: 1 / -1;
        justify-self: stretch;
        width: 100% !important;
    }
}
@media (max-width: 600px) {
    .gn-archive-filters-wrapper.gn-achive-filter-layout-1 .gn-archive-search-wrapper > fieldset.gn-form-fields {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 12px !important;
    }
    .gn-archive-filters-wrapper.gn-achive-filter-layout-1 .gn-archive-search-wrapper > fieldset.gn-form-fields > button.gn-btn {
        grid-column: auto;
    }
}
