/**
 * Structural chrome for code snippets (copy, line numbers, language bar).
 * Window look (background, radius) lives in snippet.css / snippet-dark.css
 * and can be replaced with the kda_ceb_snippet_css filter.
 * Token colors live in highlight.css / highlight-dark.css (kda_ceb_highlight_css).
 */

.kda-ceb-wrap {
	position: relative;
	margin: 0 0 1rem;
}

.kda-ceb-wrap pre {
	margin-bottom: 0;
}

/* One window: outer radius/border on the wrap; bar is only an underline. */
.kda-ceb-wrap--has-bar {
	overflow: hidden;
	border-radius: 8px;
}

.kda-ceb-bar {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 8px;
	min-height: 36px;
	padding: 6px 10px;
	border: 0;
	border-radius: 0;
	border-bottom: 1px solid #dcdcde;
	background: transparent;
}

.kda-ceb-wrap--has-bar pre {
	border: 0;
	border-radius: 0;
}

.kda-ceb-wrap--line pre,
.kda-ceb-wrap--block:not(.kda-ceb-wrap--has-bar) pre {
	padding-right: 5.75rem;
}

.kda-ceb-lang {
	margin-right: auto;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #646970;
}

.kda-ceb-line {
	display: flex;
	align-items: flex-start;
	font-size: 13px;
	line-height: 1.55;
}

.kda-ceb-line-num {
	flex: 0 0 2.75em;
	padding: 0 10px 0 12px;
	margin-right: 8px;
	color: #8a93a0;
	text-align: right;
	user-select: none;
	font-variant-numeric: tabular-nums;
	border-right: 1px solid #dcdcde;
}

.kda-ceb-line-code {
	flex: 1 1 auto;
	min-width: 0;
	padding-right: 16px;
	white-space: pre;
}

.kda-ceb-wrap--linenums pre {
	padding-left: 0;
	padding-right: 0;
}

.kda-ceb-copy {
	position: absolute;
	top: 8px;
	right: 8px;
	z-index: 2;
	border: 1px solid #dcdcde;
	background: #fff;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 600;
	padding: 4px 10px;
	cursor: pointer;
	color: #1d2327;
}

.kda-ceb-wrap--has-bar .kda-ceb-copy {
	position: static;
	top: auto;
	right: auto;
}

.kda-ceb-copy:hover {
	border-color: #2271b1;
	color: #2271b1;
}

.kda-ceb-copy:focus,
.kda-ceb-copy:focus-visible,
.kda-ceb-copy:active {
	outline: none;
	box-shadow: none;
}
