/*
 * Shared Lucid map pieces: the colour tokens, the location detail card, the pins and the zoom
 * buttons. Used by the /locations/ hero (css/locations-page.css, section.lh.lucid-map) and the
 * "Our Locations (Featured)" box (css/featured-map.css, div.lfm.lucid-map). Where the card sits,
 * and how big the map is, belongs to those two stylesheets.
 *
 * Nothing here may reuse a selector js/more.js binds to (#map, .map, .marker, .listing-entry,
 * .address, .meeting-search, ...).
 *
 * Colours go through the --lh-* custom properties on .lucid-map, which css/theme-light.css
 * redefines for light visitors.
 */

.lucid-map {
	--lh-surface: #161613;
	--lh-surface-raised: #1F1E1A;
	--lh-line: #2C2B26;
	--lh-text: #F7F7F2;
	--lh-text-2: #D8D6D0;
	--lh-muted: #9C998F;
	--lh-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
	--lh-field: #FFFFFF;
	--lh-field-text: #12120F;
	--lh-field-label: #8A867D;
	--lh-badge-text: #FFFFFF;
	--lh-gap: 24px;
}

/* -------------------------------------------------------------------------
 * Detail card
 * ---------------------------------------------------------------------- */

.lh-card {
	background: var(--lh-surface);
	color: var(--lh-text);
	border: 1px solid var(--lh-line);
	box-shadow: var(--lh-shadow);
	outline: none;
}

.lh-card[hidden] {
	display: none;
}

.lh-card__media {
	position: relative;
	aspect-ratio: 16 / 9.4;
	overflow: hidden;
	background: var(--lh-surface-raised);
}

.lh-card__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.lh-card__close {
	position: absolute;
	top: 12px;
	right: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 2px;
	background: rgba(18, 18, 15, 0.72);
	color: #FFFFFF;
	cursor: pointer;
}

.lh-card__close:hover,
.lh-card__close:focus-visible {
	background: #12120F;
	outline: none;
}

.lh-card__body {
	padding: 26px 26px 28px;
}

.lucid-map .lh-card__name {
	margin: 0 0 14px;
	color: var(--lh-text);
	font-family: var(--font-serif);
	font-size: 32px;
	font-weight: 400;
	letter-spacing: -0.005em;
	line-height: 1.05;
}

.lucid-map .lh-card__address {
	margin: 0 0 20px;
	color: var(--lh-text-2);
	font-size: 14px;
	line-height: 1.5;
}

/* A single full-width "View Location" button; booking a tour happens on the location page. */
.lh-card__actions {
	display: flex;
	align-items: center;
	gap: 22px;
	padding-top: 22px;
	border-top: 1px solid var(--lh-line);
}

/* The site's gold button (.btn, style.css ~7158: gold gradient fill, #F7F7F2 label), stretched
   across the card. .btn is a max-content flex block with 24px side padding, so the width and
   padding are set here. */
.lucid-map .lh-card__explore.btn {
	display: flex;
	flex: 1 1 auto;
	justify-content: center;
	width: 100%;
	max-width: none;
	margin: 0;
	padding: 12px 16px;
	text-align: center;
	white-space: nowrap;
}

/* -------------------------------------------------------------------------
 * Map: pins and controls
 * ---------------------------------------------------------------------- */

/* Mapbox owns the root element's transform (it positions it), so every visual effect goes on
   the inner element. Same pin artwork as the /l/ landers. */
.lh-marker {
	width: 28px;
	height: 34px;
	cursor: pointer;
}

.lh-marker__pin {
	display: block;
	width: 28px;
	height: 34px;
	background: url(../images/marker.svg) center / contain no-repeat;
	transform-origin: 50% 100%;
	transition: transform 0.2s ease-in-out, filter 0.2s ease-in-out;
}

.lh-marker:hover .lh-marker__pin,
.lh-marker.is-hover .lh-marker__pin {
	transform: scale(1.15);
}

.lh-marker.is-hover,
.lh-marker.is-active {
	z-index: 2;
}

/* Selected location: the same pin on black (images/marker-active.svg is marker.svg recoloured). */
.lh-marker.is-active .lh-marker__pin {
	background-image: url(../images/marker-active.svg);
	transform: scale(1.3);
	filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
}

.lh-marker:focus-visible {
	outline: none;
}

.lh-marker:focus-visible .lh-marker__pin {
	outline: 2px solid var(--color-text-accent);
	outline-offset: 2px;
}

/* style.css:18100-18170 push every map control 50-75px in from the left for the old full-bleed
   map and draw 8px-rounded white-bordered buttons. Here they sit bottom-right as dark squares. */
.lucid-map .mapboxgl-control-container .mapboxgl-ctrl {
	margin: 0 var(--lh-gap) var(--lh-gap) 0;
	gap: 6px;
}

/* style.css:6561 `body .site-container *:last-child { margin-bottom: 0 !important }`. */
body .lucid-map .mapboxgl-control-container .mapboxgl-ctrl:last-child {
	margin-bottom: var(--lh-gap) !important;
}

.lucid-map .mapboxgl-control-container .mapboxgl-ctrl button {
	width: 36px;
	height: 36px;
	border: 1px solid rgba(255, 255, 255, 0.25);
	border-radius: 2px !important;
	background: #12120F;
}

.lucid-map .mapboxgl-control-container .mapboxgl-ctrl button:hover {
	border-color: var(--color-text-accent);
	background: #12120F;
}
