/* Custom Map Plugin — Front-end styles (BEM).
   Fully themable via CSS custom properties injected inline per instance.
   Every popup property can also be overridden per-pin at click time. */

.cmp-map {
	--cmp-accent: #0a84ff;
	--cmp-pin: var(--cmp-accent);
	--cmp-pin-size: 14px;
	--cmp-stage-bg: transparent;
	--cmp-stage-padding: 0px;
	--cmp-stage-radius: 0px;
	--cmp-popup-bg: #ffffff;
	--cmp-popup-text: #111111;
	--cmp-popup-muted: #6b6b70;
	--cmp-popup-accent: var(--cmp-accent);
	--cmp-popup-border: rgba(0, 0, 0, 0.08);
	--cmp-radius: 16px;
	--cmp-shadow: 0 24px 60px -12px rgba(0, 0, 0, 0.28), 0 8px 20px -6px rgba(0, 0, 0, 0.12);

	/* Geo map */
	--cmp-geo-base: #e6e6ec;
	--cmp-geo-stroke: #ffffff;
	--cmp-geo-active: var(--cmp-accent);

	position: relative;
	width: 100%;
	font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: var(--cmp-popup-text);
	line-height: 1.45;
}

.cmp-map *,
.cmp-map *::before,
.cmp-map *::after {
	box-sizing: border-box;
}

/* Theme: dark */
.cmp-map--theme-dark {
	--cmp-popup-bg: #1c1c1e;
	--cmp-popup-text: #f5f5f7;
	--cmp-popup-muted: #a1a1a6;
	--cmp-popup-border: rgba(255, 255, 255, 0.1);
	--cmp-shadow: 0 24px 60px -12px rgba(0, 0, 0, 0.6), 0 8px 20px -6px rgba(0, 0, 0, 0.4);
	--cmp-geo-base: #2c2c2e;
	--cmp-geo-stroke: #1c1c1e;
}

@media (prefers-color-scheme: dark) {
	.cmp-map--theme-auto {
		--cmp-popup-bg: #1c1c1e;
		--cmp-popup-text: #f5f5f7;
		--cmp-popup-muted: #a1a1a6;
		--cmp-popup-border: rgba(255, 255, 255, 0.1);
		--cmp-shadow: 0 24px 60px -12px rgba(0, 0, 0, 0.6), 0 8px 20px -6px rgba(0, 0, 0, 0.4);
		--cmp-geo-base: #2c2c2e;
		--cmp-geo-stroke: #1c1c1e;
	}
}

/* Intro */
.cmp-map__intro {
	display: grid;
	grid-template-columns: 1fr;
	gap: 20px;
	margin-bottom: 24px;
}

.cmp-map__intro:has(.cmp-map__intro-media):has(.cmp-map__intro-text) {
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	align-items: center;
}

.cmp-map__intro-media {
	line-height: 0;
	border-radius: var(--cmp-radius);
	overflow: hidden;
}

.cmp-map__intro-media img {
	display: block;
	width: 100%;
	height: auto;
	max-height: 360px;
	object-fit: cover;
}

.cmp-map__intro-text {
	font-size: 15px;
	line-height: 1.6;
	color: var(--cmp-popup-muted);
}

.cmp-map__intro-text p:first-child { margin-top: 0; }
.cmp-map__intro-text p:last-child  { margin-bottom: 0; }

/* Frame — outer wrapper that carries the user-controlled background,
   padding and rounded corners. Keeping it separate from the stage means
   the stage stays exactly image-sized, so pins remain pixel-perfect. */
.cmp-map__frame {
	background: var(--cmp-stage-bg);
	padding: var(--cmp-stage-padding);
	border-radius: var(--cmp-stage-radius);
	overflow: hidden;
}

/* Stage — tight image container; no own background or padding. */
.cmp-map__stage {
	position: relative;
	width: 100%;
	line-height: 0;
}

.cmp-map__image {
	display: block;
	width: 100%;
	height: auto;
	max-width: 100%;
}

.cmp-map__pins {
	position: absolute;
	inset: 0;
	pointer-events: none;
}

/* Pin */
.cmp-map__pin {
	position: absolute;
	width: calc(var(--cmp-pin-size) + 14px);
	height: calc(var(--cmp-pin-size) + 14px);
	margin-left: calc((var(--cmp-pin-size) + 14px) / -2);
	margin-top: calc((var(--cmp-pin-size) + 14px) / -2);
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
	pointer-events: auto;
	-webkit-appearance: none;
	appearance: none;
	outline: none;
}

.cmp-map__pin-dot {
	position: absolute;
	inset: 0;
	margin: auto;
	width: var(--cmp-pin-size);
	height: var(--cmp-pin-size);
	border-radius: 50%;
	background: var(--cmp-pin);
	box-shadow:
		0 0 0 3px #fff,
		0 2px 6px rgba(0, 0, 0, 0.25);
	transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
	z-index: 2;
}

.cmp-map__pin-pulse {
	position: absolute;
	inset: 0;
	margin: auto;
	width: var(--cmp-pin-size);
	height: var(--cmp-pin-size);
	border-radius: 50%;
	background: var(--cmp-pin);
	opacity: 0.35;
	z-index: 1;
	animation: cmp-pulse 2.2s ease-out infinite;
	pointer-events: none;
}

.cmp-map--no-pulse .cmp-map__pin-pulse { display: none; }

@keyframes cmp-pulse {
	0%   { transform: scale(1);   opacity: 0.6; }
	80%  { transform: scale(2.6); opacity: 0;   }
	100% { transform: scale(2.6); opacity: 0;   }
}

.cmp-map__pin:hover .cmp-map__pin-dot,
.cmp-map__pin:focus-visible .cmp-map__pin-dot {
	transform: scale(1.35);
	box-shadow:
		0 0 0 3px #fff,
		0 0 0 8px rgba(0, 0, 0, 0.12),
		0 6px 14px rgba(0, 0, 0, 0.3);
}

.cmp-map__pin.is-active .cmp-map__pin-dot {
	transform: scale(1.35);
	box-shadow:
		0 0 0 3px #fff,
		0 0 0 8px color-mix(in srgb, var(--cmp-pin) 35%, transparent),
		0 6px 14px rgba(0, 0, 0, 0.3);
}

/* Geo map — inline SVG of countries. */
.cmp-map__geo {
	line-height: 0;
}

.cmp-map__geo svg {
	display: block;
	width: 100%;
	height: auto;
}

.cmp-map__geo svg path {
	fill: var(--cmp-geo-base);
	stroke: var(--cmp-geo-stroke);
	stroke-width: 0.6px;
	vector-effect: non-scaling-stroke;
	pointer-events: none;
	transition: fill 0.18s ease, filter 0.18s ease;
}

/* Configured countries: filled with the accent, interactive. */
.cmp-map__geo svg path.cmp-geo__region--active {
	fill: var(--cmp-geo-active);
	pointer-events: auto;
	cursor: pointer;
}

/* Hovering a clickable country pulses it with a glow so visitors know it can
   be clicked. */
@keyframes cmp-geo-hover-pulse {
	0%, 100% { filter: brightness(1.15) drop-shadow(0 0 1px var(--cmp-geo-active)); }
	50%      { filter: brightness(1.42) drop-shadow(0 0 7px var(--cmp-geo-active)); }
}

.cmp-map__geo svg path.cmp-geo__region--active:hover,
.cmp-map__geo svg path.cmp-geo__region--active:focus-visible {
	outline: none;
	animation: cmp-geo-hover-pulse 1.1s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
	.cmp-map__geo svg path.cmp-geo__region--active:hover,
	.cmp-map__geo svg path.cmp-geo__region--active:focus-visible {
		animation: none;
		filter: brightness(1.2);
	}
}

.cmp-map__geo svg path.cmp-geo__region--selected {
	filter: brightness(1.2);
	stroke: var(--cmp-popup-bg);
	stroke-width: 1.2px;
}

/* Popup — pops out of the pin. Transform-origin follows the arrow (i.e. the
   pin side) so the popup scales up from the pin itself, not the center. */
.cmp-map__popup {
	position: absolute;
	z-index: 20;
	width: min(340px, calc(100% - 24px));
	background: var(--cmp-popup-bg);
	color: var(--cmp-popup-text);
	border: 1px solid var(--cmp-popup-border);
	border-radius: var(--cmp-radius);
	box-shadow: var(--cmp-shadow);
	backdrop-filter: saturate(180%) blur(20px);
	-webkit-backdrop-filter: saturate(180%) blur(20px);
	opacity: 0;
	transform: scale(0.6) translateY(12px);
	transform-origin: var(--cmp-arrow-x, 50%) 100%;
	transition:
		opacity 0.18s ease-out,
		transform 0.38s cubic-bezier(0.34, 1.56, 0.64, 1);
	pointer-events: none;
	overflow: hidden;
}

.cmp-map__popup[data-placement="bottom"] {
	transform: scale(0.6) translateY(-12px);
	transform-origin: var(--cmp-arrow-x, 50%) 0%;
}

.cmp-map__popup.is-open {
	opacity: 1;
	transform: scale(1) translateY(0);
	pointer-events: auto;
}

.cmp-map__popup[hidden] { display: none !important; }

/* Caret fades in slightly later so the pop reads first */
.cmp-map__popup::before {
	transition: opacity 0.2s ease 0.12s;
}

/* Inner content staggers in after the shell has popped */
@keyframes cmp-pop-in {
	from { opacity: 0; transform: translateY(8px); }
	to   { opacity: 1; transform: translateY(0); }
}

@keyframes cmp-pop-in-media {
	from { opacity: 0; transform: scale(1.04); }
	to   { opacity: 1; transform: scale(1); }
}

.cmp-map__popup.is-open .cmp-map__popup-media img { animation: cmp-pop-in-media 0.45s cubic-bezier(0.22, 1, 0.36, 1) 0.05s both; }
.cmp-map__popup.is-open .cmp-map__popup-title     { animation: cmp-pop-in 0.35s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both; }
.cmp-map__popup.is-open .cmp-map__popup-desc      { animation: cmp-pop-in 0.35s cubic-bezier(0.22, 1, 0.36, 1) 0.18s both; }
.cmp-map__popup.is-open .cmp-map__popup-link      { animation: cmp-pop-in 0.35s cubic-bezier(0.22, 1, 0.36, 1) 0.24s both; }
.cmp-map__popup.is-open .cmp-map__popup-close     { animation: cmp-pop-in 0.3s  cubic-bezier(0.22, 1, 0.36, 1) 0.18s both; }

/* Active pin gets a small bounce when it's selected */
@keyframes cmp-pin-bounce {
	0%   { transform: scale(1); }
	35%  { transform: scale(1.45); }
	70%  { transform: scale(1.28); }
	100% { transform: scale(1.35); }
}

.cmp-map__pin.is-active .cmp-map__pin-dot {
	animation: cmp-pin-bounce 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.cmp-map__popup-inner {
	position: relative;
}

.cmp-map__popup-media {
	line-height: 0;
	background: color-mix(in srgb, var(--cmp-popup-text) 5%, transparent);
}

.cmp-map__popup-media:empty { display: none; }

.cmp-map__popup-media img {
	width: 100%;
	height: auto;
	display: block;
	max-height: 220px;
	object-fit: cover;
}

.cmp-map__popup-body {
	padding: 18px 20px 20px;
}

.cmp-map__popup-close {
	position: absolute;
	top: 10px;
	right: 10px;
	width: 30px;
	height: 30px;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.5);
	color: #fff;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
	transition: background 0.15s ease, transform 0.2s ease, box-shadow 0.15s ease;
	z-index: 2;
}

.cmp-map__popup-close:hover {
	background: rgba(0, 0, 0, 0.75);
	transform: rotate(90deg) scale(1.06);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.cmp-map__popup-close svg {
	display: block;
}

/* When popup has no media, give the close button a solid background that
   contrasts with the popup's own background instead of the dark overlay. */
.cmp-map__popup-media:empty ~ .cmp-map__popup-close,
.cmp-map__popup:not(:has(.cmp-map__popup-media img)) .cmp-map__popup-close {
	background: color-mix(in srgb, var(--cmp-popup-text) 12%, transparent);
	color: var(--cmp-popup-text);
	box-shadow: none;
	backdrop-filter: none;
	-webkit-backdrop-filter: none;
}

.cmp-map__popup-media:empty ~ .cmp-map__popup-close:hover,
.cmp-map__popup:not(:has(.cmp-map__popup-media img)) .cmp-map__popup-close:hover {
	background: color-mix(in srgb, var(--cmp-popup-text) 22%, transparent);
}

.cmp-map__popup-title {
	margin: 0 0 6px 0;
	font-size: 18px;
	font-weight: 600;
	letter-spacing: -0.015em;
	color: var(--cmp-popup-text);
	line-height: 1.3;
}

.cmp-map__popup-title:empty { display: none; }

.cmp-map__popup-desc {
	margin: 0;
	font-size: 14px;
	line-height: 1.55;
	color: var(--cmp-popup-muted);
}

.cmp-map__popup-desc:empty { display: none; }

.cmp-map__popup-desc p:first-child { margin-top: 0; }
.cmp-map__popup-desc p:last-child  { margin-bottom: 0; }

.cmp-map__popup-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: 14px;
	padding: 8px 14px;
	font-size: 13px;
	font-weight: 600;
	color: #fff;
	background: var(--cmp-popup-accent);
	text-decoration: none;
	border-radius: 999px;
	transition: transform 0.15s ease, filter 0.15s ease, gap 0.15s ease;
}

.cmp-map__popup-link[hidden] { display: none !important; }

.cmp-map__popup-link:hover {
	filter: brightness(1.08);
	gap: 10px;
	text-decoration: none;
	color: #fff;
}

.cmp-map__popup-link span {
	transition: transform 0.15s ease;
	display: inline-block;
}

.cmp-map__popup-link:hover span { transform: translateX(2px); }

/* Small caret pointer on popup */
.cmp-map__popup::before {
	content: "";
	position: absolute;
	width: 12px;
	height: 12px;
	background: var(--cmp-popup-bg);
	border: 1px solid var(--cmp-popup-border);
	transform: rotate(45deg);
	z-index: 1;
	transition: top 0.2s ease, bottom 0.2s ease, left 0.2s ease;
	opacity: 0;
}

.cmp-map__popup.is-open::before { opacity: 1; }

.cmp-map__popup[data-placement="top"]::before {
	bottom: -7px;
	left: var(--cmp-arrow-x, 50%);
	margin-left: -6px;
	border-top: 0;
	border-left: 0;
	clip-path: polygon(100% 0, 100% 100%, 0 100%);
}

.cmp-map__popup[data-placement="bottom"]::before {
	top: -7px;
	left: var(--cmp-arrow-x, 50%);
	margin-left: -6px;
	border-bottom: 0;
	border-right: 0;
	clip-path: polygon(0 0, 100% 0, 0 100%);
}

/* Mobile */
@media (max-width: 600px) {
	.cmp-map__pin {
		width: calc(var(--cmp-pin-size) + 22px);
		height: calc(var(--cmp-pin-size) + 22px);
		margin-left: calc((var(--cmp-pin-size) + 22px) / -2);
		margin-top: calc((var(--cmp-pin-size) + 22px) / -2);
	}

	.cmp-map__popup {
		width: calc(100% - 24px);
	}

	.cmp-map__intro:has(.cmp-map__intro-media):has(.cmp-map__intro-text) {
		grid-template-columns: 1fr;
	}
}

@media (prefers-reduced-motion: reduce) {
	.cmp-map__pin-pulse { animation: none; }
	.cmp-map__pin-dot,
	.cmp-map__popup,
	.cmp-map__popup-link,
	.cmp-map__popup-link span,
	.cmp-map__popup-close { transition: none; }
	.cmp-map__popup.is-open .cmp-map__popup-media img,
	.cmp-map__popup.is-open .cmp-map__popup-title,
	.cmp-map__popup.is-open .cmp-map__popup-desc,
	.cmp-map__popup.is-open .cmp-map__popup-link,
	.cmp-map__popup.is-open .cmp-map__popup-close,
	.cmp-map__pin.is-active .cmp-map__pin-dot { animation: none !important; }
}

/* ================================================================== */
/*  Sidebar layout (geo maps)                                         */
/* ================================================================== */

.cmp-map--sidebar {
	--cmp-panel-w: clamp(300px, 32%, 380px);
	--cmp-panel-gap: 20px;
}

.cmp-map--sidebar .cmp-geo-layout {
	position: relative;
}

/* Fixed-ratio box. It is always full width (it never shrinks), so its height
   — set inline by JS via padding-bottom — stays constant whether or not the
   panel is open. The map and the panel are absolutely positioned inside it. */
.cmp-geo-stagebox {
	position: relative;
	width: 100%;
}

/* Map frame fills the box; when the panel opens it gives up room on the right
   so the map shrinks to the left instead of being covered. */
.cmp-map--sidebar .cmp-map__frame {
	position: absolute;
	inset: 0;
	width: auto;
	overflow: visible;
	transition: right 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

.cmp-map--sidebar.cmp-map--panel-open .cmp-map__frame {
	right: calc(var(--cmp-panel-w) + var(--cmp-panel-gap));
}

.cmp-map--sidebar .cmp-map__geo {
	position: absolute;
	inset: 0;
	width: auto;
	overflow: hidden;
}

.cmp-map--sidebar .cmp-map__geo svg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}

/* ---- Continent zoom rail ---- */
.cmp-geo-rail {
	position: absolute;
	left: clamp(8px, 2%, 22px);
	top: 50%;
	transform: translateY(-50%);
	z-index: 6;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.cmp-geo-rail__btn {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	padding: 6px 16px 6px 6px;
	border: 1px solid transparent;
	background: color-mix(in srgb, var(--cmp-popup-bg) 55%, transparent);
	color: var(--cmp-popup-muted);
	cursor: pointer;
	border-radius: 999px;
	font: inherit;
	-webkit-appearance: none;
	appearance: none;
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.cmp-geo-rail__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	flex: 0 0 auto;
	border-radius: 50%;
	border: 1px solid var(--cmp-popup-border);
	background: color-mix(in srgb, var(--cmp-popup-bg) 70%, transparent);
	transition: border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.cmp-geo-rail__label {
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	white-space: nowrap;
}

.cmp-geo-rail__btn:hover {
	color: var(--cmp-popup-text);
	background: color-mix(in srgb, var(--cmp-popup-bg) 78%, transparent);
}

.cmp-geo-rail__btn.is-active {
	color: var(--cmp-popup-accent);
	background: color-mix(in srgb, var(--cmp-popup-bg) 85%, transparent);
	border-color: color-mix(in srgb, var(--cmp-popup-accent) 45%, transparent);
}

.cmp-geo-rail__btn.is-active .cmp-geo-rail__icon {
	border-color: var(--cmp-popup-accent);
	color: var(--cmp-popup-accent);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--cmp-popup-accent) 22%, transparent);
}

/* ---- Flag strip ---- */
.cmp-geo-flags {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: flex-start;
	gap: 8px 4px;
	margin-top: 16px;
	padding: 14px 16px;
	border: 1px solid var(--cmp-flags-border, var(--cmp-popup-border));
	border-radius: var(--cmp-radius);
	background: var(--cmp-flags-bg, color-mix(in srgb, var(--cmp-popup-bg) 60%, transparent));
}

.cmp-geo-flags__chip {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	width: 64px;
	flex: 0 0 auto;
	padding: 6px 4px;
	border: 0;
	border-radius: 12px;
	/* Force transparent so the host theme's button hover/active background
	   (the unwanted pink box) can't show through. */
	background: transparent !important;
	box-shadow: none !important;
	color: var(--cmp-popup-muted);
	cursor: pointer;
	font: inherit;
	-webkit-appearance: none;
	appearance: none;
	transition: color 0.16s ease;
}

.cmp-map .cmp-geo-flags__chip,
.cmp-map .cmp-geo-flags__chip:hover,
.cmp-map .cmp-geo-flags__chip:focus,
.cmp-map .cmp-geo-flags__chip:active,
.cmp-map .cmp-geo-flags__chip.is-active {
	background: transparent !important;
	box-shadow: none !important;
	outline: none;
}

/* Plain flag (no circle, no border). */
.cmp-geo-flags__flag {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 30px;
	line-height: 1;
	transition: transform 0.16s ease;
}

.cmp-geo-flags__name {
	font-size: 12px;
	font-weight: 600;
	text-align: center;
	line-height: 1.2;
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* Hover: gently enlarge the flag and brighten the name. */
.cmp-geo-flags__chip:hover {
	color: var(--cmp-popup-text);
}

.cmp-geo-flags__chip:hover .cmp-geo-flags__flag {
	transform: scale(1.14);
}

/* Keyboard focus ring (since the theme outline is removed). */
.cmp-geo-flags__chip:focus-visible .cmp-geo-flags__flag {
	outline: 2px solid var(--cmp-popup-accent);
	outline-offset: 3px;
	border-radius: 4px;
}

/* Active / selected country: accent name + a subtle lift. */
.cmp-geo-flags__chip.is-active {
	color: var(--cmp-popup-accent);
}

.cmp-geo-flags__chip.is-active .cmp-geo-flags__flag {
	transform: scale(1.18);
}

/* Optional color cover over the selected country's flag. Only visible when the
   "Selected flag overlay" color is set in Design → Layout; otherwise the
   overlay color resolves to transparent and nothing shows. */
.cmp-geo-flags__chip.is-active .cmp-geo-flags__flag::after {
	content: "";
	position: absolute;
	inset: -3px -2px;
	border-radius: 5px;
	background: var(--cmp-flag-active, transparent);
	opacity: 0.5;
	pointer-events: none;
}

/* ---- Side panel: docks to the right of the map inside the fixed-ratio box.
   The box height never changes, so opening the panel shrinks the map on the
   left without altering the overall height of the block. ---- */
.cmp-panelw {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	width: var(--cmp-panel-w);
	z-index: 8;
	opacity: 0;
	transform: translateX(16px);
	pointer-events: none;
	transition: opacity 0.32s ease, transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

.cmp-map--panel-open .cmp-panelw {
	opacity: 1;
	transform: translateX(0);
	pointer-events: auto;
}

.cmp-panelw[hidden] { display: block; }

.cmp-panelw__inner {
	width: 100%;
	height: 100%;
	max-height: 100%;
	display: flex;
	flex-direction: column;
	background: var(--cmp-popup-bg);
	color: var(--cmp-popup-text);
	border: 1px solid var(--cmp-popup-border);
	border-radius: var(--cmp-radius);
	box-shadow: var(--cmp-shadow);
	overflow: hidden;
}

.cmp-panelw__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 18px 20px 0;
}

.cmp-panelw__eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--cmp-popup-accent);
}

.cmp-panelw__eyebrow-flag:empty { display: none; }

.cmp-panelw__close {
	flex: 0 0 auto;
	width: 32px;
	height: 32px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: color-mix(in srgb, var(--cmp-popup-text) 8%, transparent);
	color: var(--cmp-popup-text);
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: background 0.15s ease, transform 0.2s ease;
}

.cmp-panelw__close:hover {
	background: color-mix(in srgb, var(--cmp-popup-text) 18%, transparent);
	transform: rotate(90deg);
}

.cmp-panelw__scroll {
	flex: 1 1 auto;
	overflow-y: auto;
	padding: 14px 20px 8px;
	scrollbar-width: thin;
}

.cmp-panelw__title {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	font-size: 30px;
	font-weight: 800;
	letter-spacing: -0.02em;
	line-height: 1.1;
	color: var(--cmp-popup-text);
}

.cmp-panelw__title-flag {
	font-size: 24px;
	line-height: 1;
}

.cmp-panelw__title-flag:empty { display: none; }

.cmp-panelw__subtitle {
	margin-top: 6px;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: var(--cmp-subtitle, var(--cmp-popup-muted));
}

.cmp-panelw__subtitle[hidden] { display: none; }

.cmp-panelw__media {
	margin-top: 16px;
	line-height: 0;
	border-radius: calc(var(--cmp-radius) - 4px);
	overflow: hidden;
}

.cmp-panelw__media:empty { display: none; }

.cmp-panelw__media img {
	display: block;
	width: 100%;
	height: auto;
	max-height: 240px;
	object-fit: cover;
}

.cmp-panelw__desc {
	margin-top: 16px;
	font-size: 14px;
	line-height: 1.6;
	color: var(--cmp-popup-muted);
}

.cmp-panelw__desc:empty { display: none; }
.cmp-panelw__desc p:first-child { margin-top: 0; }
.cmp-panelw__desc p:last-child { margin-bottom: 0; }

.cmp-panelw__products {
	margin-top: 22px;
}

.cmp-panelw__products[hidden] { display: none; }

.cmp-panelw__products-head {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--cmp-popup-accent);
	margin-bottom: 6px;
}

.cmp-panelw__products-head:empty { display: none; }

.cmp-panelw__products-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.cmp-panelw__product > a,
.cmp-panelw__product > span {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 13px 2px;
	border-top: 1px solid var(--cmp-popup-border);
	font-size: 14px;
	color: var(--cmp-popup-text);
	text-decoration: none;
}

.cmp-panelw__product:last-child > a,
.cmp-panelw__product:last-child > span {
	border-bottom: 1px solid var(--cmp-popup-border);
}

.cmp-panelw__product--link > a {
	transition: color 0.15s ease, padding 0.15s ease;
}

.cmp-panelw__product--link > a:hover {
	color: var(--cmp-popup-accent);
	padding-left: 6px;
}

.cmp-panelw__product-arrow {
	flex: 0 0 auto;
	font-size: 18px;
	line-height: 1;
	color: var(--cmp-popup-muted);
	transition: transform 0.15s ease, color 0.15s ease;
}

.cmp-panelw__product--link > a:hover .cmp-panelw__product-arrow {
	color: var(--cmp-popup-accent);
	transform: translateX(3px);
}

.cmp-panelw__cta {
	flex: 0 0 auto;
	margin: 16px 20px 20px;
	padding: 15px 20px;
	border-radius: 999px;
	background: var(--cmp-popup-accent);
	color: #fff;
	font-size: 15px;
	font-weight: 700;
	text-align: center;
	text-decoration: none;
	transition: filter 0.15s ease, transform 0.15s ease;
}

.cmp-panelw__cta[hidden] { display: none; }

.cmp-panelw__cta:hover {
	filter: brightness(1.08);
	transform: translateY(-1px);
	color: #fff;
}

/* Panel content fade/slide-in on open */
@keyframes cmp-panel-in {
	from { opacity: 0; transform: translateY(10px); }
	to   { opacity: 1; transform: translateY(0); }
}

.cmp-panelw.is-open .cmp-panelw__title    { animation: cmp-panel-in 0.4s cubic-bezier(0.22, 1, 0.36, 1) 0.05s both; }
.cmp-panelw.is-open .cmp-panelw__media    { animation: cmp-panel-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both; }
.cmp-panelw.is-open .cmp-panelw__desc     { animation: cmp-panel-in 0.4s cubic-bezier(0.22, 1, 0.36, 1) 0.16s both; }
.cmp-panelw.is-open .cmp-panelw__products { animation: cmp-panel-in 0.4s cubic-bezier(0.22, 1, 0.36, 1) 0.22s both; }

/* ---- Sidebar responsive ---- */

/* Tablet / phone: stop docking. Everything flows vertically — full-width map,
   then the country panel as a full-width card, then the flag strip. The map
   returns to natural flow so it is never covered by the panel. */
@media (max-width: 820px) {
	.cmp-geo-stagebox {
		height: auto !important;
		padding-bottom: 0 !important;
	}

	.cmp-map--sidebar .cmp-map__frame {
		position: relative;
		inset: auto;
		right: auto !important;
	}

	.cmp-map--sidebar .cmp-map__geo {
		position: relative;
		inset: auto;
	}

	.cmp-map--sidebar .cmp-map__geo svg {
		position: relative;
		inset: auto;
		width: 100%;
		height: auto;
	}

	.cmp-panelw {
		position: relative;
		inset: auto;
		width: 100%;
		max-height: 0;
		opacity: 1;
		overflow: hidden;
		transform: none;
		pointer-events: auto;
		transition: max-height 0.45s cubic-bezier(0.4, 0, 0.2, 1), margin 0.4s ease;
	}

	.cmp-map--panel-open .cmp-panelw {
		max-height: 2600px;
		margin-top: 16px;
		transform: none;
	}

	.cmp-panelw__inner {
		width: 100%;
		height: auto;
		max-height: none;
	}

	.cmp-panelw__scroll {
		overflow-y: visible;
	}

	.cmp-panelw__cta {
		margin-bottom: 20px;
	}

	.cmp-geo-rail {
		left: 8px;
		gap: 5px;
	}

	.cmp-geo-rail__label { display: none; }
	.cmp-geo-rail__icon { width: 34px; height: 34px; }
}

/* Phone: hide the continent rail (too cramped over a small map) and shrink the
   flag chips. The flag strip remains the way to pick a country. */
@media (max-width: 560px) {
	.cmp-geo-rail { display: none; }

	.cmp-geo-flags {
		gap: 6px 2px;
		padding: 12px 10px;
	}

	.cmp-geo-flags__chip { width: 56px; }
	.cmp-geo-flags__flag { font-size: 26px; }
	.cmp-geo-flags__name { font-size: 11px; }

	.cmp-panelw__title { font-size: 26px; }
	.cmp-panelw__scroll { padding-left: 16px; padding-right: 16px; }
	.cmp-panelw__head { padding-left: 16px; padding-right: 16px; }
	.cmp-panelw__cta { margin-left: 16px; margin-right: 16px; }
}

@media (prefers-reduced-motion: reduce) {
	.cmp-panelw,
	.cmp-geo-rail__btn,
	.cmp-geo-rail__icon,
	.cmp-geo-flags__chip,
	.cmp-panelw__cta { transition: none; }
	.cmp-panelw.is-open .cmp-panelw__title,
	.cmp-panelw.is-open .cmp-panelw__media,
	.cmp-panelw.is-open .cmp-panelw__desc,
	.cmp-panelw.is-open .cmp-panelw__products { animation: none !important; }
}
