/* Copy button for article code blocks. The button markup is added at build time
   in lib/articles.js; these styles position it in the corner of the block and
   match the existing code-block look (light grey fill, #ccc border). */
.atb-code {
  position: relative;
}

.atb-code .atb-copy-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 0;
  padding: 4px 9px;
  font-family: inherit;
  font-size: 12px;
  line-height: 1;
  color: #333;
  background-color: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
  cursor: pointer;
  opacity: 0.9;
  transition: opacity 0.15s ease, background-color 0.15s ease,
    color 0.15s ease, border-color 0.15s ease;
  -webkit-appearance: none;
  appearance: none;
}

.atb-code .atb-copy-btn:hover {
  opacity: 1;
  background-color: #f0f0f0;
}

.atb-code .atb-copy-btn:focus-visible {
  outline: 2px solid #2271b1;
  outline-offset: 1px;
}

.atb-code .atb-copy-btn.is-copied {
  color: #1a7f37;
  border-color: #1a7f37;
}

.atb-code .atb-copy-btn__icon {
  display: block;
  flex: none;
}
