/* ───────────────────────────────────────────────────────────────
   Sinoptičke mape Evrope — [vm_sinopticka]
   Koristi tema CSS varijable (--vm-*) → automatski dark mode.
   v1.4 — otporna stanja kontrola, pristupačan retry/slider i mobilni
   scroll cue. Kontrolna traka više nije sticky, pa ne ulazi iza headera.
   SVI stilovi ostaju u ovom fajlu (van UCSS bundle-a).
   ─────────────────────────────────────────────────────────────── */

.vm-sinop-page {
	max-width: 1040px;
	margin: 0 auto;
	color: var(--vm-text-primary, #0f172a);
}

/* hidden atribut mora da pobedi SVAKI display iz teme/komponenti (figure, flex...) */
.vm-sinop-page [hidden] { display: none !important; }

/* ─── Hero: uvod + bedž svežine ─── */
.vm-sinop-hero {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: .8rem 1.4rem;
	margin-bottom: 1rem;
	padding: 1.05rem 1.3rem;
	background: linear-gradient(135deg, rgba(13,148,136,.09), rgba(8,145,178,.05) 55%, transparent);
	border: 1px solid var(--vm-border-color, #e2e8f0);
	border-radius: 18px;
}
[data-theme="dark"] .vm-sinop-hero {
	background: linear-gradient(135deg, rgba(13,148,136,.16), rgba(8,145,178,.08) 55%, transparent);
	border-color: rgba(148,163,184,.22);
}
.vm-sinop-hero__text { flex: 1 1 380px; }

.vm-sinop-heading {
	font-size: 1.5rem;
	margin: 0 0 .5rem;
}

.vm-sinop-intro-text {
	color: var(--vm-text-secondary, #475569);
	line-height: 1.6;
	margin: 0;
}

.vm-sinop-fresh[hidden] { display: none; }
.vm-sinop-fresh {
	display: inline-flex;
	align-items: center;
	gap: .5rem;
	flex-shrink: 0;
	padding: .45rem .85rem;
	border-radius: 999px;
	font-size: .78rem;
	font-weight: 700;
	background: var(--vm-card-bg, #fff);
	border: 1px solid var(--vm-border-color, #e2e8f0);
	color: var(--vm-text-secondary, #475569);
	box-shadow: 0 1px 3px rgba(15,23,42,.06);
	font-variant-numeric: tabular-nums;
}
[data-theme="dark"] .vm-sinop-fresh { background: rgba(30,41,59,.75); border-color: rgba(148,163,184,.22); color: #cbd5e1; }
.vm-sinop-fresh__dot { width: 9px; height: 9px; border-radius: 50%; background: #94a3b8; box-shadow: 0 0 0 3px rgba(148,163,184,.18); }
.vm-sinop-fresh--fresh  .vm-sinop-fresh__dot { background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,.18); }
.vm-sinop-fresh--recent .vm-sinop-fresh__dot { background: #eab308; box-shadow: 0 0 0 3px rgba(234,179,8,.18); }
.vm-sinop-fresh--stale  .vm-sinop-fresh__dot { background: #ef4444; box-shadow: 0 0 0 3px rgba(239,68,68,.18); }

/* ─── Kontrolna traka: model + tabovi (staklo, bez konflikta sa headerom) ─── */
.vm-sinop-controlbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .6rem .9rem;
	margin: 0 0 .75rem;
	padding: .55rem .65rem;
	background: rgba(255,255,255,.78);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	border: 1px solid var(--vm-border-color, #e2e8f0);
	border-radius: 16px;
	box-shadow: 0 1px 2px rgba(15,23,42,.05), 0 8px 22px rgba(15,23,42,.05);
}
[data-theme="dark"] .vm-sinop-controlbar { background: rgba(15,23,42,.72); border-color: rgba(148,163,184,.22); }

/* ─── Izbor modela (GFS / ICON-EU) ─── */
.vm-sinop-sources {
	display: flex;
	align-items: center;
	gap: .4rem;
	margin: 0;
}

.vm-sinop-sources__label {
	font-size: .82rem;
	font-weight: 600;
	color: var(--vm-text-muted, #64748b);
	margin-right: .15rem;
}

.vm-sinop-src {
	appearance: none;
	border: 1px solid var(--vm-border-color, #cbd5e1);
	background: var(--vm-card-bg, #fff);
	color: var(--vm-text-secondary, #475569);
	font-size: .82rem;
	font-weight: 700;
	padding: .38rem .85rem;
	border-radius: 999px;
	cursor: pointer;
	transition: background .15s, color .15s, border-color .15s;
}

.vm-sinop-src:not(:disabled):hover { border-color: #0d9488; color: #0d9488; }

.vm-sinop-src--active {
	background: linear-gradient(135deg, #0d9488 0%, #0891b2 100%) !important;
	border-color: transparent !important;
	color: #fff !important;
}

/* ─── Tabovi ─── */
.vm-sinop-tabs-wrap {
	position: relative;
	flex: 1 1 590px;
	min-width: 0;
}

.vm-sinop-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: .4rem;
	margin: 0;
}

.vm-sinop-tab {
	appearance: none;
	border: 1px solid var(--vm-border-color, #cbd5e1);
	background: var(--vm-bg-secondary, #f1f5f9);
	color: var(--vm-text-secondary, #475569);
	font-size: .9rem;
	font-weight: 600;
	padding: .5rem .9rem;
	border-radius: 999px;
	cursor: pointer;
	transition: background .15s, color .15s, border-color .15s;
}

.vm-sinop-tab:not(:disabled):hover {
	border-color: #2563eb;
	color: #2563eb;
}

.vm-sinop-tab--active {
	background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%) !important;
	border-color: transparent !important;
	color: #fff !important;
}

.vm-sinop-tab--dwd { border-style: dashed; }
.vm-sinop-tab--dwd.vm-sinop-tab--active { border-style: solid; }
.vm-sinop-tab--disabled,
.vm-sinop-control--disabled,
.vm-sinop-page button:disabled {
	opacity: .5;
	cursor: not-allowed;
}

.vm-sinop-page button:disabled { pointer-events: none; }

.vm-sinop-src:focus-visible,
.vm-sinop-tab:focus-visible,
.vm-sinop-btn:focus-visible,
.vm-sinop-speed__btn:focus-visible,
.vm-sinop-retry:focus-visible,
.vm-sinop-timeline:focus-visible { outline: 3px solid #2563eb; outline-offset: 2px; }

/* ─── Scena / platno ─── */
.vm-sinop-stage {
	background: var(--vm-card-bg, #fff);
	border: 1px solid var(--vm-border-color, #cbd5e1);
	border-radius: 18px;
	padding: .5rem;
	box-shadow: 0 1px 2px rgba(15,23,42,.08), 0 14px 34px rgba(15,23,42,.10);
}

.vm-sinop-canvas {
	position: relative;
	width: 100%;
	min-height: 320px;
	aspect-ratio: 1100 / 820;   /* razmera karata → bez CLS pre učitavanja */
	height: auto;
	border-radius: 10px;
	overflow: hidden;
}

.vm-sinop-img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 10px;
}

.vm-sinop-frame {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: contain;
	opacity: 0;
	transition: opacity .2s ease;
	border-radius: 10px;
}

.vm-sinop-skeleton {
	position: absolute;
	inset: 0;
	z-index: 3;
	pointer-events: none;
	background: linear-gradient(100deg, rgba(148,163,184,.10) 38%, rgba(148,163,184,.26) 50%, rgba(148,163,184,.10) 62%);
	background-size: 220% 100%;
	animation: vm-sinop-shimmer 1.5s ease-in-out infinite;
}
@keyframes vm-sinop-shimmer { from { background-position: 130% 0; } to { background-position: -90% 0; } }
@media (prefers-reduced-motion: reduce) { .vm-sinop-skeleton { animation: none; } }

.vm-sinop-empty[hidden] { display: none; }
.vm-sinop-empty {
	position: absolute;
	inset: 0;
	z-index: 4;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: .85rem;
	text-align: center;
	padding: 1.2rem;
	font-size: .92rem;
	font-weight: 600;
	color: var(--vm-text-muted, #64748b);
	background: var(--vm-bg-secondary, #f1f5f9);
	border: 1.5px dashed var(--vm-border-color, #cbd5e1);
	border-radius: 10px;
}
[data-theme="dark"] .vm-sinop-empty { background: rgba(30,41,59,.5); border-color: rgba(148,163,184,.3); color: #94a3b8; }

.vm-sinop-empty__message {
	max-width: 620px;
	margin: 0 !important;
	text-align: center !important;
}

.vm-sinop-retry {
	appearance: none;
	min-height: 44px;
	padding: .6rem 1.1rem;
	border: 0;
	border-radius: 999px;
	background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
	color: #fff;
	font-size: .88rem;
	font-weight: 700;
	cursor: pointer;
	box-shadow: 0 4px 14px rgba(37,99,235,.24);
}

.vm-sinop-retry:hover { filter: brightness(1.08); }

.vm-sinop-loading {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(255,255,255,.6);
	color: var(--vm-text-muted, #64748b);
	font-weight: 600;
	font-size: .9rem;
	z-index: 5;
}

[data-theme="dark"] .vm-sinop-loading {
	background: rgba(15,23,42,.6);
}

/* ─── Kontrolna traka playera ─── */
.vm-sinop-bar {
	display: flex;
	align-items: center;
	gap: .5rem;
	margin-top: .6rem;
	padding: .45rem .6rem;
	background: var(--vm-bg-secondary, #f1f5f9);
	border: 1px solid var(--vm-border-color, #cbd5e1);
	border-radius: 14px;
	flex-wrap: wrap;
}

.vm-sinop-btn {
	appearance: none;
	background: var(--vm-card-bg, #fff);
	color: var(--vm-text-primary, #0f172a);
	width: 44px;
	height: 44px;
	border-radius: 10px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	font-size: 1.15rem;
	line-height: 1;
	border: 1px solid var(--vm-border-color, #cbd5e1);
	transition: border-color .15s, color .15s, transform .1s;
}

.vm-sinop-btn:not(:disabled):hover { border-color: #2563eb; color: #2563eb; }
.vm-sinop-btn:not(:disabled):active { transform: scale(.95); }

#vm-sinop-play {
	background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
	color: #fff;
	border: none;
}

.vm-sinop-steplabel {
	font-weight: 600;
	font-size: .85rem;
	color: var(--vm-text-primary, #0f172a);
	white-space: nowrap;
	min-width: 130px;
	font-variant-numeric: tabular-nums;
}

.vm-sinop-counter {
	font-variant-numeric: tabular-nums;
	font-size: .82rem;
	color: var(--vm-text-muted, #64748b);
	white-space: nowrap;
}

.vm-sinop-timeline {
	flex: 1 1 120px;
	height: 44px;
	background: transparent;
	border-radius: 999px;
	cursor: pointer;
	position: relative;
	min-width: 90px;
	touch-action: manipulation;
}

.vm-sinop-timeline::before {
	content: '';
	position: absolute;
	left: 0;
	right: 0;
	top: 50%;
	height: 8px;
	transform: translateY(-50%);
	background: var(--vm-border-color, #cbd5e1);
	border-radius: 999px;
}

.vm-sinop-progress {
	position: absolute;
	left: 0;
	top: 50%;
	height: 8px;
	transform: translateY(-50%);
	width: 0;
	background: linear-gradient(90deg, #2563eb, #4f46e5);
	border-radius: 999px;
	pointer-events: none;
}

.vm-sinop-progress::after {
	content: '';
	position: absolute;
	right: -7px;
	top: 50%;
	width: 16px;
	height: 16px;
	transform: translateY(-50%);
	border: 3px solid var(--vm-card-bg, #fff);
	border-radius: 50%;
	background: #4f46e5;
	box-shadow: 0 1px 4px rgba(15,23,42,.28);
}

.vm-sinop-timeline--disabled { cursor: not-allowed; opacity: .5; }

.vm-sinop-speed {
	display: inline-flex;
	gap: 2px;
	background: var(--vm-card-bg, #fff);
	border: 1px solid var(--vm-border-color, #cbd5e1);
	border-radius: 999px;
	padding: 2px;
}

.vm-sinop-speed__btn {
	appearance: none;
	border: none;
	background: transparent;
	color: var(--vm-text-secondary, #475569);
	font-size: .78rem;
	font-weight: 600;
	padding: .25rem .55rem;
	border-radius: 999px;
	cursor: pointer;
}

.vm-sinop-speed__btn--active {
	background: #2563eb;
	color: #fff;
}

/* ─── Atribucija + SEO ─── */
.vm-sinop-attrib {
	margin: .5rem 0 1.25rem;
	font-size: .76rem;
	color: var(--vm-text-muted, #64748b);
	text-align: right;
}

.vm-sinop-seo {
	background: var(--vm-bg-secondary, #f1f5f9);
	border-radius: 16px;
	padding: 1.1rem 1.3rem;
}

.vm-sinop-seo__title { font-size: 1.15rem; margin: 0 0 .6rem; }

.vm-sinop-seo__list {
	margin: 0 0 .8rem;
	padding-left: 1.1rem;
	line-height: 1.6;
	color: var(--vm-text-secondary, #475569);
}

.vm-sinop-seo__list li { margin-bottom: .4rem; }

.vm-sinop-seo__note {
	font-size: .82rem;
	color: var(--vm-text-muted, #64748b);
	margin: 0;
	line-height: 1.55;
}

/* ─── Mobilni ─── */
@media (max-width: 600px) {
	.vm-sinop-hero { padding: .9rem 1rem; border-radius: 16px; }
	.vm-sinop-intro-text { text-align: left !important; }
	.vm-sinop-canvas { min-height: 240px; }
	.vm-sinop-controlbar { padding: .5rem .55rem; }
	.vm-sinop-tabs-wrap {
		flex-basis: 100%;
		width: 100%;
	}
	.vm-sinop-tabs-wrap::after {
		content: '›';
		position: absolute;
		top: 0;
		right: 0;
		bottom: 5px;
		width: 38px;
		display: flex;
		align-items: center;
		justify-content: flex-end;
		padding-right: 5px;
		background: linear-gradient(90deg, transparent, var(--vm-card-bg, #fff) 58%);
		color: #2563eb;
		font-size: 1.45rem;
		font-weight: 800;
		pointer-events: none;
		z-index: 2;
	}
	[data-theme="dark"] .vm-sinop-tabs-wrap::after {
		background: linear-gradient(90deg, transparent, #0f172a 58%);
		color: #60a5fa;
	}
	.vm-sinop-tabs {
		flex-wrap: nowrap;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: thin;
		scrollbar-color: #94a3b8 transparent;
		padding: 0 2.4rem 5px 0;
	}
	.vm-sinop-tabs::-webkit-scrollbar { height: 4px; }
	.vm-sinop-tabs::-webkit-scrollbar-thumb { background: #94a3b8; border-radius: 999px; }
	.vm-sinop-src,
	.vm-sinop-tab,
	.vm-sinop-speed__btn { min-height: 44px; }
	.vm-sinop-tab { flex-shrink: 0; font-size: .82rem; padding: .5rem .75rem; }
	.vm-sinop-steplabel { min-width: 0; font-size: .8rem; }
	.vm-sinop-bar { gap: .4rem; }
	/* Full-bleed karta na telefonu — više piksela za izobare */
	.vm-sinop-stage { margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); border-radius: 0; border-left: none; border-right: none; }
}
