/**
 * StatPro – samo ono što Elementor / Crocoblock nemaju kao podešavanje.
 *
 * Sve ostalo (boje, dugmad, tipografija, razmaci, kartice, brojke, šablon projekta…) podešava se u
 * Elementoru: Site Settings (Global Colors, Buttons) i Style tab pojedinačnih widgeta.
 *
 * Ovdje ostaje:
 *  - chips filter na stranici Projekti: jedan red sa horizontalnim skrolom + strelice
 *    (JetSmartFilters nema "slider" opciju; izgled samih chipsa je u Style tabu JSF widgeta)
 */

/* ---------- JetSmartFilters radio filter: jedan red, horizontalni skrol (CSS klasa widgeta: sp-chips-filter) ---------- */

.sp-chips-filter .jet-radio-list {
	position: relative;
	display: flex;
	align-items: center;
	min-width: 0;
}

.sp-chips-filter .jet-radio-list-wrapper {
	flex: 1 1 auto;
	min-width: 0;
}

.sp-chips-filter fieldset {
	display: flex;
	flex-wrap: nowrap;
	gap: 10px;
	min-width: 0;
	margin: 0;
	padding: 2px; /* da se focus outline ne odsiječe */
	border: 0;
	overflow-x: auto;
	scroll-snap-type: x proximity;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}

.sp-chips-filter fieldset::-webkit-scrollbar {
	display: none;
}

.sp-chips-filter .jet-filter-row {
	flex: 0 0 auto;
	margin: 0 !important;
	scroll-snap-align: start;
}

.sp-chips-filter .jet-radio-list__button {
	white-space: nowrap;
}

/* "Sve" izgleda aktivno dok nijedan filter nije izabran (boje = "Checked" boje iz Style taba widgeta). */
.sp-chips-filter fieldset:not(:has(.jet-radio-list__input:checked)) > .jet-filter-row:first-of-type .jet-radio-list__button {
	background-color: var(--e-global-color-primary);
	color: var(--e-global-color-83d413d);
}

/* Strelice – dodaje ih assets/js/statpro-chips-scroll.js samo kad filteri ne staju u red. */
body .sp-chips-filter button.sp-chips-arrow {
	position: absolute;
	top: 50%;
	z-index: 2;
	transform: translateY(-50%);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 1.5px solid var(--e-global-color-text);
	border-radius: 999px;
	background: var(--e-global-color-83d413d);
	box-shadow: 0 0 0 8px var(--e-global-color-83d413d);
	color: var(--e-global-color-text);
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
}

body .sp-chips-filter button.sp-chips-arrow--prev {
	left: 0;
}

body .sp-chips-filter button.sp-chips-arrow--next {
	right: 0;
}

body .sp-chips-filter button.sp-chips-arrow:hover,
body .sp-chips-filter button.sp-chips-arrow:focus {
	background: var(--e-global-color-1a69798);
	color: var(--e-global-color-text);
}

body .sp-chips-filter button.sp-chips-arrow[hidden] {
	display: none;
}

/* Na mobilnom se filteri prevlače prstom – strelice nisu potrebne. */
@media (max-width: 767px) {
	body .sp-chips-filter button.sp-chips-arrow {
		display: none !important;
	}
}
