/* ====================================================================
   AI CAD Studio Workspace Layout & Toolbar Styling
   ==================================================================== */

.workspace-layout {
  display: grid;
  grid-template-columns: 360px 1fr 380px;
  height: calc(100vh - 67px);
  width: 100vw;
  overflow: hidden;
  background-color: #06080f;
}

@media (max-width: 1200px) {
  .workspace-layout {
    grid-template-columns: 300px 1fr 340px;
  }
}

.pane {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border-color);
  background: rgba(11, 15, 25, 0.95);
  overflow: hidden;
}

.pane-header {
  padding: 0.85rem 1.1rem;
  background: rgba(17, 24, 39, 0.8);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pane-title {
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.pane-body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  position: relative;
}

/* 2D Canvas Viewer Pane */
#drawing-canvas-container {
  width: 100%;
  height: 100%;
  position: relative;
  background: #0d121f;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#drawing-canvas {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.dimension-pin {
  position: absolute;
  background: rgba(0, 242, 255, 0.2);
  border: 1px solid var(--accent-cyan);
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 2px 6px;
  border-radius: 4px;
  pointer-events: auto;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(0, 242, 255, 0.3);
  transition: all 0.2s ease;
}

.dimension-pin:hover {
  background: var(--accent-cyan);
  color: #000;
  transform: scale(1.1);
}

/* 3D WebGL Viewport Pane */
#viewport-3d-container {
  width: 100%;
  height: 100%;
  position: relative;
  background: radial-gradient(circle at center, #151d30 0%, #080b14 100%);
}

#viewport-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.viewport-toolbar {
  position: absolute;
  top: 16px;
  left: 16px;
  display: flex;
  gap: 8px;
  background: rgba(17, 24, 39, 0.85);
  backdrop-filter: blur(12px);
  padding: 6px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  z-index: 10;
}

.tool-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  width: 34px;
  height: 34px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: all 0.2s ease;
}

.tool-btn:hover, .tool-btn.active {
  color: var(--accent-cyan);
  background: rgba(0, 242, 255, 0.15);
}

.mass-props-overlay {
  position: absolute;
  bottom: 16px;
  left: 16px;
  background: rgba(17, 24, 39, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.mass-props-overlay strong {
  color: var(--accent-cyan);
}

/* EFG Tree Panel */
.efg-tree {
  list-style: none;
}

.tree-node {
  margin-bottom: 6px;
}

.tree-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.tree-item:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(0, 242, 255, 0.3);
}

.tree-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 500;
}

.tree-val-input {
  width: 70px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 3px 6px;
  border-radius: 4px;
  text-align: right;
}

.tree-val-input:focus {
  outline: none;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 8px rgba(0, 242, 255, 0.4);
}
