/* Measurement Tools Styles */

/* Length Measurement */
/* Measurement Tools Styles */
.measurement-line { stroke: var(--measurement-yellow); stroke-width: 2px; }
.measurement-point { fill: var(--measurement-yellow); }
.measurement-label, .area-label, .section-label { position: absolute; background: rgba(0, 0, 0, 0.8); color: var(--bg-surface); padding: 4px 8px; border-radius: 4px; font-size: var(--font-size-base); pointer-events: none; z-index: 100; white-space: nowrap; }
.area-annotation, .section-indicator { position: absolute; pointer-events: none; z-index: 99; }
.section-plane { position: absolute; pointer-events: none; z-index: 98; }
.section-active { stroke: var(--measurement-orange); stroke-width: 2px; fill: rgba(255, 152, 0, 0.2); }
.section-inactive { stroke: var(--gray-400); stroke-width: 1px; fill: rgba(0, 0, 0, 0.1); stroke-dasharray: 5, 5; }
.section-arrow { stroke: var(--measurement-orange); stroke-width: 2px; }
.direction-indicator { position: absolute; pointer-events: none; z-index: 97; }
.btn-save-view { margin: 12px 16px; padding: 8px 16px; background: var(--measurement-purple); color: var(--bg-surface); border: none; border-radius: 4px; cursor: pointer; font-size: var(--font-size-base); font-weight: 500; transition: background 0.2s; }
.btn-save-view:hover { background: var(--measurement-purple-dark); }
.views-list-panel { flex: 1; overflow-y: auto; padding: 0 16px 16px; }
.view-item { margin-bottom: 12px; border: 1px solid var(--gray-200); border-radius: 8px; overflow: hidden; transition: box-shadow 0.2s; }
.view-item:hover { box-shadow: var(--shadow); }
.view-thumbnail { width: 100%; height: 120px; object-fit: contain; background: var(--gray-900); border-radius: 4px; margin-bottom: 8px; }
.view-thumbnail-placeholder { width: 100%; height: 120px; background: var(--gray-100); border-radius: 4px; margin-bottom: 8px; display: flex; align-items: center; justify-content: center; color: var(--gray-400); }
.view-item-content { padding: 8px 12px; }
.view-item-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.view-item-name { font-weight: 600; font-size: var(--font-size-md); color: var(--gray-700); }
.view-item-annotation-badge { font-size: var(--font-size-xs); background: var(--color-success-bg); color: var(--color-success); padding: 2px 6px; border-radius: 4px; }
.view-item-date { font-size: var(--font-size-xs); color: var(--gray-400); margin-bottom: 8px; }
.view-item-actions { display: flex; gap: 8px; }
.btn-load-view { flex: 1; padding: 6px 12px; background: var(--measurement-purple); color: var(--bg-surface); border: none; border-radius: 4px; cursor: pointer; font-size: var(--font-size-base); transition: background 0.2s; }
.btn-load-view:hover { background: var(--measurement-purple-dark); }
.btn-delete-view { padding: 6px 12px; background: var(--color-danger); color: var(--bg-surface); border: none; border-radius: 4px; cursor: pointer; font-size: var(--font-size-base); transition: background 0.2s; }
.btn-delete-view:hover { background: var(--color-danger-dark); }
.views-empty-state { text-align: center; padding: 30px; color: var(--gray-500); }
.views-empty-state p { margin: 0; }
.views-empty-state .hint { margin: 8px 0 0; font-size: var(--font-size-base); }
.views-panel-container { position: absolute; top: 60px; right: 10px; width: 320px; max-height: 70vh; background: var(--bg-surface); border-radius: 8px; box-shadow: var(--shadow-lg); z-index: 1000; overflow: hidden; display: none; flex-direction: column; }
.views-panel-header { padding: 16px; border-bottom: 1px solid var(--gray-200); display: flex; justify-content: space-between; align-items: center; background: var(--gray-50); }
.views-panel-title { margin: 0; font-size: var(--font-size-xl); font-weight: 600; color: var(--gray-700); }
.views-panel-close { background: none; border: none; font-size: var(--font-size-xxxl); cursor: pointer; color: var(--gray-500); padding: 0; line-height: 1; }
.views-panel-close:hover { color: var(--gray-700); }
.save-view-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.5); display: flex; align-items: center; justify-content: center; z-index: 2000; }
.save-view-overlay { z-index: 10002; pointer-events: auto; }
.save-view-dialog { background: var(--bg-surface); border-radius: 12px; padding: 24px; width: 400px; max-width: 90%; box-shadow: var(--shadow-lg); }
.dialog-title { margin: 0 0 16px 0; font-size: var(--font-size-xxl); font-weight: 600; color: var(--gray-700); }
.dialog-description { margin: 0 0 12px 0; font-size: var(--font-size-md); color: var(--gray-500); }
.dialog-input { width: 100%; padding: 12px; border: 1px solid var(--border-color); border-radius: 6px; font-size: var(--font-size-md); box-sizing: border-box; margin-bottom: 16px; }
.dialog-input:focus { outline: none; border-color: var(--measurement-purple); }
.dialog-buttons { display: flex; gap: 12px; justify-content: flex-end; }
.dialog-btn { padding: 10px 20px; border: none; border-radius: 6px; cursor: pointer; font-size: var(--font-size-md); transition: background 0.2s; }
.dialog-btn-cancel { border: 1px solid var(--border-color); background: var(--bg-surface); color: var(--gray-500); }
.dialog-btn-cancel:hover { background: var(--gray-100); }
.dialog-btn-save { background: var(--measurement-purple); color: var(--bg-surface); }
.dialog-btn-save:hover { background: var(--measurement-purple-dark); }
.measurement-length-container, .measurement-area-container, .section-tool-container { display: none; gap: 10px; align-items: center; position: absolute; left: 50%; transform: translateX(-50%); }
.measurement-btn { padding: 10px 20px; border: none; border-radius: 6px; cursor: pointer; font-size: var(--font-size-md); transition: background 0.2s; }
.measurement-btn-confirm { background: var(--measurement-purple); color: var(--bg-surface); }
.measurement-btn-confirm:hover { background: var(--measurement-purple-dark); }
.measurement-btn-reset { background: var(--color-danger); color: white; }
.measurement-btn-reset:hover { background: var(--color-danger-dark); }
.measurement-btn-finish { background: var(--color-success); color: white; }
.measurement-btn-finish:hover { background: var(--color-success-dark); }
.section-tool-instruction { background: rgba(0, 0, 0, 0.8); color: white; padding: 8px 12px; border-radius: 4px; font-size: var(--font-size-base); pointer-events: none; white-space: nowrap; }
.section-plane-selector { padding: 8px 12px; border: 1px solid var(--border-color); border-radius: 4px; font-size: var(--font-size-base); background: var(--bg-surface); cursor: pointer; }
.section-tool-btn { padding: 8px 16px; border: none; border-radius: 4px; cursor: pointer; font-size: var(--font-size-base); transition: background 0.2s; }
.section-btn-add { background: var(--measurement-purple); color: var(--bg-surface); }
.section-btn-add:hover { background: var(--measurement-purple-dark); }
.section-btn-flip { background: var(--color-warning); color: white; }
.section-btn-flip:hover { background: var(--color-warning-dark); }
.section-btn-rotate { background: var(--color-primary); color: white; }
.section-btn-rotate:hover { background: var(--color-primary-dark); }
.section-btn-clear { background: var(--color-danger); color: white; }
.section-btn-clear:hover { background: var(--color-danger-dark); }

.measurement-point {
  fill: var(--measurement-yellow);
}

.measurement-label {
  position: absolute;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: var(--font-size-base);
  pointer-events: none;
  z-index: 100;
  white-space: nowrap;
}

/* Area Measurement */
.area-label {
  position: absolute;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: var(--font-size-base);
  pointer-events: none;
  z-index: 100;
  white-space: nowrap;
}

.area-annotation {
  position: absolute;
  pointer-events: none;
  z-index: 99;
}

/* Section Tool */
.section-label {
  position: absolute;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: var(--font-size-base);
  pointer-events: none;
  z-index: 100;
  white-space: nowrap;
}

.section-indicator {
  position: absolute;
  pointer-events: none;
  z-index: 99;
}

/* Section planes */
.section-plane {
  position: absolute;
  pointer-events: none;
  z-index: 98;
}

.section-active {
  stroke: var(--measurement-orange);
  stroke-width: 2px;
  fill: rgba(255, 152, 0, 0.2);
}

.section-inactive {
  stroke: var(--gray-500);
  stroke-width: 1px;
  fill: rgba(0, 0, 0, 0.1);
  stroke-dasharray: 5, 5;
}

.section-arrow {
  stroke: var(--measurement-orange);
  stroke-width: 2px;
}

/* Direction indicators */
.direction-indicator {
  position: absolute;
  pointer-events: none;
  z-index: 97;
}

