/* SchoolCAD: the Assembly workspace and the workspace tabs (assembly-ui.js). */

/* workspace tabs, bottom left of the status bar (as in Onshape) */
.ws-tabs { display: flex; gap: 2px; align-self: stretch; margin: -5px 0; }
.ws-tab { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border: 1px solid transparent; border-top: 0; border-radius: 0 0 6px 6px; background: none; color: var(--muted); font: 500 12px var(--font-ui); cursor: pointer; }
.ws-tab .ti { width: 15px; height: 15px; display: inline-grid; }
.ws-tab .ti svg { width: 15px; height: 15px; }
.ws-tab:hover { color: var(--ink); background: var(--panel-2); }
.ws-tab[aria-selected="true"] { color: var(--ink); background: var(--bg); border-color: var(--line); box-shadow: inset 0 2px 0 var(--accent); font-weight: 600; }

/* the assembly takes the left panel and the toolbar; the Part workspace's stay as they were underneath */
.asm-tree { display: none; }
.ws-asm .ftree > .tree-sec { display: none; }
.ws-asm .asm-tree { display: block; }
.ws-asm #explode-wrap { display: none; }
.asm-tree .features li .jval { margin-left: auto; font: 11px var(--font-mono); color: var(--muted); white-space: nowrap; }
.asm-tree .features li .fname { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.asm-tree .features li .eye { margin-left: auto; }
.asm-tree .features li.empty { color: var(--muted); font-size: 12px; padding-left: 12px; cursor: default; }
.asm-tree .features li.feat-msg { padding-left: 37px; }
.asm-scrub { display: flex; align-items: center; gap: 8px; padding: 6px 12px 2px; }
.asm-scrub input[type=range] { flex: 1; min-width: 0; accent-color: var(--accent); }

/* the joint value box: type an angle or distance, or drag the slider */
.asm-jbox { left: 50%; bottom: 14px; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; padding: 6px 10px; max-width: calc(100% - 40px); }
.asm-jbox .ti { width: 18px; height: 18px; color: var(--accent); flex: none; }
.asm-jbox b { font-size: 13px; white-space: nowrap; }
.asm-jbox .fd-num { width: 70px; flex: none; }
.asm-jbox .unit { font-size: 12px; color: var(--muted); }
.asm-jbox input[type=range] { width: 170px; accent-color: var(--accent); }
.asm-jbox .lim { color: var(--muted); font-size: 11.5px; white-space: nowrap; }

/* Export menu: where the parts are placed */
.export-at { padding: 6px 10px 8px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.export-at label { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.export-at select { flex: 1; min-width: 0; padding: 4px 6px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel-2); font-size: 12.5px; color: var(--ink); }

/* bill of materials */
.bom-wrap { max-height: min(60vh, 520px); overflow: auto; border: 1px solid var(--line); border-radius: 6px; }
table.bom { width: 100%; border-collapse: collapse; font-size: 13px; }
table.bom th { position: sticky; top: 0; background: var(--panel-2); text-align: left; font: 600 11.5px var(--font-ui); text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); padding: 7px 10px; border-bottom: 1px solid var(--line); }
table.bom td { padding: 6px 10px; border-bottom: 1px solid var(--line); }
table.bom td.bom-size { font-family: var(--font-mono); font-size: 12px; white-space: nowrap; }
table.bom tbody tr:last-child td { border-bottom: 0; }

@media (max-width: 900px) { .ws-tabs { margin: 0; } .asm-jbox input[type=range] { width: 110px; } }
