/* Laser Studio: the workspace, in the site's plain style (fonts and colours from app.css). */

.ls-app { position: absolute; inset: 0; display: flex; flex-direction: column; font: 13px/1.4 var(--ui); color: var(--ink); background: #fff; outline: none; user-select: none; -webkit-user-select: none; }
.ls-app input, .ls-app textarea, .ls-dialog { user-select: text; -webkit-user-select: text; }
.ls-app.ls-busy .ls-main { cursor: progress; }

/* menu bar */
.ls-menubar { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; padding: 4px 6px; border-bottom: 1px solid var(--line); background: #f6f7f9; }
.ls-sep { width: 1px; align-self: stretch; background: var(--line); margin: 0 4px; }
.ls-btn { font: inherit; line-height: 1.3; color: var(--ink); background: #f0f0f0; border: 1px solid #8a8a8a; border-radius: 3px; padding: 3px 10px; cursor: pointer; box-shadow: inset 0 1px 0 #fff; white-space: nowrap; }
.ls-btn:hover:not(:disabled) { background: #e3e3e3; }
.ls-btn:disabled { opacity: 0.5; cursor: default; }
.ls-btn.ls-primary { background: var(--navy); border-color: #14284a; color: #fff; font-weight: bold; box-shadow: none; }
.ls-btn.ls-primary:hover { background: var(--navy-2); }
.ls-menu { position: relative; }
.ls-menu-list { position: absolute; z-index: 20; top: 100%; left: 0; min-width: 230px; margin-top: 2px; padding: 3px 0; background: #fff; border: 1px solid #8a96a8; box-shadow: 2px 3px 8px rgba(0, 0, 0, 0.18); }
.ls-menu-item { display: flex; justify-content: space-between; gap: 18px; width: 100%; padding: 4px 12px; font: inherit; color: var(--ink); text-align: left; background: none; border: 0; cursor: pointer; }
.ls-menu-item:hover:not(:disabled), .ls-menu-item:focus { background: var(--band); outline: none; }
.ls-menu-item:disabled { color: #9a9a9a; cursor: default; }
.ls-key { color: var(--muted); font-size: 0.9em; }
.ls-menu-sep { border: 0; border-top: 1px solid var(--rule); margin: 3px 0; }

/* main area: tools | canvas | panels */
.ls-main { flex: 1 1 auto; min-height: 0; display: flex; }
.ls-toolbox { flex: none; display: flex; flex-direction: column; gap: 2px; padding: 4px; border-right: 1px solid var(--line); background: #f6f7f9; overflow-y: auto; }
.ls-tool { font: inherit; font-size: 12px; text-align: left; padding: 4px 8px; border: 1px solid transparent; border-radius: 3px; background: none; cursor: pointer; color: var(--ink); white-space: nowrap; }
.ls-tool:hover { border-color: #b9c2cf; background: #fff; }
.ls-tool[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.ls-stage { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.ls-stage-top { display: flex; align-items: center; gap: 10px; padding: 3px 8px; min-height: 30px; border-bottom: 1px solid var(--line); background: #fbfbfc; }
.ls-tool-options { display: flex; align-items: center; gap: 6px; flex: none; }
.ls-tool-options .ls-num { width: 64px; }
.ls-hint-line { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ls-canvas-wrap { position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden; touch-action: none; }
.ls-canvas-wrap.ls-drop { outline: 3px dashed var(--navy); outline-offset: -6px; }
.ls-canvas { display: block; position: absolute; inset: 0; }
.ls-empty { position: absolute; left: 50%; top: 45%; transform: translate(-50%, -50%); width: min(440px, 90%); padding: 16px 20px; background: #fff; border: 1px solid var(--line); box-shadow: 1px 2px 6px rgba(0, 0, 0, 0.08); text-align: center; pointer-events: none; }
.ls-empty button { pointer-events: auto; }
.ls-empty-title { font: bold 1.1rem/1.3 var(--serif); color: var(--navy); margin: 0 0 8px; }
.ls-palette { display: flex; flex-wrap: wrap; gap: 2px; padding: 4px 6px; border-top: 1px solid var(--line); background: #f6f7f9; }
.ls-color { width: 18px; height: 18px; padding: 0; border: 1px solid #555; cursor: pointer; }
.ls-color:hover { outline: 2px solid var(--navy); }

.ls-side { flex: none; width: 290px; overflow-y: auto; border-left: 1px solid var(--line); background: #fafbfc; }
.ls-panel { border-bottom: 1px solid var(--line); }
.ls-panel-title { margin: 0; padding: 4px 8px; font: bold 12px/1.4 var(--ui); color: var(--navy); background: var(--band); border-bottom: 1px solid var(--line); }
.ls-panel-body { padding: 8px; }
.ls-panel-body > * + * { margin-top: 6px; }
.ls-hint { color: var(--muted); font-size: 12px; margin: 4px 0 0; }
.ls-row { display: flex; flex-wrap: wrap; gap: 4px; }
.ls-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 8px; }
.ls-field { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ls-field-label { font-size: 12px; font-weight: bold; }
.ls-num, .ls-text, .ls-select, .ls-textarea { font: inherit; width: 100%; min-width: 0; padding: 2px 5px; border: 1px solid var(--field-line); border-radius: 2px; background: #fff; color: var(--ink); }
.ls-textarea { resize: vertical; }
.ls-check { display: flex; gap: 6px; align-items: flex-start; font-size: 12px; cursor: pointer; }
.ls-check input { margin: 2px 0 0; accent-color: var(--navy); }
.ls-inline { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; }
.ls-range-row { display: flex; align-items: center; gap: 6px; }
.ls-range { flex: 1; min-width: 0; accent-color: var(--navy); }
.ls-range-value { width: 3em; text-align: right; font-size: 12px; }
.ls-sel-summary { font-weight: bold; margin: 0; }

.ls-layer-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); background: #fff; }
.ls-layer { display: flex; align-items: center; gap: 6px; padding: 3px 6px; cursor: pointer; border-bottom: 1px solid #eef0f3; }
.ls-layer:last-child { border-bottom: 0; }
.ls-layer:hover { background: #f3f5f8; }
.ls-layer.ls-current { background: var(--band); outline: 1px solid #9fb1cc; }
.ls-swatch { display: inline-block; width: 12px; height: 12px; border: 1px solid #555; flex: none; vertical-align: middle; }
.ls-layer-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ls-layer-count { color: var(--muted); font-size: 11px; }
.ls-mini { display: inline-flex; align-items: center; gap: 1px; font-size: 10px; color: var(--muted); }
.ls-mini input { margin: 0; accent-color: var(--navy); }
.ls-layer-settings { border: 1px solid var(--line); background: #fff; padding: 6px; }
.ls-layer-settings > * + * { margin-top: 6px; }
.ls-job-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.ls-job-table td { padding: 2px 0; border-bottom: 1px dotted #ccd2db; }
.ls-num-cell { text-align: right; white-space: nowrap; }
.ls-total td { font-weight: bold; border-bottom: 0; }

.ls-statusbar { display: flex; gap: 12px; align-items: center; padding: 2px 8px; border-top: 1px solid var(--line); background: #f6f7f9; font-size: 12px; color: var(--muted); min-height: 22px; }
.ls-status-text { color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ls-spacer { flex: 1; }
.ls-coords, .ls-zoom { white-space: nowrap; font-family: var(--mono); }

/* dialogs */
.ls-backdrop { position: absolute; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; background: rgba(20, 30, 45, 0.25); }
.ls-dialog { width: min(440px, calc(100% - 24px)); max-height: calc(100% - 24px); overflow-y: auto; background: #fff; border: 1px solid #6f7d93; box-shadow: 3px 4px 14px rgba(0, 0, 0, 0.25); }
.ls-dialog-title { margin: 0; padding: 6px 10px; font: bold 13px/1.4 var(--ui); color: #fff; background: var(--navy); }
.ls-dialog-body { padding: 10px; }
.ls-dialog-body > * + * { margin-top: 8px; }
.ls-dialog-body p { margin: 0; }
.ls-dialog-error { margin: 0 10px; padding: 6px 8px; color: var(--bad); background: var(--bad-bg); border: 1px solid var(--bad-line); }
.ls-dialog-buttons { display: flex; justify-content: flex-end; gap: 6px; padding: 8px 10px; border-top: 1px solid var(--rule); background: #f6f7f9; }
.ls-notes { margin: 0; padding-left: 18px; }

/* tracing a picture: settings beside a preview */
.ls-dialog.ls-dialog-wide { width: min(900px, calc(100% - 24px)); }
.ls-trace { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 12px; }
.ls-trace-settings { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.ls-trace-right { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ls-trace-view { position: relative; height: 380px; border: 1px solid var(--line); background: #fff; overflow: hidden; }
.ls-trace-canvas { position: absolute; inset: 0; display: block; }
.ls-trace-status { min-height: 2.8em; margin: 0; font-size: 12px; color: var(--ink); }
.ls-trace-status.ls-bad { color: var(--bad); }

/* narrow screens: tools across the top, panels under the canvas */
@media (max-width: 760px) {
  .ls-main { flex-direction: column; overflow-y: auto; }
  .ls-toolbox { flex-direction: row; flex-wrap: wrap; border-right: 0; border-bottom: 1px solid var(--line); }
  .ls-stage { flex: none; height: 62vh; }
  .ls-side { width: auto; border-left: 0; border-top: 1px solid var(--line); overflow: visible; }
  .ls-hint-line { display: none; }
  .ls-trace { grid-template-columns: minmax(0, 1fr); }
  .ls-trace-view { height: 260px; }
}
