/* Code block wrapper: make room for copy button */
.highlight {
	position: relative;
	margin: 1em 0;
	border-radius: 6px;
	overflow: hidden;
}

.highlight pre.chroma {
	padding: 0.5em 1em;
	overflow-x: auto;
	margin: 0;
	font-size: 0.9em;
	line-height: 1.45;
}

/* Kill default `code` block whitespace from chroma's trailing newline */
.highlight pre.chroma code {
	display: block;
}

/* Line numbers: dim, non-selectable */
.highlight .ln {
	margin-right: 0.8em;
	user-select: none;
	-webkit-user-select: none;
	opacity: 0.45;
	display: inline-block;
	min-width: 2ch;
	text-align: right;
}

/* Copy button */
.copy-btn {
	position: absolute;
	top: 0.5em;
	right: 0.5em;
	padding: 0.25em 0.65em;
	font-family: inherit;
	font-size: 0.75em;
	color: #cdd6f4;
	background: rgba(49, 50, 68, 0.85);
	border: 1px solid #45475a;
	border-radius: 4px;
	cursor: pointer;
	opacity: 0;
	transition: opacity 120ms ease, background 120ms ease;
	z-index: 2;
}

.highlight:hover .copy-btn,
.copy-btn:focus {
	opacity: 1;
}

.copy-btn:hover {
	background: #45475a;
}

.copy-btn[data-state="copied"] {
	color: #a6e3a1;
	border-color: #a6e3a1;
}
