/* Learn AI Mindset — prompt/code card (built by code-box.js), used in the library and in blog posts.
   Header row with label + buttons, divider, then each line highlighted. Self-contained: own tokens. */

.lam-res-code {
	--lam-accent: #5955d1;
	--lam-accent-strong: #4440b4;
	--lam-muted: #606079;
	--lam-bg: #f8f7ff;
	--lam-accent-soft: #eeedff;
	--lam-border: #e1e1e8;
	--lam-font: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;

	margin-block: 1.25em;
	border: 1px solid var(--lam-border);
	border-radius: 12px;
	background: var(--lam-bg);
	overflow: hidden;
	font-family: var(--lam-font);
}

[data-scheme="dark"] .lam-res-code {
	--lam-accent: #908cf5;
	--lam-accent-strong: #b3b0ff;
	--lam-muted: #b9b9cc;
	--lam-bg: #24233a;
	--lam-accent-soft: #2e2c55;
	--lam-border: #3a3a4a;
}

@media (prefers-color-scheme: dark) {
	[data-scheme="auto"] .lam-res-code {
		--lam-accent: #908cf5;
		--lam-accent-strong: #b3b0ff;
		--lam-muted: #b9b9cc;
		--lam-bg: #24233a;
		--lam-accent-soft: #2e2c55;
		--lam-border: #3a3a4a;
	}
}

.lam-res-code__bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px 12px;
	padding: 8px 10px 8px 16px;
	border-bottom: 1px solid var(--lam-border);
	font-size: 0.875rem;
	font-weight: 600;
	line-height: 1.4;
	color: var(--lam-muted);
}

.lam-res-code__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.lam-res-code .lam-res-copy {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	min-height: 32px;
	margin: 0;
	padding: 6px 12px;
	border: 1px solid var(--lam-border) !important;
	border-radius: 8px;
	background: transparent !important;
	box-shadow: none !important;
	color: var(--lam-accent) !important;
	font: 600 0.8125rem/1 var(--lam-font) !important;
	letter-spacing: normal;
	text-decoration: none !important;
	text-transform: none;
	cursor: pointer;
	transition: border-color 0.15s, background-color 0.15s;
}

.lam-res-code .lam-res-copy:hover {
	border-color: var(--lam-accent) !important;
}

.lam-res-code .lam-res-copy:focus-visible {
	outline: 3px solid var(--lam-accent);
	outline-offset: 2px;
}

.lam-res-code .lam-res-copy[data-state="done"] {
	background: var(--lam-accent) !important;
	border-color: var(--lam-accent) !important;
	color: #fff !important;
}

/* Themes style <pre> heavily inside entry content; the card owns its body. */
.lam-res-code > pre {
	max-width: 100%;
	margin: 0 !important;
	padding: 14px 16px !important;
	overflow-x: auto;
	border: 0 !important;
	border-radius: 0 !important;
	background: none !important;
	box-shadow: none !important;
	color: var(--lam-accent-strong) !important;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace !important;
	font-size: 0.8125rem !important;
	line-height: 1.9 !important;
	white-space: pre-wrap !important;
	word-break: break-word;
}

.lam-res-code > pre code {
	padding: 0 !important;
	border: 0 !important;
	background: none !important;
	color: inherit !important;
	font: inherit !important;
	white-space: inherit !important;
}

.lam-res-code__line {
	padding: 2px 5px;
	border-radius: 4px;
	background: var(--lam-accent-soft);
	-webkit-box-decoration-break: clone;
	box-decoration-break: clone;
}

.lam-res-code .lam-res-sr-only {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
}
