:root {
	--navy: #16306f;
	--navy-deep: #0e1f52;
	--green: #007a35;
	--yellow: #ffd23f;
	--ink: #111a33;
	--muted: #5f6880;
	--line: #dfe4ee;
	--tint: #f1f4fa;
	--field: #eef1f7;
	--focus: #0a76f6;
	--font: "PT Sans", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
	font-family: var(--font);
	font-size: 17px;
	line-height: 1.45;
	color: var(--ink);
	background: #fff;
}

button { font: inherit; color: inherit; }

.mz-app {
	display: flex;
	flex-direction: column;
	height: 100vh;
	height: 100dvh;
}

/* Gornja traka */

.mz-top {
	flex: none;
	display: flex;
	align-items: center;
	gap: 24px;
	min-height: 60px;
	padding: 0 24px 0 0;
	color: #fff;
	background: var(--navy);
}

.mz-top__back {
	display: flex;
	align-items: center;
	gap: 10px;
	align-self: stretch;
	padding: 0 22px;
	font-weight: 700;
	font-size: 15.5px;
	color: var(--ink);
	text-decoration: none;
	background: var(--yellow);
	transition: background-color 0.15s ease;
}

.mz-top__back:hover { background: #ffdf70; }

.mz-top__title {
	font-size: 1.35rem;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: -0.01em;
}

.mz-top__city {
	margin-left: auto;
	font-size: 15px;
	color: rgba(255, 255, 255, 0.78);
}

/* Raspored */

.mz-body {
	flex: 1;
	display: grid;
	grid-template-columns: 340px minmax(0, 1fr);
	min-height: 0;
}

.mz-side {
	display: flex;
	flex-direction: column;
	min-height: 0;
	border-right: 1px solid var(--line);
	background: #fff;
}

.mz-search { padding: 20px 24px 14px; }

.mz-search__label {
	display: block;
	margin-bottom: 6px;
	font-size: 14px;
	font-weight: 700;
}

.mz-search__input {
	width: 100%;
	height: 46px;
	padding: 0 14px;
	border: 0;
	border-bottom: 2px solid var(--ink);
	border-radius: 4px 4px 0 0;
	font: inherit;
	font-size: 16px;
	color: var(--ink);
	background: var(--field);
}

.mz-search__input:focus,
.mz-tool:focus-visible,
.mz-item:focus-visible,
.mz-card__btn:focus-visible,
.mz-card__close:focus-visible,
.mz-top__back:focus-visible {
	outline: 2px solid var(--focus);
	outline-offset: 2px;
}

.mz-count {
	padding: 0 24px 12px;
	border-bottom: 2px solid var(--ink);
	font-size: 14.5px;
	color: var(--muted);
}

.mz-count strong { color: var(--ink); font-variant-numeric: tabular-nums; }

.mz-list {
	flex: 1;
	min-height: 0;
	overflow-y: auto;
	list-style: none;
}

.mz-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	width: 100%;
	padding: 13px 24px 13px 20px;
	border: 0;
	border-left: 4px solid transparent;
	border-bottom: 1px solid var(--line);
	font-size: 16.5px;
	font-weight: 700;
	text-align: left;
	color: var(--navy);
	background: none;
	cursor: pointer;
	transition: background-color 0.15s ease;
}

.mz-item svg { flex: none; color: var(--muted); transition: transform 0.15s ease; }

.mz-item:hover { background: var(--tint); }
.mz-item:hover svg { transform: translateX(3px); }

.mz-item[aria-current="true"] {
	border-left-color: var(--yellow);
	background: var(--tint);
}

.mz-empty { padding: 20px 24px; font-size: 15.5px; color: var(--muted); }

/* Mapa */

.mz-main { position: relative; min-width: 0; min-height: 0; }

.mz-map { position: absolute; inset: 0; background: #e9eef5; }

.mz-tools {
	position: absolute;
	top: 16px;
	left: 16px;
	z-index: 500;
	display: flex;
	gap: 8px;
}

.mz-tool {
	display: flex;
	align-items: center;
	gap: 8px;
	height: 40px;
	padding: 0 14px;
	border: 1px solid var(--navy);
	border-radius: 2px;
	font-size: 15px;
	font-weight: 700;
	color: var(--navy);
	background: #fff;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.mz-tool:hover { background: var(--tint); }

.mz-tool[aria-pressed="true"] { color: #fff; background: var(--navy); }

.mz-card {
	position: absolute;
	right: 16px;
	bottom: 44px;
	z-index: 500;
	width: 320px;
	max-width: calc(100% - 32px);
	padding: 20px 22px 22px;
	border-top: 4px solid var(--yellow);
	color: #fff;
	background: var(--navy);
}

.mz-card[hidden] { display: none; }

.mz-card__kicker { font-size: 14px; color: rgba(255, 255, 255, 0.78); }

.mz-card__name {
	margin: 2px 32px 16px 0;
	font-size: 1.45rem;
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: -0.01em;
}

.mz-card__close {
	position: absolute;
	top: 10px;
	right: 10px;
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	border: 0;
	color: #fff;
	background: none;
	cursor: pointer;
}

.mz-card__close:hover { background: rgba(255, 255, 255, 0.12); }

.mz-card__btn {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 12px 16px;
	border-radius: 2px;
	font-size: 16px;
	font-weight: 700;
	color: var(--ink);
	text-decoration: none;
	background: var(--yellow);
	transition: background-color 0.15s ease;
}

.mz-card__btn:hover { background: #ffdf70; }
.mz-card__btn svg { transition: transform 0.15s ease; }
.mz-card__btn:hover svg { transform: translateX(3px); }

.mz-note {
	position: absolute;
	left: 16px;
	bottom: 12px;
	z-index: 400;
	max-width: calc(100% - 32px);
	padding: 5px 10px;
	font-size: 13.5px;
	color: var(--muted);
	background: rgba(255, 255, 255, 0.92);
}

.mz-loading {
	position: absolute;
	inset: 0;
	z-index: 600;
	display: grid;
	place-items: center;
	font-weight: 700;
	color: var(--navy);
	background: #fff;
}

.mz-loading[hidden] { display: none; }

/* Leaflet */

.leaflet-container { font-family: var(--font); }

.leaflet-bar { border: 1px solid var(--navy) !important; border-radius: 2px !important; box-shadow: none !important; }
.leaflet-bar a { color: var(--navy) !important; border-radius: 0 !important; }

.mz-label {
	padding: 2px 6px;
	border: 0;
	border-radius: 0;
	font-family: var(--font);
	font-size: 12.5px;
	font-weight: 700;
	color: var(--navy-deep);
	background: rgba(255, 255, 255, 0.9);
	box-shadow: none;
	white-space: nowrap;
}

.mz-label::before { display: none; }

.mz-label--on { color: var(--ink); background: var(--yellow); }

/* Uži ekrani */

@media (max-width: 899px) {
	html, body { height: auto; }

	.mz-app { height: auto; min-height: 100vh; }

	.mz-top { gap: 14px; min-height: 54px; padding-right: 16px; }
	.mz-top__back { padding: 0 14px; }
	.mz-top__back span { display: none; }
	.mz-top__title { font-size: 1.1rem; }
	.mz-top__city { display: none; }

	.mz-body { display: flex; flex-direction: column; }

	.mz-main { order: 1; height: 58vh; min-height: 340px; }

	.mz-side { order: 2; border-right: 0; border-top: 2px solid var(--ink); }
	.mz-search { padding: 16px 16px 12px; }
	.mz-count { padding: 0 16px 12px; }
	.mz-list { overflow: visible; }
	.mz-item { padding: 14px 16px 14px 12px; }

	.mz-tools { top: 10px; left: 10px; }
	.mz-tool { height: 38px; padding: 0 11px; font-size: 14px; }

	.mz-card { right: 10px; left: 10px; bottom: 10px; width: auto; max-width: none; padding: 14px 16px 16px; }
	.mz-card__name { font-size: 1.25rem; margin-bottom: 12px; }

	.mz-note { position: static; max-width: none; padding: 8px 16px; background: var(--tint); }
	.mz-main { display: flex; flex-direction: column; height: auto; }
	.mz-map { position: relative; inset: auto; height: 58vh; min-height: 340px; }
	.mz-card { bottom: auto; top: max(340px, 58vh); transform: translateY(calc(-100% - 28px)); }
}

@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; }
}
