/* Shared styles for the supported listing archives; pager selectors are route-agnostic. */
#main #pgr-housing-map-stubs[hidden] {
	display: none !important;
}

#main .facetwp-pager[aria-label="Pagination des annonces"] .facetwp-page:focus-visible,
#main .facetwp-pager[aria-label="Pagination des hebergements"] .facetwp-page:focus-visible {
	outline: 3px solid #244638;
	outline-offset: 3px;
	border-radius: 3px;
}

/* Keep the shared FacetWP pager centered, including on flex-based archives. */
#main .facetwp-pager {
	display: flex;
	flex: 0 0 calc(100% - 60px);
	width: calc(100% - 60px);
	max-width: 100%;
	box-sizing: border-box;
	justify-content: center;
}

/* Hide zero-result cuisine choices without changing FacetWP's filter data. */
body.perigord-restaurants-archive .job_filters .facetwp-facet-type_de_cuisine > .facetwp-checkbox.disabled {
	display: none !important;
}

/* Match the inline Restaurants filter toggle to the search button height. */
body.perigord-restaurants-archive .toggle-hidden-facets.js-toggle-hidden-facets {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	min-height: 52px;
	margin-top: 0;
	margin-bottom: 0;
}

@media (max-width: 767px) {
	body.perigord-restaurants-archive .toggle-hidden-facets.js-toggle-hidden-facets {
		display: none;
	}
}

/* Keep all six active cuisine choices visible without the FacetWP overflow links. */
body.perigord-restaurants-archive .job_filters .facetwp-facet-type_de_cuisine.facetwp-type-checkboxes {
	grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	gap: 6px 20px !important;
	align-items: center;
}

body.perigord-restaurants-archive .job_filters .facetwp-facet-type_de_cuisine.facetwp-type-checkboxes > .facetwp-filter-title {
	margin-bottom: 2px !important;
}

body.perigord-restaurants-archive .job_filters .facetwp-facet-type_de_cuisine.facetwp-type-checkboxes > .facet-wrapper,
body.perigord-restaurants-archive .job_filters .facetwp-facet-type_de_cuisine.facetwp-type-checkboxes .facetwp-overflow {
	display: contents !important;
}

body.perigord-restaurants-archive .job_filters .facetwp-facet-type_de_cuisine.facetwp-type-checkboxes .facetwp-overflow.facetwp-hidden > .facetwp-checkbox {
	display: block !important;
}

body.perigord-restaurants-archive .job_filters .facetwp-facet-type_de_cuisine.facetwp-type-checkboxes .facetwp-toggle {
	display: none !important;
}

body.perigord-restaurants-archive .job_filters .facetwp-facet-type_de_cuisine.facetwp-type-checkboxes .facetwp-checkbox {
	width: 100% !important;
	min-height: 28px;
	box-sizing: border-box;
	display: flex !important;
	align-items: center;
	gap: 4px;
	padding: 0 0 0 31px !important;
	border: 0 !important;
	border-radius: 0 !important;
	background-position: left center !important;
	line-height: 1.35;
	white-space: normal;
	word-break: normal;
	overflow-wrap: normal;
	hyphens: none;
}

body.perigord-restaurants-archive .job_filters .facetwp-facet-type_de_cuisine.facetwp-type-checkboxes > .facetwp-checkbox.disabled {
	display: none !important;
}

.job_filters .pgr-facet-apply-wrap .pgr-housing-reset {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 150px;
    min-height: 48px;
    padding: 12px 22px;
    border: 1px solid #bd654a;
    border-radius: 5px;
    background: #fff;
    color: #814c3a;
    font: inherit;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
}

.job_filters .pgr-facet-apply-wrap .pgr-housing-reset:hover {
    background: #fbf4f1;
}

.job_filters .pgr-facet-apply-wrap .pgr-housing-reset:focus-visible {
    outline: 3px solid #75402f;
    outline-offset: 3px;
}

@media (max-width: 767px) {
    .job_filters .pgr-facet-apply-wrap .pgr-housing-reset {
        width: 100%;
        max-width: 280px;
    }
}

@media (max-width: 359px) {
	body.perigord-restaurants-archive .job_filters .facetwp-facet-type_de_cuisine.facetwp-type-checkboxes {
		grid-template-columns: minmax(0, 1fr) !important;
	}
}

@media (min-width: 768px) {
	body.perigord-restaurants-archive .myflex__left.pgr-has-inline-apply {
		display: grid !important;
		grid-template-columns: minmax(0, 1fr) auto auto;
		column-gap: 12px;
		row-gap: 12px;
		align-items: center;
	}

	body.perigord-restaurants-archive .myflex__left.pgr-has-inline-apply > * {
		grid-column: 1 / -1;
	}

	body.perigord-restaurants-archive .myflex__left.pgr-has-inline-apply > .job_filters {
		grid-column: 1 / -1;
		grid-row: 2;
		min-width: 0;
		width: 100%;
	}

	body.perigord-restaurants-archive .myflex__left.pgr-has-inline-apply > .toggle-hidden-facets.js-toggle-hidden-facets {
		grid-column: 2;
		grid-row: 3;
		align-self: center;
		margin: 0 !important;
	}

	body.perigord-restaurants-archive .myflex__left.pgr-has-inline-apply > .pgr-facet-apply-wrap--inline {
		grid-column: 3;
		grid-row: 3;
		align-self: center;
		margin: 0 !important;
	}
}
