/* Always show copy button and icon */
/* also add a clear outline for focus */
  
pre.code-with-copy {
  position: relative;
}


pre.code-with-copy .code-copy-button {
  opacity: 1 !important;
  pointer-events: auto;
  position: absolute;
  top: 0.25em;
  right: 0.25em;
  background: #f0f0f0;
    border: 1px solid #ccc;
  border-radius: 4px;
  padding: 2px 6px;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

pre.code-with-copy .code-copy-button .bi {
  display: inline-block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

pre.code-with-copy .code-copy-button:focus-visible {
  outline: 3px solid #0056b3;
  outline-offset: 2px;
  background: #e0f0ff;
    border-color: #0056b3;
}

/* Dark mode copy button */
body.quarto-dark pre.code-with-copy .code-copy-button {
  background-color: #2c2c2c;   /* dark gray background */
  border: 1px solid #555;      /* slightly lighter border */
  color: #e0eef5;              /* icon color */
}

/* Hover/focus for better visibility */
body.quarto-dark pre.code-with-copy .code-copy-button:hover,
body.quarto-dark pre.code-with-copy .code-copy-button:focus-visible {
  background-color: #3a3a3a;   /* lighter on hover/focus */
  border-color: #777;
  color: #ffffff;              /* make icon stand out */
}


/* Don't show these icons when printing */
@media print {
  pre.code-with-copy .code-copy-button,
  pre.code-with-copy .code-copy-button .bi {
    display: none !important;
  }
}

