html, body, #cesiumContainer
{
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;
	overflow: hidden;
	font-family: sans-serif;
}

#cesiumContainer
{
	inset: 0;
}

/* Toolbar (left to right: Tileset, Drawing, Measure) */

#uiToggles
{
	position: absolute;
	top: 10px;
	left: 10px;
	z-index: 1100;
	display: flex;
	gap: 8px;
	align-items: center;
	flex-wrap: wrap;
}

#uiToggles .ui-toggle
{
	padding: 6px 10px;
	background: #2a2a2a;
	color: #fff;
	border: 1px solid #444;
	border-radius: 6px;
	cursor: pointer;
    font-size: 13px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

#uiToggles .ui-toggle.active
{
	background: #3e68ff;
	border-color: #2c4fd1;
}

/* Panels */

.panel
{
	position: absolute;
	z-index: 1200;
	width: 380px;
	padding: 10px;
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.95);
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
	box-sizing: border-box;
	max-height: 70vh;
	overflow-y: auto;
	cursor: default;
    _overflow: hidden;
    _display: none;
}

.panel-header
{
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 6px;
	cursor: move;
	user-select: none;
    _padding: 6px 10px;
    _border-bottom: 1px solid #ddd;
    _background: #f5f5f5;
    _font-weight: 600;
    _font-size: 13px;
}

.close-btn
{
	background: #eee;
	border: 1px solid #ccc;
	padding: 2px 6px;
	border-radius: 4px;
	cursor: pointer;
	font-size: 14px;
    _border: none;
    _background: transparent;
    _font-size: 13px;
}

#levelsBody
{
	padding: 8px 10px;
	font-size: 13px;
	overflow-y: auto;
	max-height: calc(70vh - 40px);
}

.level-row
{
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin: 4px 0;
}

.level-row label
{
	display: flex;
	align-items: center;
	gap: 4px;
	cursor: pointer;
}

.level-count
{
	font-size: 11px;
	color: #555;
}

.level-row button
{
	border-radius: 4px;
	border: 1px solid #ccc;
	padding: 3px 8px;
	font-size: 12px;
	cursor: pointer;
	background: #f7f7f7;
}

.level-row button.on
{
	background: #2563eb;
	border-color: #1d4ed8;
	color: #fff;
}

.level-name-btn
{
	min-width: 140px;
	text-align: left;
}

.level-row button:disabled
{
	opacity: 0.45;
	cursor: not-allowed;
}

/* Tileset panel starts on the left */

#uipanel
{
	top: 70px;
	left: 10px;
}

/* Details sections */

details
{
	margin: 6px 0;
}

summary
{
	font-weight: bold;
	padding: 6px 8px;
	margin: 4px 0;
	background: #f2f2f2;
	border: 1px solid #ddd;
	border-radius: 6px;
	cursor: pointer;
	list-style: none;
}

summary::-webkit-details-marker
{
	display: none;
}

.uiline
{
	margin: 6px 0;
}

.uiradio
{
	display: inline-block;
	margin-right: 10px;
}

.uiradio a
{
	color: black;
	text-decoration: none;
}

.uiradio a:hover
{
	color: red;
}

.valbox
{
	display: inline-block;
	width: 64px;
	text-align: right;
	border: 1px solid #ccc;
	border-radius: 4px;
	padding: 2px 4px;
	margin-left: 6px;
}

.valbox input
{
	width: 100%;
	border: none;
	outline: none;
	background: transparent;
	text-align: right;
}

/* Adjustments Panels */

.xyzPanel, .opacPanel
{
	display: grid;
	grid-template-columns: 46px 1fr auto;
	align-items: center;
	gap: 6px;
	margin: 4px 0;
}

.xyzPanel
{
	grid-template-columns: 46px 1fr auto;
}

.opacPanel
{
	grid-template-columns: 1fr auto;
}
