/* "Set up with your agent" — stack picker + copy-a-prompt block. Uses the docs' global custom
   properties (--mono/--text/--muted/--surface/--border/--accent), matching the blog-preview widget. */

.ap {
  margin: 18px 0 6px;
}

.ap-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.ap-label {
  font-size: 13px;
  color: var(--muted);
}

.ap-select {
  font: inherit;
  font-size: 14px;
  color: var(--text);
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 9px;
  padding: 7px 30px 7px 12px;
  min-width: 12rem;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' fill='none' stroke='%23888' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
}

.ap-select:focus {
  outline: none;
  border-color: var(--accent);
}

.ap-block {
  position: relative;
}

.ap-code {
  display: block;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--text);
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
  tab-size: 2;
}

/* Match the site's <pre> copy button, but always visible — this block is the point of the page. */
.ap-copy {
  position: absolute;
  top: 8px;
  right: 8px;
  font: inherit;
  font-size: 11.5px;
  line-height: 1;
  color: var(--muted);
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 7px;
  padding: 5px 10px;
  cursor: pointer;
}

.ap-copy:hover,
.ap-copy:focus {
  color: var(--accent);
  border-color: var(--accent);
  outline: none;
}

.ap-copy.ok {
  color: var(--accent);
  border-color: var(--accent);
}

/* Opt-in for the authoring step. Sits beside the stack select on wide viewports and drops to its
   own line when the controls wrap. */
.ap-check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}

.ap-box {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.ap-box:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
