/**
 * Olaj Retro Filter - horizontális filter bar
 * Illeszkedik a jelenlegi minimál téma designjához: fehér háttér, piros accent.
 */

.olaj-retro-filter-bar {
	margin: 0 0 32px;
	padding: 16px 0;
	border-bottom: 1px solid #e5e5e5;
}

.olaj-retro-filter-bar__inner {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: center;
}

/* Filter group (dropdown) */
.olaj-retro-filter-group {
	position: relative;
}

.olaj-retro-filter-group__toggle {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 14px;
	background: #fff;
	border: 1px solid #d4d4d4;
	border-radius: 4px;
	font-size: 14px;
	font-weight: 500;
	color: white;
	cursor: pointer;
	transition: border-color 0.15s, box-shadow 0.15s;
}

.olaj-retro-filter-group__toggle:hover {
	border-color: #888;
}

.olaj-retro-filter-group.is-open .olaj-retro-filter-group__toggle,
.olaj-retro-filter-group__toggle:focus-visible {
	border-color: #d9202f;
	outline: none;
	box-shadow: 0 0 0 2px rgba(217, 32, 47, 0.15);
}

.olaj-retro-filter-group__label {
	white-space: nowrap;
}

.olaj-retro-filter-group__count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 20px;
	height: 20px;
	padding: 0 6px;
	background: #d9202f;
	color: #fff;
	border-radius: 10px;
	font-size: 11px;
	font-weight: 600;
	line-height: 1;
}

.olaj-retro-filter-group__count[hidden] {
	display: none;
}

.olaj-retro-filter-group__caret {
	width: 0;
	height: 0;
	border-left: 4px solid transparent;
	border-right: 4px solid transparent;
	border-top: 5px solid currentColor;
	transition: transform 0.15s;
}

.olaj-retro-filter-group.is-open .olaj-retro-filter-group__caret {
	transform: rotate(180deg);
}

/* Panel */
.olaj-retro-filter-group__panel {
	position: absolute;
	top: calc(100% + 6px);
	left: 0;
	z-index: 100;
	min-width: 220px;
	max-width: 320px;
	max-height: 360px;
	overflow-y: auto;
	background: #fff;
	border: 1px solid #d4d4d4;
	border-radius: 4px;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.olaj-retro-filter-group__panel[hidden] {
	display: none;
}

.olaj-retro-filter-group__list {
	list-style: none;
	margin: 0;
	padding: 8px 0;
}

.olaj-retro-filter-group__list li {
	margin: 0;
	padding: 0;
}

/* Option */
.olaj-retro-filter-option {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 14px;
	cursor: pointer;
	font-size: 14px;
	color: #2a2a2a;
	transition: background 0.1s;
}

.olaj-retro-filter-option:hover {
	background: #f5f5f5;
}

.olaj-retro-filter-option input[type="checkbox"] {
	margin: 0;
	cursor: pointer;
	accent-color: #d9202f;
}

.olaj-retro-filter-option.is-checked {
	background: #fdf2f3;
	font-weight: 500;
}

.olaj-retro-filter-option__label {
	flex: 1;
}

/* Clear gomb */
.olaj-retro-filter-clear {
	margin-left: auto;
	padding: 8px 14px;
	background: transparent;
	border: 1px solid transparent;
	color: white;
	font-size: 13px;
	font-weight: 500;
	cursor: pointer;
	text-decoration: underline;
	transition: color 0.15s;
}

.olaj-retro-filter-clear:hover {
	color: #a81822;
}

.olaj-retro-filter-clear[hidden] {
	display: none;
}

/* Loading */
.olaj-retro-loading {
	position: relative;
	opacity: 0.5;
	pointer-events: none;
	transition: opacity 0.2s;
}

.olaj-retro-loading::after {
	content: '';
	position: absolute;
	top: 40px;
	left: 50%;
	width: 36px;
	height: 36px;
	margin-left: -18px;
	border: 3px solid #e5e5e5;
	border-top-color: #d9202f;
	border-radius: 50%;
	animation: olaj-retro-spin 0.8s linear infinite;
}

@keyframes olaj-retro-spin {
	to { transform: rotate(360deg); }
}

/* No results */
.olaj-retro-no-results {
	padding: 48px 16px;
	text-align: center;
	color: #666;
	font-size: 15px;
}

/* Pagination (AJAX által beillesztve) */
.olaj-retro-pagination {
	margin: 32px 0 16px;
	display: flex;
	justify-content: center;
}

.olaj-retro-pagination .page-numbers {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin: 0;
	padding: 0;
}

.olaj-retro-pagination .page-numbers li {
	margin: 0;
}

.olaj-retro-pagination a.page-numbers,
.olaj-retro-pagination span.page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 36px;
	height: 36px;
	padding: 0 10px;
	background: #fff;
	border: 1px solid #d4d4d4;
	border-radius: 4px;
	font-size: 14px;
	color: #2a2a2a;
	text-decoration: none;
	transition: border-color 0.15s, background 0.15s;
}

.olaj-retro-pagination a.page-numbers:hover {
	border-color: #d9202f;
	color: #d9202f;
}

.olaj-retro-pagination span.page-numbers.current {
	background: #d9202f;
	border-color: #d9202f;
	color: #fff;
	font-weight: 600;
}

.olaj-retro-pagination span.page-numbers.dots {
	border-color: transparent;
	background: transparent;
}

/* Mobil */
@media (max-width: 640px) {
	.olaj-retro-filter-bar__inner {
		gap: 8px;
	}

	.olaj-retro-filter-group__toggle {
		padding: 8px 12px;
		font-size: 13px;
	}

	.olaj-retro-filter-group__panel {
		min-width: 200px;
		max-width: calc(100vw - 32px);
	}

	.olaj-retro-filter-clear {
		width: 100%;
		margin-left: 0;
		margin-top: 4px;
		text-align: left;
	}
}
