/**
 * Food26 Review Map
 *
 * Contents
 * 1. Variables, filters, count, Clear Filters
 * 2. Layout: the list beside the map (or the map alone), the phones' List / Map buttons
 * 3. Places
 * 4. Nothing found
 * 5. Map: the notice and Show the Map until it loads, the pins, the popups
 * 6. Tablets and phones
 * 7. Reduced motion
 *
 * Colours read the Food26 Design Scheme with the design's values as fallbacks. Rules use two classes; the Style tab's
 * controls use three (or set the variables). The map stays left to right in every language (Leaflet positions pins
 * physically); the popups follow the page's direction.
 */

/* 1. Variables, filters ----------------------------------------------------------------------------- */
.food26-review-map {
	--food26-rm-primary: var(--inoforest-color-primary, #b23a1e);
	--food26-rm-primary-dark: var(--inoforest-custom-primary-dark, #8e2c15);
	--food26-rm-primary-light: var(--inoforest-custom-primary-light, #fbeae4);
	--food26-rm-active: var(--inoforest-custom-dark, #22150f);
	--food26-rm-heading: var(--inoforest-color-heading, #2b1a12);
	--food26-rm-muted: var(--inoforest-custom-muted, #6e5f55);
	--food26-rm-line: var(--inoforest-color-border, #ece2d6);
	--food26-rm-box: #fff;
	--food26-rm-map-bg: var(--inoforest-custom-warm, #f3e9dc);
	--food26-rm-height: 620px;
	--food26-rm-shadow-sm: 0 6px 20px rgba(43, 26, 18, 0.08);
	--food26-rm-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

.food26-review-map svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

.food26-review-map .food26-review-map__filters {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 14px 16px;
	margin: 0 0 24px;
	padding: 20px 22px;
	background-color: var(--food26-rm-box);
	border: 1px solid var(--food26-rm-line);
	border-radius: 26px;
}

.food26-review-map .food26-review-map__field {
	display: grid;
	flex: 1 1 160px;
	gap: 6px;
}

.food26-review-map .food26-review-map__field label {
	margin: 0;
	font-size: 0.85rem;
	font-weight: 700;
	color: var(--food26-rm-heading);
}

.food26-review-map .food26-review-map__select {
	position: relative;
	display: block;
}

/* The design's arrow (Remix arrow-down-s-line) without the icon font. */
.food26-review-map .food26-review-map__select::after {
	position: absolute;
	inset-block-start: 50%;
	inset-inline-end: 16px;
	width: 1em;
	height: 1em;
	content: "";
	pointer-events: none;
	background: var(--food26-rm-muted);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 13.172l4.95-4.95 1.414 1.414L12 16 5.636 9.636 7.05 8.222z'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 13.172l4.95-4.95 1.414 1.414L12 16 5.636 9.636 7.05 8.222z'/%3E%3C/svg%3E") center / contain no-repeat;
	translate: 0 -50%;
}

.food26-review-map .food26-review-map__select select {
	box-sizing: border-box;
	width: 100%;
	min-height: 46px;
	margin: 0;
	padding: 8px 44px 8px 14px;
	font: inherit;
	color: var(--food26-rm-heading);
	cursor: pointer;
	background: var(--food26-rm-box);
	border: 1px solid var(--food26-rm-line);
	border-radius: 10px;
	-webkit-appearance: none;
	appearance: none;
}

[dir="rtl"] .food26-review-map .food26-review-map__select select {
	padding: 8px 14px 8px 44px;
}

.food26-review-map .food26-review-map__select select:focus {
	border-color: var(--food26-rm-primary);
	outline: 0;
}

.food26-review-map .food26-review-map__count {
	margin: 0;
	padding-block-end: 12px;
	white-space: nowrap;
	color: var(--food26-rm-muted);
}

.food26-review-map .food26-review-map__count strong {
	font-family: var(--inoforest-font-heading-family, inherit);
	font-size: 1.4rem;
	color: var(--food26-rm-heading);
}

/* Clear Filters: the design's small outline button. Show the Map and the "nothing found" button: solid. */
.food26-review-map :is(.food26-review-map__reset, .food26-review-map__load, .food26-review-map__none-button) {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	box-sizing: border-box;
	min-height: 46px;
	margin: 0;
	padding: 10px 22px;
	font-family: inherit;
	font-size: 0.925rem;
	font-weight: 700;
	line-height: 1.2;
	color: #fff;
	text-align: center;
	text-transform: none;
	letter-spacing: normal;
	cursor: pointer;
	background: var(--food26-rm-primary);
	border: 2px solid var(--food26-rm-primary);
	border-radius: 999px;
	transition: color 0.3s var(--food26-rm-ease), background-color 0.3s var(--food26-rm-ease), border-color 0.3s var(--food26-rm-ease);
}

.food26-review-map .food26-review-map__reset {
	color: var(--food26-rm-heading);
	background: transparent;
	border-color: var(--food26-rm-line);
}

.food26-review-map .food26-review-map__load {
	min-height: 54px;
	padding: 14px 30px;
	font-size: 0.975rem;
}

.food26-review-map :is(.food26-review-map__reset, .food26-review-map__load, .food26-review-map__none-button):is(:hover, :focus-visible) {
	color: #fff;
	background: var(--food26-rm-primary-dark);
	border-color: var(--food26-rm-primary-dark);
}

/* 2. Layout ----------------------------------------------------------------------------------------- */
.food26-review-map .food26-review-map__views {
	display: none;
}

.food26-review-map .food26-review-map__layout {
	display: grid;
	grid-template-columns: minmax(0, 400px) minmax(0, 1fr);
	gap: 24px;
	align-items: start;
}

.food26-review-map[data-layout="map"] .food26-review-map__layout {
	grid-template-columns: minmax(0, 1fr);
}

.food26-review-map .food26-review-map__list-wrap {
	max-height: var(--food26-rm-height);
	padding-inline-end: 6px;
	overflow-y: auto;
	scrollbar-width: thin;
}

/* 3. Places ----------------------------------------------------------------------------------------- */
.food26-review-map .food26-review-map__list {
	display: grid;
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.food26-review-map .food26-review-map__place {
	position: relative;
	display: grid;
	grid-template-columns: 72px minmax(0, 1fr);
	gap: 4px 14px;
	align-items: center;
	margin: 0;
	padding: 12px;
	padding-inline-end: 56px;
	background: var(--food26-rm-box);
	border: 1px solid var(--food26-rm-line);
	border-radius: 16px;
	transition: border-color 0.3s var(--food26-rm-ease), box-shadow 0.3s var(--food26-rm-ease);
}

.food26-review-map .food26-review-map__place--no-image {
	grid-template-columns: minmax(0, 1fr);
}

.food26-review-map .food26-review-map__place.is-active {
	border-color: var(--food26-rm-primary);
	box-shadow: 0 0 0 3px var(--food26-rm-primary-light);
}

.food26-review-map .food26-review-map__place[hidden] {
	display: none;
}

.food26-review-map .food26-review-map__place img {
	display: block;
	width: 72px;
	height: 72px;
	max-width: none;
	object-fit: cover;
	border-radius: 10px;
}

.food26-review-map .food26-review-map__place-meta {
	margin: 0;
	font-size: 0.8rem;
	color: var(--food26-rm-muted);
}

.food26-review-map .food26-review-map__price {
	font-weight: 700;
	letter-spacing: 0.1em;
	color: var(--food26-rm-heading);
}

.food26-review-map .food26-review-map__price span {
	color: color-mix(in srgb, var(--food26-rm-muted) 35%, transparent);
}

.food26-review-map .food26-review-map__place-title {
	margin: 2px 0;
	padding: 0;
	font-size: 1.15rem;
	line-height: 1.15;
}

.food26-review-map .food26-review-map__place-title a {
	color: var(--food26-rm-heading);
	text-decoration: none;
	transition: color 0.3s var(--food26-rm-ease);
}

.food26-review-map .food26-review-map__place-title a:is(:hover, :focus-visible) {
	color: var(--food26-rm-primary);
}

.food26-review-map .food26-review-map__place-address {
	margin: 0;
	font-size: 0.85rem;
}

/* The score: a small ring over the photo's corner. */
.food26-review-map .food26-review-map__place-score {
	position: absolute;
	inset-block-end: 6px;
	inset-inline-start: 6px;
	display: grid;
	place-content: center;
	box-sizing: border-box;
	width: 38px;
	height: 38px;
	line-height: 1;
	color: #fff;
	text-align: center;
	background: var(--food26-rm-primary);
	border: 2px solid #fff;
	border-radius: 50%;
}

.food26-review-map .food26-review-map__place-score strong {
	font-family: var(--inoforest-font-heading-family, inherit);
	font-size: 0.85rem;
	font-weight: 700;
}

.food26-review-map .food26-review-map__locate {
	position: absolute;
	inset-block-start: 50%;
	inset-inline-end: 10px;
	display: grid;
	place-items: center;
	width: 38px;
	height: 38px;
	margin: 0;
	padding: 0;
	font-size: 1.15rem;
	color: var(--food26-rm-primary);
	cursor: pointer;
	background: var(--food26-rm-primary-light);
	border: 0;
	border-radius: 50%;
	translate: 0 -50%;
	transition: color 0.3s var(--food26-rm-ease), background-color 0.3s var(--food26-rm-ease);
}

.food26-review-map .food26-review-map__locate:is(:hover, :focus-visible) {
	color: #fff;
	background: var(--food26-rm-primary);
}

/* 4. Nothing found ---------------------------------------------------------------------------------- */
.food26-review-map .food26-review-map__none {
	display: grid;
	gap: 10px;
	justify-items: center;
	padding: 40px 24px;
	text-align: center;
	background: var(--food26-rm-box);
	border: 1px dashed var(--food26-rm-line);
	border-radius: 16px;
}

.food26-review-map .food26-review-map__none[hidden] {
	display: none;
}

.food26-review-map .food26-review-map__none > :is(i, svg) {
	font-size: 2rem;
	color: var(--food26-rm-primary);
}

.food26-review-map .food26-review-map__none p {
	margin: 0;
	font-weight: 600;
	color: var(--food26-rm-heading);
}

/* 5. Map -------------------------------------------------------------------------------------------- */
.food26-review-map .food26-review-map__map {
	position: sticky;
	inset-block-start: 110px;
	height: var(--food26-rm-height);
	overflow: hidden;
	background: var(--food26-rm-map-bg);
	border: 1px solid var(--food26-rm-line);
	border-radius: 26px;
}

.food26-review-map .food26-review-map__canvas {
	position: relative;
	z-index: 0;
	width: 100%;
	height: 100%;
	direction: ltr;
	isolation: isolate;
}

.food26-review-map .food26-review-map__canvas:focus-visible {
	outline: 2px solid var(--food26-rm-primary);
	outline-offset: -4px;
}

/* Before the map loads: a quiet street-grid pattern and the notice. */
.food26-review-map .food26-review-map__consent {
	position: absolute;
	inset: 0;
	z-index: 1;
	display: grid;
	place-content: center;
	justify-items: center;
	gap: 12px;
	padding: 30px;
	text-align: center;
	background-color: var(--food26-rm-map-bg);
}

/* This decoration downloads nothing and can show before Elementor lazy-loads the section's photos. */
.food26-review-map .food26-review-map__consent::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	pointer-events: none;
	background-image:
		repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.7) 0 6px, transparent 6px 90px),
		repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.7) 0 6px, transparent 6px 120px),
		repeating-linear-gradient(35deg, color-mix(in srgb, var(--inoforest-color-accent, #3f6b32) 12%, transparent) 0 3px, transparent 3px 160px);
}

.food26-review-map .food26-review-map__consent[hidden] {
	display: none;
}

.food26-review-map .food26-review-map__consent-icon {
	display: grid;
	place-items: center;
	width: 64px;
	height: 64px;
	font-size: 1.8rem;
	color: var(--food26-rm-primary);
	background: #fff;
	border-radius: 50%;
	box-shadow: var(--food26-rm-shadow-sm);
}

.food26-review-map .food26-review-map__consent p {
	max-width: 340px;
	margin: 0;
	padding: 10px 14px;
	color: var(--food26-rm-heading);
	background: rgba(255, 255, 255, 0.85);
	border-radius: 10px;
}

/* Pins: Leaflet's divIcon is a 0 x 0 point; the label sits above it. */
.food26-review-map .food26-map-pin-icon {
	overflow: visible;
}

.food26-review-map .food26-map-pin {
	position: relative;
	display: block;
	width: max-content;
	padding: 5px 11px;
	font-family: inherit;
	font-size: 0.85rem;
	font-weight: 700;
	line-height: 1.2;
	color: #fff;
	background: var(--food26-rm-primary);
	border: 2px solid #fff;
	border-radius: 999px;
	box-shadow: var(--food26-rm-shadow-sm);
	translate: -50% calc(-100% - 8px);
	transition: background-color 0.3s var(--food26-rm-ease);
}

.food26-review-map .food26-map-pin::after {
	position: absolute;
	inset-block-start: 100%;
	inset-inline-start: 50%;
	width: 10px;
	height: 10px;
	margin-top: -6px;
	content: "";
	background: inherit;
	border: 2px solid #fff;
	border-block-start: 0;
	border-inline-start: 0;
	rotate: 45deg;
	translate: -50% 0;
}

.food26-review-map .food26-map-pin-icon:is(:hover, :focus-visible, .is-active) .food26-map-pin {
	background: var(--food26-rm-active);
}

.food26-review-map .food26-map-pin-icon:focus-visible {
	outline: 0;
}

.food26-review-map .food26-map-pin-icon:focus-visible .food26-map-pin {
	box-shadow: 0 0 0 3px var(--food26-rm-primary-light);
}

.food26-review-map .leaflet-container {
	font-family: inherit;
	background: var(--food26-rm-map-bg);
}

.food26-review-map .leaflet-popup-content-wrapper {
	border-radius: 16px;
	box-shadow: 0 18px 44px rgba(43, 26, 18, 0.12);
}

.food26-review-map .leaflet-popup-content {
	margin: 14px 18px;
	font-size: 1rem;
	line-height: 1.6;
}

[dir="rtl"] .food26-review-map .food26-map-popup {
	direction: rtl;
}

.food26-review-map .food26-map-popup > * {
	margin: 0;
}

.food26-review-map .food26-map-popup .food26-review-map__place-title {
	margin-block: 2px;
	font-size: 1.05rem;
}

/* The map of a list on the page (a guide): in the flow, not sticky. */
.food26-review-map[data-source="list"] .food26-review-map__map {
	position: relative;
	inset-block-start: auto;
}

.food26-review-map .food26-map-popup .food26-guide-list__title {
	margin-block: 2px;
	font-size: 1.05rem;
}

.food26-review-map .food26-map-popup li {
	font-size: 0.85rem;
	list-style: none;
}

.food26-review-map .food26-map-popup .food26-guide-list__meta {
	font-size: 0.9rem;
	color: var(--food26-rm-muted);
}

.food26-review-map .food26-map-popup .food26-guide-list__price {
	font-weight: 700;
	letter-spacing: 0.1em;
	color: var(--food26-rm-heading);
}

.food26-review-map .food26-map-popup .food26-guide-list__price span {
	color: color-mix(in srgb, var(--food26-rm-muted) 35%, transparent);
}

.food26-review-map .food26-map-popup li :is(i, svg) {
	display: none;
}

/* 6. Tablets and phones ----------------------------------------------------------------------------- */
@media (max-width: 1199px) {
	.food26-review-map .food26-review-map__layout {
		grid-template-columns: minmax(0, 340px) minmax(0, 1fr);
	}
}

@media (max-width: 767px) {
	.food26-review-map .food26-review-map__filters {
		padding: 16px;
	}

	.food26-review-map .food26-review-map__field {
		flex-basis: calc(50% - 8px);
	}

	.food26-review-map .food26-review-map__count {
		padding: 0;
	}

	.food26-review-map .food26-review-map__views {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 4px;
		margin-block-end: 16px;
		padding: 4px;
		background: var(--food26-rm-box);
		border: 1px solid var(--food26-rm-line);
		border-radius: 999px;
	}

	.food26-review-map .food26-review-map__views button {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		gap: 8px;
		min-height: 44px;
		margin: 0;
		padding: 0 12px;
		font-family: inherit;
		font-size: inherit;
		font-weight: 700;
		color: var(--food26-rm-heading);
		cursor: pointer;
		background: transparent;
		border: 0;
		border-radius: 999px;
	}

	.food26-review-map .food26-review-map__views button[aria-pressed="true"] {
		color: #fff;
		background: var(--food26-rm-primary);
	}

	.food26-review-map .food26-review-map__layout,
	.food26-review-map[data-layout="map"] .food26-review-map__layout {
		grid-template-columns: minmax(0, 1fr);
	}

	.food26-review-map[data-layout="split"]:not([data-view="map"]) .food26-review-map__map,
	.food26-review-map[data-view="map"] .food26-review-map__list-wrap {
		display: none;
	}

	.food26-review-map .food26-review-map__list-wrap {
		max-height: none;
		padding: 0;
		overflow: visible;
	}

	.food26-review-map .food26-review-map__map {
		position: relative;
		inset-block-start: auto;
		height: min(var(--food26-rm-height), 70vh);
	}
}

/* 7. Reduced motion --------------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
	.food26-review-map :is(.food26-review-map__reset, .food26-review-map__load, .food26-review-map__none-button, .food26-review-map__place, .food26-review-map__locate, .food26-map-pin) {
		transition: none;
	}
}
