/* Camper Filter 3.0 */
.cf-filter-wrap {
	--cf-primary: #1a53d3;
	--cf-primary-soft: #e8eefc;
	--cf-text: #1c1f24;
	--cf-muted: #6b7580;
	--cf-border: #dfe3ea;
	--cf-bg: #ffffff;
	--cf-input-bg: #f8f9fb;
	--cf-radius: 10px;
	color: var(--cf-text);
	font-size: 14px;
}

.cf-filter {
	display: flex;
	flex-direction: column;
	gap: 4px;
	margin: 0;
	transition: opacity .2s;
}

.cf-filter.cf-loading .cf-total { opacity: .5; }

/* Kopf */
.cf-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.cf-total { margin: 0 0 4px; font-size: 15px; }
.cf-total strong { font-size: 20px; color: var(--cf-primary); }

/* Aktive Filter */
.cf-chips-list { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.cf-chips-list li { margin: 0; }
.cf-chip {
	display: inline-flex; align-items: center; gap: 6px;
	padding: 4px 10px; border-radius: 999px;
	background: var(--cf-primary-soft); color: var(--cf-primary);
	font-size: 13px; line-height: 1.4; text-decoration: none;
}
.cf-chip span { font-size: 15px; line-height: 1; }
.cf-chip:hover { background: var(--cf-primary); color: #fff; }
.cf-reset { display: inline-block; padding: 4px 2px; font-size: 13px; color: var(--cf-muted); text-decoration: underline; }

/* Gruppen */
.cf-group { margin-top: 10px; }
.cf-group-title {
	margin: 0; padding: 10px 0 4px;
	font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
	color: var(--cf-muted); border-top: 2px solid var(--cf-border);
}

/* Einzelner Filter */
.cf-facet { border-bottom: 1px solid var(--cf-border); padding: 0; margin: 0; }
.cf-facet-sort { padding: 6px 0 10px; }
.cf-facet-title {
	display: flex; align-items: center; justify-content: space-between; gap: 8px;
	padding: 10px 0; margin: 0;
	font-weight: 700; font-size: 14px; cursor: pointer; list-style: none;
	text-transform: none; letter-spacing: 0;
}
.cf-facet-sort .cf-facet-title { cursor: default; padding: 0 0 6px; }
.cf-facet-title::-webkit-details-marker { display: none; }
summary.cf-facet-title::after {
	content: ""; width: 8px; height: 8px; margin-left: auto;
	border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
	transform: rotate(45deg); transition: transform .2s; opacity: .6;
}
details[open] > summary.cf-facet-title::after { transform: rotate(-135deg); }
.cf-facet-body { padding: 0 0 12px; }

.cf-badge {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
	background: var(--cf-primary); color: #fff; font-size: 12px; font-weight: 700; line-height: 1;
}
.cf-badge[hidden] { display: none; }

/* Checkbox-Optionen */
.cf-options { list-style: none; margin: 0; padding: 0; }
.cf-options li { margin: 0; }
.cf-opt {
	display: flex; align-items: center; gap: 8px;
	padding: 5px 0; margin: 0; cursor: pointer;
	font-weight: 400; font-size: 14px; text-transform: none; letter-spacing: 0;
}
.cf-opt input { margin: 0; width: 18px; height: 18px; flex: 0 0 18px; accent-color: var(--cf-primary); }
.cf-opt-label { flex: 1; }
.cf-num { color: var(--cf-muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.cf-opt.is-empty { opacity: .45; cursor: default; }
.cf-js .cf-options:not(.is-expanded) .cf-more-item { display: none; }
.cf-more {
	margin: 4px 0 0; padding: 0; border: 0; background: none;
	color: var(--cf-primary); font-size: 13px; font-weight: 600; text-transform: none; letter-spacing: 0;
	min-height: 0; line-height: 1.6; cursor: pointer;
}
.cf-more:hover { text-decoration: underline; }

/* Auswahlfelder */
.cf-select {
	width: 100%; margin: 0; height: 40px; padding: 0 10px;
	border: 1px solid var(--cf-border); border-radius: 8px;
	background-color: var(--cf-input-bg); font-size: 14px; color: var(--cf-text);
	box-shadow: none;
}
.cf-select:focus { border-color: var(--cf-primary); outline: none; box-shadow: 0 0 0 3px var(--cf-primary-soft); }
.cf-range { display: flex; align-items: center; gap: 6px; }
.cf-range .cf-select { flex: 1; min-width: 0; }
.cf-range-sep { color: var(--cf-muted); }

/* Absenden (ohne JS bzw. im mobilen Panel) */
.cf-actions { padding-top: 12px; }
.cf-submit { width: 100%; margin: 0; border-radius: 8px; }
.cf-js.cf-live .cf-actions { display: none; }
.cf-drawer .cf-js.cf-live .cf-actions {
	display: block; position: sticky; bottom: 0;
	padding: 12px 0 calc(12px + env(safe-area-inset-bottom));
	background: var(--cf-bg);
}

/* Im Off-Canvas des Themes (Flatsome „Filter“-Button) */
.mfp-content .cf-js.cf-live.cf-in-offcanvas .cf-actions {
	display: block; position: sticky; bottom: 0;
	padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
	background: transparent;
}
.mfp-content .cf-in-offcanvas .cf-submit { box-shadow: 0 4px 14px rgba(0, 0, 0, .2); }
.cf-theme-badge { margin-left: 6px; vertical-align: middle; background: #1a53d3; color: #fff; }

/* Ergebnisse */
.cf-results { position: relative; transition: opacity .2s; }
.cf-results.cf-loading { opacity: .45; pointer-events: none; }
.cf-results.cf-loading::after {
	content: ""; position: absolute; top: 80px; left: 50%;
	width: 36px; height: 36px; margin-left: -18px;
	border: 3px solid var(--cf-border, #dfe3ea); border-top-color: #1a53d3; border-radius: 50%;
	animation: cf-spin .7s linear infinite;
}
@keyframes cf-spin { to { transform: rotate(360deg); } }
.cf-no-results .cf-reset { margin-left: 6px; }

/* Mobile */
.cf-mobile-bar { display: none; }
@media (max-width: 849px) {
	.cf-mobile-bar { display: block; margin: 0 0 15px; }
	.cf-mobile-toggle {
		display: inline-flex !important; align-items: center; gap: 8px;
		margin: 0; border-radius: 8px;
	}
	.cf-mobile-toggle[hidden] { display: none !important; }
	.cf-mobile-toggle .cf-badge { background: #fff; color: #1a53d3; }
}

.cf-drawer[hidden] { display: none; }
.cf-drawer { position: fixed; inset: 0; z-index: 100000; }
.cf-drawer-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .45); }
.cf-drawer-panel {
	position: absolute; top: 0; bottom: 0; left: 0;
	width: min(420px, 92vw); background: #fff;
	display: flex; flex-direction: column;
	box-shadow: 0 0 30px rgba(0, 0, 0, .25);
	animation: cf-slide .2s ease-out;
}
@keyframes cf-slide { from { transform: translateX(-100%); } to { transform: none; } }
.cf-drawer-head {
	display: flex; align-items: center; justify-content: space-between;
	padding: 12px 16px; border-bottom: 1px solid #dfe3ea; font-size: 16px;
}
.cf-drawer-close {
	margin: 0; padding: 0 8px; min-height: 0; border: 0; background: none;
	font-size: 28px; line-height: 1; cursor: pointer; color: inherit;
}
.cf-drawer-body { flex: 1; overflow-y: auto; padding: 8px 16px 0; -webkit-overflow-scrolling: touch; }
html.cf-drawer-open, html.cf-drawer-open body { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
	.cf-drawer-panel, .cf-results.cf-loading::after { animation: none; }
}
