/* A compact control column beside an inspection workspace. Export dimensions are
   set by the core; these rules only size the on-screen views. */
.name-tags-workspace {
  width: calc(100% - 24px);
  max-width: 1680px;
  gap: 10px;
  padding-top: 10px;
}
.name-tags-workspace .card { padding: 12px; }
.name-tags-workspace .card-head { gap: 6px 10px; margin-bottom: 8px; }
.name-tags-workspace .toolbar { gap: 6px; margin-block: 8px; }
.name-tags-workspace .settings { gap: 8px 10px; margin-top: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.name-tags-workspace .settings label { font-size: 13px; line-height: 1.35; }
.name-tags-workspace .wide-setting { grid-column: 1 / -1; }
.name-tags-workspace .settings select { width: 100%; }
.name-tags-workspace .tray-card > .settings { grid-template-columns: minmax(0, 1.35fr) minmax(0, .75fr); }
#names { display: block; width: 100%; height: 9rem; font: 13px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; resize: vertical; }
.hint { margin: 6px 0; font-size: 12px; line-height: 1.45; }
#name-count, #status, #tray-summary, #overlay-status, #logo-status { font-size: 12px; line-height: 1.4; }
#tray-summary { margin-block: 8px; }
.toolbar[hidden] { display: none; }
.settings label.check { flex-direction: row; align-items: center; gap: 6px; color: var(--text); }
.overlay { margin-top: 8px; font-size: 12px; }
.overlay summary { cursor: pointer; font-weight: 600; }
.design-notes { margin-top: 8px; font-size: 12px; }
.design-notes summary { cursor: pointer; font-weight: 600; }
.toolbar.inline { margin: 0; }
.name-tags-workspace .run-actions { margin: 0; }
.results-card > .card-head h2 { margin-right: auto; }
.results-card > .card-head #status { text-align: right; }
.preview-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin-block: 4px; font-size: 12px; }
.preview-tools select { width: auto; }
.preview-tools #preview-note { flex: 1 1 220px; line-height: 1.4; }
.sheet-choice { border: 0; padding: 0; margin: 0; }
.sheet-choice legend { padding: 0; color: var(--muted); font-size: 12px; }
.sheet-choice label { display: inline-flex; gap: 5px; align-items: center; }
.preview { margin: 6px 0; border: 1px solid var(--border); border-radius: var(--radius-sm); background: white; overflow: hidden; }
.preview svg { display: block; width: 100%; height: auto; }
.preview[data-view="tags"] { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 8px; padding: 8px; background: var(--surface-2); }
.tag-preview { min-width: 0; }
.tag-preview svg { background: white; border: 1px solid var(--border); }
.tag-caption { margin: 4px 0 0; color: var(--muted); font-size: 11px; line-height: 1.35; }
.decoration-dialog { width: min(1100px, calc(100vw - 24px)); height: min(860px, calc(100dvh - 24px)); max-width: none; max-height: none; padding: 0; border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); background: var(--surface); }
.decoration-dialog[open] { display: flex; flex-direction: column; }
.decoration-dialog::backdrop { background: rgb(0 0 0 / .45); }
.decoration-dialog-heading, .decoration-dialog-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; padding: 8px 12px; flex: 0 0 auto; }
.decoration-dialog-heading { border-bottom: 1px solid var(--border); }
.decoration-dialog-heading h2 { margin: 0; font-size: 1rem; }
.decoration-dialog-heading button { padding: 4px 10px; }
.decoration-editor-host { flex: 1 1 auto; min-height: 0; }
.decoration-editor-host iframe { display: block; width: 100%; height: 100%; border: 0; }
.decoration-dialog-footer { border-top: 1px solid var(--border); }
.decoration-dialog-footer .hint { flex: 1 1 220px; margin: 0; }
.decoration-dialog-footer .toolbar { margin: 0; }
@media (max-width: 599px) {
  .decoration-dialog { width: calc(100vw - 12px); height: calc(100dvh - 12px); }
  .decoration-dialog-footer .toolbar { margin-left: auto; }
}

@media (min-width: 760px) {
  .name-tags-workspace { grid-template-columns: 310px minmax(0, 1fr); grid-template-rows: auto auto 1fr auto; }
  .name-tags-workspace > .names-card { grid-column: 1; grid-row: 1; }
  .name-tags-workspace > .design-card { grid-column: 1; grid-row: 2; }
  .name-tags-workspace > .tray-card { grid-column: 1; grid-row: 3; }
  .name-tags-workspace > .results-card { grid-column: 2; grid-row: 1 / 4; position: sticky; top: 10px; }
  .name-tags-workspace > .method-card { grid-column: 1 / -1; grid-row: 4; }
  .name-tags-workspace .results-link { display: none; }
  .preview[data-view="tags"] { max-height: max(320px, calc(100dvh - 270px)); overflow-y: auto; }
}
@media (min-width: 1200px) {
  .name-tags-workspace { grid-template-columns: 330px minmax(0, 1fr); }
}
@media (max-width: 759px) {
  .name-tags-workspace { width: calc(100% - 16px); }
  #names { height: 8rem; }
  .preview[data-view="tags"] { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 10px; max-height: 55dvh; overflow-y: auto; }
  .preview-tools #preview-note { flex-basis: 100%; }
  .results-card > .card-head #status { flex: 1 0 100%; text-align: left; }
  .name-tags-workspace .settings label { font-size: 14px; }
}
@media (min-width: 760px) and (max-height: 500px) {
  .name-tags-workspace { grid-template-columns: 270px minmax(0, 1fr); }
  .preview[data-view="tags"] { grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: 320px; }
  .name-tags-workspace > .results-card { position: static; }
}
