.ks-mcs {
	--ks-teal: #2f6f78;
	--ks-green: #58b36d;
	--ks-black: #111111;
	--ks-white: #ffffff;
	--ks-muted: #68737d;
	--ks-border: #d8dde2;
	--ks-soft: #f6f8f9;
	--ks-brand: #433F2D;
	position: relative;
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw);
	font-family: Inter, Jost, Arial, sans-serif;
	color: var(--ks-black);
}

.ks-mcs,
.ks-mcs *,
.ks-mcs *::before,
.ks-mcs *::after {
	box-sizing: border-box;
}

.ks-mcs__shell {
	position: relative;
	display: grid;
	grid-template-columns: minmax(390px, 38vw) minmax(0, 1fr);
	grid-template-rows: 86px minmax(0, 1fr);
	width: 100%;
	height: var(--ks-mcs-height, calc(100vh - 90px));
	min-height: 720px;
	overflow: hidden;
	background: var(--ks-white);
	border: 1px solid var(--ks-border);
}

.ks-mcs__toolbar {
	grid-column: 1 / -1;
	grid-row: 1;
	z-index: 60;
	display: grid;
	grid-template-columns: 120px minmax(250px, 1.7fr) minmax(250px, 1.7fr) 200px 230px 230px 180px 190px;
	gap: 10px;
	align-items: center;
	padding: 13px 28px;
	background: var(--ks-white);
	border-bottom: 1px solid var(--ks-border);
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.ks-mcs label {
	display: block;
	min-width: 0;
}

.ks-mcs label > span {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
}

.ks-mcs input,
.ks-mcs select,
.ks-mcs__more {
	width: 100%;
	height: 56px;
	min-width: 0;
	padding: 0 16px;
	color: #29323a;
	background: var(--ks-white);
	border: 1px solid var(--ks-border);
	border-radius: 8px;
	font: inherit;
	font-size: 16px;
	font-weight: 500;
	letter-spacing: 0;
	outline: none;
	transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.ks-mcs input:focus,
.ks-mcs select:focus {
	border-color: #8db2ba;
	box-shadow: 0 0 0 2px rgba(47, 111, 120, 0.12);
}

.ks-mcs__deal select,
.ks-mcs__minutes-field select {
	border: 2px solid #93b4bc;
	color: #315f66;
	font-weight: 700;
}

.ks-mcs__poi-field {
	position: relative;
}

.ks-mcs__poi-field b {
	position: absolute;
	left: 22px;
	top: 50%;
	z-index: 2;
	display: grid;
	place-items: center;
	width: 34px;
	height: 34px;
	color: var(--ks-white);
	background: #55a86a;
	border-radius: 50%;
	font-size: 17px;
	transform: translateY(-50%);
}

.ks-mcs__poi-field.is-secondary b {
	background: #2f6f78;
}

.ks-mcs__poi-field input {
	padding-left: 66px;
}

.ks-mcs__more {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	font-weight: 700;
	white-space: nowrap;
}

.ks-mcs__panel {
	grid-column: 1;
	grid-row: 2;
	position: relative;
	z-index: 20;
	display: flex;
	flex-direction: column;
	min-width: 0;
	min-height: 0;
	background: linear-gradient(180deg, #ffffff 0%, #f5fbfc 100%);
	border-right: 1px solid var(--ks-border);
	overflow: hidden;
}

.ks-mcs__return {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	width: fit-content;
	margin: 38px 0 0 34px;
	color: #2f6f78;
	text-decoration: none;
	font-size: 18px;
	font-weight: 800;
}

.ks-mcs__return::before {
	content: "‹";
	font-size: 34px;
	line-height: 0;
}

.ks-mcs__hint {
	position: absolute;
	top: 78px;
	right: 32px;
	width: 270px;
	padding: 13px 16px;
	color: var(--ks-green);
	background: rgba(255, 255, 255, 0.86);
	border: 2px dashed var(--ks-green);
	border-radius: 8px;
	font-size: 18px;
	line-height: 1.3;
	text-align: center;
}

.ks-mcs__hint::before {
	content: "";
	position: absolute;
	top: -64px;
	left: -138px;
	width: 150px;
	height: 92px;
	border-top: 3px dashed var(--ks-green);
	border-left: 3px dashed var(--ks-green);
	border-radius: 80px 0 0;
	transform: rotate(28deg);
	opacity: 0.9;
}

.ks-mcs__intro {
	display: grid;
	justify-items: center;
	align-content: center;
	gap: 24px;
	flex: 1;
	padding: 110px 48px 44px;
	text-align: center;
}

.ks-mcs__intro h2 {
	max-width: 620px;
	margin: 0;
	font-size: clamp(28px, 2vw, 38px);
	line-height: 1.2;
	font-weight: 800;
	letter-spacing: 0;
}

.ks-mcs__intro p {
	margin: 0;
	color: #333;
	font-size: 22px;
}

.ks-mcs__steps {
	display: grid;
	gap: 22px;
	width: min(520px, 100%);
}

.ks-mcs__steps div {
	display: grid;
	grid-template-columns: 40px minmax(0, 1fr);
	align-items: center;
	gap: 14px;
	min-height: 78px;
	padding: 16px 24px;
	background: var(--ks-white);
	border-radius: 10px;
	box-shadow: 0 15px 34px rgba(47, 111, 120, 0.08);
	text-align: left;
	font-size: 19px;
}

.ks-mcs__steps i {
	display: grid;
	place-items: center;
	width: 30px;
	height: 30px;
	color: var(--ks-green);
	border: 3px solid var(--ks-green);
	border-radius: 50%;
	font-style: normal;
	font-weight: 900;
}

.ks-mcs__results-head,
.ks-mcs__summary,
.ks-mcs__results {
	display: none;
}

.ks-mcs.has-commute .ks-mcs__hint,
.ks-mcs.has-commute .ks-mcs__intro {
	display: none;
}

.ks-mcs.has-commute .ks-mcs__results-head,
.ks-mcs.has-commute .ks-mcs__summary,
.ks-mcs.has-commute .ks-mcs__results {
	display: flex;
}

.ks-mcs__results-head {
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 22px 24px 18px;
	border-bottom: 1px solid var(--ks-border);
}

.ks-mcs__eyebrow {
	margin: 0 0 6px;
	color: var(--ks-brand);
	font-size: 12px;
	font-weight: 900;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.ks-mcs__results-head h2 {
	margin: 0;
	font-size: 28px;
	line-height: 1.12;
	font-weight: 900;
	letter-spacing: 0;
}

.ks-mcs__clear-commute,
.ks-mcs__map-close,
.ks-mcs__mobile-results {
	border: 0;
	cursor: pointer;
	font: inherit;
}

.ks-mcs__clear-commute {
	height: 42px;
	padding: 0 18px;
	color: var(--ks-white);
	background: var(--ks-black);
	border-radius: 999px;
	font-weight: 800;
}

.ks-mcs__summary {
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 12px 24px;
	color: var(--ks-muted);
	background: #fafafa;
	border-bottom: 1px solid var(--ks-border);
	font-size: 12px;
	font-weight: 700;
}

.ks-mcs__missing {
	text-align: right;
	color: var(--ks-brand);
}

.ks-mcs__results {
	flex-direction: column;
	min-height: 0;
	overflow: auto;
	scrollbar-width: thin;
}

.ks-mcs__card {
	display: grid;
	grid-template-columns: 140px minmax(0, 1fr);
	gap: 14px;
	padding: 16px;
	color: inherit;
	text-decoration: none;
	background: var(--ks-white);
	border-bottom: 1px solid var(--ks-border);
	transition: background 0.18s ease, transform 0.18s ease;
}

.ks-mcs__card:hover,
.ks-mcs__card.is-active {
	background: #f7fafb;
	transform: translateX(3px);
}

.ks-mcs__card-img {
	width: 100%;
	height: 112px;
	object-fit: cover;
	border-radius: 7px;
	background: #eceff2;
}

.ks-mcs__card-body {
	display: grid;
	align-content: start;
	gap: 6px;
	min-width: 0;
}

.ks-mcs__chip {
	display: inline-flex;
	width: fit-content;
	max-width: 100%;
	padding: 4px 8px;
	color: var(--ks-white);
	background: var(--ks-brand);
	border-radius: 4px;
	font-size: 10px;
	font-weight: 900;
	text-transform: uppercase;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ks-mcs__card-title {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	margin: 0;
	overflow: hidden;
	color: var(--ks-black);
	font-size: 15px;
	line-height: 1.25;
	font-weight: 800;
	letter-spacing: 0;
}

.ks-mcs__card-price {
	color: var(--ks-black);
	font-size: 18px;
	line-height: 1.1;
	font-weight: 900;
}

.ks-mcs__address,
.ks-mcs__card-stats {
	color: var(--ks-muted);
	font-size: 12px;
	line-height: 1.35;
}

.ks-mcs__card-stats {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	font-weight: 800;
}

.ks-mcs__map-wrap {
	grid-column: 2;
	grid-row: 2;
	position: relative;
	min-width: 0;
	min-height: 0;
}

.ks-mcs__map {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	background: #d9e7ed;
}

.ks-mcs__map-help {
	position: absolute;
	left: 50%;
	bottom: 30px;
	z-index: 40;
	max-width: min(680px, calc(100% - 48px));
	padding: 14px 20px;
	color: var(--ks-white);
	background: rgba(39, 39, 39, 0.86);
	border-radius: 8px;
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
	font-size: 18px;
	font-weight: 700;
	text-align: center;
	transform: translateX(-50%);
}

.ks-mcs.has-commute .ks-mcs__map-help {
	display: none;
}

.ks-mcs__map-close {
	position: absolute;
	top: 24px;
	right: 24px;
	z-index: 45;
	display: grid;
	place-items: center;
	width: 58px;
	height: 58px;
	color: var(--ks-black);
	background: var(--ks-white);
	border-radius: 50%;
	box-shadow: 0 6px 22px rgba(0, 0, 0, 0.18);
	font-size: 40px;
	line-height: 1;
}

.ks-mcs__pin {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 62px;
	height: 38px;
	padding: 0 12px;
	color: var(--ks-white);
	background: var(--ks-black);
	border: 3px solid var(--ks-white);
	border-radius: 999px;
	box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
	font-size: 16px;
	font-weight: 900;
	line-height: 1;
	transition: transform 0.18s ease, background 0.18s ease;
}

.ks-mcs__pin::after {
	content: "";
	position: absolute;
	left: 50%;
	bottom: -8px;
	width: 14px;
	height: 14px;
	background: inherit;
	border-right: 3px solid var(--ks-white);
	border-bottom: 3px solid var(--ks-white);
	transform: translateX(-50%) rotate(45deg);
}

.ks-mcs__pin.is-highlighted {
	background: var(--ks-brand);
	transform: scale(1.08);
	z-index: 3;
}

.ks-mcs__pin.is-start {
	min-width: 42px;
	background: var(--ks-green);
}

.ks-mcs__pin.is-second {
	min-width: 42px;
	background: var(--ks-teal);
}

.ks-mcs__cluster {
	position: relative;
	display: grid;
	place-items: center;
	width: 58px;
	height: 58px;
	color: var(--ks-white);
	background: #5cabc0;
	border: 3px solid rgba(255, 255, 255, 0.75);
	border-radius: 50%;
	box-shadow: 0 0 0 8px rgba(92, 171, 192, 0.18), 0 12px 26px rgba(0, 0, 0, 0.2);
	font-size: 18px;
	font-weight: 900;
}

.ks-mcs .leaflet-popup-content-wrapper {
	padding: 0;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
}

.ks-mcs .leaflet-popup-content {
	width: 280px !important;
	margin: 0;
}

.ks-mcs__popup img {
	display: block;
	width: 100%;
	height: 164px;
	object-fit: cover;
}

.ks-mcs__popup-body {
	display: grid;
	gap: 7px;
	padding: 14px;
}

.ks-mcs__popup-body strong {
	color: var(--ks-black);
	font-size: 16px;
	line-height: 1.25;
}

.ks-mcs__popup-body span {
	color: var(--ks-muted);
	font-size: 13px;
}

.ks-mcs__popup-body a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 40px;
	color: var(--ks-white);
	background: var(--ks-black);
	border-radius: 6px;
	text-decoration: none;
	font-weight: 800;
}

.ks-mcs__empty {
	padding: 22px;
	color: var(--ks-muted);
	font-size: 14px;
	text-align: center;
}

.ks-mcs .leaflet-control-zoom {
	border: 0;
	box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18);
}

.ks-mcs .leaflet-control-zoom a {
	color: var(--ks-black);
	border-color: var(--ks-border);
}

.ks-mcs__mobile-results {
	display: none;
	position: absolute;
	left: 50%;
	bottom: 18px;
	z-index: 45;
	height: 46px;
	padding: 0 18px;
	color: var(--ks-white);
	background: var(--ks-black);
	border: 0;
	border-radius: 999px;
	box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
	font-weight: 900;
	transform: translateX(-50%);
}

@media (max-width: 1500px) {
	.ks-mcs__toolbar {
		grid-template-columns: 110px minmax(220px, 1.4fr) minmax(220px, 1.4fr) 170px 190px 190px 165px 170px;
		padding-inline: 18px;
	}
}

@media (max-width: 1240px) {
	.ks-mcs__toolbar {
		grid-template-columns: 100px minmax(220px, 1fr) minmax(180px, 0.8fr) 150px 160px;
	}

	.ks-mcs__toolbar label:nth-of-type(5),
	.ks-mcs__toolbar label:nth-of-type(6),
	.ks-mcs__more {
		display: none;
	}
}

@media (max-width: 900px) {
	.ks-mcs__shell {
		display: block;
		height: var(--ks-mcs-height, 86vh);
		min-height: 720px;
	}

	.ks-mcs__toolbar {
		position: absolute;
		top: 10px;
		left: 10px;
		right: 10px;
		z-index: 60;
		display: grid;
		grid-template-columns: 1fr;
		padding: 8px;
		border-radius: 10px;
		box-shadow: 0 10px 28px rgba(0, 0, 0, 0.15);
	}

	.ks-mcs__toolbar label:not(:nth-of-type(2)) {
		display: none;
	}

	.ks-mcs__panel {
		position: absolute;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 45;
		height: 54%;
		border-right: 0;
		border-radius: 16px 16px 0 0;
		transform: translateY(calc(100% - 78px));
		transition: transform 0.28s ease;
	}

	.ks-mcs.is-mobile-open .ks-mcs__panel,
	.ks-mcs.has-commute .ks-mcs__panel {
		transform: translateY(0);
	}

	.ks-mcs__return,
	.ks-mcs__hint {
		display: none;
	}

	.ks-mcs__intro {
		padding: 32px 20px;
	}

	.ks-mcs__intro h2 {
		font-size: 24px;
	}

	.ks-mcs__intro p {
		font-size: 17px;
	}

	.ks-mcs__steps div {
		min-height: 62px;
		font-size: 15px;
	}

	.ks-mcs__map-wrap,
	.ks-mcs__map {
		position: absolute;
		inset: 0;
	}

	.ks-mcs__map-close {
		top: 86px;
		right: 14px;
		width: 48px;
		height: 48px;
		font-size: 32px;
	}

	.ks-mcs__mobile-results {
		display: inline-flex;
		align-items: center;
		justify-content: center;
	}

	.ks-mcs.has-commute .ks-mcs__mobile-results {
		display: none;
	}
}
