/* ============================================================
   OE GCI Top 10 Carousel
   A carousel of the top cities in the 2026 Global Cities Index.
   Self-contained: design tokens are inlined so the block renders
   identically regardless of the host theme. Every class is
   prefixed oe-gci-t10. The six pillar dot colours mirror the
   GCI Globe & Index block exactly (microsite consistency).
   ============================================================ */

.oe-gci-t10 {
	/* Brand palette */
	--oe-heritage-blue: #003466;
	--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-t10-cat-overall: #003466;
	--oe-gci-t10-cat-economics: #008AC8;
	--oe-gci-t10-cat-human: #B3107A;
	--oe-gci-t10-cat-qol: #B38D2F;
	--oe-gci-t10-cat-environment: #8BA612;
	--oe-gci-t10-cat-governance: #30B5AE;

	/* Surfaces & text */
	--oe-gci-t10-bg: #F5F8FA;
	--oe-gci-t10-card: #FFFFFF;
	--oe-gci-t10-line: rgba(0, 52, 102, 0.10);
	--oe-gci-t10-text-heading: #003466;
	--oe-gci-t10-text-body: #455055;
	--oe-gci-t10-text-muted: #7C8891;
	--oe-gci-t10-shadow: 0 10px 30px rgba(9, 25, 57, 0.10);
	--oe-gci-t10-shadow-sm: 0 2px 8px rgba(9, 25, 57, 0.08);

	/* Layout. The desktop card count is set inline via --oe-gci-t10-pv-desktop;
	   the active per-view is derived here so the media queries below can override
	   it (an inline custom property would otherwise beat the breakpoint rules). */
	--oe-gci-t10-pv-desktop: 3;
	--oe-gci-t10-pv: var(--oe-gci-t10-pv-desktop, 3);
	--oe-gci-t10-gap: 24px;
	--oe-gci-t10-radius: 16px;

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

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

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

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

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

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

/* ---- Media ---- */
.oe-gci-t10__media {
	position: relative;
	aspect-ratio: 16 / 8;
	overflow: hidden;
}
.oe-gci-t10__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.oe-gci-t10__media::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(0deg, rgba(9, 25, 57, 0.78) 0%, rgba(9, 25, 57, 0.10) 42%, rgba(9, 25, 57, 0) 62%);
	pointer-events: none;
}

.oe-gci-t10__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-heritage-blue);
	color: #fff;
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	box-shadow: var(--oe-gci-t10-shadow-sm);
}
.oe-gci-t10__badge-icon {
	width: 13px;
	height: 13px;
	fill: var(--oe-sky-blue-60);
	flex-shrink: 0;
}

.oe-gci-t10__place {
	position: absolute;
	left: 16px;
	right: 16px;
	bottom: 14px;
	z-index: 2;
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 12px;
}
.oe-gci-t10__rank-num {
	flex-shrink: 0;
	color: var(--oe-color-primary, #00addc);
	font-size: 2.25rem;
	font-weight: 700;
	line-height: 1;
	font-variant-numeric: tabular-nums;
	text-shadow: 0 1px 10px rgba(9, 25, 57, 0.55);
}
.oe-gci-t10__place-text {
	display: flex;
	flex-direction: column;
	gap: 1px;
	min-width: 0;
}
.oe-gci-t10__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-t10__country {
	color: rgba(255, 255, 255, 0.88);
	font-size: 0.9rem;
	font-weight: 500;
	text-shadow: 0 1px 8px rgba(9, 25, 57, 0.5);
}

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

/* ---- Controls ---- */
.oe-gci-t10__controls {
	display: flex;
	align-items: center;
	justify-content: flex-start;   /* tablet & desktop: arrows left, dots right */
	gap: 12px;
	margin-top: 18px;
}
.oe-gci-t10__arrow--prev { order: 1; }
.oe-gci-t10__arrow--next { order: 2; }
.oe-gci-t10__dots        { order: 3; margin-left: auto; }
.oe-gci-t10__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-t10__arrow svg { width: 22px; height: 22px; }
.oe-gci-t10__arrow:hover:not(:disabled) {
	background: var(--oe-color-primary, #00addc);
	border-color: var(--oe-color-primary, #00addc);
	color: #fff;
}
.oe-gci-t10__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-t10__arrow:disabled {
	opacity: 0.4;
	cursor: default;
	box-shadow: none;
}

.oe-gci-t10__dots {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	justify-content: center;
}
.oe-gci-t10__dot-btn {
	display: inline-flex;
	padding: 6px;              /* comfortable hit area */
	border: 0;
	background: none;
	cursor: pointer;
	line-height: 0;
}
.oe-gci-t10__dot-btn span {
	display: block;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--oe-sky-blue-30);
	transition: background 0.15s ease, transform 0.15s ease;
}
.oe-gci-t10__dot-btn:hover span { background: var(--oe-sky-blue-60); }
.oe-gci-t10__dot-btn.is-active span {
	background: var(--oe-heritage-blue);
	transform: scale(1.35);
}
.oe-gci-t10__dot-btn:focus-visible {
	outline: none;
	border-radius: 50%;
	box-shadow: 0 0 0 3px var(--oe-sky-blue-30);
}

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

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

@media (prefers-reduced-motion: reduce) {
	.oe-gci-t10__dot-btn span,
	.oe-gci-t10__arrow { transition: none; }
}
