/*
	RC-CORE Forward-Facing PlatMap Viewer

	Client DEV notes:
	- This file is intentionally presentation-only.
	- Major sections have stable classes so a client can
	  restyle or remove them without touching platmapViewer.php.
	- .hide and .disable are hard utility overrides at the end.
*/


:root {
	--pmv-sidebar-width: 390px;
	--pmv-panel-bg: #ffffff;
	--pmv-border: #d7d7d7;
	--pmv-text: #1b1b1b;
	--pmv-muted: #707070;
	--pmv-shadow: 0 8px 28px rgba(0,0,0,.22);
	--pmv-radius: 10px;
}


* {
	box-sizing: border-box;
}


html,
body {
	margin: 0;
	padding: 0;
	width: 100%;
	min-height: 100%;
}


body.pmvBody {
	background: #fff;
	color: var(--pmv-text);
	font-family: Arial, Helvetica, sans-serif;
	overflow-x: hidden;
}


.platmapViewer {
	position: relative;
	width: 100%;
	min-height: 100%;
}


/**********************************************
	MAP
**********************************************/

.pmvMapViewport {
	position: relative;
	width: 100%;
	overflow-x: auto;
	overflow-y: visible;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior-x: contain;
	touch-action: pan-x pan-y;	
}


.pmvStage {
	position: relative;
	flex: 0 0 auto;
	margin: 0 auto;
}


.pmvPlatImage {
	position: absolute;
	display: block;
	top: 0;
	left: 0;
	max-width: none;
	user-select: none;
	-webkit-user-drag: none;
	pointer-events: none;
}


.pmvMarkerLayer {
	position: absolute;
	top: 0;
	left: 0;
}


/**********************************************
	MARKERS
**********************************************/

.pmvMarker {
	position: absolute;
	display: block;
	margin: 0;
	padding: 0;
	border: 1px solid rgba(0,0,0,.28);
	border-radius: 999px;
	box-shadow:
		0 1px 3px rgba(0,0,0,.25),
		inset 0 0 0 1px rgba(255,255,255,.15);
	cursor: pointer;
	transition:
		transform .12s ease,
		box-shadow .12s ease,
		background-color .12s ease,
		opacity .12s ease;
	z-index: 2;
	touch-action: auto;
}


.pmvMarker:hover {
	box-shadow:
		0 2px 7px rgba(0,0,0,.42),
		inset 0 0 0 1px rgba(255,255,255,.25);
}


.pmvMarker:focus-visible {
	outline: 3px solid #111;
	outline-offset: 2px;
}


.pmvMarker.pmvMarkerSelected {
	background-color: #fff !important;
	opacity: 1 !important;
	border: 2px solid #222;
	box-shadow:
		0 2px 8px rgba(0,0,0,.45),
		0 0 0 2px rgba(255,255,255,.85);
	z-index: 5;
	opacity:.5
}


.pmvMarker.pmvLegendMatch:not(.pmvMarkerSelected) {
	box-shadow:
		0 0 0 3px #fff,
		0 0 0 6px #111,
		0 3px 10px rgba(0,0,0,.45);
	z-index: 4;
}


.pmvMarker.pmvLegendFlash:not(.pmvMarkerSelected) {
	animation: pmvLegendFlash .18s linear 4;
	z-index: 4;
}


@keyframes pmvLegendFlash {

	0%,
	100% {
		transform: scale(1);
		filter: brightness(1);
	}

	50% {
		transform: scale(1.28);
		filter: brightness(1.7);
	}
}


/**********************************************
	LEGEND
**********************************************/

.pmvLegendToggle {
	position: fixed;
	top: 12px;
	left: 12px;
	z-index: 900;
	margin: 0;
	padding: 9px 14px;
	border: 1px solid rgba(0,0,0,.22);
	border-radius: 5px;
	background: rgba(255,255,255,.94);
	color: #111;
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 2px 7px rgba(0,0,0,.22);
}


.pmvLegendToggle:hover {
	background: #fff;
}


.pmvLegendPanel {
	position: fixed;
	top: 0;
	left: 0;
	display: flex;
	flex-direction: column;
	width: min(200px, 90vw);
	height: 100dvh;
	background: #fff;
	border-right: 1px solid rgba(0,0,0,.18);
	box-shadow: 4px 0 18px rgba(0,0,0,.22);
	transform: translateX(0);
	transition: transform .22s ease;
	z-index: 1050;
	overflow: hidden;
}


.pmvLegendPanel.closed {
	transform: translateX(-105%);
	box-shadow: none;
	pointer-events: none;
}


.pmvLegendHeader {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 55px;
	padding: 10px 12px 10px 18px;
	border-bottom: 1px solid rgba(0,0,0,.12);
	font-size: 18px;
}


.pmvLegendClose {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: #111;
	font-size: 30px;
	line-height: 1;
	cursor: pointer;
}


.pmvLegendClose:hover {
	background: #ececec;
}


.pmvLegend {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	justify-content: flex-start;
	gap: 4px;
	width: 100%;
	padding: 10px;
	background: #fff;
	overflow-x: hidden;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}


.pmvLegendItem {
	flex: 0 0 auto;
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: flex-start;
	gap: 12px;
	width: 100%;
	min-width: 0;
	margin: 0;
	padding: 8px 10px;
	border: 0;
	border-radius: 6px;
	background: transparent;
	color: #111;
	font: inherit;
	font-size: 13px;
	line-height: 1.2;
	text-align: left;
	cursor: pointer;
}


.pmvLegendItem:hover,
.pmvLegendItem.active {
	background: #f2f2f2;
}


.pmvLegendItem:focus-visible,
.pmvLegendToggle:focus-visible,
.pmvLegendClose:focus-visible {
	outline: 2px solid #111;
	outline-offset: 2px;
}


.pmvLegendDot {
	flex: 0 0 30px;
	display: block;
	width: 30px;
	height: 30px;
	border: 1px solid rgba(0,0,0,.28);
	border-radius: 999px;
	box-shadow: 0 1px 3px rgba(0,0,0,.25);
}


/**********************************************
	SLIDING DETAILS PANEL
**********************************************/

.pmvSidebar {
	position: fixed;
	top: 0;
	right: 0;
	width: min(var(--pmv-sidebar-width), 94vw);
	height: 100dvh;
	background: var(--pmv-panel-bg);
	border-left: 1px solid var(--pmv-border);
	box-shadow: var(--pmv-shadow);
	transform: translateX(0);
	transition: transform .22s ease;
	z-index: 1000;
	overflow: hidden;
}


.pmvSidebar.closed {
	transform: translateX(105%);
	box-shadow: none;
	pointer-events: none;
}


.pmvSidebarClose {
	position: absolute;
	top: 8px;
	right: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: rgba(255,255,255,.92);
	color: #111;
	font-size: 30px;
	line-height: 1;
	cursor: pointer;
	z-index: 3;
}


.pmvSidebarClose:hover {
	background: #ececec;
}


.pmvSidebarContent {
	width: 100%;
	height: 100%;
	overflow-y: auto;
	padding: 18px 18px 28px;
	-webkit-overflow-scrolling: touch;
}


/**********************************************
	HOME DETAILS
**********************************************/

.pmvHomeDetails,
.pmvLotDetails {
	width: 100%;
}


.pmvHomeImage {
	position: relative;
	width: calc(100% + 36px);
	height: 230px;
	margin: -18px -18px 18px;
	overflow: hidden;
	background: #efefef;
}


.pmvHomeImage img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}


.pmvDetailHeading {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
}


.pmvDetailTitle {
	font-size: 18px;
	font-weight: 700;
	line-height: 1.25;
}


.pmvDetailLocation {
	margin-top: 3px;
	color: var(--pmv-muted);
	font-size: 14px;
}


.pmvStatus {
	flex: 0 0 auto;
	max-width: 48%;
	font-size: 15px;
	font-weight: 800;
	line-height: 1.15;
	text-align: right;
	text-transform: uppercase;
}


.pmvPrice {
	margin: 14px 0 10px;
	font-size: 24px;
	font-weight: 800;
	text-align: right;
}


.pmvMetaGrid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px;
	margin-top: 14px;
}


.pmvMetaItem {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px;
	padding: 8px 10px;
	background: #f5f5f5;
	border-radius: 6px;
}


.pmvMetaLabel {
	color: var(--pmv-muted);
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
}


.pmvMetaValue {
	font-size: 14px;
	font-weight: 700;
	text-align: right;
}


.pmvDivider {
	height: 1px;
	margin: 18px 0;
	background: #222;
}


.pmvFloorPlanSingle {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 18px;
}


.pmvFloorPlanSingle span {
	color: var(--pmv-muted);
	font-size: 13px;
	font-weight: 700;
}


.pmvFloorPlanSingle a,
.pmvFloorPlanSingle strong {
	color: #111;
	font-size: 15px;
	font-weight: 800;
}


.pmvDetailLink {
	display: inline-block;
	float: right;
	margin-top: 4px;
	padding: 9px 13px;
	background: #111;
	color: #fff !important;
	border-radius: 3px;
	font-size: 14px;
	font-weight: 800;
	letter-spacing: .04em;
	text-decoration: none;
	text-transform: uppercase;
}


.pmvDetailLink:hover {
	background: #333;
}


/**********************************************
	LOT DETAILS
**********************************************/

.pmvLotIcon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	margin: 5px 0 18px;
	color: #5d8d55;
}


.pmvLotIcon svg {
	display: block;
	width: 225px;
	max-width: 78%;
	height: auto;
}


.pmvLotGround {
	fill: #eaf3e5;
}


.pmvLotBoundary {
	fill: none;
	stroke: currentColor;
	stroke-width: 4;
	stroke-dasharray: 8 6;
	stroke-linejoin: round;
}


.pmvLotGrass {
	fill: none;
	stroke: currentColor;
	stroke-width: 3;
	stroke-linecap: round;
}


.pmvLotRoad {
	fill: none;
	stroke: #888;
	stroke-width: 7;
	stroke-linecap: round;
}


.pmvFloorPlanHeading {
	margin-bottom: 10px;
	font-size: 16px;
	font-weight: 800;
}


.pmvFloorPlanList {
	display: flex;
	flex-direction: column;
	gap: 10px;
}


.pmvFloorPlanCard {
	display: grid;
	grid-template-columns: 118px 1fr;
	gap: 12px;
	align-items: center;
	min-height: 92px;
	padding: 9px;
	border: 1px solid #cfcfcf;
	border-radius: 7px;
	background: #fff;
	color: #111;
	text-decoration: none;
	transition:
		box-shadow .12s ease,
		transform .12s ease;
}


a.pmvFloorPlanCard:hover {
	box-shadow: 0 3px 12px rgba(0,0,0,.16);
	transform: translateY(-1px);
}


.pmvFloorPlanThumb {
	display: block;
	width: 118px;
	height: 78px;
	object-fit: cover;
	object-position: center;
	background: #eee;
}


.pmvFloorPlanText {
	min-width: 0;
}


.pmvFloorPlanName {
	display: block;
	font-size: 15px;
	line-height: 1.2;
}


.pmvFloorPlanSpecs {
	margin-top: 5px;
	color: var(--pmv-muted);
	font-size: 12px;
	line-height: 1.35;
}


.pmvNoFloorPlans {
	padding: 14px;
	background: #f5f5f5;
	color: var(--pmv-muted);
	border-radius: 6px;
	font-size: 13px;
}


/**********************************************
	MISSING MAP
**********************************************/

.pmvMissingMap {
	margin: 24px;
	padding: 18px;
	border: 1px solid #ddd;
	background: #f8f8f8;
	font-size: 15px;
}


/**********************************************
	MOBILE
**********************************************/

@media (max-width: 700px) {

	:root {
		--pmv-sidebar-width: 360px;
	}

	.pmvStage {
		margin-left: 0;
		margin-right: 0;
	}



	.pmvSidebar {
		width: min(92vw, var(--pmv-sidebar-width));
	}

	.pmvHomeImage {
		height: 200px;
	}

	.pmvDetailHeading {
		flex-direction: column;
		gap: 8px;
	}

	.pmvStatus {
		max-width: 100%;
		text-align: left;
	}

	.pmvPrice {
		text-align: left;
	}

	.pmvMetaGrid {
		grid-template-columns: 1fr;
	}

	.pmvFloorPlanCard {
		grid-template-columns: 100px 1fr;
	}

	.pmvFloorPlanThumb {
		width: 100px;
		height: 70px;
	}
}


/**********************************************
	HARD OVERRIDES

	These intentionally live last so a DEV can add
	the class to any portion of the viewer.
**********************************************/

.hide {
	display: none !important;
}


.disable {
	pointer-events: none !important;
	opacity: .3 !important;
}



