/* Modern Height Profile dock — overrides legacy Potree profile window styles.
   Theme tokens match ProjectWork side panels (rgba glass dark).
   Visibility is controlled by Potree jQuery fadeIn/fadeOut. */

/* Fixed “both panels open” layout:
   keep the old map-area inset (left 15% / right ~1%), then pull in by
   Layers/Details (280px) + toggle (24px) + 8px gap on each side. */
#profile_window.profile-dock {
	background-color: rgba(0, 0, 0, 0.75);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-bottom: none;
	border-radius: 12px 12px 0 0;
	bottom: 0;
	box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.3);
	box-sizing: border-box;
	display: none;
	flex-direction: column;
	height: 360px;
	left: calc(15% + 312px);
	margin: 0;
	max-height: 70vh;
	min-height: 250px;
	overflow: hidden;
	pointer-events: auto;
	position: fixed;
	right: calc(1% + 312px);
	top: auto;
	width: auto;
	z-index: 10000;
}

/* Keep jQuery fadeIn compatibility: flex layout when jQuery sets display:block. */
#profile_window.profile-dock[style*="display: block"],
#profile_window.profile-dock[style*="display:block"] {
	display: flex !important;
}

#profile_titlebar.profile-dock__header,
#profile_titlebar {
	align-items: center;
	background-color: transparent;
	border-bottom: 1px solid rgba(255, 255, 255, 0.15);
	box-sizing: border-box;
	color: #ffffff;
	display: flex;
	flex-shrink: 0;
	font-size: 0.875rem;
	font-weight: 600;
	gap: 12px;
	height: auto;
	justify-content: space-between;
	min-height: 40px;
	padding: 8px 12px;
	position: relative;
	text-shadow: none;
	width: 100%;
}

#profile_window_title {
	color: #ffffff;
	font-size: 0.875rem;
	font-weight: 600;
	margin: 0;
	position: static;
}

.profile-dock__header-left {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	min-width: 0;
}

.profile-dock__header-right {
	align-items: center;
	display: flex;
	flex-shrink: 0;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: flex-end;
}

.profile-dock__meta {
	align-items: center;
	color: rgba(255, 255, 255, 0.7);
	display: flex;
	font-size: 0.75rem;
	font-weight: 500;
	gap: 6px;
}

.profile-dock__meta-label {
	color: rgba(255, 255, 255, 0.5);
	text-transform: uppercase;
	letter-spacing: 0.4px;
}

#profile_num_points {
	color: #ffffff;
	font-variant-numeric: tabular-nums;
}

.profile-dock__controls,
.profile-dock__exports {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
}

.profile-dock__rotate-input {
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.3);
	border-radius: 6px;
	box-sizing: border-box;
	color: #ffffff;
	font-size: 0.75rem;
	height: 28px;
	margin: 0;
	padding: 0 6px;
	text-align: center;
	width: 2.75em;
}

.profile-dock__rotate-input:focus {
	border-color: rgba(255, 255, 255, 0.8);
	outline: none;
}

.profile-dock .text-icon.profile-dock__icon-btn,
.profile-dock .profile-dock__icon-btn {
	border-radius: 6px;
	box-sizing: border-box;
	cursor: pointer;
	height: 28px;
	opacity: 0.75;
	padding: 4px;
	width: 28px;
}

.profile-dock .text-icon.profile-dock__icon-btn:hover,
.profile-dock .profile-dock__icon-btn:hover {
	background: rgba(255, 255, 255, 0.08);
	opacity: 1;
}

.profile-dock__export-btn {
	align-items: stretch;
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid rgba(255, 255, 255, 0.25);
	border-radius: 8px;
	box-sizing: border-box;
	color: #ffffff !important;
	display: inline-flex;
	font-size: 0.7rem;
	font-weight: 600;
	height: 28px;
	letter-spacing: 0.2px;
	padding: 0;
	text-decoration: none !important;
	white-space: nowrap;
}

.profile-dock__export-btn:hover {
	background: rgba(255, 255, 255, 0.12);
	border-color: rgba(255, 255, 255, 0.5);
}

/* Label owns the full hit area so Potree icon-id click handlers cover the button. */
.profile-dock__export-btn > span {
	align-items: center;
	box-sizing: border-box;
	display: inline-flex;
	height: 100%;
	justify-content: center;
	padding: 0 8px;
}

.profile-dock__close.button-icon,
#closeProfileContainer.profile-dock__close {
	border-radius: 6px;
	box-sizing: border-box;
	cursor: pointer;
	filter: brightness(0) invert(1);
	height: 28px;
	margin: 0;
	opacity: 0.85;
	padding: 4px;
	width: 28px;
}

.profile-dock__close.button-icon:hover,
#closeProfileContainer.profile-dock__close:hover {
	background: rgba(255, 255, 255, 0.08);
	filter: brightness(0) invert(1);
	opacity: 1;
}

.profile-dock__body {
	box-sizing: border-box;
	display: flex;
	flex: 1;
	flex-direction: column;
	min-height: 0;
	padding: 8px 12px 12px;
	position: relative;
	width: 100%;
}

.profile-dock__canvas-wrap {
	background: #000000;
	border: 1px solid rgba(255, 255, 255, 0.15);
	border-radius: 8px;
	box-sizing: border-box;
	flex: 1;
	min-height: 0;
	overflow: hidden;
	padding: 8px;
	position: relative;
	width: 100%;
}

.profile-dock__draw-container {
	box-sizing: border-box;
	height: 100%;
	position: relative;
	user-select: none;
	width: 100%;
}

.profile-dock__svg,
#profileSVG {
	bottom: 0;
	fill: #9d9d9d;
	height: 100%;
	left: 0;
	position: absolute;
	right: 0;
	top: 0;
	width: 100%;
}

.profile-dock__canvas,
#profileCanvasContainer {
	bottom: 20px;
	height: calc(100% - 20px);
	left: 41px;
	position: absolute;
	top: 0;
	width: calc(100% - 41px);
}

.profile-dock__point-info,
#profileSelectionProperties {
	background-color: rgba(20, 20, 20, 0.9);
	border: 1px solid rgba(255, 255, 255, 0.15);
	border-radius: 8px;
	box-sizing: border-box;
	color: #ffffff;
	display: none;
	font-family: inherit;
	font-size: 0.75rem;
	left: 50px;
	max-height: 220px;
	max-width: min(280px, calc(100% - 60px));
	opacity: 1;
	overflow-x: hidden;
	overflow-y: auto;
	padding: 10px 12px;
	position: absolute;
	top: 10px;
	user-select: text;
	z-index: 4;
}

/* Title survives Potree replacing the card's innerHTML with a <table>. */
#profileSelectionProperties::before {
	border-bottom: 1px solid rgba(255, 255, 255, 0.12);
	color: #ffffff;
	content: 'Point Information';
	display: block;
	font-size: 0.75rem;
	font-weight: 600;
	margin-bottom: 8px;
	padding-bottom: 6px;
}

#profileSelectionProperties::-webkit-scrollbar {
	width: 6px;
}

#profileSelectionProperties::-webkit-scrollbar-thumb {
	background-color: rgba(255, 255, 255, 0.3);
	border-radius: 3px;
}

#profileSelectionProperties::-webkit-scrollbar-track {
	background-color: transparent;
}

#profileSelectionProperties table {
	border-collapse: collapse;
	border-spacing: 0;
	width: 100%;
}

#profileSelectionProperties tr {
	border: none;
}

#profileSelectionProperties td {
	border: none;
	padding: 3px 0;
	vertical-align: top;
}

#profileSelectionProperties td:first-child {
	color: rgba(255, 255, 255, 0.55);
	padding-right: 12px;
	text-transform: capitalize;
	white-space: nowrap;
	width: 45%;
}

#profileSelectionProperties td:last-child {
	color: #ffffff;
	font-variant-numeric: tabular-nums;
	word-break: break-word;
}
