/* Search-on-map page (Google Map + toolbar + marker info window).
   Ported 1:1 from SDW CI app/Views/frontend/google-maps.php's inline <style> block so the
   same class/ID names (#map-page, #map-controls, #map-wrap, #map, .map-fab-*, .mapInfoWindow*,
   .mapDirectionsBtn, ...) keep working with this stylesheet instead of an inline block. */
#map-page {
	display: flex;
	flex-direction: column;
	height: 100dvh;
}
#map-controls {
	background: rgba(255,255,255,0.95);
	padding: .5rem;
	border-radius: .5rem;
	box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.dark-mode #map-controls {
	background: rgba(36,37,37,1);
	padding: .5rem;
	border-radius: .5rem;
	box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.dark-mode #map-controls .form-label {
	color: #6a11cf !important;
}
/* Location + radius are plain text fields — no Bootstrap focus/select frame. */
#map-controls .map-location-input,
#map-controls #search_location,
#map-controls .map-radius-input,
#map-controls #radius_number,
#map-controls .map-location-input:focus,
#map-controls #search_location:focus,
#map-controls .map-radius-input:focus,
#map-controls #radius_number:focus,
#map-controls .map-location-input:focus-visible,
#map-controls #search_location:focus-visible,
#map-controls .map-radius-input:focus-visible,
#map-controls #radius_number:focus-visible,
#map-controls .map-location-input:active,
#map-controls #search_location:active,
#map-controls .map-radius-input:active,
#map-controls #radius_number:active {
	outline: none !important;
	box-shadow: none !important;
}
html.dark-mode #map-controls .map-location-input:focus,
html.dark-mode #map-controls #search_location:focus,
html.dark-mode #map-controls .map-radius-input:focus,
html.dark-mode #map-controls #radius_number:focus,
html.dark-mode #map-controls .map-location-input:focus-visible,
html.dark-mode #map-controls #search_location:focus-visible,
html.dark-mode #map-controls .map-radius-input:focus-visible,
html.dark-mode #map-controls #radius_number:focus-visible {
	border-color: rgb(123, 115, 101) !important;
}
html:not(.dark-mode) #map-controls .map-location-input:focus,
html:not(.dark-mode) #map-controls #search_location:focus,
html:not(.dark-mode) #map-controls .map-radius-input:focus,
html:not(.dark-mode) #map-controls #radius_number:focus,
html:not(.dark-mode) #map-controls .map-location-input:focus-visible,
html:not(.dark-mode) #map-controls #search_location:focus-visible,
html:not(.dark-mode) #map-controls .map-radius-input:focus-visible,
html:not(.dark-mode) #map-controls #radius_number:focus-visible {
	border-color: #ced4da !important;
}
.dark-mode #map-controls #radius_number.map-radius-input {
	color: #6a11cf !important;
	-webkit-text-fill-color: #6a11cf !important;
	caret-color: #6a11cf;
}
.dark-mode #map-controls .map-radius-steppers,
html.dark-mode #map-controls .map-radius-steppers,
.dark-mode .radius-bubble .map-radius-steppers,
html.dark-mode .radius-bubble .map-radius-steppers {
	background: #242525;
	border-left-color: rgb(123, 115, 101);
}
.dark-mode #map-controls .map-radius-step,
html.dark-mode #map-controls .map-radius-step,
.dark-mode .radius-bubble .map-radius-step,
html.dark-mode .radius-bubble .map-radius-step {
	background: #242525;
}
.dark-mode #map-controls .map-radius-step--up::before,
html.dark-mode #map-controls .map-radius-step--up::before,
.dark-mode .radius-bubble .map-radius-step--up::before,
html.dark-mode .radius-bubble .map-radius-step--up::before {
	border-bottom-color: #6a11cf;
}
.dark-mode #map-controls .map-radius-step--down::before,
html.dark-mode #map-controls .map-radius-step--down::before,
.dark-mode .radius-bubble .map-radius-step--down::before,
html.dark-mode .radius-bubble .map-radius-step--down::before {
	border-top-color: #6a11cf;
}
.dark-mode #map-controls .map-radius-step--up,
html.dark-mode #map-controls .map-radius-step--up,
.dark-mode .radius-bubble .map-radius-step--up,
html.dark-mode .radius-bubble .map-radius-step--up {
	border-bottom-color: rgb(123, 115, 101);
}
#map-controls .form-label,
#map-controls input,
#map-controls button {
	font-family: var(--font-body) !important;
	font-weight: 400 !important;
	font-variation-settings: normal !important;
}
#map-page #map-wrap {
	flex: 1 1 auto;
	min-height: 300px;
}
.control-row {
	gap: .5rem;
	align-items: center;
}
.radius-bubble {
	min-width: 60px;
	text-align: center;
	overflow: visible;
	position: relative;
}

.radius-bubble .map-radius-input {
	border-top-right-radius: 0.375rem;
	border-bottom-right-radius: 0.375rem;
}

.radius-bubble .map-radius-input.has-radius-steppers {
	padding-right: 22px;
}

.radius-bubble .map-radius-steppers {
	border-top-right-radius: 0.375rem;
	border-bottom-right-radius: 0.375rem;
}

/* Keep radius input position; pull label text closer to it */
#map-controls .map-radius-control {
	gap: 0.2rem;
}

#map-controls .map-radius-control .map-radius-label {
	margin-right: 0 !important;
	margin-left: auto;
}

#map-controls .map-radius-control .radius-bubble {
	margin-left: 0 !important;
}

#map-controls .map-page-location-field {
	position: relative;
	width: 280px;
	max-width: 100%;
}

#map-controls .map-page-location-input {
	width: 100%;
	padding-right: 2.35rem;
	box-sizing: border-box;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: clip;
}

@media (max-width: 767px) {
	#map-controls {
		padding: .375rem; margin: .5rem;
	}

	body.search-on-map-page .container.mb-3:has(#map-page) {
		margin-bottom: 0 !important;
	}

	#map-page {
		height: calc(100dvh - var(--map-page-top, 160px));
		max-height: calc(100dvh - var(--map-page-top, 160px));
	}

	#map-wrap {
		--map-google-control-gap: 16px;
	}
}
.gm-style .gm-style-iw-c {
  padding: 0 !important;
  border-radius: 12px !important;
  overflow: hidden !important;
}
.gm-style .gm-style-iw-d {
  overflow: hidden !important;
  max-width: 100% !important;
}
.gm-style .gm-style-iw-t:has(.mapInfoWindowMain.featured),
.gm-style .gm-style-iw-c:has(.mapInfoWindowMain.featured),
.gm-style .gm-style-iw-d:has(.mapInfoWindowMain.featured) {
  overflow: visible !important;
  background: transparent !important;
  box-shadow: none !important;
}
.gm-ui-hover-effect {
  display: none !important;
}
.mapInfoWindowMain{
	max-width: 280px;
	background: #fff;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 4px 12px rgba(0,0,0,0.15);
	font-family: 'Segoe UI', Tahoma, sans-serif;
	text-align: center;
	position: relative;
	box-sizing: border-box;
}
.mapInfoWindowMain.featured,
.mapInfoWindowMain.featured-fixed {
	overflow: visible;
	border: none;
	box-shadow: none;
}
.mapInfoWindowMain.featured::before,
.mapInfoWindowMain.featured-fixed::before {
	content: '';
	position: absolute;
	inset: 0;
	border: 2px solid #ff0000;
	border-radius: 12px;
	pointer-events: none;
	z-index: 6;
	box-sizing: border-box;
}
.mapInfoWindowMain.featured.featured-fixed::before {
	border-color: #ff004d;
}
.mapInfoWindowMain.featured::after,
.mapInfoWindowMain.featured-fixed::after {
	position: absolute;
	content: '';
	right: 0;
	top: auto;
	bottom: 0;
	width: 52.5px;
	height: 50.4px;
	transform: translate(50%, 50%);
	z-index: 7;
	background: url('/assets/images/ic-heart.svg') no-repeat;
	background-size: cover;
	pointer-events: none;
}
.imageOuterDiv{
	position: relative;
	line-height: 0;
	font-size: 0;
}
.imageOuterDiv a{
	display: block;
	line-height: 0;
	border: 0;
	outline: none;
	text-decoration: none;
}
.postFirstImageTag{
	display: block;
	max-width: 280px;
	max-height: 160px;
	width: auto;
	height: auto;
	margin: 0 auto;
	border: 0;
	outline: none;
	vertical-align: top;
	object-fit: contain;
	background: #fff;
}
.mapInfoSliderAppend{
	line-height: 0;
	font-size: 0;
}
.mapInfoSliderAppend .slick-slider:not(.slick-initialized) > div ~ div{
	display: none !important;
}
.mapInfoWindowMain .slick-slider{
	position: relative;
	max-width: 280px;
	margin: 0 auto;
}
.mapInfoWindowMain .slick-slide{
	overflow: hidden;
}
.mapInfoSlideLink{
	display: block;
	line-height: 0;
	border: 0;
	outline: none;
	text-decoration: none;
	/* Inherit slick-list cursor (zoom-in center / pointer on edges) — same as frontpage cards. */
	cursor: inherit !important;
}
.mapInfoWindowMain .postFirstImageTag{
	cursor: inherit;
}
/* Default: center = lupe (open ad); edge nav JS swaps to pointer on sides when multi-slide. */
.mapInfoWindowMain .slick-list,
.mapInfoWindowMain .mapInfoSliderAppend:not(:has(.slick-initialized)) .mapInfoSlideLink {
	cursor: zoom-in;
}
/* Map preview only: hide gray Slick side arrows; edge-tap + green chip still change slides */
.mapInfoWindowMain .slick-prev,
.mapInfoWindowMain .slick-next {
	display: none !important;
	visibility: hidden !important;
	pointer-events: none !important;
}
.mapInfoWindowMain .gallery-indicators{
	top: 4%;
	left: 50%;
	transform: translateX(-50%);
	gap: 2px;
	padding: 0;
}
.mapInfoWindowMain .gallery-indicators .slide-left,
.mapInfoWindowMain .gallery-indicators .slide-right{
	font-size: 14px;
	padding: 2px 6px;
}
.mapInfoWindowMain .gallery-indicators .slide-indicators{
	padding: 3px 2px;
	margin: -3px -2px;
	gap: 3px;
}
.mapInfoWindowMain .gallery-indicators .slide-indicators .dot{
	width: 6px;
	height: 6px;
}
.mapInfoWindowMain.featured > .imageOuterDiv,
.mapInfoWindowMain.featured-fixed > .imageOuterDiv {
	overflow: hidden;
	border-radius: 12px 12px 0 0;
}
.mapInfoWindowMain.featured > .mapInfoWindowBody,
.mapInfoWindowMain.featured-fixed > .mapInfoWindowBody {
	border-radius: 0 0 12px 12px;
}
.mapInfoWindowBody{
	padding: 10px;
	box-sizing: border-box;
	overflow: hidden;
	background: #fff;
	border: 0;
}
.mapInfoWindowBody > a{
	display: block;
	max-width: 100%;
	overflow: hidden;
	border: 0;
	outline: none;
	text-decoration: none;
}
.infoCloseWindow{
	position: fixed;
	top: 0px;
	right: 0px;
	background: rgba(0,0,0,0.6);
	color: #fff;
	border: none;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	font-size: 16px;
	cursor: pointer;
	line-height: 24px;
	text-align: center;
}
.postTitleClass{
	margin: 0 0 6px;
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.3;
	color:#000 !important;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: clip;
	max-width: 100%;
}
.distanceDetails{
	font-size: 0.9rem;
	font-weight: 500;
	color:#000 !important;
	display: block !important;
	width: 100% !important;
	text-align: center !important;
	margin: 4px 0 0 !important;
	max-width: 100%;
	box-sizing: border-box;
}
.distanceDetails-pair{
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	flex-wrap: nowrap;
	white-space: nowrap;
	gap: 2px;
	margin: 0 auto;
	color: #000 !important;
}
.distanceDetails-icon,
.distanceDetails svg {
	flex-shrink: 0;
	width: 14px;
	height: 14px;
	margin: 0;
	color: #007bff;
	display: block;
}

.distanceDetails-text {
	white-space: nowrap;
	flex-shrink: 0;
	min-width: 0;
	line-height: 1.1;
	font-size: clamp(0.68rem, 2.6vw, 0.9rem);
}

.mapInfoWindowMain.map-focus-pulse {
	animation: map-focus-heartbeat 1.15s ease-in-out infinite;
	box-shadow: 0 0 0 2px #ff004c, 0 4px 12px rgba(0, 0, 0, 0.15);
}

@keyframes map-focus-heartbeat {
	0%,
	100% {
		box-shadow: 0 0 0 2px #ff004c, 0 4px 12px rgba(0, 0, 0, 0.15);
	}

	14% {
		box-shadow: 0 0 0 5px rgba(255, 0, 76, 0.55), 0 4px 14px rgba(0, 0, 0, 0.2);
	}

	28% {
		box-shadow: 0 0 0 2px #ff004c, 0 4px 12px rgba(0, 0, 0, 0.15);
	}
}

#map-wrap {
	position: relative;
	flex: 1 1 auto;
	min-height: 300px;
	display: flex;
	flex-direction: column;
	--map-fab-btn-size: 44px;
	--map-fab-stack-gap: 12px;
	--map-fab-stack-bottom: max(16px, calc(env(safe-area-inset-bottom, 0px) + 12px));
	--map-google-control-gap: 12px;
	--map-fab-stack-height: calc((var(--map-fab-btn-size) * 2) + var(--map-fab-stack-gap));
}

#map-wrap #map {
	flex: 1 1 auto;
	min-height: 300px;
}

.map-fab-stack {
	position: absolute;
	right: 12px;
	bottom: var(--map-fab-stack-bottom);
	z-index: 101;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--map-fab-stack-gap);
	pointer-events: none;
}

/* Google Maps pan (camera) control — sit above Home / My location, not under them */
#map-wrap .gm-bundled-control-on-bottom {
	bottom: calc(var(--map-fab-stack-bottom) + var(--map-fab-stack-height) + var(--map-google-control-gap)) !important;
	right: 12px !important;
	margin: 0 !important;
}

/* Street View pegman overlaps the locate button on narrow screens */
#map-wrap .gm-svpc {
	display: none !important;
}

.map-fab-btn {
	pointer-events: auto;
	width: var(--map-fab-btn-size);
	height: var(--map-fab-btn-size);
	min-width: var(--map-fab-btn-size);
	min-height: var(--map-fab-btn-size);
	border: 0;
	border-radius: 50%;
	background: #fff;
	color: #5f6368;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	text-decoration: none;
	padding: 0;
	transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.map-fab-btn:hover,
.map-fab-btn:focus-visible {
	background: #f8f9fa;
	color: #202124;
	outline: none;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.map-fab-btn.is-active {
	background: #e8f0fe;
	color: #1a73e8;
}

.map-fab-btn.is-loading {
	opacity: 0.7;
	pointer-events: none;
}

.map-fab-btn svg {
	width: 22px;
	height: 22px;
	display: block;
}

.dark-mode .map-fab-btn {
	background: #3c4043;
	color: #e8eaed;
}

.dark-mode .map-fab-btn:hover,
.dark-mode .map-fab-btn:focus-visible {
	background: #484c51;
	color: #fff;
}

.dark-mode .map-fab-btn.is-active {
	background: #394457;
	color: #8ab4f8;
}

.mapDirectionsBtn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-top: 10px;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	border-radius: 8px;
	background: #1a73e8;
	color: #fff !important;
	cursor: pointer;
	line-height: 0;
}

.mapDirectionsBtn:hover,
.mapDirectionsBtn:focus-visible {
	background: #1765cc;
	outline: none;
}

.mapDirectionsBtn:disabled {
	background: #9aa0a6;
	cursor: not-allowed;
}

.mapDirectionsBtn svg {
	width: 22px;
	height: 22px;
	flex-shrink: 0;
}
