/* ============================================================
   MaskeZaTelefon — filteri na kategoriji (T-016, 24.10.2026., v1.2)
   ⛔ 25.10.2026.: ISTI fajl je i na MaskeZaMob (theme/, MZM WORKLOG 25.10.).
   Izvor: MaskeZaTelefon/tema-mzt/css/ — u temu ga ubacuje tools/mzt-boje.py.
   Laptop: jedan red — „Vrsta ▾" „Boja ▾" + izabrano „Crna ×".
   Telefon (≤849px): malo dugme „Filteri" pored sortiranja → panel odozdo.
   ============================================================ */

.mzt-filt {
	margin: 0 0 16px;
}

/* ── zajedničko: čip ─────────────────────────────────────── */
.mzt-filt__opcije,
.mzt-filt__pop {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.mzt-filt__cip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 34px;
	padding: 6px 12px;
	border: 1px solid var(--mzm-border, #e3e0f5);
	border-radius: 999px;
	background: #ffffff;
	color: var(--mzm-text-primary, #130a52);
	font-size: 13px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	white-space: nowrap;
}

.mzt-filt__cip:hover {
	border-color: var(--mzm-accent, #a313d1);
	color: var(--mzm-accent, #a313d1);
}

.mzt-filt__cip.is-aktivan {
	border-color: var(--mzm-accent, #a313d1);
	background: var(--mzm-accent, #a313d1);
	color: #ffffff;
}

.mzt-filt__n {
	font-weight: 500;
	opacity: 0.65;
}

.mzt-filt__tacka {
	display: inline-block;
	width: 14px;
	height: 14px;
	border: 1px solid rgba(0, 0, 0, 0.15);
	border-radius: 50%;
}

.mzt-filt__brojac {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	border-radius: 999px;
	background: var(--mzm-accent, #a313d1);
	color: #ffffff;
	font-size: 11px;
	font-weight: 700;
}

.mzt-filt__ponisti {
	font-size: 13px;
	font-weight: 600;
	color: var(--mzm-accent, #a313d1);
}

/* ── LAPTOP: traka ───────────────────────────────────────── */
.mzt-filt__traka {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

.mzt-filt__dd {
	position: relative;
}

.mzt-filt__dd > summary {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 38px;
	padding: 7px 14px;
	border: 1px solid var(--mzm-border, #e3e0f5);
	border-radius: 8px;
	background: #ffffff;
	color: var(--mzm-text-primary, #130a52);
	font-size: 14px;
	font-weight: 600;
	list-style: none;
	cursor: pointer;
	user-select: none;
}

.mzt-filt__dd > summary::-webkit-details-marker {
	display: none;
}

.mzt-filt__dd > summary:hover,
.mzt-filt__dd[open] > summary,
.mzt-filt__dd.is-aktivan > summary {
	border-color: var(--mzm-accent, #a313d1);
}

.mzt-filt__dd.is-aktivan > summary strong {
	color: var(--mzm-accent, #a313d1);
}

.mzt-filt__strelica {
	transition: transform 0.15s ease;
}

.mzt-filt__dd[open] .mzt-filt__strelica {
	transform: rotate(180deg);
}

.mzt-filt__pop {
	position: absolute;
	top: calc(100% + 6px);
	left: 0;
	z-index: 60;
	width: max-content;
	max-width: 560px;
	padding: 12px;
	border: 1px solid var(--mzm-border, #e3e0f5);
	border-radius: 12px;
	background: #ffffff;
	box-shadow: 0 12px 30px rgba(19, 10, 82, 0.14);
}

.mzt-filt__izabrano {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 30px;
	padding: 4px 10px;
	border-radius: 999px;
	background: var(--mzm-surface, #f6f5ff);
	color: var(--mzm-accent, #a313d1);
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
}

.mzt-filt__izabrano span {
	font-size: 16px;
	line-height: 1;
}

/* Telefonski delovi se na laptopu ne vide. */
.mzt-filt__otvori,
.mzt-filt__panel,
.mzt-filt__pozadina {
	display: none;
}

/* ── TELEFON ─────────────────────────────────────────────── */
@media (max-width: 849px) {
	.mzt-filt {
		margin: 0;
	}

	.mzt-filt__traka {
		display: none;
	}

	/* Red: sortiranje + Filteri (JS ih spaja). */
	/* Vera 16:41: dugme za nijansu manje — ista visina kao sortiranje (40px). */
	.mzt-filt__sort-red {
		display: flex;
		align-items: center;
		justify-content: center;
		gap: 8px;
		width: 100%;
		max-width: 420px;
		margin: 0 auto;
	}

	.mzt-filt__sort-red .woocommerce-ordering {
		flex: 1 1 auto;
		min-width: 0;
		margin: 0;
	}

	.mzt-filt__sort-red .woocommerce-ordering select {
		width: 100%;
		height: 40px;
		margin: 0;
	}

	.mzt-filt__otvori {
		display: inline-flex;
		flex: 0 0 auto;
		align-items: center;
		gap: 5px;
		height: 40px;
		min-height: 0;
		margin: 0;
		padding: 0 11px;
		border: 1px solid var(--mzm-border, #e3e0f5);
		border-radius: 8px;
		background: #ffffff;
		color: var(--mzm-text-primary, #130a52);
		font-family: inherit;
		font-size: 13px;
		font-weight: 600;
		line-height: 1;
		text-transform: none;
		letter-spacing: 0;
	}

	.mzt-filt__otvori.ima-izbor {
		border-color: var(--mzm-accent, #a313d1);
		color: var(--mzm-accent, #a313d1);
	}

	.mzt-filt__panel {
		display: flex;
		flex-direction: column;
		gap: 14px;
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 100000;
		max-height: 80vh;
		overflow-y: auto;
		padding: 0 16px;
		border-radius: 18px 18px 0 0;
		background: #ffffff;
		box-shadow: 0 -8px 30px rgba(19, 10, 82, 0.2);
		transform: translateY(105%);
		transition: transform 0.25s ease;
		visibility: hidden;
	}

	.mzt-filt-otvoren .mzt-filt__panel {
		transform: translateY(0);
		visibility: visible;
	}

	.mzt-filt__glava {
		position: sticky;
		top: 0;
		z-index: 1;
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 14px 0 4px;
		background: #ffffff;
		font-size: 17px;
	}

	.mzt-filt__zatvori {
		width: 36px;
		height: 36px;
		margin: 0;
		padding: 0;
		border: 0;
		background: transparent;
		font-size: 28px;
		line-height: 1;
		color: var(--mzm-text-primary, #130a52);
	}

	.mzt-filt__grupa {
		display: flex;
		flex-direction: column;
		gap: 8px;
	}

	.mzt-filt__naslov {
		font-size: 14px;
		font-weight: 700;
		color: var(--mzm-text-primary, #130a52);
	}

	/* Dno je zalepljeno za dno panela; ispod njega ništa ne proviruje. */
	.mzt-filt__dno {
		position: sticky;
		bottom: 0;
		z-index: 1;
		display: flex;
		align-items: center;
		gap: 12px;
		margin-top: 4px;
		padding: 12px 0 calc(14px + env(safe-area-inset-bottom, 0px));
		background: #ffffff;
		box-shadow: 0 -10px 12px -8px rgba(19, 10, 82, 0.12);
	}

	.mzt-filt__prikazi {
		display: block;
		flex: 1;
		min-height: 46px;
		margin: 0;
		border: 0;
		border-radius: 999px;
		background: var(--mzm-accent, #a313d1);
		color: #ffffff;
		font-family: inherit;
		font-size: 15px;
		font-weight: 700;
		text-transform: none;
		letter-spacing: 0;
	}

	.mzt-filt__pozadina:not([hidden]) {
		display: block;
		position: fixed;
		inset: 0;
		z-index: 99999;
		background: rgba(19, 10, 82, 0.45);
	}
}
