/*
 * Event Floorplans – front end.
 * Override any of these custom properties in Elementor > Custom CSS or your theme:
 *   .efp-app { --efp-available:#2e8b57; --efp-accent:#1f4fd8; }
 */
.efp-app {
	--efp-available: var(--e-global-color-9195708, #2e8b57);
	--efp-on_hold: var(--e-global-color-576229d, #e0a100);
	--efp-sold: var(--e-global-color-b8ec6fd, #c0392b);
	--efp-not_for_sale: #8a8f98;
	--efp-accent: #1f4fd8;
	--efp-bg: #ffffff;
	--efp-text: #1c2430;
	--efp-muted: #5b6573;
	--efp-border: #d5dae1;
	--efp-h: 640px;
	container-type: inline-size;
	color: var(--efp-text);
	font-size: 15px; line-height: 1.4;
	box-sizing: border-box;
}
.efp-app *, .efp-app *::before, .efp-app *::after { box-sizing: border-box; }
.efp-header { margin: 0 0 14px; }
.efp-title { margin: 0; font-size: clamp(22px, 3.2vw, 32px); line-height: 1.15; }
.efp-dates { margin: 4px 0 0; font-size: 16px; color: var(--efp-muted); }
.efp-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 12px; align-items: start; }
.efp-mapwrap { position: relative; overflow: hidden; height: var(--efp-h); background: var(--efp-bg); border: 1px solid var(--efp-border); border-radius: 10px; }
.efp-stage, .efp-stage svg { width: 100%; height: 100%; display: block; }
.efp-stage svg { touch-action: none; cursor: grab; }
.efp-stage svg:active { cursor: grabbing; }

/* Booth states – !important so they win over fills baked into the SVG. */
.efp-booth { cursor: pointer; outline: none; }
.efp-booth :is(path, rect, polygon, polyline, circle, ellipse) { stroke: #2b3340; stroke-width: 1.5; }
.efp-booth[data-status="available"]    :is(path, rect, polygon, polyline, circle, ellipse) { fill: var(--efp-available) !important; }
.efp-booth[data-status="on_hold"]      :is(path, rect, polygon, polyline, circle, ellipse) { fill: var(--efp-on_hold) !important; stroke-dasharray: 5 3; }
.efp-booth[data-status="sold"]         :is(path, rect, polygon, polyline, circle, ellipse) { fill: var(--efp-sold) !important; }
.efp-booth[data-status="not_for_sale"] :is(path, rect, polygon, polyline, circle, ellipse) { fill: var(--efp-not_for_sale) !important; opacity: .6; }
.efp-booth[data-status="sold"] :is(path, rect, polygon, polyline, circle, ellipse) { stroke-width: 3; }
.efp-booth text { fill: #fff !important; font-weight: 700; paint-order: stroke; stroke: rgba(0,0,0,.5); stroke-width: 2.5px; pointer-events: none; }
.efp-booth:hover :is(path, rect, polygon, polyline, circle, ellipse) { filter: brightness(1.12); }
.efp-booth:focus-visible :is(path, rect, polygon, polyline, circle, ellipse),
.efp-booth.efp-sel :is(path, rect, polygon, polyline, circle, ellipse) { stroke: var(--efp-accent) !important; stroke-width: 4; stroke-dasharray: none; }

/* Controls */
.efp-tools { position: absolute; top: 8px; left: 8px; display: flex; flex-direction: column; gap: 6px; }
.efp-tools button, .efp-close { width: 40px; height: 40px; border: 1px solid var(--efp-border); border-radius: 8px; background: var(--efp-bg); color: var(--efp-text); font-size: 20px; line-height: 1; cursor: pointer; padding: 0; }
.efp-app .efp-close { background: transparent !important; color: var(--efp-text) !important; box-shadow: none; }
.efp-app .efp-close:hover { background: rgba(0,0,0,.08) !important; }
.efp-close { position: absolute; top: 6px; right: 6px; border: 0; width: 36px; height: 36px; font-size: 24px; background: none; }
.efp-app button:focus-visible, .efp-app input:focus-visible, .efp-app select:focus-visible, .efp-app a:focus-visible { outline: 3px solid var(--efp-accent); outline-offset: 2px; }
.efp-legend { position: absolute; left: 58px; right: 8px; bottom: 8px; display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; background: rgba(255,255,255,.92); padding: 4px 8px; border-radius: 6px; pointer-events: none; }
.efp-legend i, .efp-dot { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: -2px; flex: none; }
.efp-dot { margin-right: 0; }
[data-status="available"].efp-dot, .efp-legend i[data-status="available"] { background: var(--efp-available); }
[data-status="on_hold"].efp-dot, .efp-legend i[data-status="on_hold"] {
	background: repeating-linear-gradient(45deg, rgba(0,0,0,.3) 0 2px, transparent 2px 5px), var(--efp-on_hold);
	outline: 1px dashed rgba(0,0,0,.55); outline-offset: -1px;
}
[data-status="sold"].efp-dot, .efp-legend i[data-status="sold"] { background: var(--efp-sold); }
[data-status="not_for_sale"].efp-dot, .efp-legend i[data-status="not_for_sale"] { background: var(--efp-not_for_sale); }

/* Details card */
.efp-card { position: absolute; top: 10px; right: 10px; width: 290px; max-width: calc(100% - 20px); background: var(--efp-bg); border: 1px solid var(--efp-border); border-radius: 12px; padding: 14px; box-shadow: 0 8px 28px rgba(0,0,0,.25); }
.efp-card[hidden] { display: none; }
.efp-card-title { margin: 0 40px 8px 0; font-size: 18px; }
.efp-card dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 8px 0; }
.efp-card dt { color: var(--efp-muted); }
.efp-card dd { margin: 0; }
.efp-chip { display: inline-flex; align-items: center; gap: 6px; }
.efp-info { margin: 8px 0; white-space: pre-line; }
.efp-cta { display: block; text-align: center; padding: 11px; border-radius: 8px; background: var(--efp-accent); color: #fff !important; text-decoration: none; font-weight: 600; margin-top: 10px; }
.efp-cta[aria-disabled="true"] { background: var(--efp-not_for_sale); }

/* List */
.efp-side { background: var(--efp-bg); border: 1px solid var(--efp-border); border-radius: 10px; display: flex; flex-direction: column; max-height: var(--efp-h); }
.efp-ctl { display: grid; gap: 8px; padding: 10px; border-bottom: 1px solid var(--efp-border); }
.efp-ctl label { font-size: 12px; color: var(--efp-muted); display: grid; gap: 3px; }
.efp-ctl input, .efp-ctl select { width: 100%; padding: 8px; border: 1px solid var(--efp-border); border-radius: 6px; font: inherit; color: var(--efp-text); background: var(--efp-bg); }
.efp-count { margin: 0; padding: 6px 12px; font-size: 12px; color: var(--efp-muted); }
.efp-list { list-style: none; margin: 0; padding: 0; overflow: auto; flex: 1; }
.efp-list button { display: flex; gap: 8px; align-items: center; width: 100%; text-align: left; padding: 9px 12px; border: 0; border-top: 1px solid var(--efp-border); background: none; color: inherit; font: inherit; cursor: pointer; }
.efp-app .efp-list button:hover,
.efp-app .efp-list button:focus-visible,
.efp-app .efp-list button[aria-pressed="true"] {
	color: var(--e-global-color-b8ec6fd, #c0392b) !important;
	background-color: rgba(192, 57, 43, .1) !important; /* fallback */
	background-color: color-mix(in srgb, var(--e-global-color-b8ec6fd, #c0392b) 10%, transparent) !important;
}
.efp-app .efp-list button:hover small,
.efp-app .efp-list button[aria-pressed="true"] small { color: inherit; }
.efp-list small { color: var(--efp-muted); }
.efp-notice { padding: 10px 12px; background: #fff3c4; color: #5a4300; border-radius: 6px; }

@container (max-width: 760px) {
	.efp-layout { grid-template-columns: minmax(0, 1fr); }
	/* Phone layout: controls + legend sit in a strip above the map, and the map is exactly as tall as the artwork. */
	.efp-mapwrap { height: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px; }
	.efp-tools { position: static; flex-direction: row; order: 1; }
	.efp-legend { position: static; order: 2; flex: 1 1 180px; background: none; padding: 0; }
	.efp-stage { order: 3; flex: 0 0 100%; width: 100%; height: auto; aspect-ratio: var(--efp-ar, 1); max-height: 80vh; }
	.efp-stage svg { height: 100%; }
	.efp-side { max-height: 50vh; }
	.efp-card { top: auto; bottom: 0; right: 0; left: 0; width: auto; max-width: none; border-radius: 14px 14px 0 0; }
}
@media (max-width: 760px) {
	.efp-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: no-preference) { .efp-booth :is(path, rect, polygon, polyline, circle, ellipse) { transition: filter .15s; } }
