/* ==========================================================================
   400x420mm 제어판 SVG 보드 전용 스타일
   ========================================================================== */

.board-stage-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 600px;
  background: radial-gradient(circle at center, #1e293b 0%, #0b0f17 100%);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  padding: 10px;
  overflow: hidden;
  position: relative;
  cursor: grab;
}

.board-stage-container.panning {
  cursor: grabbing;
}

.board-view-wrapper {
  width: 100%;
  max-width: 720px;
  display: flex;
  justify-content: center;
  align-items: center;
  transform-origin: center center;
  transition: transform 0.15s ease-out;
  user-select: none;
}

#board-svg {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 20px 25px -5px rgba(0, 0, 0, 0.5));
  user-select: none;
}

/* 부품 호버 및 인터랙션 */
.component {
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.component:hover {
  filter: brightness(1.15) drop-shadow(0 0 6px rgba(56, 189, 248, 0.6));
}

/* 단자 나사 호버 */
.terminal-screw {
  cursor: crosshair;
  transition: all 0.15s;
}

.terminal-screw:hover circle {
  fill: #facc15 !important;
  stroke: #ca8a04 !important;
  r: 3.8px !important;
}

.terminal-screw:hover text {
  fill: #ffffff !important;
  font-weight: 900 !important;
}

/* 차단기 레버 인터랙션 */
.clickable-lever:hover {
  fill: #ffffff;
  stroke: #38bdf8;
}

/* 마스킹 테이프 흔들림 효과 */
.masking-tape {
  pointer-events: none;
}

/* 제도선 반짝임 효과 */
#drafting-lines-layer line {
  stroke-linecap: round;
}

/* 툴팁 스타일 */
.comp-tooltip {
  position: absolute;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid var(--accent-blue);
  color: #ffffff;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  pointer-events: none;
  z-index: 999;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  display: none;
}

/* ==========================================================================
   4단계 보조회로 결선 방향성 & 순번 뱃지 스타일
   ========================================================================== */

/* 진행 방향 화살표 마커 */
.aux-direction-arrow {
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.aux-direction-arrow polygon {
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.7));
}

/* 단자 결선 순서 번호 뱃지 (①, ②, ③...) */
.aux-order-badge {
  pointer-events: none;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.8));
  animation: aux-badge-pop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes aux-badge-pop {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* 보조회로 작업 방향 전류/신호 흐름 애니메이션 */
@keyframes auxFlowAnimation {
  0% {
    stroke-dashoffset: 32;
  }
  100% {
    stroke-dashoffset: 0;
  }
}

.aux-wire-flowing {
  stroke-dasharray: 4, 8;
  animation: auxFlowAnimation 1.2s linear infinite;
}

