/* copy-command: reads the page tokens, with fallbacks so the demo stands alone. */
copy-command { display: inline-block; }

.copy-command {
  display: inline-flex; align-items: center; gap: 14px;
  min-height: 44px; padding: 12px 18px;
  border: 0; border-radius: 6px; cursor: pointer; white-space: nowrap;
  background: var(--signal, #1E6B57); color: var(--signal-ink, #FFFFFF);
  font: 600 .95rem/1 var(--mono, ui-monospace, monospace);
  font-variation-settings: "wdth" 87.5;
}
.copy-command:hover { background: var(--signal-hover, #185747); }
.copy-command:focus-visible { outline: 3px solid var(--paint, #E8B71A); outline-offset: 3px; }
.copy-command:active { transform: translateY(1px); }

.copy-command__text { font: inherit; user-select: all; }
.copy-command__status {
  font: 500 .8rem/1 var(--sans, system-ui, sans-serif);
  min-width: 5.5em; text-align: right;
}
.copy-command[data-state="copied"] .copy-command__status::before { content: "✓ "; }
.copy-command[data-state="failed"] { box-shadow: inset 0 0 0 2px var(--signal-ink, #FFFFFF), inset 0 0 0 4px var(--signal, #1E6B57); }

.copy-command__live {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* icon attribute: a copy glyph instead of the word, a bare tick once copied. */
copy-command[icon] .copy-command__status { min-width: 1.25em; display: inline-grid; justify-items: end; }
copy-command[icon] .copy-command[data-state="copied"] .copy-command__status::before { content: "✓"; }
.copy-command__icon { display: block; }
