:not(:defined) > * {
  display: none;
}

html {
  height: 100%;
}

body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
}

model-viewer {
  width: 100%;
  height: 100%;
  background-color: #1a1a1a;
}

#canvas-container {
  width: 100%;
  height: 100%;
  background-color: #1a1a1a;
}

#canvas-container canvas {
  display: block;
}

#hotspots-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
}

#loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

#loading-overlay.hidden {
  display: none;
}

.hotspot-3d {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #0066cc;
  border: 1px solid white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  cursor: pointer;
  pointer-events: auto;
  transform: translate(-50%, -50%);
}

.hotspot-3d .label {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.8);
  color: white;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  margin-bottom: 8px;
  pointer-events: none;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.hotspot-3d.hidden {
  display: none;
}

/* Measure markers for Three.js */
.measure-marker {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ff4444;
  border: 2px solid white;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.measure-marker .label {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 102, 204, 0.95);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  margin-bottom: 8px;
  font-weight: 600;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Control Panel Styles */
#control-panel {
  position: fixed;
  top: 10px;
  right: 10px;
  width: 280px;
  max-height: 80vh;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
}

#panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: #333;
  color: white;
  border-radius: 8px 8px 0 0;
  cursor: pointer;
  user-select: none;
}

#panel-header span {
  font-weight: 600;
}

#panel-toggle {
  background: none;
  border: none;
  color: white;
  font-size: 12px;
  cursor: pointer;
  padding: 4px 8px;
  transition: transform 0.3s ease;
}

#control-panel.collapsed #panel-toggle {
  transform: rotate(-90deg);
}

#panel-content {
  max-height: 60vh;
  overflow-y: auto;
  transition: max-height 0.3s ease;
}

#control-panel.collapsed #panel-content {
  max-height: 0;
  overflow: hidden;
}

/* Toggle Controls */
#toggle-controls {
  padding: 12px;
}

.toggle-item {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  margin-bottom: 8px;
  background: #f5f5f5;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.toggle-item:last-child {
  margin-bottom: 0;
}

.toggle-item:hover {
  background: #e8e8e8;
}

.toggle-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-right: 12px;
  cursor: pointer;
  accent-color: #333;
}

.toggle-label {
  font-size: 14px;
  font-weight: 500;
}

/* Legacy - Picker Controls */
#picker-controls {
  padding: 12px;
  border-bottom: 1px solid #eee;
}

.picker-btn {
  width: 100%;
  padding: 10px 16px;
  border: 2px solid #333;
  background: #fff;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.picker-btn:hover {
  background: #f5f5f5;
}

.picker-btn.active {
  background: #333;
  color: white;
}

.picker-hint {
  margin: 8px 0 0;
  font-size: 12px;
  color: #666;
  text-align: center;
}

/* Hidden Surfaces List */
#hidden-surfaces {
  padding: 12px;
}

.section-header {
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
  font-size: 13px;
}

#surfaces-list {
  max-height: 200px;
  overflow-y: auto;
  margin-bottom: 10px;
}

.empty-msg {
  color: #999;
  font-size: 12px;
  text-align: center;
  padding: 12px;
  margin: 0;
  font-style: italic;
}

.surface-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  margin: 4px 0;
  background: #f5f5f5;
  border-radius: 4px;
  font-size: 13px;
}

.surface-item .surface-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.surface-item .restore-btn {
  background: none;
  border: none;
  color: #666;
  cursor: pointer;
  padding: 4px 8px;
  font-size: 16px;
  line-height: 1;
}

.surface-item .restore-btn:hover {
  color: #333;
}

.action-btn {
  width: 100%;
  padding: 8px 16px;
  border: 1px solid #ddd;
  background: #fff;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  transition: background 0.2s ease;
}

.action-btn:hover:not(:disabled) {
  background: #f0f0f0;
}

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

/* Picker Mode Cursor */
model-viewer.picker-mode {
  cursor: crosshair;
}


/* Loading Overlay */
.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 100;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.loading-overlay.hide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #e0e0e0;
  border-top-color: #333;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-text {
  margin-top: 16px;
  font-size: 14px;
  color: #666;
}

.progress-bar {
  display: block;
  width: 200px;
  height: 6px;
  margin-top: 16px;
  border-radius: 3px;
  background-color: #e0e0e0;
  overflow: hidden;
}

.progress-bar.hide {
  visibility: hidden;
  transition: visibility 0.3s;
}

.update-bar {
  background-color: #333;
  width: 0%;
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s;
}

.progress-percent {
  margin-top: 8px;
  font-size: 13px;
  color: #999;
}

/* Instructions Panel */
#instructions-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 380px;
  max-width: 90vw;
  max-height: 85vh;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
  z-index: 2000;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  display: flex;
  flex-direction: column;
}

#instructions-panel.hidden {
  display: none;
}

.instructions-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: #333;
  color: white;
  border-radius: 12px 12px 0 0;
  flex-shrink: 0;
}

.instructions-header span {
  font-weight: 600;
  font-size: 14px;
}

#close-instructions {
  background: none;
  border: none;
  color: white;
  font-size: 20px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.instructions-content {
  padding: 10px 14px;
  overflow-y: auto;
  flex: 1;
}

.instructions-section {
  margin-bottom: 8px;
}

.instructions-section:last-child {
  margin-bottom: 0;
}

.instructions-section h3 {
  margin: 0 0 4px 0;
  font-size: 11px;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.instructions-section ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.instructions-section li {
  padding: 2px 0;
  font-size: 12px;
  color: #333;
}

.instructions-section li strong {
  color: #000;
}

.instructions-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 8px 14px;
  border-top: 1px solid #eee;
  flex-shrink: 0;
}

#got-it-btn {
  padding: 6px 16px;
  background: #333;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

#got-it-btn:hover {
  background: #444;
}

/* Help Button (shared styles) */
.help-btn {
  width: 36px;
  height: 36px;
  background: #333;
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.help-btn:hover {
  background: #444;
}

/* Desktop help button */
#help-btn-desktop {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 1000;
}

/* Hide desktop help button on mobile/tablet */
@media screen and (max-width: 1280px) {
  #help-btn-desktop {
    display: none;
  }
}

/* Mobile/Tablet Responsive Styles */
@media screen and (max-width: 1280px) {
  #control-panel {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-height: 45vh;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.15);
  }

  #panel-header {
    border-radius: 12px 12px 0 0;
    padding: 12px 16px;
  }

  #control-panel.collapsed #panel-content {
    max-height: 0;
  }

  #panel-content {
    max-height: 35vh;
  }

  .toggle-item {
    padding: 12px 14px;
    margin-bottom: 8px;
  }

  .toggle-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 12px;
  }

  .toggle-label {
    font-size: 15px;
  }

  .picker-btn {
    padding: 12px 16px;
    font-size: 15px;
  }

  #surfaces-list {
    max-height: 100px;
  }

  .surface-item {
    padding: 10px 12px;
  }

  .action-btn {
    padding: 10px 16px;
    font-size: 14px;
  }

  /* Show only mobile instructions on mobile/tablet */
  .desktop-instructions {
    display: none;
  }

}

/* Show only desktop instructions on desktop */
@media screen and (min-width: 1281px) {
  .mobile-instructions {
    display: none;
  }
}

/* Hotspot Styles */
.hotspot {
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #0066cc;
  border: 1px solid white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  cursor: pointer;
  position: relative;
}

.hotspot .label {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.8);
  color: white;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  margin-bottom: 8px;
  pointer-events: none;
}

/* Toolbar */
#toolbar {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  background: rgba(255, 255, 255, 0.95);
  padding: 8px 12px;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

#toolbar button {
  width: 36px;
  height: 36px;
  border: 1px solid #ddd;
  background: white;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

#toolbar button:hover {
  background: #f0f0f0;
  border-color: #bbb;
}

#toolbar button.active {
  background: #333;
  color: white;
  border-color: #333;
}

.toolbar-divider {
  width: 1px;
  background: #ddd;
  margin: 4px 4px;
}

.view-btn {
  font-weight: 600;
  font-size: 14px !important;
}

/* Sensitivity Control */
.sensitivity-control {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 4px;
}

.sensitivity-label {
  font-size: 11px;
  color: #666;
  white-space: nowrap;
}

#sensitivity-slider {
  width: 60px;
  height: 4px;
  cursor: pointer;
  accent-color: #333;
}

/* FOV Control */
.fov-control {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 4px;
}

.fov-label {
  font-size: 11px;
  color: #666;
  white-space: nowrap;
}

#fov-slider {
  width: 60px;
  height: 4px;
  cursor: pointer;
  accent-color: #333;
}

/* Shadow Control */
.shadow-control {
  display: flex;
  align-items: center;
  padding: 0 4px;
}

.shadow-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  font-size: 11px;
  color: #666;
}

.shadow-toggle input[type="checkbox"] {
  width: 14px;
  height: 14px;
  cursor: pointer;
  accent-color: #333;
}

.shadow-label {
  white-space: nowrap;
}

/* Hotspot Control */
.hotspot-control {
  display: flex;
  align-items: center;
  padding: 0 4px;
}

.hotspot-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  font-size: 11px;
  color: #666;
}

.hotspot-toggle input[type="checkbox"] {
  width: 14px;
  height: 14px;
  cursor: pointer;
  accent-color: #333;
}

.hotspot-label {
  white-space: nowrap;
}

/* Floodlight Control */
.floodlight-control {
  display: flex;
  align-items: center;
  padding: 0 4px;
}

.floodlight-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  font-size: 11px;
  color: #666;
}

.floodlight-toggle input[type="checkbox"] {
  width: 14px;
  height: 14px;
  cursor: pointer;
  accent-color: #333;
}

.floodlight-label {
  white-space: nowrap;
}

/* Elements Button */
#toolbar .elements-btn {
  width: auto;
  height: auto;
  padding: 6px 12px;
  border: 1px solid #ddd;
  background: white;
  border-radius: 4px;
  cursor: pointer;
  font-size: 11px;
  color: #666;
  font-family: inherit;
  transition: all 0.2s ease;
}

#toolbar .elements-btn:hover {
  background: #f0f0f0;
  border-color: #bbb;
}

/* Views Dropdown */
#views-dropdown {
  padding: 6px 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 12px;
  font-family: inherit;
  background: white;
  cursor: pointer;
  color: #333;
  min-width: 70px;
}

#views-dropdown:hover {
  border-color: #bbb;
  background: #f0f0f0;
}

/* Sun Control */
.sun-control {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 4px;
}

.sun-icon {
  font-size: 16px;
  color: #f5a623;
}

#sun-date {
  width: 110px;
  padding: 4px 6px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 11px;
  font-family: inherit;
}

#sun-time {
  width: 75px;
  padding: 4px 6px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 11px;
  font-family: inherit;
  background: white;
  cursor: pointer;
}

/* Share Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3000;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: white;
  border-radius: 12px;
  width: 450px;
  max-width: 90vw;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  background: #333;
  color: white;
  border-radius: 12px 12px 0 0;
}

.modal-header span {
  font-weight: 600;
  font-size: 15px;
}

.modal-close {
  background: none;
  border: none;
  color: white;
  font-size: 22px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.modal-body {
  padding: 20px;
}

.modal-body p {
  margin: 0 0 12px 0;
  color: #333;
  font-size: 14px;
}

.share-url-container {
  display: flex;
  gap: 8px;
}

#share-url {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 13px;
  background: #f9f9f9;
}

#copy-url-btn {
  padding: 10px 16px;
  background: #333;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  font-size: 13px;
}

#copy-url-btn:hover {
  background: #444;
}

.share-note {
  margin-top: 12px !important;
  font-size: 12px !important;
  color: #666 !important;
}

/* View Controls Modal */
#view-controls-modal .modal-content {
  width: 280px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

#view-controls-modal .modal-header {
  padding: 10px 14px;
  background: rgba(51, 51, 51, 0.85);
}

#view-controls-modal .modal-header span {
  font-size: 14px;
}

#view-controls-modal .modal-close {
  font-size: 20px;
}

#view-controls-modal .modal-body {
  padding: 12px;
}

#modal-toggle-controls {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

#modal-toggle-controls .toggle-item {
  display: flex;
  align-items: center;
  padding: 8px 10px;
  background: rgba(245, 245, 245, 0.7);
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.2s ease;
}

#modal-toggle-controls .toggle-item:hover {
  background: rgba(232, 232, 232, 0.8);
}

#modal-toggle-controls .toggle-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-right: 10px;
  cursor: pointer;
  accent-color: #333;
}

#modal-toggle-controls .toggle-label {
  font-size: 13px;
  font-weight: 500;
  color: #333;
  flex: 1;
}

/* Compact toggle items for Elements modal */
#modal-toggle-controls .toggle-item.compact {
  padding: 5px 8px;
  margin-bottom: 0;
}

#modal-toggle-controls .toggle-item.compact input[type="checkbox"] {
  width: 14px;
  height: 14px;
  margin-right: 8px;
}

#modal-toggle-controls .toggle-item.compact .toggle-label {
  font-size: 12px;
}

#modal-toggle-controls .solo-btn {
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 500;
  background: #e0e0e0;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  color: #666;
  margin-left: auto;
  transition: all 0.2s;
}

#modal-toggle-controls .solo-btn:hover {
  background: #2196f3;
  color: white;
}

#modal-toggle-controls .solo-btn.active {
  background: #2196f3;
  color: white;
}

#modal-toggle-controls .elements-btn-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

#modal-toggle-controls .show-all-btn,
#modal-toggle-controls .reset-btn {
  flex: 1;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 500;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.2s;
}

#modal-toggle-controls .show-all-btn {
  background: #333;
  color: white;
}

#modal-toggle-controls .show-all-btn:hover {
  background: #444;
}

#modal-toggle-controls .reset-btn {
  background: #e0e0e0;
  color: #333;
}

#modal-toggle-controls .reset-btn:hover {
  background: #d0d0d0;
}

/* Measure Info Bar */
#measure-info {
  position: fixed;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 102, 204, 0.95);
  color: white;
  padding: 6px 20px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 20px;
  z-index: 1500;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 13px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

#measure-info.hidden {
  display: none;
}

#measure-clear,
#measure-cancel {
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 4px;
  cursor: pointer;
  font-size: 11px;
}

#measure-clear:hover,
#measure-cancel:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Measure points on model */
.measure-point {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ff4444;
  border: 2px solid white;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.measure-label {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 102, 204, 0.95);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  margin-bottom: 8px;
  font-weight: 600;
}

/* Object Info Popup (right-click/long-press) */
#object-info-popup {
  position: fixed;
  z-index: 2000;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  min-width: 200px;
  max-width: 300px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  pointer-events: auto;
}

#object-info-popup.hidden {
  display: none;
}

.object-info-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: #333;
  color: white;
  border-radius: 8px 8px 0 0;
}

.object-info-header span {
  font-weight: 600;
  font-size: 13px;
}

#object-info-close {
  background: none;
  border: none;
  color: white;
  font-size: 18px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

#object-info-close:hover {
  opacity: 0.8;
}

.object-info-content {
  padding: 10px 12px;
}

.info-row {
  display: flex;
  margin-bottom: 6px;
}

.info-row:last-child {
  margin-bottom: 0;
}

.info-label {
  font-size: 11px;
  color: #666;
  font-weight: 500;
  min-width: 60px;
}

.info-value {
  font-size: 12px;
  color: #333;
  word-break: break-word;
}

/* Mobile Sun Bar (bottom of screen) */
#mobile-sun-bar {
  display: none;
  position: fixed;
  bottom: 10px;
  left: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.95);
  padding: 7px 9px;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

#mobile-sun-bar .sun-icon {
  font-size: 18px;
  color: #f5a623;
}

#mobile-sun-bar input[type="date"] {
  padding: 5px 7px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  width: 130px;
  background: white;
}

#mobile-sun-bar select {
  padding: 5px 7px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  background: white;
  cursor: pointer;
}

#mobile-sun-bar .mobile-divider {
  width: 1px;
  height: 24px;
  background: #ddd;
  margin: 0 4px;
}

#mobile-sun-bar .fov-label {
  font-size: 12px;
  color: #666;
  white-space: nowrap;
}

#mobile-sun-bar #fov-slider-mobile {
  width: 60px;
  height: 4px;
  cursor: pointer;
  accent-color: #333;
}

/* Mobile top bar (Elements + Help) - positioned at top right */
#mobile-top-bar {
  display: none;
  position: fixed;
  top: 10px;
  right: 10px;
  align-items: center;
  gap: 8px;
  z-index: 1000;
}

#mobile-top-bar .mobile-elements-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.95);
  padding: 0 11px;
  height: 36px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  font-size: 12px;
  color: #333;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  border: none;
  font-weight: 500;
}

#mobile-top-bar .mobile-elements-btn:hover {
  background: rgba(240, 240, 240, 0.95);
}

#mobile-top-bar .help-btn {
  position: static;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.95);
  color: #333;
  border: none;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

#mobile-top-bar .help-btn:hover {
  background: rgba(240, 240, 240, 0.95);
}

/* Mobile help area (shadow toggle + hotspot toggle + floodlights toggle) */
#mobile-help-area {
  display: none;
  position: fixed;
  bottom: 60px;
  left: 10px;
  align-items: center;
  gap: 8px;
  z-index: 1000;
}

#mobile-help-area .mobile-shadow-toggle,
#mobile-help-area .mobile-hotspot-toggle,
#mobile-help-area .mobile-floodlights-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.95);
  padding: 0 11px;
  height: 36px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  font-size: 12px;
  color: #333;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

#mobile-help-area .mobile-shadow-toggle input[type="checkbox"],
#mobile-help-area .mobile-hotspot-toggle input[type="checkbox"],
#mobile-help-area .mobile-floodlights-toggle input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: #333;
}

/* On desktop, hide the entire mobile areas since help button is positioned fixed */
@media screen and (min-width: 1281px) {
  #mobile-help-area {
    display: none !important;
  }
  #mobile-top-bar {
    display: none !important;
  }
}

/* Mobile/Tablet adjustments for toolbar */
@media screen and (max-width: 1280px) {
  #toolbar {
    top: 10px;
    bottom: auto;
    left: 10px;
    transform: none;
    padding: 5px 9px;
    gap: 5px;
  }

  #toolbar button {
    width: 29px;
    height: 29px;
    font-size: 13px;
  }

  .toolbar-divider {
    margin: 2px 2px;
  }

  /* Hide zoom sensitivity, FOV, shadow, hotspot, floodlight, elements and sun controls on mobile/tablet toolbar */
  .sensitivity-control,
  .sensitivity-divider,
  .fov-control,
  .shadow-control,
  .hotspot-control,
  .floodlight-control,
  #toolbar .elements-btn,
  .sun-divider,
  .sun-control {
    display: none;
  }

  /* Show mobile sun bar at bottom */
  #mobile-sun-bar {
    display: flex;
  }

  /* Show mobile help area with toggles */
  #mobile-help-area {
    display: flex;
  }

  /* Show mobile top bar with Elements and Help */
  #mobile-top-bar {
    display: flex;
  }

  #measure-info {
    top: 60px !important;
    bottom: auto !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    font-size: 12px !important;
    padding: 6px 12px !important;
    gap: 10px !important;
    white-space: nowrap !important;
    width: fit-content !important;
    min-width: fit-content !important;
    max-width: unset !important;
    flex-wrap: nowrap !important;
    overflow: visible !important;
  }

  #measure-info * {
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    overflow: visible !important;
  }
}
