.topinka-tour-map {
	margin: 1rem auto 2rem;
	width: 100%;
	font-family: Poppins, sans-serif;
	scroll-margin-top: 90px;
}

.topinka-tour-map__frame {
	background: #e7eddf;
	border: 0;
	border-radius: 20px;
	box-shadow: 0 14px 34px rgba(34, 22, 25, .13);
	overflow: hidden;
	position: relative;
	display: flex;
	flex-direction: column;
	height: 100%;
	scroll-margin-top: 90px;
}

.topinka-tour-map__canvas {
	height: 100%;
	overflow: hidden;
	position: relative;
	width: 100%;
	z-index: 1;
}

.topinka-tour-map__experience {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	height: min(640px, calc(100vh - 200px));
	height: min(640px, calc(100dvh - 200px));
}

.topinka-tour-map__viewport { position: relative; min-height: 120px; flex: 1; }
.topinka-tour-map__controls {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: center;
	gap: 12px;
	padding: 10px 16px;
	flex-shrink: 0;
	background: #fff;
	border-top: 1px solid #eee4e6;
}

.topinka-tour-map__itinerary {
	background: linear-gradient(155deg, #fff 0%, #fcf8f8 100%);
	border-top: 1px solid #eee4e6;
	display: flex;
	flex-direction: column;
	min-height: 0;
	overflow: hidden;
	flex-shrink: 0;
}

.topinka-tour-map__stop-selector { display: none; }

.topinka-tour-map__itinerary-head {
	align-items: center;
	display: flex;
	justify-content: space-between;
	padding: 8px 16px 0;
}

.topinka-tour-map__itinerary-head span {
	color: #698747;
	font-size: .67rem;
	font-weight: 800;
	letter-spacing: .12em;
	text-transform: uppercase;
}
.topinka-tour-map__itinerary-head > div { display: flex; align-items: center; gap: 10px; }
.topinka-tour-map__itinerary-head > div > span { display: none; }

.topinka-tour-map .topinka-tour-map__itinerary-head h3 {
	color: #791227;
	font-size: .8rem;
	font-weight: 800;
	margin: 3px 0 0;
}

.topinka-tour-map__itinerary-tools > strong {
	background: #f4e8eb;
	border-radius: 999px;
	color: #791227;
	font-size: .72rem;
	font-weight: 800;
	padding: 3px 8px;
	white-space: nowrap;
}

.topinka-tour-map__itinerary-tools { display: flex; align-items: center; gap: 6px; }
.topinka-tour-map__itinerary-tools button {
	appearance: none;
	width: 44px;
	height: 44px;
	border: 1px solid #eadadd;
	border-radius: 10px;
	background: #fff;
	color: #791227;
	font-size: 1.1rem;
	cursor: pointer;
}
.topinka-tour-map__itinerary-tools button:hover:not(:disabled) { background: #791227; color: #fff; }
.topinka-tour-map__itinerary-tools button:disabled { opacity: .35; cursor: default; }

.topinka-tour-map__stops {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
	flex: 1;
	gap: 8px;
	max-height: 148px;
	overflow-x: hidden;
	overflow-y: auto;
	padding: 8px 12px 12px;
	position: relative;
	scrollbar-width: thin;
}

.topinka-tour-map__itinerary.is-slider .topinka-tour-map__stops {
	display: flex;
	max-height: none;
	overflow-x: auto;
	overflow-y: hidden;
	scroll-snap-type: x proximity;
	scroll-padding-inline: 12px;
	scrollbar-color: #b67a89 #f3e6e9;
}
.topinka-tour-map__itinerary.is-slider .topinka-tour-map__stop { flex: 0 0 clamp(200px, 24%, 280px); scroll-snap-align: start; }
.topinka-tour-map__stops:focus-visible { outline: 2px solid #698747; outline-offset: -3px; }

.topinka-tour-map__stop {
	align-items: center;
	appearance: none;
	background: transparent;
	border: 1px solid transparent;
	border-radius: 13px;
	color: inherit;
	cursor: pointer;
	display: grid;
	gap: 8px;
	grid-template-columns: auto minmax(0, 1fr);
	padding: 7px 8px;
	text-align: left;
	transition: background .2s ease, border-color .2s ease, box-shadow .2s ease, transform .2s ease;
	width: 100%;
	min-height: 54px;
}

.topinka-tour-map__stop:hover {
	background: #fff;
	border-color: #eadadd;
}

.topinka-tour-map__stop.is-active {
	background: #fff;
	border-color: rgba(121, 18, 39, .22);
	box-shadow: 0 7px 18px rgba(81, 25, 36, .1);
}

.topinka-tour-map__stop-day {
	align-items: center;
	background: #f3e6e9;
	border-radius: 10px;
	color: #791227;
	display: flex;
	font-size: .64rem;
	font-weight: 900;
	height: 36px;
	justify-content: center;
	letter-spacing: .03em;
	width: 44px;
}

.topinka-tour-map__stop.is-active .topinka-tour-map__stop-day {
	background: #791227;
	color: #fff;
}

.topinka-tour-map__stop-copy { min-width: 0; }

.topinka-tour-map__stop-copy strong {
	color: #2e2527;
	display: -webkit-box;
	font-size: .75rem;
	font-weight: 600;
	line-height: 1.35;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
}

.topinka-tour-map__stop-copy small {
	color: #71717a;
	display: -webkit-box;
	font-size: .72rem;
	line-height: 1.45;
	margin-top: 3px;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
}
.topinka-tour-map__stop-copy small { display: none; }

.topinka-tour-map__map-meta {
	align-items: center;
	display: flex;
	font-size: .68rem;
	font-weight: 700;
	gap: 8px;
	flex-wrap: wrap;
}

.topinka-tour-map__toolbar {
	display: flex;
	align-items: center;
	gap: 3px;
	padding: 4px;
	background: #fff;
	border: 1px solid rgba(121, 18, 39, .12);
	border-radius: 12px;
}

.topinka-tour-map__toolbar button,
.topinka-tour-map__loading button {
	appearance: none;
	background: transparent;
	border: 0;
	border-radius: 8px;
	color: #791227;
	cursor: pointer;
	font: 600 .7rem Poppins, sans-serif;
	min-height: 44px;
	padding: 7px 10px;
	min-width: 44px;
}

.topinka-tour-map__toolbar button[aria-pressed="true"],
.topinka-tour-map__toolbar button:hover,
.topinka-tour-map__loading button { background: #791227; color: #fff; }
.topinka-tour-map__toolbar [data-map-fullscreen] { font-size: 1.25rem; padding: 2px 9px; }
.topinka-tour-map__toolbar button[hidden] { display: none; }
.topinka-tour-map__frame:not(.is-ready) .topinka-tour-map__toolbar { visibility: hidden; }

.topinka-tour-map__loading {
	position: absolute;
	inset: 0;
	z-index: 600;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-direction: column;
	gap: 14px;
	background: radial-gradient(ellipse at 75% 25%, #d1dfbf, transparent 55%), linear-gradient(135deg, #edf0e6, #d4e4e7);
	color: #536b3e;
	font-size: .85rem;
}
.topinka-tour-map__loading[hidden], .topinka-tour-map__loading button[hidden] { display: none; }

.topinka-tour-map__toolbar { grid-column: 2; grid-row: 1; }
.topinka-tour-map__legend { grid-column: 1; grid-row: 1; display: block; color: #65635f; font-size: .65rem; line-height: 1.4; }
.topinka-tour-map__legend:before { content: ''; display: inline-block; width: 20px; border-top: 2px dashed #791227; margin-right: 6px; vertical-align: middle; }
.topinka-tour-map__legend.has-road:before { border-top: 3px solid #4285f4; }
.topinka-tour-map__status { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.topinka-tour-map button:focus-visible { outline: 3px solid #698747; outline-offset: 3px; }
.topinka-tour-map select:focus-visible, .topinka-tour-map .leaflet-control-zoom a:focus-visible { outline: 3px solid #698747; outline-offset: -3px; }
.topinka-tour-map .leaflet-control-scale-line { background: rgba(255, 255, 255, .9); border-color: #536b3e; color: #34492a; }
.topinka-tour-map .leaflet-control-attribution { background: rgba(255, 255, 255, .94); color: #4b5563; font-size: 11px; line-height: 1.4; }
.topinka-tour-map .leaflet-control-attribution a { color: #4b5563 !important; text-decoration: underline !important; text-underline-offset: 2px; }
.topinka-tour-map .leaflet-control-attribution a:focus-visible { outline: 2px solid #698747; outline-offset: 1px; }
.topinka-tour-map__frame:fullscreen { border-radius: 0; width: 100%; height: 100%; display: flex; flex-direction: column; }
.topinka-tour-map__frame:fullscreen .topinka-tour-map__viewport { flex: 1; }
.topinka-tour-map__frame:fullscreen .topinka-tour-map__canvas { height: 100%; }
.topinka-tour-map__frame:fullscreen .topinka-tour-map__controls { flex-shrink: 0; }
.topinka-tour-map__frame.is-satellite .topinka-map-marker { box-shadow: 0 4px 20px rgba(0, 0, 0, .5); }
.topinka-map-marker { transition: transform .2s, background .2s; }
.topinka-map-marker-wrap:hover .topinka-map-marker { transform: translateY(-4px); }
.topinka-tour-map .topinka-map-tooltip { background: #791227; border: 0; color: #fff; border-radius: 8px; padding: 8px 12px; font: 600 .7rem Poppins, sans-serif; }
.topinka-tour-map .topinka-map-tooltip:before { border-top-color: #791227; }

.topinka-tour-map__map-meta span:first-child { color: #791227; }
.topinka-tour-map__map-meta span + span { color: #698747; }

.topinka-tour-map .leaflet-control-zoom {
	border: 0;
	border-radius: 8px;
	box-shadow: none;
	display: flex;
	float: none;
	margin: 0 0 0 3px;
	overflow: hidden;
}

.topinka-tour-map .leaflet-control-zoom a {
	border-bottom-color: #eee !important;
	color: #791227;
	font-weight: 700;
	background: #f4e8eb;
	border: 0;
	width: 44px;
	height: 44px;
	line-height: 44px;
}

.topinka-map-marker-wrap { background: transparent; border: 0; }

.topinka-map-marker {
	align-items: center;
	background: #791227;
	border: 3px solid #fff;
	border-radius: 11px;
	box-shadow: 0 8px 15px rgba(73, 10, 25, .35);
	display: flex;
	flex-direction: column;
	height: 38px;
	justify-content: center;
	line-height: 1;
	position: relative;
	width: 52px;
}

.topinka-map-marker:after {
	border-left: 7px solid transparent;
	border-right: 7px solid transparent;
	border-top: 8px solid #791227;
	bottom: -9px;
	content: '';
	left: 50%;
	position: absolute;
	transform: translateX(-50%);
}

.topinka-map-marker span {
	color: #dce8c8;
	font-family: Poppins, sans-serif;
	font-size: .52rem;
	font-weight: 900;
	letter-spacing: .08em;
}

.topinka-map-marker strong {
	color: #fff;
	font-family: Poppins, sans-serif;
	font-size: .92rem;
	font-weight: 900;
	margin-top: 2px;
}

.topinka-map-marker-wrap.is-active .topinka-map-marker {
	background: #698747;
	box-shadow: 0 9px 20px rgba(52, 89, 28, .48);
	transform: translateY(-4px);
}

.topinka-map-marker-wrap.is-active .topinka-map-marker:after { border-top-color: #698747; }

.topinka-tour-map .leaflet-popup-content-wrapper {
	border-radius: 14px;
	box-shadow: 0 12px 32px rgba(39, 18, 22, .2);
	padding: 0;
	overflow: hidden;
}

.topinka-tour-map .leaflet-popup-content { margin: 0; }

.topinka-tour-map .leaflet-popup-tip { box-shadow: 3px 3px 8px rgba(39, 18, 22, .1); }

.topinka-map-popup { font-family: Poppins, sans-serif; overflow: hidden; text-align: left; }

.topinka-map-popup__media { height: var(--topinka-popup-image-height, 170px); overflow: hidden; position: relative; }

.topinka-map-popup__image { display: block; height: 100%; object-fit: cover; width: 100%; }

.topinka-map-popup__body { padding: 10px 12px 12px; }

.topinka-tour-map .leaflet-popup-content .topinka-map-popup h3 { color: #3b252a; font-size: 14px !important; font-weight: 600; line-height: 1.4; margin: 0; padding-right: 12px; }

.topinka-tour-map .leaflet-popup-close-button {
	position: absolute !important;
	top: 2px !important;
	right: 2px !important;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px !important;
	height: 44px !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 10px;
	background: transparent !important;
	color: #791227 !important;
	font: 400 28px/1 Arial, sans-serif !important;
	text-decoration: none !important;
	box-shadow: none !important;
	cursor: pointer;
	z-index: 2;
}
.topinka-tour-map .leaflet-popup-close-button span { display: none !important; }
.topinka-tour-map .leaflet-popup-close-button::before {
	content: '';
	position: absolute;
	inset: 7px;
	border-radius: 50%;
	background: rgba(255, 255, 255, .96);
	box-shadow: 0 2px 8px rgba(0, 0, 0, .16);
	pointer-events: none;
}
.topinka-tour-map .leaflet-popup-close-button::after {
	content: '';
	position: absolute;
	width: 12px;
	height: 12px;
	top: 16px;
	left: 16px;
	background: linear-gradient(45deg, transparent 43%, #791227 43%, #791227 57%, transparent 57%), linear-gradient(-45deg, transparent 43%, #791227 43%, #791227 57%, transparent 57%);
	pointer-events: none;
}
.topinka-tour-map .leaflet-popup-close-button:hover::before { background: #f8eef1; }
.topinka-tour-map .leaflet-popup-close-button:focus-visible { outline: none; }
.topinka-tour-map .leaflet-popup-close-button:focus-visible::before { outline: 3px solid #698747; outline-offset: 2px; }
.topinka-map-popup:not(.has-image) .topinka-map-popup__body { padding-right: 60px; min-height: 60px; }

@media (max-width: 640px) {
	.topinka-tour-map { margin: 1rem 0; }
	.topinka-tour-map__frame { border-radius: 17px; }
	.topinka-tour-map__controls { grid-template-columns: minmax(0, 1fr); padding: 8px; gap: 8px; }
	.topinka-tour-map__toolbar { grid-column: 1; grid-row: 1; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0; padding: 0; border: 0; }
	.topinka-tour-map__toolbar button { padding: 4px 2px; min-width: 44px; }
	.topinka-tour-map__toolbar .leaflet-control-zoom { display: contents; }
	.topinka-tour-map__toolbar .leaflet-control-zoom a { width: 100%; border-radius: 8px; }
	.topinka-tour-map__legend { grid-row: 2; font-size: .6rem; }
	.topinka-map-marker { transform: scale(.82); transform-origin: center bottom; }
	.topinka-map-marker-wrap.is-active .topinka-map-marker,
	.topinka-map-marker-wrap:hover .topinka-map-marker { transform: translateY(-4px) scale(.82); }
}

@media (max-width: 900px) {
	.topinka-tour-map__itinerary-head, .topinka-tour-map__stops { display: none; }
	.topinka-tour-map__itinerary.is-slider .topinka-tour-map__itinerary-head { display: flex; }
	.topinka-tour-map__itinerary.is-slider .topinka-tour-map__stop-selector { display: none; }
	.topinka-tour-map__stop-selector { display: block; padding: 8px 12px 12px; color: #791227; font-size: .75rem; font-weight: 600; }
	.topinka-tour-map__stop-selector span { display: block; margin-bottom: 4px; }
	.topinka-tour-map__stop-selector select { width: 100%; min-height: 44px; border: 1px solid #d8bec5; border-radius: 8px; background: #fff; color: #34272b; font: inherit; padding: 8px; }
}

@media (max-width: 640px) and (max-height: 600px) {
	.topinka-tour-map__viewport { min-height: 80px; }
}

@media (max-width: 360px) {
	.topinka-tour-map__toolbar { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
	.topinka-tour-map__itinerary-tools > strong { display: none; }
}

@media (min-width: 641px) and (max-width: 1100px) {
	.topinka-tour-map__controls { grid-template-columns: minmax(0, 1fr); }
	.topinka-tour-map__toolbar { grid-column: 1; grid-row: 1; justify-self: end; }
	.topinka-tour-map__legend { grid-row: 2; }
}

@media (prefers-reduced-motion: reduce) {
	.topinka-tour-map__stop, .topinka-map-marker { transition: none; }
}
