/* The command workspace shares the institute's typography and colour tokens. */
#smartCommandDialog {
  box-sizing: border-box;
  width: min(780px, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
  max-height: calc(100dvh - 24px);
  margin: auto;
  padding: 24px;
  border: 1px solid var(--iveacer-border, #dce6df);
  border-radius: 10px;
  color: var(--iveacer-text-main, #1e293b);
  background: var(--iveacer-surface, #fff);
  box-shadow: 0 24px 90px #09251342;
  overflow-x: hidden;
  overflow-y: auto;
  font-family: var(--iveacer-font-body, 'Prompt', 'Sarabun', sans-serif);
  font-size: 16px;
  line-height: 1.7;
  overscroll-behavior: contain;
}
#smartCommandDialog *, #smartCommandDialog *::before, #smartCommandDialog *::after { box-sizing: border-box; }
#smartCommandDialog::backdrop { background: #08240f80; }
#smartCommandDialog [hidden] { display: none !important; }
#smartCommandDialog :is(input,button) { font-family: inherit; }
#smartCommandDialog :is(a,button,input):focus-visible { outline: 3px solid var(--iveacer-focus, #b8941f); outline-offset: 3px; }
#smartCommandDialog > :first-child { margin-top: 0; }
#smartCommandDialog h2 { margin: 0; color: var(--iveacer-heading, #14381e); font-size: 24px; line-height: 1.5; letter-spacing: -.02em; }
#smartCommandDialog .smart-command-heading,
#smartCommandDialog .smart-command-header { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 18px; }
#smartCommandClose { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; min-width: 44px; min-height: 44px; padding: 8px; border: 0; border-radius: 4px; color: var(--iveacer-text-muted, #53665b); background: transparent; font-size: 14px; cursor: pointer; }
#smartCommandClose:hover { background: var(--iveacer-surface-soft, #f1f8f4); color: var(--iveacer-heading, #14381e); }
#smartCommandForm { margin: 0; }
.smart-command-input-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.smart-command-input-row > .bi { flex: 0 0 auto; color: var(--iveacer-text-muted, #53665b); font-size: 16px; }
#smartCommandInput { display: block; width: 100%; min-width: 0; min-height: 54px; padding: 12px 14px; border: 1px solid var(--iveacer-border, #dce6df); border-radius: 5px; color: var(--iveacer-text-main, #1e293b); background: var(--iveacer-surface-soft, #f1f8f4); font-size: 16px; line-height: 1.7; }
#smartCommandInput::placeholder { color: var(--iveacer-text-muted, #53665b); opacity: 1; }
.smart-command-input-row #smartCommandInput { flex: 1; }
#smartCommandDialog .smart-command-keyboard { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--iveacer-border, #dce6df); color: var(--iveacer-text-muted, #53665b); font-size: 14px; }
#smartCommandDialog :is(label,.smart-command-hint,.smart-command-footer) { font-size: 14px; }
#smartCommandStatus { margin: 14px 0 8px; color: var(--iveacer-text-muted, #53665b); font-size: 14px; line-height: 1.7; }
#smartCommandResults { max-height: min(48dvh, 440px); margin: 0; padding: 0; list-style: none; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; scrollbar-gutter: stable; }
#smartCommandResults > li { margin: 0; padding: 0; list-style: none; }
#smartCommandResults .smart-command-result { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; width: 100%; min-width: 0; min-height: 64px; padding: 14px 12px; border: 0; border-bottom: 1px solid var(--iveacer-border, #dce6df); border-radius: 0; color: var(--iveacer-text-main, #1e293b); background: transparent; text-decoration: none; transition: background-color 180ms ease-out, color 180ms ease-out; }
#smartCommandResults .smart-command-result:is(:hover,.is-active,[aria-selected='true']) { color: var(--iveacer-heading, #14381e); background: var(--iveacer-surface-subtle, #e8f5e9); }
#smartCommandResults .smart-command-result-copy { display: block; flex: 1; min-width: 0; }
#smartCommandResults .smart-command-label { display: block; margin: 0; font-size: 16px; font-weight: 600; line-height: 1.7; overflow-wrap: anywhere; }
#smartCommandResults .smart-command-description { display: -webkit-box; margin-top: 3px; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; color: var(--iveacer-text-muted, #53665b); font-size: 14px; line-height: 1.7; overflow-wrap: anywhere; }
#smartCommandResults .smart-command-kind { flex: 0 0 auto; max-width: 110px; padding-top: 2px; color: var(--iveacer-text-muted, #53665b); background: transparent; font-size: 14px; line-height: 1.7; text-align: right; }
#smartCommandAnswer { max-width: 65ch; margin: 18px 0 0; padding: 16px 0 0; border-top: 1px solid var(--iveacer-border, #dce6df); color: var(--iveacer-text-main, #1e293b); font-size: 16px; line-height: 1.8; white-space: pre-line; overflow-wrap: break-word; }
#smartCommandAsk { display: inline-flex; justify-content: center; align-items: center; min-height: 44px; margin-top: 16px; padding: 9px 16px; border: 1px solid var(--iveacer-brand-green, #1e4d2b); border-radius: 4px; color: var(--iveacer-on-brand, #fff); background: var(--iveacer-brand-green, #1e4d2b); font-size: 14px; line-height: 1.7; cursor: pointer; transition: background-color 180ms ease-out, border-color 180ms ease-out; }
#smartCommandAsk:hover { background: var(--iveacer-brand-deep, #14381e); border-color: var(--iveacer-brand-deep, #14381e); }
#smartCommandAsk:disabled { opacity: .65; cursor: wait; }
.smart-command-input-row #smartCommandAsk { flex: 0 0 auto; margin-top: 0; }
#smartCommandPrivacy { max-width: 65ch; margin: 12px 0 0; color: var(--iveacer-text-muted, #53665b); font-size: 14px; line-height: 1.7; }
@media (max-width: 600px) {
  #smartCommandDialog { padding: 18px 14px; border-radius: 7px; }
  #smartCommandDialog .smart-command-heading,
  #smartCommandDialog .smart-command-header { gap: 10px; margin-bottom: 14px; }
  #smartCommandResults { max-height: min(44dvh, 360px); }
  #smartCommandResults .smart-command-result { gap: 10px; padding: 12px 8px; }
  #smartCommandResults .smart-command-kind { max-width: 75px; }
  .smart-command-input-row { flex-wrap: wrap; }
  .smart-command-input-row > .bi { display: none; }
  .smart-command-input-row #smartCommandAsk { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  #smartCommandDialog *, #smartCommandDialog *::before, #smartCommandDialog *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
