/* public/static/navisworks-pro.css — Autodesk Navisworks Freedom 2025 1:1 정밀 복제 스타일 */

:root {
  --nw-title-bg: #222222;
  --nw-tab-header-bg: linear-gradient(180deg, #383838 0%, #292929 100%);
  --nw-tab-active-bg: #e6e6e6;
  --nw-ribbon-bg: linear-gradient(180deg, #f5f5f5 0%, #e8e8e8 60%, #dedede 100%);
  --nw-ribbon-border: #bcbcbc;
  --nw-panel-border: #c8c8c8;
  --nw-text-dark: #202020;
  --nw-text-dim: #555555;
  --nw-dock-bg: #f0f0f0;
  --nw-dock-head-bg: linear-gradient(180deg, #e4e4e4 0%, #d4d4d4 100%);
  --nw-btn-hover: #d2e4f5;
  --nw-btn-active: #b8d4f0;
  --nw-accent-blue: #0072c6;
  --nw-green-light: #52c41a;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body.navis-freedom-root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Malgun Gothic", 맑은 고딕, sans-serif;
  font-size: 11px;
  color: var(--nw-text-dark);
  background: #000000;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  user-select: none;
}

/* ── 1. 최상단 타이틀 바 (Autodesk Navisworks Freedom 2025) ── */
#nw-top-titlebar {
  height: 26px;
  background: var(--nw-title-bg);
  color: #dcdcdc;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
  border-bottom: 1px solid #181818;
}

.nw-title-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nw-brand-icon {
  width: 18px;
  height: 18px;
  background: #0072c6;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  color: #ffffff;
  font-size: 11px;
  letter-spacing: -0.5px;
}

.nw-quick-tools {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-left: 4px;
}

.nw-qtool-btn {
  background: transparent;
  border: none;
  color: #bfbfbf;
  width: 20px;
  height: 20px;
  border-radius: 2px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
}

.nw-qtool-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

.nw-title-center {
  font-size: 11.5px;
  font-weight: 500;
  color: #cccccc;
  letter-spacing: 0.1px;
}

.nw-title-center b {
  color: #ffffff;
}

.nw-title-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nw-search-box {
  height: 18px;
  background: #333333;
  border: 1px solid #484848;
  border-radius: 2px;
  padding: 0 6px;
  color: #eee;
  font-size: 10px;
  width: 120px;
}

/* ── 2. 리본 탭 헤더 (다크 차콜) ── */
#nw-ribbon-tab-bar {
  background: var(--nw-tab-header-bg);
  display: flex;
  align-items: flex-end;
  padding: 3px 6px 0 6px;
  gap: 2px;
  border-bottom: 1px solid var(--nw-ribbon-border);
}

.nw-tab {
  background: transparent;
  border: 1px solid transparent;
  border-bottom: none;
  color: #cfcfcf;
  padding: 4px 12px 5px 12px;
  font-size: 11px;
  cursor: pointer;
  border-radius: 3px 3px 0 0;
  transition: all 0.1s ease;
}

.nw-tab:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.nw-tab.active {
  background: var(--nw-tab-active-bg);
  color: #111111;
  font-weight: 600;
  border-color: var(--nw-ribbon-border);
  box-shadow: 0 -1px 2px rgba(0,0,0,0.15);
  margin-bottom: -1px;
  z-index: 2;
}

/* ── 3. 리본 패널 컨테이너 (정통 Navisworks 라이트 그레이) ── */
#nw-ribbon-body {
  height: 88px;
  background: var(--nw-ribbon-bg);
  border-bottom: 1px solid #b5b5b5;
  display: flex;
  align-items: stretch;
  padding: 3px 6px 4px 6px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.12);
  overflow-x: auto;
}

.nw-rpanel {
  display: none;
  align-items: stretch;
  gap: 4px;
  width: 100%;
}

.nw-rpanel.active {
  display: flex;
}

.nw-rgroup {
  border: 1px solid var(--nw-panel-border);
  background: rgba(255, 255, 255, 0.45);
  border-radius: 3px;
  display: flex;
  flex-direction: column;
  padding: 2px 5px 1px 5px;
  margin-right: 2px;
}

.nw-rgroup-items {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 4px;
}

.nw-rgroup-label {
  font-size: 10px;
  color: var(--nw-text-dim);
  text-align: center;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  padding-top: 1px;
  margin-top: 1px;
  white-space: nowrap;
}

/* 리본 버튼 (큰 버튼) */
.nw-rbtn-big {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 3px;
  height: 60px;
  min-width: 46px;
  padding: 2px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  transition: all 0.1s ease;
}

.nw-rbtn-big:hover {
  background: var(--nw-btn-hover);
  border-color: #92bce5;
}

.nw-rbtn-big:active, .nw-rbtn-big.active {
  background: var(--nw-btn-active);
  border-color: #6da2d6;
}

.nw-rbtn-big i {
  font-size: 18px;
  color: #2b5797;
}

.nw-rbtn-big span {
  font-size: 10px;
  color: #1a1a1a;
  text-align: center;
  line-height: 1.1;
  word-break: keep-all;
}

/* 리본 작은 버튼/행 */
.nw-rbtn-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nw-rbtn-small {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 2px;
  height: 18px;
  padding: 0 6px;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  cursor: pointer;
  color: #222;
  white-space: nowrap;
}

.nw-rbtn-small:hover {
  background: var(--nw-btn-hover);
  border-color: #92bce5;
}

.nw-rbtn-small i {
  color: #2b5797;
  font-size: 10px;
}

/* ── 4. 메인 워크스페이스 (좌측 2단 독 + 중앙 칠흑 3D 뷰포트) ── */
#nw-workspace {
  flex: 1;
  display: flex;
  position: relative;
  overflow: hidden;
  background: #000000;
}

/* 좌측 도킹 패널 (단면 평면 설정 + 선택 트리 2단 구조) */
#nw-left-dock {
  width: 250px;
  background: var(--nw-dock-bg);
  border-right: 1px solid #999999;
  display: flex;
  flex-direction: column;
  z-index: 10;
  box-shadow: 2px 0 6px rgba(0,0,0,0.25);
}

/* 상단 1단: 단면 평면 설정 패널 */
#nw-dock-sectioning {
  height: 210px;
  border-bottom: 1px solid #a8a8a8;
  display: flex;
  flex-direction: column;
  background: #f7f7f7;
}

.nw-dock-header {
  height: 22px;
  background: var(--nw-dock-head-bg);
  border-bottom: 1px solid #b8b8b8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
  font-weight: 700;
  font-size: 11px;
  color: #282828;
}

.nw-dock-header-actions button {
  background: transparent;
  border: none;
  cursor: pointer;
  color: #666;
  font-size: 10px;
}

.nw-dock-header-actions button:hover {
  color: #000;
}

.nw-section-body {
  padding: 6px 8px;
  overflow-y: auto;
  flex: 1;
  font-size: 11px;
}

.nw-sec-opt-group {
  margin-bottom: 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid #e2e2e2;
}

.nw-sec-opt-title {
  font-size: 10px;
  color: #666;
  margin-bottom: 4px;
}

.nw-planes-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.nw-plane-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 4px;
  border-radius: 2px;
  background: #ffffff;
  border: 1px solid #dcdcdc;
  font-size: 10.5px;
}

.nw-plane-item:hover {
  background: #eef6ff;
  border-color: #a4c9ee;
}

.nw-plane-item .left {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nw-plane-bulb {
  color: #bbbbbb;
  cursor: pointer;
  font-size: 12px;
  transition: color 0.15s ease;
}

.nw-plane-bulb.on {
  color: #52c41a; /* 마스터 사진 속 녹색 램프 */
  text-shadow: 0 0 4px rgba(82, 196, 26, 0.6);
}

/* 하단 2단: 선택 트리 (Selection Tree) 패널 */
#nw-dock-tree {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #ffffff;
}

.nw-tree-toolbar {
  padding: 4px 6px;
  background: #f0f0f0;
  border-bottom: 1px solid #d4d4d4;
  display: flex;
  align-items: center;
  gap: 4px;
}

.nw-tree-select {
  height: 20px;
  border: 1px solid #b4b4b4;
  background: #fff;
  border-radius: 2px;
  font-size: 10px;
  padding: 0 4px;
  flex: 1;
}

.nw-tree-content {
  flex: 1;
  overflow-y: auto;
  padding: 4px 6px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 11px;
}

.nw-tree-node {
  padding: 2px 0 2px 14px;
  cursor: pointer;
  white-space: nowrap;
}

.nw-tree-node:hover {
  background: #e6f2ff;
}

.nw-tree-node.selected {
  background: #bcdcfa;
  color: #0c3664;
  font-weight: 600;
}

.nw-tree-node i {
  margin-right: 4px;
  font-size: 11px;
}

/* ── 5. 중앙 3D 뷰포트 (순수 칠흑 블랙 배경) ── */
#nw-viewport-wrapper {
  flex: 1;
  position: relative;
  width: 100%;
  height: 100%;
  background: #000000; /* 마스터 사진 100% 동일 딥 블랙 */
}

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

/* 좌측 하단 Autodesk WCS 3축 삼각뿔 나침반 (Triad Indicator) */
#nw-triad-compass {
  position: absolute;
  bottom: 14px;
  left: 14px;
  width: 54px;
  height: 54px;
  pointer-events: none;
  z-index: 15;
}

.nw-triad-base {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(60,60,60,0.6) 0%, rgba(20,20,20,0.8) 100%);
  border: 1px solid rgba(255,255,255,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.6);
  position: relative;
}

.nw-axis-x { position: absolute; right: 6px; top: 22px; color: #ff4d4f; font-weight: 900; font-size: 10px; }
.nw-axis-y { position: absolute; top: 4px; left: 20px; color: #52c41a; font-weight: 900; font-size: 10px; }
.nw-axis-z { position: absolute; bottom: 6px; left: 10px; color: #1890ff; font-weight: 900; font-size: 10px; }

/* 우측 상단 Autodesk ViewCube */
#nw-viewcube-box {
  position: absolute;
  top: 14px;
  right: 48px;
  width: 86px;
  height: 86px;
  z-index: 15;
}

/* 우측 세로형 SteeringWheels & Nav Bar */
#nw-navbar-vertical {
  position: absolute;
  top: 110px;
  right: 12px;
  width: 26px;
  background: rgba(35, 35, 35, 0.75);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 0;
  gap: 6px;
  z-index: 15;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.nw-nav-btn {
  width: 20px;
  height: 20px;
  background: transparent;
  border: none;
  color: #cccccc;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 11px;
}

.nw-nav-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

/* ── 6. 하단 상태 바 ── */
#nw-statusbar {
  height: 20px;
  background: #2b2b2b;
  border-top: 1px solid #1c1c1c;
  display: flex;
  align-items: center;
  padding: 0 10px;
  font-size: 10px;
  color: #b0b0b0;
  gap: 16px;
}

.nw-sb-item { display: flex; align-items: center; gap: 4px; }
.nw-sb-item.grow { flex: 1; }
.nw-sb-item b { color: #ffffff; }

/* 모든 팝업 모달, 드래그 오버레이 및 불필요한 AI 패널 완전 숨김 보장 */
.hidden,
#drop-overlay.hidden,
#scan-modal.hidden,
#drawing-modal.hidden,
#ai-insight-panel {
  display: none !important;
}

/* ── 7. SolidCraft & AM 스타일 3D 뷰포트 플로팅 모델링 도크 ── */
.dock-btn {
  background: #21262d;
  color: #c9d1d9;
  border: 1px solid #30363d;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.dock-btn:hover {
  background: #30363d;
  color: #ffffff;
  border-color: #8b949e;
}
.dock-btn.primary {
  background: #1f6feb;
  color: #ffffff;
  border-color: #388bfd;
}
.dock-btn.primary:hover {
  background: #388bfd;
}
.dock-btn.accent {
  color: #58a6ff;
  border-color: #1f6feb;
}
.dock-btn.accent:hover {
  background: #1f6feb;
  color: #ffffff;
}
.dock-btn.danger {
  color: #f85149;
  border-color: #da3633;
}
.dock-btn.danger:hover {
  background: #da3633;
  color: #ffffff;
}

.seat-card {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 6px;
  padding: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.seat-card:hover {
  border-color: #58a6ff;
  background: #21262d;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}
.seat-card-title {
  font-weight: 700;
  font-size: 12px;
  color: #58a6ff;
}
.seat-card-desc {
  font-size: 10px;
  color: #8b949e;
}
.seat-card-badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 3px;
  background: #238636;
  color: #fff;
  font-size: 9px;
  font-weight: 600;
  align-self: flex-start;
}
