/* Enjoyroll Szűrő – frontend stílusok */
:root {
	--erf-accent: #028c00;
	--erf-ink: #173318;
	--erf-muted: #5b6f5d;
	--erf-line: #dfe9df;
	--erf-soft: #f3f8f3;
	--erf-bg: #fff;
	--erf-radius: 12px;
	--erf-ease: cubic-bezier(.2, .8, .2, 1);
}

.erf-root, .erf-sheet { color: var(--erf-ink); font: inherit; }
.erf-root *, .erf-sheet *, .erf-root *::before, .erf-sheet *::before { box-sizing: border-box; }
.erf-sheet .screen-reader-text, .erf-root .screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}

/* Asztali nézet: ha a téma (pl. a korábbi annasta-beállítás miatt) elrejtette az oldalsávot,
   a szűrő számára visszakapcsoljuk, és visszaállítjuk a kéthasábos elrendezést. */
html:not(.erf-mobile) body .erf-sidebar-host { display: block !important; visibility: visible !important; }
html:not(.erf-mobile) body .erf-layout-host.er-shop-layout {
	display: grid !important; grid-template-columns: 270px minmax(0, 1fr) !important; gap: 34px;
}
html:not(.erf-mobile) body .erf-sidebar-host.er-shop-sidebar { position: static !important; transform: none !important; width: auto !important; box-shadow: none !important; }

/* A téma saját mobil szűrőgombjai helyett a sajátunkat használjuk */
.erf-hide-theme-ui .er-filter-open,
.erf-hide-theme-ui .er-filter-close,
.erf-hide-theme-ui .er-filter-backdrop { display: none !important; }
.erf-mobile .erf-hide-theme-ui .er-shop-sidebar:empty,
html.erf-mobile body.erf-hide-theme-ui .er-shop-sidebar { display: none !important; }

/* ---------- Mobil sáv ---------- */
.erf-bar, .erf-fab { display: none; }
html.erf-mobile .erf-root { display: contents; }
html.erf-mobile .erf-fab {
	position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 9990;
	display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 22px;
	border: 0; border-radius: 999px; background: var(--erf-ink); color: #fff;
	font: inherit; font-weight: 700; font-size: 15px; cursor: pointer;
	box-shadow: 0 8px 24px rgba(0, 0, 0, .28);
	transform: translate(-50%, 160%); transition: transform .28s var(--erf-ease);
}
html.erf-mobile .erf-fab.is-visible { transform: translate(-50%, 0); }
html.erf-mobile.erf-lock .erf-fab { transform: translate(-50%, 160%); }
.erf-fab .erf-badge { background: #fff; color: var(--erf-ink); }
html.erf-mobile .erf-bar {
	position: sticky; top: var(--erf-sticky-top, 0px); z-index: 50;
	display: flex; align-items: center; justify-content: space-between; gap: 12px;
	margin: 0 -16px 12px; padding: 10px 16px;
	background: var(--erf-bg);
	box-shadow: 0 1px 0 var(--erf-line), 0 6px 14px -10px rgba(0, 0, 0, .25);
}
.erf-bar__btn {
	display: inline-flex; align-items: center; gap: 8px;
	min-height: 44px; padding: 0 18px;
	border: 1.5px solid var(--erf-ink); border-radius: 999px;
	background: var(--erf-bg); color: var(--erf-ink);
	font: inherit; font-weight: 700; font-size: 15px; cursor: pointer;
}
.erf-bar__btn:active { transform: scale(.98); }
.erf-bar__count { color: var(--erf-muted); font-size: 14px; }
.erf-badge {
	display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px;
	border-radius: 999px; background: var(--erf-accent); color: #fff;
	font-size: 12px; font-weight: 700; line-height: 1;
}

/* ---------- Aktív szűrők ---------- */
.erf-active { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 16px; }
.erf-chip {
	display: inline-flex; align-items: center; gap: 8px;
	min-height: 34px; padding: 4px 8px 4px 14px;
	border-radius: 999px; background: var(--erf-soft); border: 1px solid var(--erf-line);
	color: var(--erf-ink) !important; text-decoration: none !important; font-size: 14px; line-height: 1.2;
	transition: background .15s, border-color .15s;
}
.erf-chip:hover { border-color: var(--erf-accent); background: #fff; }
.erf-chip__x {
	display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
	background: rgba(23, 51, 24, .08); font-size: 16px; line-height: 1;
}
.erf-clear { color: var(--erf-muted) !important; font-size: 14px; text-decoration: underline !important; padding: 6px 4px; }

/* ---------- Panel (asztali: oldalsáv) ---------- */
.erf-sheet { background: var(--erf-bg); }
.erf-sheet__head {
	display: flex; align-items: center; gap: 10px; padding: 0 0 12px;
	border-bottom: 1px solid var(--erf-line);
}
.erf-sheet__title { flex: 1; margin: 0; font-size: 18px; font-weight: 800; line-height: 1.2; display: flex; align-items: center; gap: 8px; color: var(--erf-ink); }
.erf-reset { font-size: 14px; color: var(--erf-accent) !important; font-weight: 600; text-decoration: none !important; }
.erf-reset:hover { text-decoration: underline !important; }
.erf-sheet__close { display: none; }
.erf-sheet__foot { display: none; }
.erf-empty { color: var(--erf-muted); font-size: 14px; margin: 16px 0 0; }

/* Kapcsolók */
.erf-toggles { display: grid; gap: 4px; padding: 12px 0; border-bottom: 1px solid var(--erf-line); }
.erf-switch { display: flex; align-items: center; gap: 12px; min-height: 40px; cursor: pointer; font-size: 15px; margin: 0; }
.erf-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.erf-switch__ui {
	position: relative; flex: 0 0 auto; width: 42px; height: 24px; border-radius: 999px;
	background: #cfd9cf; transition: background .2s var(--erf-ease);
}
.erf-switch__ui::after {
	content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%;
	background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s var(--erf-ease);
}
.erf-switch input:checked + .erf-switch__ui { background: var(--erf-accent); }
.erf-switch input:checked + .erf-switch__ui::after { transform: translateX(18px); }
.erf-switch input:focus-visible + .erf-switch__ui { outline: 2px solid var(--erf-accent); outline-offset: 2px; }
.erf-switch__label { flex: 1; }

/* Csoportok (lenyitható) */
.erf-group { border-bottom: 1px solid var(--erf-line); }
.erf-group > summary {
	display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 6px 0;
	cursor: pointer; list-style: none; font-weight: 700; font-size: 15px; user-select: none;
}
.erf-group > summary::-webkit-details-marker { display: none; }
.erf-group > summary:focus-visible { outline: 2px solid var(--erf-accent); outline-offset: 2px; border-radius: 6px; }
.erf-group__title { flex: 1; }
.erf-group__badge {
	display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px;
	border-radius: 999px; background: var(--erf-accent); color: #fff; font-size: 11px; font-weight: 700;
}
.erf-chev { flex: 0 0 auto; color: var(--erf-muted); transition: transform .2s var(--erf-ease); }
.erf-group[open] > summary .erf-chev { transform: rotate(180deg); }
.erf-group__body { padding: 0 0 16px; }

/* Lista */
.erf-list, .erf-chips { list-style: none; margin: 0; padding: 0; }
.erf-list .erf-opt label {
	display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 2px 0; margin: 0;
	cursor: pointer; font-size: 14.5px; color: var(--erf-ink);
}
.erf-list .erf-opt input, .erf-chips .erf-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.erf-box {
	flex: 0 0 auto; width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid #a8b8a9;
	background: #fff; display: grid; place-items: center; transition: background .15s, border-color .15s;
}
.erf-box::after {
	content: ""; width: 10px; height: 6px; margin-top: -2px;
	border-left: 2.4px solid #fff; border-bottom: 2.4px solid #fff; transform: rotate(-45deg) scale(0);
	transition: transform .15s var(--erf-ease);
}
.erf-list input:checked + .erf-box { background: var(--erf-accent); border-color: var(--erf-accent); }
.erf-list input:checked + .erf-box::after { transform: rotate(-45deg) scale(1); }
.erf-list input:focus-visible + .erf-box { outline: 2px solid var(--erf-accent); outline-offset: 2px; }
.erf-list .erf-opt label:hover .erf-box { border-color: var(--erf-accent); }
.erf-opt__label { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.erf-opt__count { color: var(--erf-muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.erf-opt.is-zero { opacity: .5; }
.erf-opt.is-more, .erf-opt.is-filtered { display: none !important; }
.erf-group.show-more .erf-opt.is-more:not(.is-filtered) { display: block !important; }
.erf-chips.erf-chips .erf-opt.is-more { display: none; }
.erf-group.show-more .erf-chips .erf-opt.is-more:not(.is-filtered) { display: inline-flex !important; }

/* Chipek */
.erf-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.erf-chips .erf-opt { display: inline-flex; }
.erf-chips .erf-opt label {
	display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 6px 14px; margin: 0;
	border: 1.5px solid var(--erf-line); border-radius: 999px; background: #fff;
	cursor: pointer; font-size: 14px; font-weight: 600; line-height: 1.1; color: var(--erf-ink);
	transition: border-color .15s, background .15s, color .15s;
}
.erf-chips .erf-opt label:hover { border-color: var(--erf-accent); }
.erf-chips .erf-opt input:checked ~ .erf-opt__label { color: #fff; }
.erf-chips .erf-opt label:has(input:checked) { background: var(--erf-accent); border-color: var(--erf-accent); color: #fff; }
.erf-chips .erf-opt label:has(input:checked) .erf-opt__count { color: rgba(255, 255, 255, .85); }
.erf-chips .erf-opt label:has(input:focus-visible) { outline: 2px solid var(--erf-accent); outline-offset: 2px; }
.erf-chips .erf-opt__label { flex: 0 1 auto; }
.erf-chips .erf-opt__count { font-weight: 500; font-size: 12px; }

.erf-search { margin: 0 0 10px; }
.erf-search input {
	width: 100%; height: 40px; padding: 0 12px; border: 1.5px solid var(--erf-line); border-radius: 10px;
	font: inherit; font-size: 16px; background: #fff; color: var(--erf-ink);
}
.erf-search input:focus { outline: none; border-color: var(--erf-accent); }
.erf-more {
	margin: 8px 0 0; padding: 6px 0; border: 0; background: none; cursor: pointer;
	color: var(--erf-accent); font: inherit; font-size: 14px; font-weight: 700;
}
.erf-more:hover { text-decoration: underline; }

/* ---------- Tartomány csúszka ---------- */
.erf-range { padding: 0 2px; }
.erf-range__val { margin: 0 0 8px; font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--erf-ink); }
.erf-hist { display: flex; align-items: flex-end; gap: 2px; height: 36px; margin: 0 10px; }
.erf-hist i { flex: 1; min-height: 0; border-radius: 3px 3px 0 0; background: #dbe6db; transition: background .15s; }
.erf-hist i.is-in { background: color-mix(in srgb, var(--erf-accent) 45%, #fff); }
.erf-slider { position: relative; height: 32px; margin: -4px 0 8px; }
.erf-slider__track { position: absolute; left: 10px; right: 10px; top: 14px; height: 4px; border-radius: 4px; background: #dbe6db; }
.erf-slider__fill { position: absolute; top: 0; bottom: 0; border-radius: 4px; background: var(--erf-accent); }
.erf-slider input[type=range] {
	position: absolute; left: 0; top: 0; width: 100%; height: 32px; margin: 0; padding: 0;
	background: none; pointer-events: none; -webkit-appearance: none; appearance: none; outline: none;
}
.erf-slider input[type=range]::-webkit-slider-runnable-track { background: none; border: 0; height: 32px; }
.erf-slider input[type=range]::-moz-range-track { background: none; border: 0; }
.erf-slider input[type=range]::-webkit-slider-thumb {
	-webkit-appearance: none; pointer-events: auto; width: 26px; height: 26px; margin-top: 3px; border-radius: 50%;
	background: #fff; border: 2.5px solid var(--erf-accent); box-shadow: 0 2px 6px rgba(0, 0, 0, .18); cursor: grab;
}
.erf-slider input[type=range]::-moz-range-thumb {
	pointer-events: auto; width: 21px; height: 21px; border-radius: 50%;
	background: #fff; border: 2.5px solid var(--erf-accent); box-shadow: 0 2px 6px rgba(0, 0, 0, .18); cursor: grab;
}
.erf-slider input[type=range]:active::-webkit-slider-thumb { cursor: grabbing; transform: scale(1.1); }
.erf-slider input[type=range]:focus-visible::-webkit-slider-thumb { outline: 3px solid color-mix(in srgb, var(--erf-accent) 35%, transparent); }
.erf-range__inputs { display: flex; align-items: center; gap: 6px; }
.erf-range__dash { color: var(--erf-muted); }
.erf-num {
	position: relative; flex: 1; display: flex; align-items: center; margin: 0;
	border: 1.5px solid var(--erf-line); border-radius: 10px; background: #fff; overflow: hidden;
}
.erf-num:focus-within { border-color: var(--erf-accent); }
.erf-num input {
	width: 100%; min-width: 0; height: 40px; padding: 0 2px 0 9px; border: 0 !important; background: none;
	font: inherit; font-size: 16px; font-variant-numeric: tabular-nums; color: var(--erf-ink); box-shadow: none !important;
	-moz-appearance: textfield;
}
.erf-num input::-webkit-outer-spin-button, .erf-num input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.erf-num input:focus { outline: none; }
.erf-num em { padding: 0 8px 0 0; font-style: normal; font-size: 13px; color: var(--erf-muted); white-space: nowrap; }

/* ---------- Gombok ---------- */
.erf-btn {
	display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 18px;
	border-radius: 12px; font: inherit; font-weight: 700; font-size: 15px; cursor: pointer; text-decoration: none !important;
	border: 1.5px solid transparent; transition: background .15s, opacity .15s;
}
.erf-btn--primary { background: var(--erf-accent); color: #fff !important; flex: 1; }
.erf-btn--primary:disabled { opacity: .5; cursor: default; }
.erf-btn--ghost { background: #fff; color: var(--erf-ink) !important; border-color: var(--erf-line); }
.erf-noscript-submit { width: 100%; margin-top: 16px; }

/* ---------- Betöltés ---------- */
.erf-loading { display: none; }
.erf-busy .erf-loading {
	display: block; position: fixed; left: 0; right: 0; top: 0; z-index: 100000; height: 3px; overflow: hidden;
}
.erf-busy .erf-loading span {
	display: block; height: 100%; width: 40%; background: var(--erf-accent);
	animation: erf-bar 1s var(--erf-ease) infinite;
}
@keyframes erf-bar { from { transform: translateX(-100%); } to { transform: translateX(260%); } }
.erf-fading { opacity: .45; transition: opacity .2s; pointer-events: none; }

/* ---------- Mobil: alsó panel ---------- */
html.erf-mobile .erf-sheet {
	position: fixed; left: 0; right: 0; bottom: 0; z-index: 99999;
	display: flex; flex-direction: column;
	height: min(92dvh, 92vh); max-height: 92vh;
	border-radius: 20px 20px 0 0; box-shadow: 0 -12px 40px rgba(0, 0, 0, .22);
	transform: translateY(105%); visibility: hidden;
	transition: transform .32s var(--erf-ease), visibility 0s linear .32s;
}
html.erf-mobile .erf-sheet.is-open { transform: translateY(0); visibility: visible; transition: transform .32s var(--erf-ease), visibility 0s; }
html.erf-mobile .erf-sheet.is-dragging { transition: none; }
html.erf-mobile .erf-form { display: flex; flex-direction: column; height: 100%; min-height: 0; margin: 0; }
html.erf-mobile .erf-sheet__head {
	position: relative; flex: 0 0 auto; padding: 22px 16px 12px; touch-action: none;
}
html.erf-mobile .erf-sheet__head::before {
	content: ""; position: absolute; top: 8px; left: 50%; width: 40px; height: 5px; margin-left: -20px;
	border-radius: 999px; background: #d3ddd3;
}
html.erf-mobile .erf-sheet__close {
	display: grid; place-items: center; width: 40px; height: 40px; margin-right: -8px;
	border: 0; border-radius: 50%; background: var(--erf-soft); color: var(--erf-ink); cursor: pointer;
}
html.erf-mobile .erf-sheet__body { flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 0 16px 16px; }
html.erf-mobile .erf-sheet__foot {
	display: flex; gap: 10px; flex: 0 0 auto;
	padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
	border-top: 1px solid var(--erf-line); background: #fff;
}
html.erf-mobile .erf-backdrop:not([hidden]) {
	position: fixed; inset: 0; z-index: 99998; background: rgba(10, 30, 12, .5);
	animation: erf-fade .25s ease;
}
html.erf-mobile .erf-list .erf-opt label { min-height: 44px; font-size: 15.5px; }
html.erf-mobile .erf-chips .erf-opt label { min-height: 42px; }
html.erf-lock, html.erf-lock body { overflow: hidden !important; }
@keyframes erf-fade { from { opacity: 0; } }

/* Asztali nézetben a panel az oldalsávba kerül */
html:not(.erf-mobile) .erf-sheet--in-sidebar { margin: 0; }
html:not(.erf-mobile) .erf-root .erf-backdrop { display: none !important; }

@media (prefers-reduced-motion: reduce) {
	.erf-sheet, .erf-chev, .erf-switch__ui, .erf-switch__ui::after, .erf-box::after { transition: none !important; }
}

/* Keskeny oldalsávban a nagy számok (pl. 1 540 000 Ft) is férjenek ki */
.erf-sheet--in-sidebar .erf-num input { font-size: 14px; padding-left: 7px; }
.erf-sheet--in-sidebar .erf-num em { font-size: 12px; padding-right: 6px; }
