/* ============================================================
   OE GCI Cities to Watch Carousel
   Sibling of the GCI Top 10 Carousel. Same self-contained design
   system and interaction; the only structural difference is the
   card's top panel, which is a dark-blue block (photos to follow)
   rather than a city photo. Every class is prefixed oe-gci-watch.
   The six pillar dot colours mirror the GCI Globe & Index block.
   ============================================================ */

.oe-gci-watch {
	/* Brand palette */
	--oe-heritage-blue: #003466;
	--oe-heritage-blue-dark: #091939;
	--oe-sky-blue: #008AC8;
	--oe-sky-blue-60: #66BDE0;
	--oe-sky-blue-30: #B2DEF0;

	/* Pillar dot colours — identical to the GCI Globe & Index block */
	--oe-gci-watch-cat-overall: #003466;
	--oe-gci-watch-cat-economics: #008AC8;
	--oe-gci-watch-cat-human: #B3107A;
	--oe-gci-watch-cat-qol: #B38D2F;
	--oe-gci-watch-cat-environment: #8BA612;
	--oe-gci-watch-cat-governance: #30B5AE;

	/* Surfaces & text */
	--oe-gci-watch-bg: #F5F8FA;
	--oe-gci-watch-card: #FFFFFF;
	--oe-gci-watch-line: rgba(0, 52, 102, 0.10);
	--oe-gci-watch-text-heading: #003466;
	--oe-gci-watch-text-body: #455055;
	--oe-gci-watch-text-muted: #7C8891;

	/* Layout. Desktop card count is set inline via --oe-gci-watch-pv-desktop;
	   the active per-view is derived here so the media queries can override it. */
	--oe-gci-watch-pv-desktop: 3;
	--oe-gci-watch-pv: var(--oe-gci-watch-pv-desktop, 3);
	--oe-gci-watch-gap: 24px;
	--oe-gci-watch-radius: 16px;

	box-sizing: border-box;
	width: 100%;
	color: var(--oe-gci-watch-text-body);
	font-family: inherit;
}
.oe-gci-watch *,
.oe-gci-watch *::before,
.oe-gci-watch *::after { box-sizing: border-box; }

.oe-gci-watch__heading {
	margin: 0 0 1rem;
	color: var(--oe-gci-watch-text-heading);
	font-size: clamp(1.5rem, 2.4vw, 2rem);
	font-weight: 500;
	line-height: 1.2;
}

/* ---- Viewport & track ---- */
.oe-gci-watch__viewport {
	overflow-x: auto;
	overflow-y: hidden;
	scroll-snap-type: x mandatory;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
	padding: 6px 4px 10px;
	margin: 0 -4px;
}
.oe-gci-watch__viewport::-webkit-scrollbar { display: none; }
.oe-gci-watch__viewport:focus-visible {
	outline: 2px solid var(--oe-sky-blue);
	outline-offset: 3px;
	border-radius: 8px;
}

.oe-gci-watch__track {
	display: flex;
	gap: var(--oe-gci-watch-gap);
	margin: 0;
	padding: 0;
	list-style: none;
}

.oe-gci-watch__slide {
	flex: 0 0 calc((100% - (var(--oe-gci-watch-pv) - 1) * var(--oe-gci-watch-gap)) / var(--oe-gci-watch-pv));
	scroll-snap-align: start;
	list-style: none;
}

/* ---- Card ---- */
.oe-gci-watch__card {
	display: flex;
	flex-direction: column;
	height: 100%;
	background: var(--oe-gci-watch-card);
	border: 1px solid var(--oe-gci-watch-line);
	border-radius: var(--oe-gci-watch-radius);
	overflow: hidden;
}

/* ---- Media panel (city photo; dark-blue gradient is the fallback) ---- */
.oe-gci-watch__media {
	position: relative;
	aspect-ratio: 16 / 8;
	overflow: hidden;
	background:
		radial-gradient(120% 140% at 78% 18%, rgba(0, 138, 200, 0.32) 0%, rgba(0, 138, 200, 0) 55%),
		linear-gradient(150deg, var(--oe-heritage-blue) 0%, var(--oe-heritage-blue-dark) 100%);
}
.oe-gci-watch__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
/* Legibility scrim for the badge and city name over the photo. */
.oe-gci-watch__media::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(0deg, rgba(9, 25, 57, 0.82) 0%, rgba(9, 25, 57, 0.15) 46%, rgba(9, 25, 57, 0) 66%);
	pointer-events: none;
}

.oe-gci-watch__badge {
	position: absolute;
	top: 14px;
	right: 14px;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px 6px 10px;
	border-radius: 999px;
	background: var(--oe-sky-blue);
	color: #fff;
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}
.oe-gci-watch__badge-icon {
	width: 14px;
	height: 14px;
	fill: #fff;
	flex-shrink: 0;
}

.oe-gci-watch__place {
	position: absolute;
	left: 16px;
	right: 16px;
	bottom: 14px;
	z-index: 2;
	display: flex;
	flex-direction: column;
	gap: 1px;
}
.oe-gci-watch__city {
	color: #fff;
	font-size: 1.5rem;
	font-weight: 700;
	line-height: 1.1;
	text-shadow: 0 1px 10px rgba(9, 25, 57, 0.5);
}
.oe-gci-watch__country {
	color: rgba(255, 255, 255, 0.9);
	font-size: 0.9rem;
	font-weight: 500;
	text-shadow: 0 1px 8px rgba(9, 25, 57, 0.5);
}

/* ---- Scores (condensed) ---- */
.oe-gci-watch__scores {
	list-style: none;
	margin: 0;
	padding: 14px 18px 16px;
	display: flex;
	flex-direction: column;
}
.oe-gci-watch__score-row {
	display: flex;
	align-items: center;
	gap: 9px;
	padding: 5px 0;
	line-height: 1.2;
}
.oe-gci-watch__score-row + .oe-gci-watch__score-row {
	border-top: 1px solid var(--oe-gci-watch-line);
}
.oe-gci-watch__dot {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	flex-shrink: 0;
	background: var(--oe-gci-watch-dot, currentColor);
}
.oe-gci-watch__score-label {
	flex: 1 1 auto;
	min-width: 0;
	color: var(--oe-gci-watch-text-body);
	font-size: 0.9rem;
	font-weight: 500;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.oe-gci-watch__score-value {
	flex-shrink: 0;
	color: var(--oe-gci-watch-text-heading);
	font-size: 0.95rem;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

/* ---- Controls ---- */
.oe-gci-watch__controls {
	display: flex;
	align-items: center;
	justify-content: flex-start;   /* tablet & desktop: arrows left, dots right */
	gap: 12px;
	margin-top: 18px;
}
.oe-gci-watch__arrow--prev { order: 1; }
.oe-gci-watch__arrow--next { order: 2; }
.oe-gci-watch__progress    { order: 3; margin-left: auto; }
.oe-gci-watch__arrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 1px solid var(--oe-heritage-blue);
	border-radius: var(--oe-border-radius-base, 8px);
	background: var(--oe-heritage-blue);
	color: #fff;
	cursor: pointer;
	transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.oe-gci-watch__arrow svg { width: 22px; height: 22px; }
.oe-gci-watch__arrow:hover:not(:disabled) {
	background: var(--oe-color-primary, #00addc);
	border-color: var(--oe-color-primary, #00addc);
	color: #fff;
}
.oe-gci-watch__arrow:focus-visible {
	outline: none;
	background: var(--oe-color-primary, #00addc);
	border-color: var(--oe-color-primary, #00addc);
	color: #fff;
	box-shadow: 0 0 0 3px var(--oe-sky-blue-30);
}
.oe-gci-watch__arrow:disabled {
	opacity: 0.4;
	cursor: default;
}

/* Compact "current / total" counter (per-city dots don't scale to 28, and the
   carousel loops infinitely so a linear progress bar would be misleading). */
.oe-gci-watch__progress {
	margin-block: 0;   /* reset the <p> vertical margins only — keep margin-left:auto (right-aligns on desktop/tablet) */
	display: flex;
	align-items: center;
}
.oe-gci-watch__count {
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--oe-gci-watch-text-muted);
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}
.oe-gci-watch__count-current {
	color: var(--oe-gci-watch-text-heading);
	font-weight: 700;
}

/* ---- Responsive: 3 -> 2 -> 1 ---- */
@media (max-width: 1024px) {
	.oe-gci-watch { --oe-gci-watch-pv: 2; --oe-gci-watch-gap: 20px; }
}
@media (max-width: 640px) {
	.oe-gci-watch { --oe-gci-watch-pv: 1; --oe-gci-watch-gap: 16px; }
	.oe-gci-watch__city { font-size: 1.35rem; }

	/* Mobile keeps the original centred [prev] [progress] [next] arrangement. */
	.oe-gci-watch__controls { justify-content: center; gap: 18px; }
	.oe-gci-watch__arrow--prev { order: 1; }
	.oe-gci-watch__progress    { order: 2; margin-left: 0; }
	.oe-gci-watch__arrow--next { order: 3; }
}

@media (prefers-reduced-motion: reduce) {
	.oe-gci-watch__arrow { transition: none; }
}
