/* Knowledge Base blocks — shared by front end and editor. Colours come from theme tokens with fallbacks. */

.lcp-steps { margin: 2rem 0; }
.lcp-steps__title { margin: 0 0 1rem; }
.lcp-steps__list { list-style: none; counter-reset: lcp-step; margin: 0; padding: 0; }
.lcp-step {
	counter-increment: lcp-step;
	position: relative;
	padding: 0 0 1.5rem 3.25rem;
	margin: 0;
}
.lcp-step::before {
	content: counter(lcp-step);
	position: absolute; left: 0; top: 0;
	width: 2.1rem; height: 2.1rem; border-radius: 50%;
	display: grid; place-items: center;
	font-weight: 700; font-size: .95rem;
	background: var(--lcp-accent-strong, #1b75bc); color: #fff;
}
.lcp-step:not(:last-child)::after {
	content: ""; position: absolute; left: 1.05rem; top: 2.4rem; bottom: .3rem;
	width: 2px; background: var(--lcp-border, #e2e8f0);
}
.lcp-step__title { margin: .25rem 0 .5rem; font-size: 1.1rem; line-height: 1.4; }
.lcp-step__body > :first-child { margin-top: 0; }
.lcp-step__body > :last-child { margin-bottom: 0; }
.lcp-step__body img { border: 1px solid var(--lcp-border, #e2e8f0); border-radius: 6px; max-width: 100%; height: auto; }

.lcp-note {
	--note: #2563eb; --note-bg: #eff6ff;
	border-left: 4px solid var(--note);
	background: var(--note-bg);
	border-radius: 6px;
	padding: .85rem 1rem;
	margin: 1.25rem 0;
}
.lcp-note--tip { --note: #16a34a; --note-bg: #f0fdf4; }
.lcp-note--warning { --note: #d97706; --note-bg: #fffbeb; }
.lcp-note--danger { --note: #dc2626; --note-bg: #fef2f2; }
.lcp-note__title { margin: 0 0 .3rem !important; font-weight: 700; color: var(--note); font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; }
.lcp-note__body > :first-child { margin-top: 0; }
.lcp-note__body > :last-child { margin-bottom: 0; }

@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .lcp-note { --note-bg: color-mix(in srgb, var(--note) 14%, transparent); }
}
:root[data-theme="dark"] .lcp-note { --note-bg: color-mix(in srgb, var(--note) 14%, transparent); }

.lcp-code {
	margin: 1.25rem 0;
	border-radius: 8px;
	overflow: hidden;
	background: #1e1e2e;
	border: 1px solid #2d2d3f;
}
.lcp-code__bar {
	display: flex; align-items: center; gap: .75rem;
	padding: .4rem .75rem;
	background: #2a2a3c; color: #cdd6f4;
	font: 600 .75rem/1.4 ui-sans-serif, system-ui, sans-serif;
}
.lcp-code__lang { text-transform: uppercase; letter-spacing: .05em; opacity: .75; }
.lcp-code__file { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-weight: 400; }
.lcp-code__copy {
	margin-left: auto; cursor: pointer;
	background: transparent; color: inherit;
	border: 1px solid #4b4b63; border-radius: 4px;
	padding: .15rem .55rem; font: inherit;
}
.lcp-code__copy:hover { background: #3a3a52; }
.lcp-code pre[class*="language-"], .lcp-code pre {
	margin: 0 !important; padding: 1rem !important;
	background: transparent !important;
	overflow: auto; max-height: 36rem;
	font: .85rem/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	color: #cdd6f4; tab-size: 4;
}
.lcp-code code { font: inherit; background: none; padding: 0; color: inherit; white-space: pre; }

/* Editor-only */
.lcp-code.is-editor .lcp-code__bar .components-base-control { min-width: 10rem; }
.lcp-code__file-input { background: #1e1e2e; color: #cdd6f4; border: 1px solid #4b4b63; border-radius: 4px; padding: 2px 6px; font: inherit; }
.lcp-code__textarea {
	display: block; width: 100%; box-sizing: border-box;
	background: transparent; color: #cdd6f4; border: 0; padding: 1rem; resize: vertical;
	font: .85rem/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; tab-size: 4;
}
.lcp-code__textarea:focus { outline: 2px solid var(--lcp-accent, #2ea3f2); outline-offset: -2px; }
.lcp-steps.is-editor .block-list-appender { position: static; margin-left: 3.25rem; }
