/* c-playground.css — Play button + output styling for C code blocks. */

/* Match mdbook's native icon button box (see .clip-button: 33x33) */
.c-play-button {
  cursor: pointer;
  box-sizing: border-box;
  width: 33px;
  height: 33px;
  padding: 2px 4px 0 6px;
  color: inherit;
  display: inline-block;
}

.c-play-button svg {
  width: 20px;
  height: 20px;
  vertical-align: middle;
  position: relative;
  top: -2px;
}

.c-play-button.running {
  animation: c-spin 1s linear infinite;
}

@keyframes c-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Reader-supplied standard input, shown for programs that read stdin */
.c-input {
  display: block;
  box-sizing: border-box;
  width: 100%;
  border: none;
  border-top: 1px dashed var(--table-border-color);
  padding: 0.5em;
  font-family: var(--mono-font, monospace);
  font-size: 0.875em;
  line-height: 1.4;
  background: var(--bg);
  color: var(--fg);
  resize: vertical;
}

.c-input:focus {
  outline: none;
  background: var(--quote-bg, var(--bg));
}

/* Output area below the code block */
.c-output {
  display: block;
  border-top: 1px dashed var(--table-border-color);
  padding: 0.5em;
  font-size: 0.875em;
  white-space: pre-wrap;
  background: var(--bg);
  color: var(--fg);
}

.c-error {
  color: #e06c75;
}
