/* Vector editor: Layers and Artboards (left), the drawing with its rulers (centre), the AI assistant (right). */

/* Noto Sans, one of the fonts offered – the file the PDF downloads use too (vector/fonts.js), loaded only when used */
@font-face { font-family: 'Noto Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url(../vendor/fonts@1/noto-sans/NotoSans-Regular.ttf) format('truetype'); }
#main { display: flex; flex-direction: row; flex: 1; min-width: 0; min-height: 0; background: var(--panel); }

/* left: Layers and Artboards (vector/layers.js) */
#vec-left, #vec-side { min-height: 0; }
.vec-pane { display: flex; flex-direction: column; min-height: 0; overflow: auto; }
.vec-pane.grow { flex: 1; }
#vec-layers, #vec-boards { padding-bottom: 8px; }
.vec-sec { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 28px; padding: 8px 6px 2px 10px; color: var(--muted); font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.vec-note { margin: 4px 10px; }
.vec-tree { display: flex; flex-direction: column; }
.vec-lead { display: inline-flex; align-items: center; gap: 2px; }
.vec-caret { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; padding: 0; border: 0; background: none; color: var(--muted); cursor: pointer; }
.vec-caret:disabled { visibility: hidden; }
.vec-caret .material-symbols-outlined { font-size: 16px; }
.vec-kind { font-size: 16px; color: var(--muted); }
.vec-layer-colour { width: 10px; height: 10px; margin: 0 3px; background: var(--lc); border-radius: var(--radius-xs); }
.vec-row.vec-layer .lr-name { font-weight: 600; }
.vec-row.vec-layer.current { box-shadow: inset 2px 0 0 var(--prog); }

/* centre: the drawing, its rulers (vector/view.js) */
#vec-center { flex: 1; min-width: 0; display: flex; flex-direction: column; }
#vec-view { position: relative; flex: 1; min-height: 120px; overflow: hidden; outline: none; user-select: none; -webkit-user-select: none; touch-action: none; background: var(--desk); display: grid; grid-template-columns: 18px 1fr; grid-template-rows: 18px 1fr; }
#vec-view.no-rulers { grid-template-columns: 0 1fr; grid-template-rows: 0 1fr; }
#vec-view.no-rulers .vec-ruler, #vec-view.no-rulers .vec-ruler-corner { display: none; }
#vec-view:focus-visible { box-shadow: inset 0 0 0 2px var(--prog); }
.vec-ruler-corner { grid-column: 1; grid-row: 1; background: var(--panel); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.vec-ruler { display: block; background: var(--panel); cursor: copy; }
.vec-ruler-top { grid-column: 2; grid-row: 1; border-bottom: 1px solid var(--line); }
.vec-ruler-left { grid-column: 1; grid-row: 2; border-right: 1px solid var(--line); }
.vec-stage { position: relative; grid-column: 2; grid-row: 2; overflow: hidden; min-width: 0; min-height: 0; }
.vec-cv, .vec-ov { position: absolute; left: 0; top: 0; display: block; }
.vec-ov { pointer-events: none; }
#vec-view[data-tool="hand"] .vec-stage { cursor: grab; }
/* typing in place: a box laid exactly over the text */
.vec-type { position: absolute; left: 0; top: 0; margin: 0; padding: 0; border: 0; outline: 1px dashed var(--sel); background: transparent; resize: none; overflow: hidden; transform-origin: 0 0; caret-color: var(--sel); z-index: 2; }

/* the top bar's fill and stroke chips */
.vec-chip { display: inline-flex; align-items: center; justify-content: center; width: 34px; }
.vec-sw { width: 18px; height: 18px; border-radius: var(--radius-xs); border: 1px solid var(--line-strong); background: var(--sw, transparent); }
.vec-sw-stroke { box-shadow: inset 0 0 0 4px var(--sw, transparent), inset 0 0 0 5px var(--surface); background: transparent; }
.vec-sw.none { background: linear-gradient(135deg, transparent 45%, var(--danger) 45%, var(--danger) 55%, transparent 55%); box-shadow: none; }
.vec-sw.grad { background: linear-gradient(90deg, var(--text), var(--surface)); }

/* Properties: a fill or stroke, a gradient's stops (vector/props.js) */
.vec-paint { display: flex; flex-direction: column; gap: 4px; }
.vec-grad { display: flex; flex-direction: column; gap: 4px; padding: 2px 0 6px; }
.vec-gbar { position: relative; margin: 2px 10px 18px; }
.vec-gstrip { height: 18px; border-radius: var(--radius-xs); border: 1px solid var(--line-strong); cursor: copy; background-color: var(--surface); }
.vec-gstops { position: relative; height: 0; }
.vec-gstop { position: absolute; top: 2px; width: 14px; height: 14px; margin-left: -7px; padding: 0; border: 2px solid var(--surface); border-radius: var(--radius-xs); background: var(--c); box-shadow: 0 0 0 1px var(--line-strong); cursor: ew-resize; }
.vec-gstop.on { box-shadow: 0 0 0 2px var(--sel); }
.vec-gbar-row { display: none; }

/* Properties: the drawing's swatches (vector/props.js) */
.vec-swatches { display: flex; flex-wrap: wrap; gap: 6px; padding: 2px 0 4px; }
.vec-swatch { width: 22px; height: 22px; padding: 0; border-radius: var(--radius-xs); border: 1px solid var(--line-strong); background: var(--sw, transparent); cursor: pointer; }
.vec-swatch.on { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--sel); }
.vec-swatch-add { display: inline-flex; align-items: center; justify-content: center; border-style: dashed; color: var(--muted); }
.vec-swatch-add .cb-icon { font-size: 16px; }

/* Make vector art with AI (vector/ai.js) */
.vec-ai-prompt { width: 100%; }
.vec-ai-thumb canvas, .vec-ai-stage canvas { display: block; max-width: 100%; height: auto; margin: 0 auto; }
.vec-ai-stage { display: flex; align-items: center; justify-content: center; min-height: 200px; }

/* what came along from a file (vector/io.js) */
.vec-warn ul { margin: 6px 0 0 18px; padding: 0; }
.vec-warn li { margin: 3px 0; }

/* Vectorize a picture (vector/trace.js): the settings, the preview */
.vec-trace { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 16px; align-items: start; }
.vec-trace-view { display: flex; flex-direction: column; align-items: center; gap: 6px; min-height: 380px; padding: 8px; border-radius: var(--radius-s); background: var(--sunk); }
.vec-trace-cv { max-width: 100%; height: auto; box-shadow: var(--shadow); }

/* Properties: the drawing's symbols (vector/symbols.js) */
.vec-symbols { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; }
.vec-symbol { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 4px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface); cursor: pointer; }
.vec-symbol:hover { border-color: var(--line-strong); background: var(--hover-soft); }
.vec-symbol-pic { max-width: 44px; max-height: 44px; }
.vec-symbol-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-s); color: var(--text-2); }

/* typing text on a path: a box beside it (the words go along the path as they're typed) */
.vec-type.vec-type-path { background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-s); padding: 6px 8px; box-shadow: var(--shadow); color: var(--text); transform-origin: 0 0; }
