/**
 * MapLibre GL LiDAR Control Styles
 */

/* Container - matches maplibregl-ctrl styling */
.lidar-control {
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Toggle button - 29x29 to match navigation control */
.lidar-control-toggle {
  background: none;
  border: none;
  padding: 0;
  width: 29px;
  height: 29px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  outline: none;
  color: #1f2a37;
}

.lidar-control-toggle:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.lidar-control-toggle .lidar-control-icon {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.lidar-control-toggle .lidar-control-icon svg {
  width: 22px;
  height: 22px;
  display: block;
  stroke: currentColor;
  fill: none;
}

/* Panel - positioned dynamically by JavaScript for floating behavior */
.lidar-control-panel {
  position: absolute;
  /* Position is set dynamically by _updatePanelPosition() */
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
  width: 380px;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 1000;
  padding: 8px;
  font-size: 12px;
  line-height: 1.4;
  display: none;
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.3) transparent;
}

.lidar-control-panel::-webkit-scrollbar {
  width: 6px;
}

.lidar-control-panel::-webkit-scrollbar-track {
  background: transparent;
}

.lidar-control-panel::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.3);
  border-radius: 3px;
}

.lidar-control-panel::-webkit-scrollbar-thumb:hover {
  background-color: rgba(0, 0, 0, 0.5);
}

.lidar-control-panel.expanded {
  display: block;
}

/* Panel header */
.lidar-control-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-weight: 600;
  color: #333;
  padding: 4px 0 8px 0;
  border-bottom: 1px solid #e0e0e0;
  margin-bottom: 8px;
}

.lidar-control-title {
  flex: 1 1 auto;
  font-size: 13px;
}

.lidar-control-close {
  width: 20px;
  height: 20px;
  border: none;
  background: transparent;
  color: #999;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  transition: color 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lidar-control-close:hover {
  color: #333;
}

/* Content */
.lidar-control-content {
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.3) transparent;
}

.lidar-control-content::-webkit-scrollbar {
  width: 6px;
}

.lidar-control-content::-webkit-scrollbar-track {
  background: transparent;
}

.lidar-control-content::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.3);
  border-radius: 3px;
}

.lidar-control-content::-webkit-scrollbar-thumb:hover {
  background-color: rgba(0, 0, 0, 0.5);
}

/* Sections */
.lidar-control-section {
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e0e0e0;
}

.lidar-control-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.lidar-control-section-header {
  font-weight: 600;
  font-size: 11px;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

/* Form elements */
.lidar-control-group {
  margin-bottom: 10px;
}

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

.lidar-control-label {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  font-weight: 500;
  color: #555;
}

.lidar-control-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.lidar-control-value {
  font-size: 11px;
  color: #666;
  font-weight: 500;
}

.lidar-control-input {
  width: 100%;
  padding: 6px 8px;
  font-size: 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
}

.lidar-control-input:focus {
  border-color: #159895;
  box-shadow: 0 0 0 2px rgba(21, 152, 149, 0.15);
}

.lidar-control-select {
  width: 100%;
  padding: 6px 8px;
  font-size: 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  outline: none;
  background: #fff;
  cursor: pointer;
}

.lidar-control-select:focus {
  border-color: #159895;
  box-shadow: 0 0 0 2px rgba(21, 152, 149, 0.15);
}

/* Slider */
.lidar-control-slider {
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: #e0e0e0;
  outline: none;
  -webkit-appearance: none;
  margin-top: 4px;
}

.lidar-control-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #159895;
  cursor: pointer;
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.lidar-control-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #159895;
  cursor: pointer;
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Button */
.lidar-control-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  color: white;
  background: #159895;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.15s;
}

.lidar-control-button:hover {
  background: #128784;
}

.lidar-control-button:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.lidar-control-button.secondary {
  background: #f0f0f0;
  color: #333;
}

.lidar-control-button.secondary:hover {
  background: #e0e0e0;
}

.lidar-share-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: sticky;
  bottom: 0;
  z-index: 2;
  background: #fff;
  padding-top: 10px;
}

.lidar-share-button {
  width: 100%;
}

.lidar-share-status {
  min-height: 16px;
  color: #555;
  font-size: 11px;
  text-align: center;
}

/* File input styling */
.lidar-file-input-wrapper {
  position: relative;
  overflow: hidden;
  display: block;
  width: 100%;
}

.lidar-file-input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  top: 0;
  left: 0;
}

.lidar-file-input-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px;
  background: #f8f9fa;
  border: 2px dashed #ddd;
  border-radius: 4px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  color: #666;
  font-size: 12px;
  text-align: center;
}

.lidar-file-input-label:hover,
.lidar-file-input-label.drag-over {
  border-color: #159895;
  background: #f0faf9;
}

.lidar-file-input-label svg {
  color: #999;
}

/* Point cloud list */
.lidar-pointclouds-section {
  min-height: 40px;
}

.lidar-pointclouds-list {
  max-height: 150px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
}

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

.lidar-pointcloud-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px;
  background: #f8f9fa;
  border-radius: 4px;
  margin-bottom: 4px;
}

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

.lidar-pointcloud-info {
  flex: 1;
  min-width: 0;
  margin-right: 8px;
}

.lidar-pointcloud-name {
  font-weight: 500;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lidar-pointcloud-details {
  font-size: 10px;
  color: #888;
  margin-top: 2px;
}

.lidar-pointcloud-actions {
  display: flex;
  gap: 4px;
}

.lidar-control-panel .lidar-pointcloud-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  font-size: 10px;
  background: #f0f0f0;
  border: 1px solid #ccc;
  border-radius: 3px;
  cursor: pointer;
  color: #333;
  font-weight: 500;
  width: 64px;
  height: auto;
  line-height: 1.2;
  white-space: nowrap;
  box-sizing: border-box;
}

.lidar-control-panel .lidar-pointcloud-action:hover {
  background: #e0e0e0;
  border-color: #bbb;
}

.lidar-control-panel .lidar-pointcloud-action.remove {
  background: #fff5f5;
  color: #dc3545;
  border-color: #dc3545;
}

.lidar-control-panel .lidar-pointcloud-action.remove:hover {
  background: #dc3545;
  color: #fff;
}

/* Loading state */
.lidar-loading {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  color: #666;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.95);
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  border-radius: 4px;
}

.lidar-loading.active {
  display: flex;
}

.lidar-loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #e0e0e0;
  border-top-color: #159895;
  border-radius: 50%;
  animation: lidar-spin 0.8s linear infinite;
  margin-bottom: 12px;
}

.lidar-loading-text {
  font-size: 13px;
  font-weight: 500;
  color: #333;
  margin-bottom: 8px;
}

.lidar-loading-progress {
  font-size: 11px;
  color: #666;
}

.lidar-loading-bar {
  width: 200px;
  height: 4px;
  background: #e0e0e0;
  border-radius: 2px;
  margin-top: 12px;
  overflow: hidden;
}

.lidar-loading-bar-fill {
  height: 100%;
  background: #159895;
  border-radius: 2px;
  transition: width 0.2s ease;
  width: 0%;
}

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

/* Error state */
.lidar-error {
  padding: 8px;
  background: #fff5f5;
  border: 1px solid #ffcdd2;
  border-radius: 4px;
  color: #c62828;
  font-size: 11px;
  margin-top: 8px;
  word-wrap: break-word;
  overflow-wrap: break-word;
  max-height: 120px;
  overflow-y: auto;
}

/* Flex utilities */
.lidar-control-flex {
  display: flex;
  gap: 8px;
  align-items: center;
}

.lidar-control-flex-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Scrollbar styling for pointclouds list */
.lidar-pointclouds-list {
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.3) transparent;
}

.lidar-pointclouds-list::-webkit-scrollbar {
  width: 6px;
}

.lidar-pointclouds-list::-webkit-scrollbar-track {
  background: transparent;
}

.lidar-pointclouds-list::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.3);
  border-radius: 3px;
}

/* Classification Legend */
.lidar-classification-legend {
  margin-top: 8px;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  overflow: hidden;
}

.lidar-classification-legend-header {
  display: flex;
  gap: 8px;
  padding: 6px 8px;
  background: #f8f9fa;
  border-bottom: 1px solid #e0e0e0;
}

.lidar-legend-action-btn {
  flex: 1;
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 500;
  background-color: #159895;
  border: 1px solid #128583;
  border-radius: 3px;
  cursor: pointer;
  color: #fff;
  transition: background-color 0.15s, border-color 0.15s;
}

.lidar-control-panel .lidar-legend-action-btn {
  background-color: #159895;
  border: 1px solid #128583;
  color: #fff;
}

.lidar-legend-action-btn:hover,
.lidar-legend-action-btn:focus-visible {
  background-color: #0f6d6b;
  border-color: #0b5b59;
  color: #fff;
}

.lidar-control-panel .lidar-classification-legend-header button.lidar-legend-action-btn:hover,
.lidar-control-panel .lidar-classification-legend-header button.lidar-legend-action-btn:focus-visible {
  background-color: #0f6d6b;
  border-color: #0b5b59;
  color: #fff;
}

.lidar-classification-legend-list {
  max-height: 180px;
  overflow-y: auto;
  padding: 4px 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.3) transparent;
}

.lidar-classification-legend-list::-webkit-scrollbar {
  width: 6px;
}

.lidar-classification-legend-list::-webkit-scrollbar-track {
  background: transparent;
}

.lidar-classification-legend-list::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.3);
  border-radius: 3px;
}

.lidar-classification-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  cursor: pointer;
}

.lidar-classification-legend-item:hover {
  background: #f8f9fa;
}

.lidar-classification-legend-item input[type="checkbox"] {
  margin: 0;
  cursor: pointer;
  flex-shrink: 0;
}

.lidar-classification-swatch {
  width: 16px;
  height: 16px;
  border-radius: 3px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  flex-shrink: 0;
}

.lidar-classification-label {
  font-size: 11px;
  color: #333;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lidar-classification-empty {
  padding: 12px 8px;
  text-align: center;
  color: #888;
  font-size: 11px;
  font-style: italic;
}

/* Colormap Selector */
.lidar-colormap-group {
  margin-bottom: 10px;
}

.lidar-colormap-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lidar-colormap-select {
  flex: 1;
  padding: 6px 8px;
  font-size: 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  outline: none;
  background: #fff;
  cursor: pointer;
}

.lidar-colormap-select:focus {
  border-color: #159895;
  box-shadow: 0 0 0 2px rgba(21, 152, 149, 0.15);
}

.lidar-colormap-preview {
  width: 50px;
  height: 14px;
  border-radius: 2px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  flex-shrink: 0;
}

/* Colorbar Legend */
.lidar-colorbar {
  margin: 8px 0;
}

.lidar-colorbar-label {
  font-size: 11px;
  font-weight: 500;
  color: #555;
  margin-bottom: 4px;
}

.lidar-colorbar-gradient {
  width: 100%;
  height: 14px;
  border-radius: 2px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  display: block;
}

.lidar-colorbar-labels {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #666;
  margin-top: 2px;
}

.lidar-colorbar-min,
.lidar-colorbar-max {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, monospace;
}

/* Color Range Control */
.lidar-color-range {
  margin: 8px 0;
}

.lidar-color-range-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.lidar-range-reset-btn {
  padding: 2px 8px;
  font-size: 10px;
  background: #f0f0f0;
  border: 1px solid #ccc;
  border-radius: 3px;
  cursor: pointer;
  color: #555;
}

.lidar-range-reset-btn:hover {
  background: #e0e0e0;
  border-color: #999;
}

.lidar-range-reset-btn:active {
  background: #d0d0d0;
}

.lidar-range-mode {
  display: flex;
  gap: 16px;
  margin-bottom: 8px;
}

.lidar-range-mode label {
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  font-size: 11px;
  color: #555;
}

.lidar-range-mode input[type="radio"] {
  margin: 0;
  cursor: pointer;
}

/* Info button for point cloud items */
.lidar-control-panel .lidar-pointcloud-action.info {
  background: #e3f2fd;
  color: #1565c0;
  border-color: #90caf9;
}

.lidar-control-panel .lidar-pointcloud-action.info:hover {
  background: #1565c0;
  color: #fff;
}

/* ==================== Metadata Panel ==================== */
.lidar-metadata-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10000;
}

.lidar-metadata-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  width: 500px;
  max-width: 90vw;
  max-height: 80vh;
  overflow: hidden;
  z-index: 10001;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 13px;
}

.lidar-metadata-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #e0e0e0;
  background: #f8f9fa;
}

.lidar-metadata-title {
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

.lidar-metadata-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #999;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}

.lidar-metadata-close:hover {
  background: #e0e0e0;
  color: #333;
}

.lidar-metadata-content {
  padding: 16px 20px;
  max-height: calc(80vh - 65px);
  overflow-y: auto;
}

.lidar-metadata-section {
  margin-bottom: 12px;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  overflow: hidden;
}

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

.lidar-metadata-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: #f8f9fa;
  cursor: pointer;
  user-select: none;
  font-weight: 600;
  font-size: 12px;
  color: #555;
}

.lidar-metadata-section-header:hover {
  background: #f0f0f0;
}

.lidar-metadata-section-toggle {
  font-size: 10px;
  color: #888;
}

.lidar-metadata-section-title {
  flex: 1;
}

.lidar-metadata-section-body {
  padding: 12px;
  border-top: 1px solid #e0e0e0;
}

.lidar-metadata-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 12px;
}

.lidar-metadata-label {
  color: #666;
  font-weight: 500;
}

.lidar-metadata-value {
  color: #333;
  text-align: right;
  max-width: 60%;
  word-break: break-all;
}

.lidar-metadata-subheader {
  font-size: 11px;
  font-weight: 600;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 12px 0 6px 0;
  padding-top: 8px;
  border-top: 1px dashed #e0e0e0;
}

.lidar-metadata-subheader:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.lidar-metadata-wkt {
  margin-top: 8px;
}

.lidar-metadata-copy-btn {
  display: block;
  margin-bottom: 8px;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 500;
  background: #159895;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.lidar-metadata-copy-btn:hover {
  background: #128784;
}

.lidar-metadata-code {
  background: #f5f5f5;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 10px;
  font-family: 'Monaco', 'Consolas', monospace;
  font-size: 10px;
  max-height: 200px;
  overflow: auto;
  white-space: pre;
  margin: 0;
}

.lidar-metadata-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.lidar-metadata-table th,
.lidar-metadata-table td {
  padding: 6px 8px;
  text-align: left;
  border-bottom: 1px solid #e0e0e0;
}

.lidar-metadata-table th {
  background: #f8f9fa;
  font-weight: 600;
  color: #555;
}

.lidar-metadata-table tr:last-child td {
  border-bottom: none;
}

/* ==================== Cross-Section Panel ==================== */
.lidar-crosssection-section {
  margin-top: 8px;
}

.lidar-section-collapsible {
  display: flex;
  align-items: center;
  gap: 6px;
}

.lidar-section-toggle {
  font-size: 10px;
  color: #888;
  width: 12px;
}

.lidar-section-body {
  padding: 8px 0;
}

.lidar-crosssection-panel {
  padding: 8px 0;
}

.lidar-crosssection-header {
  font-size: 12px;
  font-weight: 600;
  color: #555;
  margin-bottom: 8px;
  display: none; /* Hide since section header already shows title */
}

.lidar-crosssection-controls {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.lidar-crosssection-draw,
.lidar-crosssection-clear {
  flex: 1;
  padding: 6px 12px;
  font-size: 11px;
}

.lidar-crosssection-draw.active {
  background: #e3f2fd;
  color: #1565c0;
  border: 1px solid #90caf9;
}

.lidar-crosssection-chart {
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  margin: 10px 0;
  overflow: hidden;
}

.lidar-profile-chart-container {
  position: relative;
  background: #fff;
}

.lidar-profile-chart {
  display: block;
}

.lidar-profile-tooltip {
  position: absolute;
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 11px;
  pointer-events: none;
  z-index: 100;
  white-space: nowrap;
  line-height: 1.5;
}

.lidar-crosssection-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 12px;
  padding: 8px;
  background: #f8f9fa;
  border-radius: 4px;
  font-size: 11px;
}

.lidar-crosssection-stat {
  display: flex;
  justify-content: space-between;
}

.lidar-crosssection-stat-label {
  color: #666;
}

.lidar-crosssection-stat-value {
  font-weight: 500;
  color: #333;
}

/* ==================== Chart Popup ==================== */
.lidar-chart-popup-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lidar-chart-popup {
  position: relative;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  width: 750px;
  height: 520px;
  max-width: 95vw;
  max-height: 95vh;
  display: flex;
  flex-direction: column;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.lidar-chart-popup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid #e0e0e0;
  background: #f8f9fa;
  border-radius: 8px 8px 0 0;
  flex-shrink: 0;
}

.lidar-chart-popup-title {
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

.lidar-chart-popup-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #999;
  cursor: pointer;
  padding: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  line-height: 1;
}

.lidar-chart-popup-close:hover {
  background: #e0e0e0;
  color: #333;
}

.lidar-chart-popup-content {
  flex: 1;
  padding: 16px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lidar-chart-popup-stats {
  display: flex;
  gap: 24px;
  padding: 12px 16px;
  background: #f8f9fa;
  border-top: 1px solid #e0e0e0;
  font-size: 13px;
  color: #555;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.lidar-chart-popup-stats span {
  white-space: nowrap;
}

.lidar-chart-popup-resize {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 20px;
  height: 20px;
  cursor: nwse-resize;
  background: linear-gradient(135deg, transparent 50%, #ccc 50%, #ccc 60%, transparent 60%, transparent 70%, #ccc 70%, #ccc 80%, transparent 80%);
  border-radius: 0 0 8px 0;
}

.lidar-chart-popup-resize:hover {
  background: linear-gradient(135deg, transparent 50%, #999 50%, #999 60%, transparent 60%, transparent 70%, #999 70%, #999 80%, transparent 80%);
}
/*$vite$:1*/