/* FilterRocket front end. Uses the theme's fonts and colours where it can. */
.frkt-filters {
	--frkt-accent: var(--wp--preset--color--primary, #266433);
	--frkt-line: rgba(0, 0, 0, 0.12);
	--frkt-muted: rgba(0, 0, 0, 0.55);
	font-size: 0.95em;
}
.frkt-filters .screen-reader-text,
.frkt-search .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}
.frkt-toggle { display: none; }
.frkt-el { border-bottom: 1px solid var(--frkt-line); padding: 0.75em 0; }
.frkt-el__title {
	display: flex;
	width: 100%;
	justify-content: space-between;
	align-items: center;
	margin: 0 0 0.5em;
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	font-weight: 600;
	text-align: left;
	cursor: default;
}
button.frkt-el__title { cursor: pointer; }
button.frkt-el__title::after { content: "–"; font-weight: 400; opacity: 0.6; }
.frkt-el.is-collapsed button.frkt-el__title::after { content: "+"; }
.frkt-el.is-collapsed .frkt-el__body { display: none; }
.frkt-el.is-collapsed .frkt-el__title { margin-bottom: 0; }

.frkt-list { list-style: none; margin: 0; padding: 0; }
.frkt-item { margin: 0.2em 0; padding-left: calc(var(--frkt-depth, 0) * 1em); }
.frkt-item.is-more { display: none; }
.frkt-el.is-expanded .frkt-item.is-more { display: block; }
.frkt-list--box .frkt-item.is-more,
.frkt-list--color .frkt-item.is-more,
.frkt-list--image .frkt-item.is-more { display: none; }
.frkt-el.is-expanded .frkt-list--box .frkt-item.is-more,
.frkt-el.is-expanded .frkt-list--color .frkt-item.is-more,
.frkt-el.is-expanded .frkt-list--image .frkt-item.is-more { display: inline-block; }
.frkt-item.is-empty { opacity: 0.5; }
.frkt-opt { display: inline-flex; align-items: center; gap: 0.45em; cursor: pointer; line-height: 1.4; }
.frkt-opt input { margin: 0; accent-color: var(--frkt-accent); }
.frkt-count { color: var(--frkt-muted); font-size: 0.9em; }
.frkt-link { text-decoration: none; }
.frkt-link[aria-current] { font-weight: 600; color: var(--frkt-accent); }
.frkt-stars { color: #e0a800; letter-spacing: 1px; }
.frkt-more { margin-top: 0.4em; padding: 0; border: 0; background: none; color: var(--frkt-accent); font: inherit; font-size: 0.9em; cursor: pointer; text-decoration: underline; }
.frkt-select { width: 100%; }

/* Box, colour and image lists */
.frkt-list--box,
.frkt-list--color,
.frkt-list--image { display: flex; flex-wrap: wrap; gap: 0.4em; }
.frkt-list--box .frkt-item,
.frkt-list--color .frkt-item,
.frkt-list--image .frkt-item { margin: 0; padding: 0; }
.frkt-list--box input,
.frkt-list--color input,
.frkt-list--image input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.frkt-list--box .frkt-opt {
	padding: 0.3em 0.7em;
	border: 1px solid var(--frkt-line);
	border-radius: 4px;
	background: #fff;
}
.frkt-list--box .is-selected .frkt-opt { border-color: var(--frkt-accent); background: var(--frkt-accent); color: #fff; }
.frkt-list--box .is-selected .frkt-count { color: inherit; }
.frkt-swatch {
	display: block;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	border: 1px solid var(--frkt-line);
	box-shadow: inset 0 0 0 2px #fff;
	object-fit: cover;
}
.frkt-swatch--img { border-radius: 6px; width: 40px; height: 40px; }
.frkt-swatch--blank { background: repeating-linear-gradient(45deg, #eee, #eee 4px, #fff 4px, #fff 8px); }
.frkt-list--color .is-selected .frkt-swatch,
.frkt-list--image .is-selected .frkt-swatch { outline: 2px solid var(--frkt-accent); outline-offset: 2px; }
.frkt-list--box input:focus-visible + span,
.frkt-list--color input:focus-visible + .frkt-swatch,
.frkt-list--image input:focus-visible + .frkt-swatch { outline: 2px dashed var(--frkt-accent); outline-offset: 2px; }

/* Price */
.frkt-range { position: relative; height: 28px; --frkt-a: 0%; --frkt-b: 100%; }
.frkt-range::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: 12px;
	height: 4px;
	border-radius: 2px;
	background: linear-gradient(to right, var(--frkt-line) var(--frkt-a), var(--frkt-accent) var(--frkt-a), var(--frkt-accent) var(--frkt-b), var(--frkt-line) var(--frkt-b));
}
.frkt-range input[type="range"] {
	position: absolute;
	left: 0;
	width: 100%;
	top: 4px;
	margin: 0;
	background: none;
	pointer-events: none;
	-webkit-appearance: none;
	appearance: none;
}
.frkt-range input[type="range"]::-webkit-slider-thumb {
	pointer-events: auto;
	-webkit-appearance: none;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #fff;
	border: 2px solid var(--frkt-accent);
	cursor: pointer;
}
.frkt-range input[type="range"]::-moz-range-thumb {
	pointer-events: auto;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: #fff;
	border: 2px solid var(--frkt-accent);
	cursor: pointer;
}
.frkt-range input[type="range"]::-webkit-slider-runnable-track { background: none; }
.frkt-range input[type="range"]::-moz-range-track { background: none; }
.frkt-price__boxes { display: flex; align-items: center; gap: 0.4em; margin-top: 0.4em; }
.frkt-price__boxes label { display: flex; align-items: center; gap: 0.2em; flex: 1; }
.frkt-price__boxes input { width: 100%; min-width: 0; padding: 0.25em 0.4em; }

.frkt-actions { display: flex; align-items: center; gap: 1em; padding-top: 0.75em; }
.frkt-actions:empty { display: none; }
.frkt-reset { font-size: 0.9em; }

/* Horizontal layout */
.frkt-layout-horizontal .frkt-form { display: flex; flex-wrap: wrap; gap: 0.75em 1.5em; align-items: flex-start; }
.frkt-layout-horizontal .frkt-el { border: 0; padding: 0; min-width: 160px; }

/* Active filters */
.frkt-active:empty { display: none; }
.frkt-active__title { font-weight: 600; margin-bottom: 0.4em; }
.frkt-chips { list-style: none; margin: 0 0 1em; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4em; }
.frkt-chip {
	display: inline-block;
	padding: 0.25em 0.7em;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.06);
	color: inherit;
	text-decoration: none;
	font-size: 0.9em;
}
.frkt-chip:hover { background: rgba(0, 0, 0, 0.12); }
.frkt-chip--clear { background: none; text-decoration: underline; }

/* Loading */
.frkt-results { transition: opacity 0.15s; }
.frkt-results[aria-busy="true"] { opacity: 0.45; pointer-events: none; }
.frkt-loading .frkt-filters { cursor: progress; }
.frkt-corrected { margin-bottom: 1em; }

/* Phones: panel behind a button */
@media (max-width: 768px) {
	.frkt-mobile-toggle .frkt-toggle {
		display: block;
		width: 100%;
		padding: 0.7em 1em;
		border: 1px solid var(--frkt-line);
		border-radius: 4px;
		background: #fff;
		color: inherit;
		font: inherit;
		font-weight: 600;
		cursor: pointer;
	}
	.frkt-mobile-toggle .frkt-form { display: none; }
	.frkt-mobile-toggle.is-open .frkt-form { display: block; }
	.frkt-layout-horizontal.frkt-mobile-toggle.is-open .frkt-form { display: flex; }
}

/* Product search box and suggestions */
.frkt-search { display: flex; gap: 0.4em; position: relative; }
.frkt-search__input { flex: 1; min-width: 0; }
.frkt-suggest {
	position: absolute;
	z-index: 99999;
	top: 100%;
	left: 0;
	right: 0;
	min-width: 280px;
	margin-top: 4px;
	background: #fff;
	color: #222;
	border: 1px solid rgba(0, 0, 0, 0.15);
	border-radius: 6px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
	overflow: hidden;
	text-align: left;
	font-size: 15px;
	line-height: 1.35;
}
.frkt-suggest[hidden] { display: none; }
.frkt-suggest__item {
	display: grid;
	grid-template-columns: 44px 1fr auto;
	gap: 0.7em;
	align-items: center;
	padding: 0.5em 0.75em;
	color: inherit;
	text-decoration: none;
}
.frkt-suggest__item img { width: 44px; height: 44px; object-fit: cover; border-radius: 4px; }
.frkt-suggest__item:hover,
.frkt-suggest__item.is-active { background: #f3f5f3; }
.frkt-suggest__price { font-weight: 600; white-space: nowrap; }
.frkt-suggest__all { display: block; padding: 0.6em 0.75em; border-top: 1px solid #eee; font-weight: 600; text-decoration: none; }
.frkt-suggest__note,
.frkt-suggest__empty { padding: 0.6em 0.75em; color: #666; }
.frkt-admin-note { padding: 0.5em; border: 1px dashed #c00; color: #c00; }

/* Themes style every <button> (borders, colours, padding). FilterRocket's own
   buttons are text controls, so reset them with enough specificity to win. */
.frkt-filters .frkt-toggle { display: none; }
.frkt-filters button.frkt-el__title,
.frkt-filters button.frkt-el__title:hover,
.frkt-filters button.frkt-el__title:focus,
.frkt-filters button.frkt-more,
.frkt-filters button.frkt-more:hover,
.frkt-filters button.frkt-more:focus {
	display: flex;
	width: 100%;
	min-height: 0;
	margin: 0 0 0.5em;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
	color: inherit;
	font: inherit;
	font-weight: 600;
	line-height: 1.4;
	letter-spacing: normal;
	text-transform: none;
	text-align: left;
}
.frkt-filters button.frkt-more,
.frkt-filters button.frkt-more:hover,
.frkt-filters button.frkt-more:focus {
	display: inline-block;
	width: auto;
	margin: 0.4em 0 0;
	font-weight: 400;
	font-size: 0.9em;
	color: var(--frkt-accent);
	text-decoration: underline;
}
.frkt-filters button.frkt-el__title:focus-visible,
.frkt-filters button.frkt-more:focus-visible { outline: 2px solid var(--frkt-accent); outline-offset: 2px; }
.frkt-el.is-collapsed .frkt-filters button.frkt-el__title,
.frkt-filters .frkt-el.is-collapsed button.frkt-el__title { margin-bottom: 0; }
@media (max-width: 768px) {
	.frkt-filters.frkt-mobile-toggle .frkt-toggle,
	.frkt-filters.frkt-mobile-toggle .frkt-toggle:hover,
	.frkt-filters.frkt-mobile-toggle .frkt-toggle:focus {
		display: block;
		width: 100%;
		margin: 0 0 0.75em;
		padding: 0.7em 1em;
		border: 1px solid var(--frkt-line);
		border-radius: 4px;
		background: #fff;
		color: inherit;
		font: inherit;
		font-weight: 600;
		text-transform: none;
	}
}
