/*
 * Job Filters widget: the panel that collapses behind a button on small screens.
 *
 * The widget's "Collapse into a button" control sets --smjf-filter-toggle-display and
 * --smjf-filter-panel-display per device. Both rules also need .smjf-filter-js, which
 * filter-toggle.js adds: without the script the button never shows and the form never
 * hides. The form's own layout and styling come from the widget's controls.
 */

/*
 * A widget in a centred flex container sizes to its content, which once collapsed is
 * just the button. Fill the container instead; Elementor's own width controls, scoped
 * to the element id, still override this.
 */
.elementor-widget-smjf_filter_form {
	width: 100%;
}

.smjf-filter__toggle {
	display: none;
}

.smjf-filter-js .smjf-filter > .smjf-filter__toggle {
	display: var(--smjf-filter-toggle-display, none);
	align-items: center;
	justify-content: center;
	gap: 0.5em;
	width: 100%;
	min-height: 44px;
	cursor: pointer;
}

.smjf-filter-js .smjf-filter:not(.is-open) > .smjf-filter__panel {
	display: var(--smjf-filter-panel-display, block);
}

.smjf-filter__toggle-icon {
	flex: none;
}

/* :where() so the UA [hidden] rule still hides a zero count. */
:where(.smjf-filter__count) {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 1.5em;
	height: 1.5em;
	padding: 0 0.4em;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.25);
	font-size: 0.8em;
	line-height: 1;
}

/* Comfortable tap targets; the widget's padding controls still apply on top. */
.smjf-filter .smjf-filter-form select,
.smjf-filter .smjf-filter-form button {
	min-height: 44px;
}
