.copy-inline {
  position: relative;
  display: inline-flex;
  max-width: 100%;
  vertical-align: baseline;
}

.copy-button {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  max-width: 100%;
  min-height: 24px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: inherit;
  cursor: pointer;
  user-select: text;
}

.copy-button:disabled {
  cursor: text;
}

.copy-text {
  min-width: 0;
  overflow-wrap: anywhere;
}

.copy-button:enabled .copy-text {
  text-decoration: underline dotted;
  text-decoration-thickness: 1px;
  text-decoration-color: color-mix(in srgb, var(--text-color) 60%, var(--background-color));
  text-underline-offset: 0.2em;
}

.copy-button:hover .copy-text,
.copy-button:focus-visible .copy-text {
  text-decoration-color: currentColor;
}

.copy-button:focus-visible {
  outline: 2px solid var(--link-color);
  outline-offset: 2px;
}

.copy-symbols {
  position: relative;
  flex: 0 0 14px;
  width: 14px;
  height: 14px;
  color: color-mix(in srgb, var(--text-color) 60%, var(--background-color));
}

.copy-symbols[hidden] {
  display: none;
}

.copy-symbols svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.copy-check,
.copy-inline[data-copy-state="success"] .copy-icon {
  visibility: hidden;
}

.copy-inline[data-copy-state="success"] .copy-check {
  visibility: visible;
}

.copy-status {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.copy-inline[data-copy-state="error"] .copy-status {
  top: 100%;
  left: 0;
  z-index: 1;
  width: max-content;
  box-sizing: border-box;
  max-width: min(18rem, 100%);
  height: auto;
  margin: 0;
  padding: 0.5rem;
  border: 1px solid currentColor;
  border-radius: 3px;
  background: var(--background-color);
  font-size: 0.75rem;
  white-space: normal;
  clip-path: none;
}
