/* Fonts (same files as the archiscans.com theme) */
@font-face{font-family:'Archivo';font-style:normal;font-weight:100 900;font-stretch:62% 125%;font-display:swap;src:url(fonts/archivo-100-900-latin-ext.woff2) format('woff2');unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF}
@font-face{font-family:'Archivo';font-style:normal;font-weight:100 900;font-stretch:62% 125%;font-display:swap;src:url(fonts/archivo-100-900-latin.woff2) format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}
@font-face{font-family:'IBM Plex Mono';font-style:normal;font-weight:400;font-display:swap;src:url(fonts/ibmplexmono-400-latin-ext.woff2) format('woff2');unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF}
@font-face{font-family:'IBM Plex Mono';font-style:normal;font-weight:400;font-display:swap;src:url(fonts/ibmplexmono-400-latin.woff2) format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}
@font-face{font-family:'IBM Plex Mono';font-style:normal;font-weight:500;font-display:swap;src:url(fonts/ibmplexmono-500-latin-ext.woff2) format('woff2');unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF}
@font-face{font-family:'IBM Plex Mono';font-style:normal;font-weight:500;font-display:swap;src:url(fonts/ibmplexmono-500-latin.woff2) format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}

/*
 * Archiscans theme for the Potree viewer pages (loaded after libs/potree/potree.css).
 * Same palette and type as archiscans.com: graphite ground, laser-orange accent, Archivo + IBM Plex Mono.
 */
:root {
	--as-ink: #0c0f10; --as-deep: #080a0b; --as-panel: #111618; --as-panel-2: #151a1c;
	--as-line: #232a2c; --as-line-2: #2e3739; --as-line-3: #3a4446;
	--as-text: #e8ecea; --as-soft: #b9c2c0; --as-muted: #9aa5a3;
	--as-accent: #ff5a1f; --as-accent-hover: #ff7a45;
	--as-sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
	--as-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
	/* Potree's own variables */
	--bg-color: var(--as-panel); --bg-color-2: var(--as-panel-2); --bg-light-color: var(--as-panel-2); --bg-dark-color: var(--as-ink);
	--bg-hover-color: var(--as-line); --color-1: var(--as-line-2); --color-2: var(--as-line);
	--font-color: var(--as-soft); --font-color-2: var(--as-text); --border-color: var(--as-line);
	--measurement-detail-node-bg-light: var(--as-line-2); --measurement-detail-node-bg-dark: var(--as-line);
}
body { background: var(--as-deep); }

/* ---------- sidebar ---------- */
#potree_sidebar_container {
	background-color: var(--as-panel) !important;
	border-right: 1px solid var(--as-line) !important;
	scrollbar-color: var(--as-line-3) var(--as-panel);
}
#potree_sidebar_container::-webkit-scrollbar { width: 8px; background-color: var(--as-panel); }
#potree_sidebar_container::-webkit-scrollbar-thumb { background-color: var(--as-line-3); }
#sidebar_root {
	font-family: var(--as-sans) !important;
	font-size: 15px !important;
	line-height: 1.45;
	color: var(--as-text) !important;
	-webkit-font-smoothing: antialiased;
}
#sidebar_header { padding: 18px 20px 16px; border-bottom: 1px solid var(--as-line); }
#potree_branding { margin: 0 !important; line-height: 1 !important; align-items: center; gap: 12px; }
#potree_branding img { display: none !important; }
#potree_branding::before {
	content: ""; flex: none; width: 28px; height: 28px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 28' fill='none' stroke='%23ff5a1f' stroke-width='1.5'%3E%3Ccircle cx='14' cy='14' r='8.5'/%3E%3Cpath d='M14 1v7M14 20v7M1 14h7M20 14h7'/%3E%3Ccircle cx='14' cy='14' r='1.6' fill='%23ff5a1f' stroke='none'/%3E%3C/svg%3E") center / contain no-repeat;
}
#potree_branding::after {
	content: "ARCHISCANS"; font-family: var(--as-sans); font-weight: 700; font-stretch: 78%;
	font-size: 22px; letter-spacing: .08em; color: var(--as-text);
}
#potree_sidebar_container a { color: var(--as-accent-hover) !important; }
a.as-home-link { display: block; text-decoration: none !important; color: inherit !important; }
a.as-home-link:hover #potree_branding::after { color: var(--as-accent); }
a.as-home-link:focus-visible { outline: 2px solid var(--as-accent); outline-offset: 6px; }

/* Section headers: the former red bars, now in the site's orange. */
#potree_menu > h3, .accordion > h3 {
	position: relative;
	background: var(--as-accent) !important;
	background-color: var(--as-accent) !important;
	color: var(--as-ink) !important;
	border: 0 !important;
	border-top: 1px solid rgba(12, 15, 16, .28) !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	text-shadow: none !important;
	margin: 0 !important;
	padding: 12px 16px 12px 36px !important;
	font-family: var(--as-mono) !important;
	font-size: 12px !important;
	font-weight: 500 !important;
	letter-spacing: .14em;
	text-transform: uppercase;
	outline: none;
}
#potree_menu > h3:hover, .accordion > h3:hover { filter: none !important; background-color: var(--as-accent-hover) !important; }
#potree_menu > h3:focus-visible, .accordion > h3:focus-visible { box-shadow: inset 0 0 0 2px var(--as-ink) !important; }
#potree_menu > h3 .ui-accordion-header-icon, .accordion > h3 .ui-accordion-header-icon { display: none !important; }
#potree_menu > h3::before, .accordion > h3::before {
	content: ""; position: absolute; left: 16px; top: 50%; width: 8px; height: 8px; margin-top: -4px;
	border: 1.5px solid var(--as-ink); border-radius: 50%; box-sizing: border-box;
}
.accordion-content, .ui-accordion-content, #potree_menu > div {
	background: transparent !important;
	color: var(--as-text) !important;
	border: 0 !important;
}
.pv-menu-list { margin: 16px 0 20px !important; }
.pv-menu-list > * { margin: 6px 20px !important; }
.pv-menu-list li { color: var(--as-soft); font-size: 14px; }
#sidebar_root [id^="lbl"] { font-family: var(--as-mono); font-size: 13px; color: var(--as-text); }
.divider {
	margin: 18px 0 8px !important;
	font-family: var(--as-mono) !important;
	font-size: 11px !important;
	font-weight: 500 !important;
	letter-spacing: .14em !important;
	text-transform: uppercase;
	color: var(--as-muted) !important;
}
.divider > span:before, .divider > span:after { background: var(--as-line-2) !important; }
#sidebar_root label { cursor: pointer; }
#sidebar_root input[type="checkbox"], #sidebar_root input[type="radio"] {
	accent-color: var(--as-accent); width: 16px; height: 16px; margin: 0 8px 0 0; vertical-align: -3px;
}

/* Sliders */
#sidebar_root .ui-slider, .pv-menu-list .ui-slider, .pv-menu-list > li > .ui-slider, .panel-body .ui-slider {
	background: var(--as-line-2) !important;
	background-color: var(--as-line-2) !important;
	border: 0 !important;
	border-radius: 0 !important;
	height: 4px !important;
	margin: 12px 7px 16px !important;
}
#sidebar_root .ui-slider .ui-slider-range { background: var(--as-accent) !important; }
#sidebar_root .ui-slider .ui-slider-handle, .ui-slider-handle {
	width: 14px !important; height: 14px !important; top: -5px !important; margin-left: -7px !important;
	background: var(--as-accent) !important;
	border: 2px solid var(--as-panel) !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	cursor: grab;
	outline: none;
}
#sidebar_root .ui-slider .ui-slider-handle:focus-visible { box-shadow: 0 0 0 2px var(--as-text) !important; }

/* Buttons, button groups, select menus */
#sidebar_root .ui-state-default, #sidebar_root .ui-button, .ui-selectmenu-button.ui-button, .ui-checkboxradio-label {
	background: var(--as-panel-2) !important;
	border: 1px solid var(--as-line-2) !important;
	border-radius: 0 !important;
	color: var(--as-text) !important;
	font-family: var(--as-mono) !important;
	font-size: 12px !important;
	box-shadow: none !important;
	text-shadow: none !important;
}
#sidebar_root .ui-state-hover, #sidebar_root .ui-button:hover { border-color: var(--as-muted) !important; color: var(--as-text) !important; }
#sidebar_root .ui-state-active, #sidebar_root .ui-checkboxradio-checked, #sidebar_root .ui-button.ui-state-active {
	background: var(--as-text) !important;
	border-color: var(--as-text) !important;
	color: var(--as-ink) !important;
}
#sidebar_root .ui-checkboxradio-icon { display: none !important; }
.ui-selectmenu-menu .ui-menu { background: var(--as-panel-2) !important; border: 1px solid var(--as-line-2) !important; color: var(--as-text) !important; font-family: var(--as-mono); font-size: 12px; }
.ui-selectmenu-menu .ui-menu .ui-state-active { background: var(--as-accent) !important; color: var(--as-ink) !important; border: 0 !important; margin: 0 !important; }
#sidebar_root input[type="text"], #sidebar_root input[type="number"], #sidebar_root select, #sidebar_root textarea, .ui-spinner-input {
	background: var(--as-ink) !important;
	color: var(--as-text) !important;
	border: 1px solid var(--as-line-2) !important;
	border-radius: 0;
	font-family: var(--as-mono);
	font-size: 12px;
}
.ui-spinner { background: var(--as-ink) !important; border: 1px solid var(--as-line-2) !important; border-radius: 0 !important; }
.ui-spinner .ui-spinner-input { border: 0 !important; }

/* Tool icons */
#sidebar_root .button-icon { filter: grayscale(1) brightness(1.55) contrast(1.05); opacity: .9; transition: filter .15s, opacity .15s; }
#sidebar_root .button-icon:hover { filter: grayscale(1) brightness(1.8) drop-shadow(0 0 4px rgba(255, 90, 31, .95)) !important; opacity: 1; }
/* Navigation mode in use (the filter turns any colour grey, so the orange comes from the shadow added after it). */
#sidebar_root .button-icon.as-nav-active { opacity: 1; outline: 1px solid #fff; outline-offset: 2px; filter: grayscale(1) brightness(1.8) drop-shadow(0 0 2px rgba(255, 90, 31, 1)) drop-shadow(0 0 1px rgba(255, 90, 31, 1)); }

/* Scene tree */
.jstree-default .jstree-anchor { color: var(--as-text) !important; font-family: var(--as-sans); }
.jstree-default .jstree-hovered { background: rgba(255, 90, 31, .16) !important; box-shadow: none !important; border-radius: 0 !important; }
.jstree-default .jstree-clicked { background: var(--as-line) !important; box-shadow: inset 2px 0 0 var(--as-accent) !important; border-radius: 0 !important; }
.measurement_content, .propertypanel_content, .scene_content { color: var(--as-soft); }
.measurement_value_table, .coordinates_table_container table { font-family: var(--as-mono); font-size: 12px; }
.propertypanel_content .heading { color: var(--as-muted); font-family: var(--as-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; font-weight: 500; }

/* ---------- on the 3D view ---------- */
.potree_menu_toggle, #potree_map_toggle {
	box-sizing: border-box;
	width: 40px !important; height: 40px !important;
	padding: 7px;
	background: rgba(12, 15, 16, .82) !important;
	border: 1px solid var(--as-line-2);
	margin: 6px !important;
	transition: border-color .15s;
}
.potree_menu_toggle:hover, #potree_map_toggle:hover { border-color: var(--as-accent); }
#potree_description, .potree_info_text {
	font-family: var(--as-mono) !important;
	font-weight: 500 !important;
	text-shadow: none !important;
}
#potree_description:not(.as-clean) { visibility: hidden; } /* until the date is taken out (archiscans-potree.js) */
#potree_description {
	top: 12px !important;
	padding: 8px 14px;
	font-size: 12px;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--as-text);
	background: rgba(12, 15, 16, .8);
	border: 1px solid var(--as-line-2);
	white-space: nowrap;
}
#potree_description:empty { display: none; }
.potree_message {
	background: rgba(12, 15, 16, .92) !important;
	color: var(--as-text) !important;
	border: 1px solid var(--as-line-2) !important;
	border-radius: 0 !important;
	font-family: var(--as-mono) !important;
	font-size: 12px;
	opacity: 1 !important;
}
.potree_message_error { border-color: var(--as-accent) !important; }
.annotation-titlebar { background: var(--as-ink) !important; border: 1px solid var(--as-accent) !important; border-radius: 0 !important; font-family: var(--as-mono); font-size: 12px !important; }
.annotation-description { background: var(--as-ink) !important; border: 1px solid var(--as-line-2); border-radius: 0 !important; }
#profile_window { background-color: var(--as-panel) !important; border: 1px solid var(--as-line-2); }
#profile_titlebar { background-color: var(--as-accent) !important; color: var(--as-ink) !important; text-shadow: none !important; font-family: var(--as-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }

/* ---------- loading strip along the bottom of the viewer (archiscans-potree.js) ---------- */
.as-pl { position: absolute; left: 0; right: 0; bottom: 0; z-index: 50; display: flex; flex-direction: column; align-items: flex-start; pointer-events: none; font-family: var(--as-mono); transition: opacity .6s ease; }
.as-pl.is-done { opacity: 0; visibility: hidden; transition: opacity .6s ease, visibility 0s linear .6s; }
.as-pl-info { display: flex; align-items: baseline; gap: 10px; max-width: calc(100% - 24px); box-sizing: border-box; padding: 5px 10px 4px; background: rgba(12, 15, 16, .82); color: var(--as-muted); font-size: 11px; line-height: 1.3; letter-spacing: .04em; white-space: nowrap; overflow: hidden; font-variant-numeric: tabular-nums; }
.as-pl-label { color: var(--as-text); text-transform: uppercase; letter-spacing: .1em; overflow: hidden; text-overflow: ellipsis; }
.as-pl-pct { color: var(--as-accent); }
.as-pl-pct:empty, .as-pl-points:empty, .as-pl-time:empty { display: none; }
.as-pl-track { position: relative; align-self: stretch; height: 3px; background: rgba(35, 42, 44, .9); overflow: hidden; }
.as-pl-bar { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--as-accent); transition: width .25s ease-out, opacity .4s; }
.as-pl.is-complete .as-pl-label { color: var(--as-soft); }
.as-pl.is-complete .as-pl-bar { opacity: .75; }
.as-pl.is-indeterminate .as-pl-bar { width: 32%; animation: as-pl-slide 1.3s ease-in-out infinite; transition: none; }
.as-pl.is-indeterminate.is-still .as-pl-bar { animation: none; left: 0; }
.as-pl.is-busy .as-pl-track::after { content: ""; position: absolute; top: 0; bottom: 0; width: 22%; background: linear-gradient(90deg, transparent, rgba(255, 214, 196, .85), transparent); animation: as-pl-slide 1.1s linear infinite; }
.as-pl.is-still .as-pl-track::after { display: none; }
@keyframes as-pl-slide { 0% { left: -32%; } 100% { left: 100%; } }
@media (max-width: 560px) { .as-pl-info { font-size: 10px; gap: 8px; } .as-pl-time { display: none; } }
@media (max-width: 640px) { #potree_description { font-size: 10px; max-width: calc(100% - 120px); overflow: hidden; text-overflow: ellipsis; } }

/* Mouse help (replaces images/mouse_cropped.png on screen) */
.as-mouse-help { display: block; width: calc(100% - 40px); height: auto; margin: 16px 20px 22px; }
.as-sidebar-note { margin: 14px 20px 24px; font-size: 13px; line-height: 1.55; color: var(--as-muted); }
.as-sidebar-note br { display: none; }

/* ---------- extra tools inside the menu (archiscans-tools.js) ---------- */
/* Our own icons in Potree's rows, and toggles that are on (automatic rotation, compass). */
#sidebar_root .button-icon.as-on { opacity: 1; outline: 1px solid #fff; outline-offset: 2px; filter: grayscale(1) brightness(1.8) drop-shadow(0 0 2px rgba(255, 90, 31, 1)) drop-shadow(0 0 1px rgba(255, 90, 31, 1)); }
#sidebar_root .as-own-icon { cursor: pointer; }
#sidebar_root .as-own-icon:focus-visible { outline: 2px solid var(--as-accent); outline-offset: 2px; }
.as-side-label { margin: 16px 0 8px; font-family: var(--as-mono); font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--as-muted); }
.as-side-note { margin: 6px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--as-muted); }
.as-results-list { display: flex; flex-direction: column; gap: 6px; }
.as-result { display: block; width: 100%; padding: 9px 12px 10px; box-sizing: border-box; background: var(--as-panel-2); border: 1px solid var(--as-line-2); border-left: 2px solid var(--as-accent); color: var(--as-text); font: inherit; text-align: left; cursor: pointer; }
.as-result:hover { border-color: var(--as-muted); border-left-color: var(--as-accent); }
.as-result:focus-visible, .as-side-btn:focus-visible, .as-view-go:focus-visible, .as-view-del:focus-visible, .as-present-exit:focus-visible { outline: 2px solid var(--as-accent); outline-offset: 1px; }
.as-result-name { display: block; margin-bottom: 4px; font-family: var(--as-mono); font-size: 12px; font-weight: 500; letter-spacing: .04em; }
.as-result dl { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; margin: 0; font-size: 12.5px; }
.as-result dt { color: var(--as-muted); }
.as-result dd { margin: 0; font-family: var(--as-mono); font-size: 12px; font-variant-numeric: tabular-nums; text-align: right; }
.as-side-btn { display: block; width: calc(100% - 40px); min-height: 36px; margin: 8px 0 0; padding: 6px 12px; box-sizing: border-box; background: var(--as-panel-2); border: 1px solid var(--as-line-2); border-radius: 0; color: var(--as-text); font-family: var(--as-mono); font-size: 12px; text-align: left; cursor: pointer; transition: border-color .15s; }
.as-side-btn:hover { border-color: var(--as-accent); }
.as-side-row { display: flex; gap: 6px; margin-top: 8px; }
.as-side-row .as-side-btn { flex: none; width: auto; margin: 0; }
.as-side-input { flex: 1; min-width: 0; padding: 7px 10px; box-sizing: border-box; background: var(--as-ink); color: var(--as-text); border: 1px solid var(--as-line-2); border-radius: 0; font-family: var(--as-sans); font-size: 13px; }
.as-side-input:focus { outline: none; border-color: var(--as-accent); }
.as-view-list { margin: 0; padding: 0; list-style: none; border: 1px solid var(--as-line-2); }
.as-view-list li { display: flex; align-items: center; border-bottom: 1px solid var(--as-line); }
.as-view-list li:last-child { border-bottom: 0; }
.as-view-list li.as-side-note { margin: 0; padding: 8px 12px; }
.as-view-go { flex: 1; min-width: 0; padding: 8px 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: none; border: 0; color: var(--as-text); font-family: var(--as-sans); font-size: 13.5px; text-align: left; cursor: pointer; }
.as-view-go:hover { color: var(--as-accent-hover); }
.as-view-del { flex: none; width: 32px; height: 32px; background: none; border: 0; color: var(--as-muted); font-size: 18px; line-height: 1; cursor: pointer; }
.as-view-del:hover { color: var(--as-accent); }
.as-views { padding-bottom: 18px; }
.as-help-notes { margin: 0 20px 20px; padding: 0; list-style: none; }
.as-help-notes li { position: relative; padding: 4px 0 4px 16px; font-size: 13px; line-height: 1.5; color: var(--as-muted); }
.as-help-notes li::before { content: ""; position: absolute; left: 0; top: .95em; width: 6px; height: 1px; background: var(--as-accent); }
.as-touch-help { margin: 14px 20px 22px; padding: 0; list-style: none; }
.as-touch-help li { position: relative; padding: 5px 0 5px 16px; font-size: 14px; color: var(--as-soft); }
.as-touch-help li::before { content: ""; position: absolute; left: 0; top: 1em; width: 6px; height: 1px; background: var(--as-accent); }

/* Potree's compass, restyled (its own image, rotation and click to the top view). */
img.as-compass { top: 12px !important; right: 12px !important; width: 44px !important; height: 44px; z-index: 55 !important; cursor: pointer; }

/* On the 3D view: short messages and the coordinates under the cursor. */
.as-toast { position: absolute; top: 58px; left: 50%; z-index: 70; max-width: min(520px, calc(100% - 140px)); padding: 9px 14px; box-sizing: border-box; background: rgba(12, 15, 16, .94); border: 1px solid var(--as-line-2); border-left: 2px solid var(--as-accent); color: var(--as-text); font-family: var(--as-mono); font-size: 12px; line-height: 1.45; opacity: 0; transform: translate(-50%, -6px); pointer-events: none; transition: opacity .25s, transform .25s; }
.as-toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.as-coords { position: absolute; right: 0; bottom: 3px; z-index: 50; display: flex; align-items: center; gap: 12px; padding: 5px 10px 4px; background: rgba(12, 15, 16, .82); color: var(--as-soft); font-family: var(--as-mono); font-size: 11px; line-height: 1.3; font-variant-numeric: tabular-nums; white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .2s; }
.as-coords.is-on { opacity: 1; }
.as-coords b { margin-right: 6px; font-weight: 500; color: var(--as-accent); }
.as-coords-sw { width: 10px; height: 10px; border: 1px solid var(--as-line-3); }

/* Presentation mode: only the point cloud, and a discreet button to come back. */
body.as-ui-hidden .as-pl, body.as-ui-hidden .as-coords, body.as-ui-hidden .as-toast, body.as-ui-hidden #potree_quick_buttons,
body.as-ui-hidden .potree_menu_toggle, body.as-ui-hidden #potree_map_toggle, body.as-ui-hidden #potree_description, body.as-ui-hidden img.as-compass { display: none !important; }
.as-present-exit { position: absolute; top: 12px; right: 12px; z-index: 70; width: 40px; height: 40px; padding: 0; background: rgba(12, 15, 16, .82); border: 1px solid var(--as-line-2); border-radius: 0; color: var(--as-text); font-size: 22px; line-height: 1; cursor: pointer; opacity: .55; transition: opacity .15s, border-color .15s; }
.as-present-exit:hover, .as-present-exit:focus-visible { opacity: 1; border-color: var(--as-accent); }
.as-present-exit[hidden] { display: none; }
@media (max-width: 640px) { .as-toast { top: 54px; max-width: calc(100% - 32px); } img.as-compass { top: 8px !important; right: 8px !important; width: 40px !important; height: 40px; } }
@media (prefers-reduced-motion: reduce) { .as-toast { transition: none; } }

/* ---------- top bar (as in the IFC viewer): tag and name, Menu, Affichage, full screen ---------- */
.as-bar { position: absolute; top: 0; left: 0; right: 0; z-index: 90; box-sizing: border-box; display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 52px; padding: 0 8px 0 14px; background: #0c0f10; border-bottom: 1px solid var(--as-line); font-family: var(--as-sans); font-size: 14px; color: var(--as-text); }
.as-bar-title { display: flex; align-items: center; gap: 10px; min-width: 0; font-weight: 600; }
.as-bar-tag { flex: none; padding: 3px 6px; background: var(--as-accent); color: var(--as-ink); font-family: var(--as-mono); font-size: 11px; font-weight: 500; letter-spacing: .1em; }
.as-bar-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 40vw; }
.as-bar-tools { display: flex; gap: 4px; flex: none; }
.as-bar-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; min-width: 40px; justify-content: center; padding: 0 12px; background: transparent; border: 1px solid transparent; border-radius: 0; color: var(--as-text); font-family: var(--as-sans); font-size: 14px; cursor: pointer; }
.as-bar-btn:hover { border-color: var(--as-line-2); }
.as-bar-btn[aria-pressed="true"], .as-bar-btn.is-on { background: var(--as-text); color: var(--as-ink); }
.as-bar-btn svg { width: 18px; height: 18px; }
.as-bar-icon { padding: 0; }
.as-bar-btn:focus-visible, .as-vc-btn:focus-visible, .as-menu button:focus-visible { outline: 2px solid var(--as-accent); outline-offset: 1px; }
body.as-has-bar .potree_container { top: 52px !important; height: calc(100% - 52px) !important; }
body.as-has-bar .potree_menu_toggle, body.as-has-bar #potree_description { display: none !important; } /* in the bar now */
body.as-no-map #potree_map_toggle, body.as-no-map #potree_map { display: none !important; } /* no GPS position for this cloud */
body.as-has-bar .as-toast { top: 12px; }
body.as-ui-hidden .as-bar { display: none !important; }
body.as-ui-hidden.as-has-bar .potree_container { top: 0 !important; height: 100% !important; }
/* Filtres (classification, returns, sources, GPS time): not used for these clouds */
#menu_filters, #menu_filters + div { display: none !important; }

/* ---------- view cube and its menu, display settings (top right of the view) ---------- */
.as-tr { position: absolute; top: 8px; right: 8px; z-index: 56; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; pointer-events: none; }
.as-tr > * { pointer-events: auto; }
body.as-cube-on img.as-compass { display: none !important; }
.as-vc { position: relative; width: 132px; height: 132px; --vc: 72px; user-select: none; -webkit-user-select: none; touch-action: none; }
.as-vc[hidden] { display: none; }
.as-vc-scene { position: absolute; left: 50%; top: 52%; width: var(--vc); height: var(--vc); margin: calc(var(--vc) / -2) 0 0 calc(var(--vc) / -2); perspective: none; pointer-events: none; }
.as-vc-cube { position: absolute; inset: 0; transform-style: preserve-3d; pointer-events: none; }
.as-vc-face { position: absolute; inset: 0; display: grid; grid-template-columns: 22% 56% 22%; grid-template-rows: 22% 56% 22%; background: rgba(24, 31, 33, .96); border: 1px solid #3c4749; box-sizing: border-box; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.as-vc-front { transform: translateZ(calc(var(--vc) / 2)); }
.as-vc-back { transform: rotateY(180deg) translateZ(calc(var(--vc) / 2)); }
.as-vc-right { transform: rotateY(90deg) translateZ(calc(var(--vc) / 2)); }
.as-vc-left { transform: rotateY(-90deg) translateZ(calc(var(--vc) / 2)); }
.as-vc-top { transform: rotateX(90deg) translateZ(calc(var(--vc) / 2)); }
.as-vc-bottom { transform: rotateX(-90deg) translateZ(calc(var(--vc) / 2)); }
.as-vc-cell { cursor: pointer; pointer-events: auto; }
.as-vc-cell.is-hot { background: rgba(255, 90, 31, .88); }
.as-vc-label { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; font-family: var(--as-mono); font-size: 9.5px; font-weight: 500; letter-spacing: .06em; color: #c9d1cf; }
.as-vc-ring { position: absolute; left: -38%; top: -38%; width: 176%; height: 176%; box-sizing: border-box; border-radius: 50%; border: 9px solid rgba(46, 55, 57, .7); transform: translateY(calc(var(--vc) * .56)) rotateX(90deg); pointer-events: none; }
.as-vc-dir { position: absolute; font-family: var(--as-mono); font-size: 10px; font-weight: 500; line-height: 1; color: var(--as-muted); }
.as-vc-dir-n { top: -10px; left: 50%; transform: translateX(-50%); color: var(--as-accent); }
.as-vc-dir-s { bottom: -10px; left: 50%; transform: translateX(-50%); }
.as-vc-dir-e { right: -9px; top: 50%; transform: translateY(-50%); }
.as-vc-dir-w { left: -9px; top: 50%; transform: translateY(-50%); }
.as-vc-btn { position: absolute; z-index: 2; width: 30px; height: 30px; display: grid; place-items: center; padding: 0; background: none; border: 0; color: var(--as-muted); cursor: pointer; }
.as-vc-btn:hover { color: var(--as-accent); }
.as-vc-btn svg { width: 20px; height: 20px; }
.as-vc-home { left: 2px; top: 0; }
.as-vc-more { right: 2px; top: 0; }
.as-menu { position: absolute; z-index: 80; min-width: 250px; max-width: calc(100% - 12px); padding: 4px 0; background: rgba(17, 22, 24, .98); border: 1px solid var(--as-line-2); box-shadow: 0 12px 32px rgba(0, 0, 0, .4); font-family: var(--as-sans); }
.as-menu[hidden], .as-pop[hidden] { display: none; }
.as-menu button { display: flex; align-items: center; gap: 4px; width: 100%; padding: 8px 14px 8px 8px; background: none; border: 0; text-align: left; cursor: pointer; font-family: inherit; font-size: 13px; color: var(--as-text); white-space: nowrap; }
.as-menu button:hover:not([disabled]), .as-menu button:focus-visible { background: var(--as-accent); color: var(--as-ink); outline: none; }
.as-menu button[disabled] { opacity: .45; cursor: default; }
.as-menu-mark { flex: none; width: 16px; text-align: center; font-size: 8px; color: var(--as-accent); }
.as-menu button:hover .as-menu-mark, .as-menu button:focus-visible .as-menu-mark { color: var(--as-ink); }
.as-menu hr { margin: 4px 0; border: 0; border-top: 1px solid var(--as-line); }
.as-pop { position: absolute; top: 8px; right: 8px; z-index: 78; width: min(320px, calc(100% - 20px)); max-height: calc(100% - 16px); overflow-y: auto; box-sizing: border-box; padding: 12px 14px 14px; background: rgba(17, 22, 24, .97); border: 1px solid var(--as-line-2); box-shadow: 0 12px 32px rgba(0, 0, 0, .35); font-family: var(--as-sans); font-size: 13px; color: var(--as-text); }
.as-pop-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: -4px -6px 4px 0; }
.as-pop-head h2 { margin: 0; font-family: var(--as-mono); font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--as-muted); }
.as-pop-close { width: 32px; height: 32px; padding: 0; background: none; border: 0; color: var(--as-text); font-size: 22px; line-height: 1; cursor: pointer; }
.as-pop-row { display: grid; gap: 6px; justify-items: start; margin-top: 12px; }
.as-pop-label { font-family: var(--as-mono); font-size: 11px; letter-spacing: .04em; color: var(--as-muted); }
.as-pop-range { grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; justify-items: stretch; gap: 10px; }
.as-pop-range input[type="range"] { width: 100%; margin: 0; accent-color: var(--as-accent); }
.as-pop-range output { font-family: var(--as-mono); font-size: 12px; }
.as-seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--as-line-2); }
.as-seg button { min-height: 32px; padding: 5px 10px; background: none; border: 0; cursor: pointer; font-family: var(--as-sans); font-size: 12.5px; color: var(--as-text); }
.as-seg button + button { border-left: 1px solid var(--as-line-2); }
.as-seg button:hover { background: #182022; }
.as-seg button[aria-pressed="true"] { background: var(--as-text); color: var(--as-ink); }
.as-check { display: flex; align-items: center; gap: 10px; margin-top: 12px; cursor: pointer; line-height: 1.35; }
.as-check input { accent-color: var(--as-accent); width: 16px; height: 16px; margin: 0; }
.as-pop-hint { margin: 6px 0 0 26px; font-size: 12px; line-height: 1.45; color: var(--as-muted); }
.as-pop-hint button { padding: 0; background: none; border: 0; color: var(--as-accent-hover); font: inherit; text-decoration: underline; cursor: pointer; }
/* Altitude in the clipping boxes: legend, bottom left */
.as-elev { position: absolute; left: 8px; bottom: 8px; z-index: 50; transition: bottom .3s; width: 230px; max-width: calc(100% - 16px); padding: 8px 10px 9px; box-sizing: border-box; background: rgba(12, 15, 16, .88); border: 1px solid var(--as-line-2); color: var(--as-soft); font-family: var(--as-mono); font-size: 11px; line-height: 1.4; font-variant-numeric: tabular-nums; pointer-events: none; }
.as-elev[hidden] { display: none; }
.as-pl:not(.is-done) ~ .as-elev { bottom: 36px; } /* above the loading strip while it shows */
.as-elev-title { margin: 0 0 6px; color: var(--as-text); letter-spacing: .04em; }
.as-elev-bar { height: 8px; border: 1px solid var(--as-line-3); }
.as-elev-ends { display: flex; justify-content: space-between; gap: 8px; margin-top: 4px; }
.as-elev-list { margin: 6px 0 0; padding: 0; list-style: none; }
body.as-ui-hidden .as-elev { display: none !important; }
body.as-ui-hidden .as-tr, body.as-ui-hidden .as-pop, body.as-ui-hidden .as-menu { display: none !important; }
@media (max-width: 720px) {
	.as-bar-btn span { display: none; }
	.as-bar-btn { padding: 0; }
	.as-bar-name { max-width: 30vw; }
}
@media (max-width: 640px) {
	.as-vc { width: 96px; height: 96px; --vc: 50px; }
	.as-vc-label { font-size: 7px; letter-spacing: .02em; }
	.as-vc-ring { border-width: 7px; }
}

/* The height profile's exports (LAS and CSV) hold points of the cloud itself: not offered, the clients get their
   files from their client space. The measurement exports (made by the visitor) stay. */
#potree_download_csv_icon, #potree_download_las_icon, #potree_download_profile_link, #potree_download_profile_ortho_link { display: none !important; }

/* Drawings (archiscans-drawings.js): plan of a clipping box, section of a profile, laid out on a sheet */
.as-dw { position: fixed; inset: 0; z-index: 10050; display: flex; align-items: center; justify-content: center; padding: 16px; box-sizing: border-box; background: rgba(4, 6, 7, .72); font-family: var(--as-sans); color: var(--as-text); }
.as-dw-panel { display: flex; flex-direction: column; width: min(1500px, 100%); height: min(940px, 100%); background: var(--as-panel); border: 1px solid var(--as-line-2); box-shadow: 0 18px 48px rgba(0, 0, 0, .45); }
.as-dw-head { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 8px 0 16px; border-bottom: 1px solid var(--as-line); }
.as-dw-head h2 { flex: 1; min-width: 0; margin: 0; font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.as-dw-close { width: 40px; height: 40px; padding: 0; background: none; border: 0; color: var(--as-text); font-size: 26px; line-height: 1; cursor: pointer; }
.as-dw-close:hover { color: var(--as-accent); }
.as-dw-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 290px; }
.as-dw-view { position: relative; min-width: 0; min-height: 0; background: #1b2224; }
.as-dw-stage { position: absolute; inset: 0; overflow: auto; display: grid; place-items: center; padding: 12px; box-sizing: border-box; touch-action: none; }
.as-dw-stage.is-zoomed { place-items: start; cursor: grab; }
.as-dw-stage.is-zoomed:active { cursor: grabbing; }
.as-dw-sheet { display: block; background: #fff; box-shadow: 0 6px 22px rgba(0, 0, 0, .45); }
.as-dw-zoom { position: absolute; right: 12px; bottom: 12px; display: flex; border: 1px solid var(--as-line-2); background: rgba(17, 22, 24, .94); }
.as-dw-zoom button { min-width: 34px; height: 32px; padding: 0 10px; background: none; border: 0; color: var(--as-text); font-family: var(--as-mono); font-size: 13px; cursor: pointer; }
.as-dw-zoom button + button { border-left: 1px solid var(--as-line-2); }
.as-dw-zoom button:hover { color: var(--as-accent); }
.as-dw-side { overflow-y: auto; padding: 14px 16px 18px; border-left: 1px solid var(--as-line); font-size: 13px; }
.as-dw-side .as-pop-row:first-of-type { margin-top: 4px; }
.as-pop-row-wide { justify-items: stretch; }
.as-dw-status { margin: 0; font-family: var(--as-mono); font-size: 11.5px; line-height: 1.45; color: var(--as-soft); }
.as-dw-progress { height: 3px; margin-top: 8px; background: var(--as-line); }
.as-dw-progress[hidden] { display: none; }
.as-dw-progress span { display: block; width: 8%; height: 100%; background: var(--as-accent); transition: width .4s; }
.as-dw-select, .as-dw-input { width: 100%; min-height: 34px; padding: 5px 8px; box-sizing: border-box; background: var(--as-panel-2); border: 1px solid var(--as-line-2); border-radius: 0; color: var(--as-text); font-family: var(--as-sans); font-size: 13px; }
.as-dw-select:focus-visible, .as-dw-input:focus-visible, .as-dw-go:focus-visible, .as-dw-zoom button:focus-visible, .as-dw-close:focus-visible { outline: 2px solid var(--as-accent); outline-offset: 1px; }
.as-dw-warn { margin: 12px 0 0; padding: 8px 10px; border-left: 2px solid var(--as-accent); background: rgba(255, 90, 31, .08); font-size: 12.5px; line-height: 1.4; }
.as-dw-warn[hidden] { display: none; }
.as-dw-actions { display: grid; gap: 8px; margin-top: 18px; }
.as-dw-go { min-height: 40px; padding: 8px 14px; background: var(--as-accent); border: 1px solid var(--as-accent); border-radius: 0; color: var(--as-ink); font-family: var(--as-sans); font-size: 14px; font-weight: 600; cursor: pointer; }
.as-dw-go:hover:not(:disabled) { background: var(--as-accent-hover); }
.as-dw-go-2 { background: none; color: var(--as-text); border-color: var(--as-line-3); }
.as-dw-go-2:hover:not(:disabled) { background: none; border-color: var(--as-accent); color: var(--as-text); }
.as-dw-go:disabled { opacity: .45; cursor: default; }
.as-dw-note { margin: 12px 0 0; font-size: 11.5px; line-height: 1.45; color: var(--as-muted); }
.as-pw-export { margin-left: 8px; padding: 3px 9px; background: var(--as-accent); border: 0; border-radius: 0; color: var(--as-ink); font-family: var(--as-mono); font-size: 11px; font-weight: 500; letter-spacing: .04em; cursor: pointer; vertical-align: middle; }
.as-pw-export:hover { background: var(--as-accent-hover); }
.as-elev-plan { display: block; width: 100%; margin-top: 8px; padding: 5px 8px; background: none; border: 1px solid var(--as-line-3); border-radius: 0; color: var(--as-text); font-family: var(--as-mono); font-size: 11px; cursor: pointer; pointer-events: auto; }
.as-elev-plan:hover { border-color: var(--as-accent); }
@media (max-width: 820px) {
	.as-dw { padding: 0; }
	.as-dw-panel { width: 100%; height: 100%; border: 0; }
	.as-dw-body { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; }
	.as-dw-side { max-height: 46vh; border-left: 0; border-top: 1px solid var(--as-line); }
}
.as-pop-plan { display: block; width: 100%; margin-top: 10px; min-height: 34px; padding: 6px 10px; background: none; border: 1px solid var(--as-line-3); border-radius: 0; color: var(--as-text); font-family: var(--as-mono); font-size: 12px; text-align: left; cursor: pointer; }
.as-pop-plan:hover { border-color: var(--as-accent); }
.as-pop-plan:focus-visible, .as-elev-plan:focus-visible, .as-pw-export:focus-visible { outline: 2px solid var(--as-accent); outline-offset: 1px; }
.as-dw-sub { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 8px; width: 100%; margin-top: 6px; font-family: var(--as-mono); font-size: 11px; color: var(--as-muted); }
.as-dw-sub[hidden] { display: none; }
