/*
 * The interactive floorplan pop-up (assets/js/floorplan-viewer.js).
 * Spec docs/superpowers/specs/2026-11-23-floorplans-on-site-design.md, D5 (desktop: a dark graphite panel floating
 * over the dimmed, blurred page, close button top right) and D6 (phone: full screen).
 * The viewer page inside (assets/floorplans/<slug>.html) draws itself dark and keeps its header clear of the button.
 */
html.liv-fp-open { overflow: hidden; }

.liv-fp-dialog {
	box-sizing: border-box;
	/* % of the visible area (100vw would count a reserved scrollbar gutter and push the panel off-centre). */
	width: min(1280px, calc(100% - 48px));
	height: min(1060px, calc(100vh - 48px));
	max-width: none;
	max-height: none;
	margin: auto;
	padding: 0;
	overflow: hidden;
	border: 1px solid rgb(255 255 255 / 0.14);
	border-radius: 16px;
	background: #161816;
	color: #F2F3EF;
	box-shadow: 0 30px 80px rgb(0 0 0 / 0.6), 0 0 0 1px rgb(0 0 0 / 0.4);
}
@supports (height: 100dvh) {
	.liv-fp-dialog { height: min(1060px, calc(100dvh - 48px)); }
}
.liv-fp-dialog::backdrop {
	background: rgb(6 8 6 / 0.58);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
}
.liv-fp-dialog__frame {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
	background: #161816;
}
.liv-fp-dialog__close {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 1;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #F2F3EF;
	cursor: pointer;
}
.liv-fp-dialog__close:hover { background: rgb(255 255 255 / 0.09); }
.liv-fp-dialog__close:focus-visible { outline: 2px solid #8EC63F; outline-offset: 2px; }

/* Full screen up to 690 px: floating, the viewer inside is the window less 50 px, so a pop-up that floats always
   shows the viewer's desktop look (over 640) and the phone look always fills the screen. */
@media (max-width: 690px) {
	.liv-fp-dialog {
		width: 100%;
		height: 100vh;
		border: 0;
		border-radius: 0;
	}
	@supports (height: 100dvh) {
		.liv-fp-dialog { height: 100dvh; }
	}
	.liv-fp-dialog__close { top: 6px; right: 6px; }
}
