/* --- Datum 3D Viewer Styles --- */
* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  width: 100%; height: 100%; overflow: hidden;
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
  background: #0a0a0f; color: #e0e0e0;
}

#cesiumContainer { width: 100%; height: 100%; position: absolute; top: 0; left: 0; }

/* --- Loading Overlay --- */
#loading-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: #0a0a0f; display: flex; align-items: center; justify-content: center;
  z-index: 9999; transition: opacity 0.6s ease, visibility 0.6s ease;
}
#loading-overlay.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-content { text-align: center; }
.loader-content h2 {
  font-size: 1.8rem; font-weight: 300; letter-spacing: 0.3em;
  color: #67b8f7; margin-top: 1.5rem; text-transform: uppercase;
}
.loader-content p { margin-top: 0.5rem; color: #888; font-size: 0.85rem; }
.spinner {
  width: 48px; height: 48px; border: 3px solid rgba(103,184,247,0.15);
  border-top-color: #67b8f7; border-radius: 50%; margin: 0 auto;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* --- Info Panel --- */
#info-panel {
  position: absolute; top: 12px; left: 12px; width: 280px;
  background: rgba(12,14,22,0.92); backdrop-filter: blur(12px);
  border: 1px solid rgba(103,184,247,0.15); border-radius: 10px;
  z-index: 100; overflow: hidden; box-shadow: 0 4px 24px rgba(0,0,0,0.5);
}
.panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,0.06);
}
.panel-header h3 {
  font-size: 0.9rem; font-weight: 600; letter-spacing: 0.1em;
  color: #67b8f7; text-transform: uppercase;
}
#panel-toggle {
  background: none; border: none; color: #888; cursor: pointer;
  font-size: 0.8rem; padding: 4px; transition: transform 0.3s;
}
#panel-toggle.collapsed { transform: rotate(-90deg); }
.panel-body {
  padding: 12px 16px; max-height: 500px; overflow-y: auto;
  transition: max-height 0.3s ease, padding 0.3s ease;
}
.panel-body.collapsed { max-height: 0; padding: 0 16px; overflow: hidden; }
.info-row { display: flex; justify-content: space-between; padding: 4px 0; font-size: 0.78rem; }
.info-row .label { color: #888; }
.info-row span:last-child { color: #c8d8e8; font-family: 'Consolas', monospace; font-size: 0.75rem; }
hr { border: none; border-top: 1px solid rgba(255,255,255,0.06); margin: 10px 0; }

/* --- Controls --- */
.controls { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.controls button {
  background: rgba(103,184,247,0.08); border: 1px solid rgba(103,184,247,0.2);
  color: #c8d8e8; padding: 7px 6px; border-radius: 6px; cursor: pointer;
  font-size: 0.72rem; transition: all 0.2s; white-space: nowrap;
}
.controls button:hover { background: rgba(103,184,247,0.18); border-color: rgba(103,184,247,0.4); }
.controls button.active { background: rgba(103,184,247,0.25); border-color: #67b8f7; color: #fff; }

/* --- Tileset List --- */
.tileset-list { max-height: 120px; overflow-y: auto; }
.tileset-item { display: flex; align-items: center; justify-content: space-between; padding: 4px 0; font-size: 0.75rem; }
.tileset-item .name { color: #a8c8e8; }
.tileset-item .badge { background: rgba(103,184,247,0.15); color: #67b8f7; padding: 2px 6px; border-radius: 3px; font-size: 0.65rem; }
.subtle { color: #555; font-size: 0.75rem; font-style: italic; }

/* --- Height Offset --- */
.height-adjust label { display: block; font-size: 0.75rem; color: #888; margin-bottom: 4px; }
.height-adjust input[type="range"] { width: 100%; accent-color: #67b8f7; height: 4px; }
.height-adjust span { font-size: 0.75rem; color: #67b8f7; font-family: monospace; }

/* --- Coordinate Display --- */
#coords-display {
  position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%);
  background: rgba(12,14,22,0.85); backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.06); border-radius: 6px;
  padding: 6px 14px; z-index: 100; font-size: 0.72rem;
  font-family: 'Consolas', monospace; color: #a0b0c0;
}

/* --- Cesium Overrides --- */
.cesium-viewer-bottom { display: none !important; }
.cesium-viewer-toolbar { right: 12px !important; top: 12px !important; }
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(103,184,247,0.3); border-radius: 2px; }
