/**
 * Виджет-карта магазинов Напольщик.
 */

:root {
	--nl-sm-accent: #9c2422;
	--nl-sm-accent-dark: #7a1c1a;
	--nl-sm-accent-soft: #f7eceb;
	--nl-sm-text: #1f1a1a;
	--nl-sm-muted: #6b6564;
	--nl-sm-border: #e8e0db;
	--nl-sm-surface: #faf7f4;
	--nl-sm-shadow: 0 24px 64px rgba(41, 35, 35, 0.22);
}

.nl-sm[hidden] {
	display: none !important;
}

.nl-sm {
	position: fixed;
	inset: 0;
	z-index: 10050;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}

.nl-sm__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(24, 18, 18, 0.48);
	backdrop-filter: blur(4px);
}

.nl-sm__dialog {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	width: min(1360px, calc(100vw - 32px));
	height: min(900px, calc(100vh - 32px));
	overflow: hidden;
	border: 1px solid rgba(31, 26, 26, 0.08);
	border-radius: 20px;
	background: #fff;
	box-shadow: var(--nl-sm-shadow);
}

.nl-sm__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex: 0 0 auto;
	padding: 10px 14px 10px 16px;
	border-bottom: 1px solid var(--nl-sm-border);
	background: var(--nl-sm-surface);
}

.nl-sm__eyebrow {
	display: none;
}

.nl-sm__title {
	margin: 0;
	font-family: Mulish, sans-serif;
	font-size: 15px;
	font-weight: 800;
	line-height: 1.25;
	color: var(--nl-sm-text);
}

.nl-sm__close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	flex: 0 0 32px;
	width: 32px;
	min-width: 32px;
	max-width: 32px;
	height: 32px;
	min-height: 32px;
	max-height: 32px;
	aspect-ratio: 1 / 1;
	margin: 0;
	padding: 0;
	border: 1px solid rgba(31, 26, 26, 0.1);
	border-radius: 50%;
	background: #fff;
	color: var(--nl-sm-text);
	line-height: 0;
	overflow: hidden;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
}

.nl-sm__close:hover,
.nl-sm__close:focus-visible {
	color: var(--nl-sm-accent);
	border-color: rgba(156, 36, 34, 0.28);
	background: var(--nl-sm-accent-soft);
	outline: none;
}

.nl-sm__close svg {
	width: 15px;
	height: 15px;
}

.nl-sm__body {
	display: grid;
	grid-template-columns: minmax(360px, 440px) minmax(0, 1fr);
	flex: 1 1 auto;
	min-height: 0;
}

.nl-sm__list {
	display: flex;
	flex-direction: column;
	gap: 12px;
	min-height: 0;
	overflow: auto;
	padding: 16px;
	border-right: 1px solid var(--nl-sm-border);
	background: #fff;
}

.nl-sm-card {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 8px;
	width: 100%;
	margin: 0;
	padding: 14px 16px;
	border: 1px solid var(--nl-sm-border);
	border-radius: 14px;
	background: var(--nl-sm-surface);
	color: var(--nl-sm-text);
	text-align: left;
	cursor: pointer;
	transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.nl-sm-card:hover,
.nl-sm-card:focus-visible {
	border-color: #e0c9c7;
	background: #fff;
	outline: none;
}

.nl-sm-card.is-active {
	border-color: rgba(156, 36, 34, 0.35);
	background: #fff;
	box-shadow: 0 0 0 3px rgba(156, 36, 34, 0.1);
}

.nl-sm-card__name {
	font-family: Mulish, sans-serif;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.3;
	color: var(--nl-sm-accent);
}

.nl-sm-card__address {
	font-family: Mulish, sans-serif;
	font-size: 15px;
	font-weight: 800;
	line-height: 1.35;
	color: var(--nl-sm-text);
}

.nl-sm-card__note {
	display: block;
	margin-top: 2px;
	font-size: 12px;
	font-weight: 500;
	color: var(--nl-sm-muted);
}

.nl-sm-card__hours {
	display: flex;
	flex-direction: column;
	gap: 3px;
	width: 100%;
	padding-top: 4px;
	border-top: 1px dashed rgba(31, 26, 26, 0.1);
}

.nl-sm-card__hours-row {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	font-family: Mulish, sans-serif;
	font-size: 13px;
	line-height: 1.35;
}

.nl-sm-card__hours-day {
	color: var(--nl-sm-muted);
	font-weight: 600;
}

.nl-sm-card__hours-time {
	color: var(--nl-sm-text);
	font-weight: 700;
}

.nl-sm-card__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	width: 100%;
	padding-top: 2px;
}

.nl-sm-card__phone {
	display: inline-flex;
	align-items: center;
	padding: 7px 12px;
	border-radius: 999px;
	background: var(--nl-sm-accent);
	color: #fff;
	font-family: Mulish, sans-serif;
	font-size: 14px;
	font-weight: 800;
	line-height: 1.2;
	text-decoration: none;
	white-space: nowrap;
}

.nl-sm-card__phone:hover,
.nl-sm-card__phone:focus-visible {
	background: var(--nl-sm-accent-dark);
	outline: none;
}

.nl-sm-card__maps {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.nl-sm-card__map-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 32px;
	width: 32px;
	height: 32px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	line-height: 0;
	text-decoration: none;
	overflow: visible;
	transition: transform 0.15s ease, opacity 0.15s ease;
}

.nl-sm-card__map-btn:hover,
.nl-sm-card__map-btn:focus-visible {
	outline: none;
	transform: translateY(-1px);
	opacity: 0.9;
}

.nl-sm-card__map-icon {
	display: block;
	width: 32px !important;
	height: 32px !important;
	max-width: 32px;
	max-height: 32px;
	flex: 0 0 32px;
	object-fit: contain;
}

.nl-sm__map-wrap {
	position: relative;
	min-width: 0;
	min-height: 0;
	background: #ece7e2;
}

.nl-sm__map {
	display: block;
	width: 100%;
	height: 100%;
	min-height: 420px;
	border: 0;
}

body.nl-sm-open {
	overflow: hidden;
}

@media (max-width: 1100px) {
	.nl-sm__body {
		grid-template-columns: minmax(320px, 380px) minmax(0, 1fr);
	}
}

@media (max-width: 900px) {
	.nl-sm {
		padding: 8px;
	}

	.nl-sm__dialog {
		width: calc(100vw - 16px);
		height: calc(100vh - 16px);
		border-radius: 16px;
	}

	.nl-sm__body {
		grid-template-columns: 1fr;
		grid-template-rows: minmax(240px, 46%) minmax(0, 1fr);
	}

	.nl-sm__list {
		border-right: 0;
		border-bottom: 1px solid var(--nl-sm-border);
	}

	.nl-sm__title {
		font-size: 14px;
	}
}
