/* Web majstor — alat „Vremenska prognoza"
   (/korisni-alati/vremenska-prognoza/).
   Nadovezuje se na blog.css (pozadina, logo, .wm-blog-head, footer, tokeni).
   Prefiks wm-vr-*. Logika: assets/js/vremenska-prognoza.js. */

.wm-visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ============ Value props ============ */
.wm-vr-props {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 18px;
	margin: 22px 0 0;
	padding: 0;
	list-style: none;
}
.wm-vr-prop {
	position: relative;
	font-family: var(--fm);
	font-size: 12px;
	letter-spacing: 0.06em;
	color: var(--text-mid);
	padding-left: 20px;
}
.wm-vr-prop::before {
	content: "\2713";
	position: absolute;
	left: 0;
	top: -1px;
	color: var(--accent);
	font-weight: 700;
}

/* ============ Okvir ============ */
.wm-vr {
	max-width: 1080px;
	margin: 0 auto;
	padding: 12px 24px 0;
}
.wm-vr-tool {
	margin: 36px 0 8px;
}
.wm-vr [hidden] {
	display: none !important;
}

/* ============ Dugmad ============ */
.wm-vr-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	font-family: var(--fd);
	font-size: 1.15rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	line-height: 1;
	padding: 0 22px;
	min-height: 50px;
	text-decoration: none;
	cursor: pointer;
	border-radius: 0;
	transition: background 0.25s, color 0.25s, border-color 0.25s;
	-webkit-appearance: none;
	appearance: none;
	white-space: nowrap;
}
.wm-vr-btn--primary {
	color: var(--accent);
	background: #0a0a0a;
	border: 1.5px solid var(--accent);
}
.wm-vr-btn--primary:hover,
.wm-vr-btn--primary:focus-visible {
	background: var(--accent);
	color: #0a0a0a;
	outline: none;
}
.wm-vr-btn--ghost {
	color: var(--text-mid);
	background: transparent;
	border: 1.5px solid var(--border-hi);
}
.wm-vr-btn--ghost:hover,
.wm-vr-btn--ghost:focus-visible {
	color: var(--text);
	border-color: var(--text-mid);
	outline: none;
}
.wm-vr-btn[disabled] {
	opacity: 0.5;
	cursor: wait;
}

/* ============ Pretraga ============ */
.wm-vr-search {
	display: flex;
	gap: 10px;
}
.wm-vr-combo {
	position: relative;
	flex: 1;
	min-width: 0;
}
.wm-vr-search-ic {
	position: absolute;
	left: 16px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--text-dim);
	pointer-events: none;
}
.wm-vr-combo input {
	width: 100%;
	min-height: 50px;
	font-family: var(--fm);
	font-size: 16px; /* iOS: bez auto-zuma na fokus */
	color: var(--text);
	background: var(--surface);
	border: 1px solid var(--border-hi);
	border-radius: 0;
	padding: 0 16px 0 44px;
	-webkit-appearance: none;
	appearance: none;
	transition: border-color 0.2s;
}
.wm-vr-combo input::placeholder {
	color: var(--text-dim);
}
.wm-vr-combo input:focus {
	outline: none;
	border-color: var(--accent);
}
.wm-vr-sug {
	position: absolute;
	z-index: 30;
	left: 0;
	right: 0;
	top: calc(100% + 4px);
	margin: 0;
	padding: 4px 0;
	list-style: none;
	background: #111;
	border: 1px solid var(--border-hi);
	box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}
.wm-vr-sug li {
	padding: 11px 16px;
	font-family: var(--fm);
	font-size: 13px;
	color: var(--text-dim);
	cursor: pointer;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.wm-vr-sug li strong {
	color: var(--text);
	font-weight: 500;
}
.wm-vr-sug li:hover,
.wm-vr-sug li[aria-selected="true"] {
	background: rgba(207, 46, 46, 0.14);
}

.wm-vr-status {
	min-height: 1.6em;
	margin: 12px 0 0;
	font-family: var(--fm);
	font-size: 12px;
	letter-spacing: 0.04em;
	color: var(--text-dim);
}
.wm-vr-status.is-error {
	color: #ff7a6b;
}

/* ============ Rezultat ============ */
.wm-vr-result {
	margin-top: 10px;
	transition: opacity 0.25s;
}
.wm-vr-result:not(.is-ready) {
	opacity: 0.35;
}
.wm-vr-result.is-loading {
	opacity: 0.55;
}

/* --- Trenutno --- */
.wm-vr-now {
	border: 1px solid var(--border);
	background: var(--surface);
	padding: 26px 28px;
	min-height: 330px; /* rezervisan prostor do prvog odgovora (bez CLS-a) */
}
.wm-vr-now-head {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 16px;
}
.wm-vr-place {
	font-family: var(--fd);
	font-size: clamp(2rem, 5vw, 3rem);
	line-height: 0.95;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	color: var(--text);
	margin: 0;
}
.wm-vr-sub,
.wm-vr-updated {
	font-family: var(--fm);
	font-size: 12px;
	letter-spacing: 0.04em;
	color: var(--text-dim);
	margin: 8px 0 0;
}
.wm-vr-updated {
	margin: 4px 0 0;
	text-align: right;
}
.wm-vr-now-main {
	display: flex;
	align-items: center;
	gap: 20px;
	margin: 22px 0 24px;
}
.wm-vr-now-ic {
	display: block;
	width: 96px;
	height: 96px;
	flex: 0 0 auto;
}
.wm-vr-temp {
	font-family: var(--fd);
	font-size: clamp(4.5rem, 12vw, 6.5rem);
	line-height: 0.85;
	color: var(--text);
	margin: 0;
}
.wm-vr-cond {
	font-family: var(--fb);
	font-size: 1.1rem;
	color: var(--text);
	margin: 8px 0 0;
}
.wm-vr-feels {
	font-family: var(--fm);
	font-size: 12px;
	letter-spacing: 0.03em;
	color: var(--text-mid);
	margin: 6px 0 0;
}

.wm-vr-stats {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	margin: 0;
	border-top: 1px solid var(--border);
	border-left: 1px solid var(--border);
}
.wm-vr-stat {
	padding: 12px 14px;
	border-right: 1px solid var(--border);
	border-bottom: 1px solid var(--border);
}
.wm-vr-stat dt {
	font-family: var(--fm);
	font-size: 10.5px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--text-dim);
	margin: 0 0 6px;
}
.wm-vr-stat dd {
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 4px 8px;
	margin: 0;
	font-family: var(--fm);
	font-size: 15px;
	color: var(--text);
}
.wm-vr-stat-x {
	font-size: 11.5px;
	color: var(--text-dim);
}
.wm-vr-arrow {
	align-self: center;
	color: var(--accent);
}
.wm-vr-aqi dd::before {
	content: "";
	width: 9px;
	height: 9px;
	border-radius: 50%;
	align-self: center;
	background: var(--aqi, #3aa858);
}
.wm-vr-aqi--2 { --aqi: #d9c13a; }
.wm-vr-aqi--3 { --aqi: #e08e2e; }
.wm-vr-aqi--4 { --aqi: #e0472e; }
.wm-vr-aqi--5 { --aqi: #9b51e0; }
.wm-vr-aqi--6 { --aqi: #8a1c1c; }

/* --- Blokovi (24 h, 3 dana) --- */
.wm-vr-block {
	margin-top: 34px;
}
.wm-vr-block-title {
	font-family: var(--fm);
	font-size: 12px;
	font-weight: 500;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--accent);
	margin: 0 0 12px;
}

/* --- Po satima --- */
.wm-vr-hours {
	overflow-x: auto;
	border: 1px solid var(--border);
	background: var(--surface);
	padding: 14px 0 10px;
	min-height: 182px;
	scrollbar-width: thin;
	scrollbar-color: var(--border-hi) transparent;
}
.wm-vr-hours:focus-visible {
	outline: 1px solid var(--accent);
}
.wm-vr-h-row {
	display: grid;
	text-align: center;
}
.wm-vr-h-time,
.wm-vr-h-rain {
	font-family: var(--fm);
	font-size: 12px;
	color: var(--text-mid);
}
.wm-vr-h-time:first-child {
	color: var(--accent);
}
.wm-vr-h-ic {
	display: flex;
	justify-content: center;
	padding: 6px 0 0;
}
.wm-vr-h-rain {
	color: #5fa8e8;
	font-size: 11px;
}
.wm-vr-h-rain.is-low {
	color: var(--text-dim);
	opacity: 0.6;
}
.wm-vr-curve {
	display: block;
}
.wm-vr-curve text {
	font-family: var(--fm);
	font-size: 12px;
	fill: var(--text);
}

/* --- Po danima --- */
.wm-vr-days {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 14px;
	min-height: 290px;
}
.wm-vr-day {
	border: 1px solid var(--border);
	background: var(--surface);
	padding: 18px 20px 16px;
}
.wm-vr-day-name {
	font-family: var(--fd);
	font-size: 1.5rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--text);
	margin: 0;
}
.wm-vr-day-name span {
	font-family: var(--fm);
	font-size: 12px;
	letter-spacing: 0.04em;
	text-transform: none;
	color: var(--text-dim);
	margin-left: 6px;
}
.wm-vr-day-main {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin: 10px 0 4px;
}
.wm-vr-day-temps {
	font-family: var(--fd);
	font-size: 2.2rem;
	line-height: 1;
	margin: 0;
}
.wm-vr-day-temps strong {
	font-weight: 400;
	color: var(--text);
}
.wm-vr-day-temps span {
	color: var(--text-dim);
	font-size: 1.6rem;
}
.wm-vr-day-text {
	font-family: var(--fb);
	font-size: 0.95rem;
	color: var(--text-mid);
	margin: 0 0 14px;
	min-height: 2.8em;
}
.wm-vr-range {
	position: relative;
	height: 4px;
	background: rgba(240, 237, 230, 0.08);
	border-radius: 2px;
	margin-bottom: 14px;
}
.wm-vr-range span {
	position: absolute;
	top: 0;
	bottom: 0;
	border-radius: 2px;
	background: linear-gradient(90deg, #5fa8e8, #f0a43a);
}
.wm-vr-day-meta {
	list-style: none;
	margin: 0;
	padding: 0;
}
.wm-vr-day-meta li {
	display: flex;
	justify-content: space-between;
	gap: 10px;
	padding: 7px 0;
	border-top: 1px solid var(--border);
	font-family: var(--fm);
	font-size: 12px;
	color: var(--text);
}
.wm-vr-day-meta li span {
	color: var(--text-dim);
}

.wm-vr-credit {
	margin: 16px 0 0;
	font-family: var(--fm);
	font-size: 11px;
	letter-spacing: 0.04em;
	color: var(--text-dim);
	text-align: right;
}
.wm-vr-credit a {
	color: var(--text-mid);
}

/* ============ CTA ============ */
.wm-vr-cta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	margin-top: 56px;
	padding: 28px;
	border: 1px solid var(--border);
	border-left: 3px solid var(--accent);
	background: var(--surface);
}
.wm-vr-cta-title {
	font-family: var(--fd);
	font-size: clamp(1.6rem, 3.5vw, 2.2rem);
	line-height: 1;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: var(--text);
	margin: 0 0 10px;
}
.wm-vr-cta-text {
	font-family: var(--fb);
	font-size: 0.98rem;
	line-height: 1.65;
	color: var(--text-mid);
	margin: 0;
	max-width: 620px;
}

/* ============ FAQ ============ */
.wm-vr-sechead {
	display: flex;
	align-items: baseline;
	gap: 18px;
	margin-bottom: 28px;
}
.wm-vr-sechead-num {
	font-family: var(--fm);
	font-size: 13px;
	font-weight: 500;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--accent);
}
.wm-vr-sechead-title {
	font-family: var(--fd);
	font-size: clamp(2.2rem, 6vw, 4rem);
	line-height: 0.95;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: var(--text);
	margin: 0;
}
.wm-vr-faq {
	padding: 56px 0 8px;
	border-top: 1px solid var(--border);
	margin-top: 56px;
}
.wm-vr-faq-item {
	border-bottom: 1px solid var(--border);
}
.wm-vr-faq-item:first-child {
	border-top: 1px solid var(--border);
}
.wm-vr-faq-q {
	position: relative;
	list-style: none;
	cursor: pointer;
	font-family: var(--fb);
	font-size: 1.05rem;
	line-height: 1.5;
	color: var(--text);
	padding: 20px 44px 20px 0;
	transition: color 0.2s;
}
.wm-vr-faq-q::-webkit-details-marker {
	display: none;
}
.wm-vr-faq-q:hover,
.wm-vr-faq-item[open] .wm-vr-faq-q {
	color: var(--accent);
}
.wm-vr-faq-q::after {
	content: "";
	position: absolute;
	right: 6px;
	top: 50%;
	width: 14px;
	height: 14px;
	background:
		linear-gradient(var(--accent), var(--accent)) center / 14px 2px no-repeat,
		linear-gradient(var(--accent), var(--accent)) center / 2px 14px no-repeat;
	transform: translateY(-50%);
	transition: transform 0.25s;
}
.wm-vr-faq-item[open] .wm-vr-faq-q::after {
	transform: translateY(-50%) rotate(45deg);
}
.wm-vr-faq-a {
	padding: 0 44px 22px 0;
}
.wm-vr-faq-a p {
	font-family: var(--fb);
	font-size: 0.98rem;
	line-height: 1.75;
	color: rgba(240, 237, 230, 0.82);
	margin: 0;
}

/* ============ Mobilno ============ */
@media screen and (max-width: 860px) {
	.wm-vr-days {
		grid-template-columns: 1fr;
		min-height: 0;
	}
	.wm-vr-cta {
		flex-direction: column;
		align-items: stretch;
	}
}
@media screen and (max-width: 767px) {
	.wm-vr {
		padding-left: 16px;
		padding-right: 16px;
	}
	.wm-vr-search {
		flex-wrap: wrap;
	}
	.wm-vr-combo {
		flex: 1 1 100%;
	}
	.wm-vr-search .wm-vr-btn {
		flex: 1 1 0;
		padding: 0 12px;
	}
	.wm-vr-now {
		padding: 20px 18px;
	}
	.wm-vr-now-head {
		flex-direction: column;
		gap: 0;
	}
	.wm-vr-updated {
		text-align: left;
	}
	.wm-vr-now-ic {
		width: 72px;
		height: 72px;
	}
	.wm-vr-now-ic svg {
		width: 72px;
		height: 72px;
	}
	.wm-vr-stats {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
	.wm-vr-faq-a {
		padding-right: 0;
	}
}
