/**
 * GEOBIM.APP - Geospatial BIM Viewer
 * © 2026 Christof Lorenz. All rights reserved.
 *
 * License: Personal and non-commercial use only.
 * Commercial use requires written permission.
 * Contact: info@geobim.app
 */

/* ===============================
   CSS CUSTOM PROPERTIES
   =============================== */
:root {
  /* Brand */
  --brand-teal: #2ECFB0;
  --brand-teal-dark: #25A98F;
  --brand-teal-rgb: 46, 207, 176;

  /* Backgrounds */
  --bg-base: #000000;
  --bg-surface: #0D1017;
  --bg-overlay: rgba(14, 17, 23, 0.82);

  /* Text */
  --text-primary: #E2E8F0;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --text-muted: rgba(255, 255, 255, 0.5);

  /* Functional */
  --success: #4ADE80;
  --error: #F87171;
  --warning: #FBBF24;

  /* Borders */
  --border-subtle: rgba(255, 255, 255, 0.1);
  --border-default: rgba(255, 255, 255, 0.2);

  /* Spacing Scale */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 12px;
  --space-lg: 16px;
  --space-xl: 20px;
  --space-2xl: 24px;

  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 10px;
  --radius-xl: 12px;
  --radius-2xl: 16px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.6);

  /* Input surfaces */
  --input-bg: rgba(255, 255, 255, 0.05);
  --input-bg-solid: #1a202c;

  /* Z-Index Scale */
  --z-base: 1;
  --z-toolbar: 100;
  --z-sidebar-toggle: 101;
  --z-panels: 200;
  --z-dialogs: 300;
  --z-overlays: 400;
  --z-splash: 500;
}

/* ===============================
   CESIUM BIM VIEWER - COMPLETE MODERN STYLES v4.0
   Brand Teal Design with InfoBox Fix
   =============================== */

/* Splash screen styles moved to splash-screen.css */

/* ===============================
   RESET & BASE
   =============================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', sans-serif;
  overflow: hidden;
}

#cesiumContainer {
  width: 100vw;
  height: 100vh;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

/* ===============================
   SIDEBAR TOGGLE BUTTON
   =============================== */
.sidebar-toggle {
  position: fixed;
  top: 10px;
  left: 360px;
  z-index: 101;
  background: var(--bg-overlay);
  backdrop-filter: blur(10px);
  border: none;
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: left 0.3s ease, background 0.2s ease;
}

.sidebar-toggle:hover {
  background: rgba(46, 52, 64, 0.95);
}

#toolbar.collapsed ~ .sidebar-toggle,
.sidebar-toggle.at-edge {
  left: 10px;
}

/* ===============================
   MODERN TOOLBAR
   =============================== */
#toolbar {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 340px;
  max-height: calc(100vh - 20px);
  background: var(--bg-overlay);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  z-index: 100;
  font-size: 14px;
  color: var(--text-primary);
  transition: transform 0.3s ease;
}

#toolbar.collapsed {
  transform: translateX(-360px);
}

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

#toolbar::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
}

#toolbar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

#toolbar::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* ===============================
   BOTTOM ACTION TOOLBAR
   =============================== */
.bottom-toolbar {
  position: fixed;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  height: 52px;
  background: var(--bg-overlay);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px 6px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  z-index: 100;
}

.bottom-toolbar-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 6px 14px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 52px;
  position: relative;
}

.bottom-toolbar-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.bottom-toolbar-btn.active {
  background: rgba(var(--brand-teal-rgb), 0.15);
  border-color: rgba(var(--brand-teal-rgb), 0.4);
  color: var(--brand-teal);
}

.bottom-toolbar-btn svg {
  width: 20px;
  height: 20px;
  stroke-width: 1.75;
}

.bottom-toolbar-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2px;
  white-space: nowrap;
}

.bottom-toolbar-sep {
  width: 1px;
  height: 28px;
  background: var(--border-subtle);
  margin: 0 4px;
}

@media (max-width: 768px) {
  .bottom-toolbar {
    left: 10px;
    right: 10px;
    transform: none;
    justify-content: center;
    bottom: 6px;
  }
  .bottom-toolbar-btn {
    min-width: 44px;
    min-height: 44px;
    padding: 10px;
  }
  .bottom-toolbar-label {
    display: none;
  }
}

/* ===============================
   HEADER
   =============================== */
.modern-header {
  background: var(--bg-surface, #141922);
  padding: 14px 16px;
  border-radius: 12px 12px 0 0;
  margin-bottom: 0;
  border-bottom: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.1));
}

.modern-header-content {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modern-header-logo {
  width: 100%;
  height: auto;
  opacity: 0.9;
  transition: opacity 0.2s ease;
}

.modern-header-logo:hover {
  opacity: 1;
}

.modern-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.modern-logo-icon {
  font-size: 32px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.modern-logo-icon img {
  height: 28px;
  width: auto;
  opacity: 0.85;
  transition: opacity 0.2s ease;
}

.modern-logo-icon img:hover {
  opacity: 1;
}

.modern-logo-text {
  display: flex;
  flex-direction: column;
}

.modern-logo-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary, #E2E8F0);
  letter-spacing: 0.5px;
}

.modern-logo-subtitle {
  font-size: 11px;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.6);
  letter-spacing: 1px;
  text-transform: uppercase;
}


/* ===============================
   COLLAPSIBLE SECTIONS
   =============================== */
.modern-section {
  border-bottom: 1px solid var(--border-subtle);
}

.modern-section:last-child {
  border-bottom: none;
}

.modern-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.modern-section-header:hover {
  background: rgba(255, 255, 255, 0.05);
}

.modern-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 15px;
  color: var(--text-primary);
}

.modern-section-icon {
  font-size: 18px;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
  display: flex;
  align-items: center;
}

.modern-section-icon svg {
  width: 18px;
  height: 18px;
  stroke: var(--brand-teal);
  stroke-width: 1.75;
}

.modern-section-toggle {
  font-size: 12px;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.modern-section-content {
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modern-section-content.expanded {
  max-height: 2000px;
  padding: 0 20px 16px 20px;
  opacity: 1;
}

.modern-section-content.collapsed {
  max-height: 0;
  padding: 0 20px;
  opacity: 0;
}

/* ===============================
   BUTTONS
   =============================== */
.modern-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.modern-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.modern-btn:hover::before {
  width: 300px;
  height: 300px;
}

.modern-btn:active {
  transform: scale(0.98);
}

.modern-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.modern-btn-icon {
  font-size: 16px;
  position: relative;
  z-index: 1;
}

.modern-btn span {
  position: relative;
  z-index: 1;
}

/* Button variants */
.modern-btn-primary {
  background: linear-gradient(135deg, var(--brand-teal) 0%, var(--brand-teal-dark) 100%);
  color: var(--bg-base);
  box-shadow: 0 4px 12px rgba(var(--brand-teal-rgb), 0.3);
}

.modern-btn-primary:hover {
  box-shadow: 0 6px 16px rgba(var(--brand-teal-rgb), 0.4);
  transform: translateY(-1px);
}

.modern-btn-success {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border: 1px solid var(--border-default);
  box-shadow: none;
}

.modern-btn-success:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: none;
  transform: translateY(-1px);
}

.modern-btn-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #F87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
  box-shadow: none;
}

.modern-btn-danger:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: rgba(239, 68, 68, 0.5);
  box-shadow: none;
  transform: translateY(-1px);
}

.modern-btn-accent {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border: 1px solid var(--border-default);
  box-shadow: none;
}

.modern-btn-accent:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: none;
  transform: translateY(-1px);
}

.modern-btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  border: 1px solid var(--border-default);
}

.modern-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

/* Toggle button */
.modern-toggle-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border: 2px solid var(--border-default);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modern-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.9);
}

.modern-toggle-btn.active {
  background: linear-gradient(135deg, var(--brand-teal) 0%, var(--brand-teal-dark) 100%);
  border-color: var(--brand-teal);
  color: var(--bg-base);
  box-shadow: 0 4px 12px rgba(var(--brand-teal-rgb), 0.3);
}

/* Icon button */
.modern-icon-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modern-icon-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.modern-icon-btn-danger:hover {
  background: var(--error);
}

/* ===============================
   INPUTS
   =============================== */
.modern-input,
.modern-select {
  width: 100%;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-default);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 14px;
  transition: all 0.2s ease;
}

.modern-input:focus,
.modern-select:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--brand-teal);
  box-shadow: 0 0 0 3px rgba(var(--brand-teal-rgb), 0.1);
}

.modern-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.modern-select[multiple] {
  padding: 4px;
  overflow-y: auto;
}

.modern-select[multiple] option {
  padding: 8px 10px;
  border-radius: 4px;
  margin-bottom: 2px;
}

.modern-select[multiple] option:checked {
  background: linear-gradient(135deg, var(--brand-teal), var(--brand-teal-dark));
  color: var(--bg-base);
}

.modern-select option {
  background: var(--bg-surface);
  color: var(--text-primary);
}

.modern-select optgroup {
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-style: normal;
  font-weight: 600;
}

/* Slider */
.modern-slider,
.modern-slider-small {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  outline: none;
  -webkit-appearance: none;
}

.modern-slider::-webkit-slider-thumb,
.modern-slider-small::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  background: linear-gradient(135deg, var(--brand-teal) 0%, var(--brand-teal-dark) 100%);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  transition: all 0.2s ease;
}

.modern-slider::-webkit-slider-thumb:hover,
.modern-slider-small::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 4px 12px rgba(var(--brand-teal-rgb), 0.5);
}

/* ===============================
   GROUPS & LAYOUT
   =============================== */
.modern-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.modern-group:last-child {
  margin-bottom: 0;
}

/* ===============================
   LABELS & TEXT
   =============================== */
.modern-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modern-label-small {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.modern-value,
.modern-value-small {
  font-size: 12px;
  color: var(--brand-teal);
  font-weight: 600;
}

.modern-status {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

/* ===============================
   DIVIDER
   =============================== */
.modern-divider {
  display: flex;
  align-items: center;
  margin: 16px 0;
  color: rgba(255, 255, 255, 0.3);
}

.modern-divider::before,
.modern-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-subtle);
}

.modern-divider-text {
  padding: 0 12px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ===============================
   BADGES
   =============================== */
.modern-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  background: var(--error);
  color: white;
  font-size: 11px;
  font-weight: 700;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(248, 113, 113, 0.3);
}

/* ===============================
   INFO BOXES & HINTS
   =============================== */
.modern-info-box {
  background: rgba(var(--brand-teal-rgb), 0.1);
  border: 1px solid rgba(var(--brand-teal-rgb), 0.3);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 12px;
}

.modern-hint {
  background: rgba(255, 255, 255, 0.05);
  border-left: 3px solid var(--brand-teal);
  padding: 10px 12px;
  border-radius: 4px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.modern-hint strong {
  color: var(--brand-teal);
  font-weight: 600;
}

/* ===============================
   LISTS
   =============================== */
.modern-assets-list,
.modern-comments-list,
.modern-hidden-list,
.modern-views-list {
  max-height: 300px;
  overflow-y: auto;
  padding-right: 4px;
}

/* Inline checkbox + label row (reusable across modern sidebar sections) */
.modern-check {
  display: flex;
  align-items: center;
  gap: var(--space-xs, 6px);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  margin: var(--space-xs, 6px) 0;
}

.modern-check input {
  accent-color: var(--brand-teal, #2ECFB0);
}

.modern-assets-list::-webkit-scrollbar,
.modern-comments-list::-webkit-scrollbar,
.modern-hidden-list::-webkit-scrollbar,
.modern-views-list::-webkit-scrollbar {
  width: 4px;
}

.modern-assets-list::-webkit-scrollbar-thumb,
.modern-comments-list::-webkit-scrollbar-thumb,
.modern-hidden-list::-webkit-scrollbar-thumb,
.modern-views-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
}

/* Asset item */
/* ===============================
   ME5: LOADING SKELETONS
   =============================== */
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton {
  border-radius: var(--radius-md);
  background: linear-gradient(90deg,
    rgba(255,255,255,0.04) 25%,
    rgba(255,255,255,0.08) 50%,
    rgba(255,255,255,0.04) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
}

.skeleton-asset {
  height: 64px;
  margin-bottom: var(--space-sm);
  border: 1px solid var(--border-subtle);
}

.skeleton-property {
  height: 20px;
  margin-bottom: 6px;
}

.skeleton-text {
  height: 14px;
  margin-bottom: 4px;
  width: 70%;
}

.skeleton-text-short { width: 40%; }

/* ===============================
   LI4: ENHANCED EMPTY STATES
   =============================== */
.modern-empty-state {
  text-align: center;
  padding: var(--space-xl) var(--space-lg);
  color: var(--text-muted);
  font-size: 12px;
}

.modern-empty-state-icon {
  font-size: 32px;
  margin-bottom: var(--space-sm);
  opacity: 0.4;
}

.modern-empty-state-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: var(--space-xs);
}

.modern-empty-state-hint {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
}

.modern-asset-item {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 8px;
  transition: all 0.2s ease;
}

.modern-asset-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-default);
}

.modern-asset-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.modern-asset-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 12px;
  flex: 1;
  word-break: break-word;
  line-height: 1.3;
  min-width: 0;
}

.modern-asset-controls {
  display: flex;
  gap: 4px;
}

.modern-asset-opacity {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border-subtle);
}

/* Empty state */
.modern-empty-state {
  text-align: center;
  padding: 20px;
  color: rgba(255, 255, 255, 0.4);
  font-size: 12px;
}

/* ===============================
   IFC FILTERS
   =============================== */
.modern-ifc-filters {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 400px;
  overflow-y: auto;
  padding-right: 4px;
}

.modern-ifc-category {
  margin-bottom: 4px;
}

.modern-ifc-category-title {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border-subtle);
}

.modern-ifc-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modern-ifc-item:hover {
  background: rgba(255, 255, 255, 0.1);
}

.modern-ifc-checkbox {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.modern-ifc-color {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.modern-ifc-name {
  flex: 1;
  font-size: 13px;
  color: var(--text-primary);
}

/* ===============================
   POINT CLOUD SETTINGS
   =============================== */
.modern-btn-group-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
  margin-bottom: 8px;
}

.modern-btn-group-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 8px;
}

.modern-slider-group {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 6px;
}

.modern-slider-group:hover {
  background: rgba(255, 255, 255, 0.05);
}

/* Point Size Mode section (ui-pointcloud-section.js): a hint sitting directly
   under the slider it explains, and a slider group right after that hint
   needing a little extra breathing room — CLAUDE.md forbids inline styles. */
.modern-hint--tight {
  margin-top: -2px;
}

.modern-slider-group--spaced {
  margin-top: 8px;
}

.modern-label-small {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  min-width: 80px;
}

.modern-slider-small {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.modern-slider-small::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  background: linear-gradient(135deg, var(--brand-teal) 0%, var(--brand-teal-dark) 100%);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  transition: all 0.2s ease;
}

.modern-slider-small::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 3px 8px rgba(var(--brand-teal-rgb), 0.5);
}

.modern-slider-small::-moz-range-thumb {
  width: 14px;
  height: 14px;
  background: linear-gradient(135deg, var(--brand-teal) 0%, var(--brand-teal-dark) 100%);
  border-radius: 50%;
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  transition: all 0.2s ease;
}

.modern-slider-small::-moz-range-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 3px 8px rgba(var(--brand-teal-rgb), 0.5);
}

.modern-value-small {
  font-size: 12px;
  font-weight: 600;
  color: var(--brand-teal);
  min-width: 50px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Divider with text for Point Cloud sections */
.modern-divider {
  display: flex;
  align-items: center;
  margin: 16px 0 12px 0;
}

.modern-divider::before,
.modern-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border-subtle);
}

.modern-divider-text {
  padding: 0 12px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ===============================
   UTILITIES
   =============================== */
.hidden {
  display: none !important;
}

/* ===============================
   MODE INDICATORS
   =============================== */
.mode-indicator {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(var(--brand-teal-rgb), 0.95);
  backdrop-filter: blur(10px);
  color: var(--bg-base);
  padding: 14px 24px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 14px;
  z-index: 200;
  display: none;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  animation: slideInDown 0.3s ease;
}

.mode-indicator.active {
  display: block;
}

@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translate(-50%, -20px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

#hideModeIndicator.active {
  background: linear-gradient(135deg, #EF4444 0%, var(--error) 100%);
  color: white;
}

#commentModeIndicator.active {
  background: linear-gradient(135deg, var(--brand-teal) 0%, var(--brand-teal-dark) 100%);
}

/* ===============================
   STATUS INDICATOR
   =============================== */
.status-indicator {
  position: fixed;
  bottom: 76px;
  right: 20px;
  background: var(--bg-overlay);
  backdrop-filter: blur(10px);
  color: white;
  padding: 14px 24px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 14px;
  z-index: 200;
  display: none;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  animation: slideInUp 0.3s ease;
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.status-indicator.success {
  background: linear-gradient(135deg, #22C55E 0%, var(--success) 100%);
}

.status-indicator.error {
  background: linear-gradient(135deg, #EF4444 0%, var(--error) 100%);
}

.status-indicator.warning {
  background: linear-gradient(135deg, var(--warning) 0%, #F59E0B 100%);
  color: var(--bg-base);
}

/* ===============================
   INFOBOX - COMPLETE WITH FIX
   =============================== */
/* InfoBox Floating Panel */
#infoBoxPanel {
  position: fixed;
  bottom: 80px;
  left: 20px;
  width: 400px;
  max-height: 70vh;
  background: var(--bg-overlay);
  backdrop-filter: blur(12px);
  border-radius: 12px;
  z-index: 200;
  display: none;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.08);
  transition: opacity 0.2s ease, transform 0.2s ease;
  opacity: 0;
  transform: translateX(-20px);
}

#infoBoxPanel.visible {
  display: flex;
  opacity: 1;
  transform: translateX(0);
  animation: slideInLeft 0.3s ease-out;
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

#infoBoxPanel #infoBoxBody {
  overflow-y: auto;
  max-height: calc(70vh - 48px);
  padding: 0;
  transition: max-height 0.2s ease;
}

#infoBoxPanel #infoBoxBody.collapsed {
  max-height: 0;
  overflow: hidden;
}

#infoBoxPanel #infoBoxBody::-webkit-scrollbar {
  width: 4px;
}

#infoBoxPanel #infoBoxBody::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
}

#infoBoxCustom {
  padding: 0;
}

/* Close button (legacy, hidden - now in header) */
#infoBoxCustom .close-btn {
  display: none;
}

/* BIM Property Table */
.bim-property-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  color: var(--text-primary);
}

.bim-header-row {
  background: rgba(var(--brand-teal-rgb), 0.2);
  border-bottom: 2px solid var(--brand-teal);
}

.bim-header-cell {
  padding: 12px 15px;
  text-align: left;
  font-weight: 600;
  color: var(--brand-teal);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.bim-category-row {
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: all 0.2s ease;
}

.bim-category-row:hover {
  background: rgba(255, 255, 255, 0.1);
}

.bim-category-cell {
  padding: 10px 15px;
  font-weight: 600;
  color: var(--brand-teal);
  font-size: 13px;
  border-top: 1px solid var(--border-subtle);
}

.bim-expand-icon {
  display: inline-block;
  margin-right: 8px;
  font-size: 10px;
  transition: transform 0.2s ease;
}

.bim-property-row {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.2s ease;
}

.bim-property-row:hover {
  background: rgba(255, 255, 255, 0.03);
}

.bim-property-name {
  padding: 8px 15px;
  color: var(--text-secondary);
  font-size: 12px;
}

.bim-property-value {
  padding: 8px 15px;
  color: var(--text-primary);
  font-weight: 500;
  word-break: break-word;
}

.bim-property-value-na {
  padding: 8px 15px;
  color: rgba(255, 255, 255, 0.3);
  font-style: italic;
}

/* LI5: Property search */
.bim-property-search {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.bim-search-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--input-bg);
  color: var(--text-primary);
  font-size: 12px;
  transition: border-color 0.2s ease;
  box-sizing: border-box;
}

.bim-search-input:focus {
  outline: none;
  border-color: var(--brand-teal);
}

.bim-search-input::placeholder {
  color: var(--text-muted);
}

/* LI5: Copy button on property values */
.bim-property-value,
.bim-property-value-na {
  position: relative;
}

.bim-value-text {
  display: inline;
}

.bim-copy-btn {
  display: none;
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border: none;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.1);
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 0;
  line-height: 22px;
  text-align: center;
}

.bim-copy-btn:hover {
  background: rgba(var(--brand-teal-rgb), 0.2);
  color: var(--brand-teal);
}

.bim-property-row:hover .bim-copy-btn {
  display: inline-block;
}

/* InfoBox size variations */
#infoBoxPanel.compact {
  max-height: 40vh;
}

#infoBoxPanel.medium {
  max-height: 55vh;
}

#infoBoxPanel.large {
  max-height: 70vh;
}

/* ===============================
   RESPONSIVE
   =============================== */
@media (max-width: 768px) {
  #toolbar {
    width: calc(100vw - 20px);
    left: 10px;
    right: 10px;
  }

  #toolbar.collapsed {
    transform: translateX(calc(-100vw + 10px));
  }

  .sidebar-toggle {
    left: calc(100vw - 50px);
  }

  .sidebar-toggle.at-edge {
    left: 10px;
  }

  #infoBoxPanel {
    width: calc(100vw - 40px);
    left: 20px;
  }
}

/* ===============================
   iTwin Integration Styles
   =============================== */

/* iTwin Button Styling */
.modern-btn-itwin {
  background: linear-gradient(135deg, var(--brand-teal) 0%, var(--brand-teal-dark) 100%) !important;
  color: var(--bg-base) !important;
  font-weight: 600 !important;
  box-shadow: 0 4px 12px rgba(var(--brand-teal-rgb), 0.3) !important;
}

.modern-btn-itwin:hover {
  box-shadow: 0 6px 16px rgba(var(--brand-teal-rgb), 0.4) !important;
  transform: translateY(-1px);
}

.modern-btn-itwin:active {
  transform: translateY(0);
}

/* iTwin Asset Item Styling */
.modern-asset-item.modern-asset-itwin {
  background: linear-gradient(135deg, rgba(var(--brand-teal-rgb), 0.1) 0%, rgba(61, 184, 160, 0.1) 100%);
  border-left: 3px solid var(--brand-teal);
}

.modern-asset-item.modern-asset-itwin .modern-asset-name {
  color: var(--brand-teal);
  font-weight: 600;
}

/* Modern Hint Box Enhancement */
.modern-hint {
  background: rgba(var(--brand-teal-rgb), 0.1);
  border-left: 3px solid var(--brand-teal);
  padding: 10px;
  border-radius: 6px;
  font-size: 11px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 8px;
}

.modern-hint strong {
  color: var(--brand-teal);
  font-weight: 600;
}

/* ===============================
   ION SDK MEASUREMENT WIDGET FIX
   =============================== */
#ionSdkMeasurementWidget {
  min-width: 280px !important;
  max-width: 320px !important;
  background: var(--bg-overlay) !important;
  backdrop-filter: blur(10px) !important;
  border-radius: 12px !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4) !important;
  overflow: hidden !important;
}

/* Ion SDK Widget inner container */
#ionSdkMeasurementWidget .cesium-measure-toolbar,
#ionSdkMeasurementWidget .measure-toolbar,
#ionSdkMeasurementWidget > div {
  min-width: 260px !important;
  width: 100% !important;
}

/* Fix for compressed buttons */
#ionSdkMeasurementWidget button,
#ionSdkMeasurementWidget .measure-button,
#ionSdkMeasurementWidget .cesium-button {
  min-width: 44px !important;
  min-height: 44px !important;
  padding: 10px !important;
  margin: 4px !important;
  border-radius: 8px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
}

/* Button rows */
#ionSdkMeasurementWidget .cesium-measure-toolbar-buttons,
#ionSdkMeasurementWidget .measure-buttons,
#ionSdkMeasurementWidget .toolbar-buttons {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
  padding: 12px !important;
  justify-content: center !important;
}

/* Labels and text in widget */
#ionSdkMeasurementWidget label,
#ionSdkMeasurementWidget span,
#ionSdkMeasurementWidget .measure-label {
  white-space: nowrap !important;
  overflow: visible !important;
  text-overflow: clip !important;
}

/* Result display */
#ionSdkMeasurementWidget .cesium-measure-result,
#ionSdkMeasurementWidget .measure-result,
#ionSdkMeasurementWidget .result-display {
  min-width: 200px !important;
  padding: 12px !important;
  font-size: 14px !important;
  text-align: center !important;
}

/* SVG Icons */
#ionSdkMeasurementWidget svg {
  min-width: 24px !important;
  min-height: 24px !important;
  width: 24px !important;
  height: 24px !important;
  flex-shrink: 0 !important;
}

/* Fallback UI Styling */
#ionSdkMeasurementWidget .btn {
  width: 100% !important;
  padding: 12px 16px !important;
  border: none !important;
  border-radius: 8px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}

#ionSdkMeasurementWidget .btn-primary {
  background: linear-gradient(135deg, var(--brand-teal) 0%, var(--brand-teal-dark) 100%) !important;
  color: var(--bg-base) !important;
}

#ionSdkMeasurementWidget .btn-primary:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 12px rgba(var(--brand-teal-rgb), 0.4) !important;
}

#ionSdkMeasurementWidget .btn-danger {
  background: linear-gradient(135deg, #EF4444 0%, var(--error) 100%) !important;
  color: white !important;
}

#ionSdkMeasurementWidget .btn-danger:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4) !important;
}

/* ===============================
   SPLIT-SCREEN SLIDER
   =============================== */
#splitSlider {
  display: none;
  position: absolute;
  top: 0;
  left: 50%;
  width: 5px;
  height: 100%;
  background: var(--brand-teal);
  cursor: col-resize;
  z-index: 99;
  box-shadow: 0 0 8px rgba(var(--brand-teal-rgb), 0.5);
  transition: background 0.2s ease;
}

#splitSlider:hover,
#splitSlider.active {
  background: var(--brand-teal-dark);
  box-shadow: 0 0 12px rgba(var(--brand-teal-rgb), 0.7);
}

#splitSlider.visible {
  display: block;
}

/* ===============================
   FLOATING COMMENTS PANEL
   =============================== */
#floatingCommentsPanel {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 320px;
  max-height: 420px;
  background: var(--bg-overlay, rgba(14, 17, 23, 0.82));
  backdrop-filter: blur(12px);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.08);
  z-index: 200;
  font-size: 13px;
  color: var(--text-primary, #e2e8f0);
  display: none;
  flex-direction: column;
  overflow: hidden;
  transition: opacity 0.2s ease, transform 0.2s ease;
  opacity: 0;
  transform: translateY(10px);
}

#floatingCommentsPanel.visible {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}

.floating-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  cursor: grab;
  user-select: none;
  flex-shrink: 0;
}

.floating-panel-header:active {
  cursor: grabbing;
}

.floating-panel-title {
  font-weight: 600;
  font-size: 13px;
  color: var(--brand-teal, #2ECFB0);
}

.floating-panel-controls {
  display: flex;
  gap: 4px;
}

.floating-panel-btn {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1;
}

.floating-panel-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

.floating-panel-body {
  overflow-y: auto;
  max-height: 360px;
  padding: 8px;
  transition: max-height 0.2s ease;
}

.floating-panel-body.collapsed {
  max-height: 0;
  padding: 0 8px;
  overflow: hidden;
}

.floating-panel-body::-webkit-scrollbar {
  width: 4px;
}

.floating-panel-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
}

/* ===============================
   MEASUREMENT PANEL
   =============================== */
.ms-tool-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 9px 10px;
  border: none;
  border-radius: 8px;
  color: white;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  font-family: inherit;
}

.ms-tool-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.ms-tool-btn:active {
  transform: translateY(0);
}

/* Saved measurement items */
.ms-saved-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  margin-bottom: 3px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.ms-saved-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
}

.ms-saved-icon {
  font-size: 16px;
  flex-shrink: 0;
  width: 24px;
  text-align: center;
}

.ms-saved-info {
  flex: 1;
  min-width: 0;
}

.ms-saved-label {
  font-size: 12px;
  font-weight: 600;
  color: #E2E8F0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ms-saved-meta {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.35);
  margin-top: 1px;
}

.ms-saved-zoom,
.ms-saved-delete {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 11px;
  transition: all 0.15s ease;
  padding: 0;
}

.ms-saved-zoom {
  color: rgba(255, 255, 255, 0.35);
}

.ms-saved-zoom:hover {
  background: rgba(46, 207, 176, 0.15);
  color: #2ECFB0;
}

.ms-saved-delete {
  color: rgba(255, 255, 255, 0.25);
  font-size: 12px;
}

.ms-saved-delete:hover {
  background: rgba(248, 113, 113, 0.15);
  color: #F87171;
}

.floating-comments-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Floating Loaded Assets Panel — width adapts to content */
#floatingAssetsPanel {
  position: fixed;
  top: 80px;
  right: 20px;
  width: max-content;
  min-width: 320px;
  max-width: min(520px, calc(100vw - 380px));
  max-height: calc(100vh - 100px);
  background: var(--bg-overlay, rgba(14, 17, 23, 0.82));
  backdrop-filter: blur(12px);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.08);
  z-index: 200;
  font-size: 13px;
  color: var(--text-primary, #e2e8f0);
  display: none;
  flex-direction: column;
  overflow: hidden;
}

#floatingAssetsPanel .floating-panel-body {
  max-height: none;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

#floatingAssetsPanel.visible {
  display: flex;
}

.floating-assets-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* WEA Shadow floating widget */
#weaShadowPanel {
  position: fixed;
  top: 80px;
  right: 20px;
  width: 300px;
  max-height: calc(100vh - 100px);
  background: rgba(14, 17, 23, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.06);
  z-index: 200;
  font-size: 13px;
  color: var(--text-primary, #e2e8f0);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: opacity 0.18s ease;
  opacity: 0;
  pointer-events: none;
}

#weaShadowPanel .floating-panel-body {
  max-height: none;
  overflow-y: auto;
}

#weaShadowPanel.visible {
  opacity: 1;
  pointer-events: auto;
}

#weaLayerPanel {
  position: fixed;
  top: 80px;
  left: 20px;
  width: 240px;
  max-height: calc(100vh - 100px);
  background: rgba(14, 17, 23, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.06);
  z-index: 200;
  font-size: 13px;
  color: var(--text-primary, #e2e8f0);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: opacity 0.18s ease;
  opacity: 0;
  pointer-events: none;
}

#weaLayerPanel .floating-panel-body {
  max-height: none;
  overflow-y: auto;
  padding: 10px;
}

#weaLayerPanel.visible {
  opacity: 1;
  pointer-events: auto;
}

@media (max-width: 768px) {
  #floatingCommentsPanel {
    width: calc(100vw - 20px);
    right: 10px;
    bottom: 68px; /* above bottom toolbar */
    max-height: 300px;
  }

  #floatingAssetsPanel {
    width: calc(100vw - 20px);
    min-width: 0;
    max-width: none;
    top: 60px;
    right: 10px;
    max-height: calc(100vh - 80px);
  }

  #weaShadowPanel {
    width: calc(100vw - 20px);
    right: 10px;
    top: 10px;
    max-height: 60vh;
  }
}

/* ===============================
   QW3: REDUCED MOTION
   =============================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ===============================
   QW5: FOCUS STATES (Keyboard Nav)
   =============================== */
.modern-btn:focus-visible,
.modern-toggle-btn:focus-visible,
.modern-icon-btn:focus-visible,
.bottom-toolbar-btn:focus-visible {
  outline: 2px solid var(--brand-teal);
  outline-offset: 2px;
}

.modern-section-header:focus-visible {
  outline: 2px solid var(--brand-teal);
  outline-offset: -2px;
  border-radius: 4px;
}

input[type="range"]:focus-visible,
input[type="checkbox"]:focus-visible,
select:focus-visible {
  outline: 2px solid var(--brand-teal);
  outline-offset: 2px;
}

/* ===============================
   ME3: CONTEXTUAL CURSORS
   =============================== */
body.tool-measure #cesiumContainer { cursor: crosshair; }
body.tool-clip #cesiumContainer { cursor: cell; }
body.tool-comment #cesiumContainer { cursor: copy; }
body.tool-hide #cesiumContainer { cursor: pointer; }
body.tool-inspect #cesiumContainer { cursor: help; }
body.tool-spawn #cesiumContainer { cursor: crosshair; }

/* ===============================
   ME4: PANEL TRANSITIONS
   =============================== */
#infoBoxPanel,
#floatingCommentsPanel,
#floatingAssetsPanel,
#weaShadowPanel {
  transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* InfoBox slides in from left */
#infoBoxPanel {
  transform: translateX(-20px);
  opacity: 0;
}
#infoBoxPanel.visible {
  transform: translateX(0);
  opacity: 1;
}

/* Comments panel slides up */
#floatingCommentsPanel {
  transform: translateY(20px);
  opacity: 0;
}
#floatingCommentsPanel.visible {
  transform: translateY(0);
  opacity: 1;
}

/* Assets panel slides down from top */
#floatingAssetsPanel {
  transform: translateY(-20px);
  opacity: 0;
}
#floatingAssetsPanel.visible {
  transform: translateY(0);
  opacity: 1;
}


/* Point cloud upload progress (pointcloud-upload.js createUploadProgress) */
.pc-upload-progress {
  margin-top: var(--space-xs);
}
.pc-upload-progress-track {
  height: 6px;
  border-radius: var(--radius-sm);
  background: var(--input-bg);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
}
.pc-upload-progress-fill {
  width: 0;
  height: 100%;
  background: var(--brand-teal);
  transition: width 0.3s ease;
}
.pc-upload-progress-text {
  margin-top: var(--space-xs);
  font-size: 11px;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}
@media (prefers-reduced-motion: reduce) {
  .pc-upload-progress-fill { transition: none; }
}

/* IFC / point cloud upload: optional EPSG + ±0.00 height (ui-assets-section.js) */
.upload-georef-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xs);
  margin-top: 6px;
}
