/* Documentation - Base, Nav, Layout, Sidebar, Content, Steps, Code Blocks */
/* SparkAI - Documentation Styles */
@import "base/_scrollbar.css";

* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

body {
	font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	background: var(--color-bg);
	color: #e4e4e7;
	line-height: 1.6;
	font-size: 15px;
}

.container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 24px;
}

/* Nav */
nav {
	position: sticky;
	top: 0;
	z-index: 100;
	padding: 16px 0;
	background: rgba(9, 9, 11, 0.9);
	backdrop-filter: blur(12px);
	border-bottom: 1px solid var(--color-bg-hover);
}
nav .container {
	display: flex;
	align-items: center;
	justify-content: space-between;
}
.logo {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 18px;
	font-weight: 700;
	color: #fafafa;
	text-decoration: none;
}
.logo img {
	height: 28px;
	width: auto;
}
.nav-links {
	display: flex;
	align-items: center;
	gap: 24px;
}
.nav-links a {
	color: #71717a;
	text-decoration: none;
	font-size: 14px;
	font-weight: 500;
	transition: color 0.2s;
}
.nav-links a:hover,
.nav-links a.active {
	color: #fafafa;
}

/* Docs Layout */
.docs-layout {
	display: grid;
	grid-template-columns: 220px 1fr;
	gap: 48px;
	max-width: 1200px;
	margin: 0 auto;
	padding: 32px 24px 80px;
}

/* Sidebar */
.sidebar {
	position: sticky;
	top: 80px;
	height: fit-content;
	padding-right: 24px;
	border-right: 1px solid var(--color-bg-hover);
}
.sidebar-section {
	margin-bottom: 24px;
}
.sidebar-title {
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: #52525b;
	margin-bottom: 8px;
}
.sidebar-link {
	display: block;
	padding: 6px 0;
	color: #a1a1aa;
	text-decoration: none;
	font-size: 14px;
	transition: color 0.15s;
}
.sidebar-link:hover {
	color: #e4e4e7;
}
.sidebar-link.active {
	color: #fafafa;
	font-weight: 500;
}

/* Content */
.content {
	max-width: 800px;
	min-width: 0;
}

.hero-mini {
	margin-bottom: 48px;
	padding-bottom: 32px;
	border-bottom: 1px solid var(--color-bg-hover);
}
.hero-mini h1 {
	font-size: 36px;
	font-weight: 700;
	margin-bottom: 8px;
}
.hero-mini .subtitle {
	font-size: 21px;
	background: #818cf8;
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}

section {
	margin-bottom: 56px;
	scroll-margin-top: 100px;
}

h2 {
	font-size: 24px;
	font-weight: 700;
	margin-bottom: 16px;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--color-bg-hover);
}

h3 {
	font-size: 16px;
	font-weight: 600;
	margin: 24px 0 12px;
	color: #fafafa;
}

p {
	margin-bottom: 16px;
	color: #a1a1aa;
}

a {
	color: #818cf8;
}
a:hover {
	color: #a5b4fc;
}

ol,
ul {
	margin: 0 0 16px 24px;
	color: #a1a1aa;
}
li {
	margin-bottom: 8px;
}

code {
	font-family: "JetBrains Mono", "Fira Code", monospace;
	font-size: 13px;
	background: var(--color-bg-elevated);
	padding: 2px 6px;
	border-radius: 4px;
	color: #e4e4e7;
}

/* Steps */
.steps {
	display: flex;
	flex-direction: column;
	gap: 20px;
	margin: 24px 0;
}
.step {
	display: flex;
	gap: 16px;
	align-items: flex-start;
}
.step-num {
	width: 28px;
	height: 28px;
	background: linear-gradient(135deg, #818cf8, #a5b4fc);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 14px;
	font-weight: 600;
	color: white;
	flex-shrink: 0;
}
.step-content h3 {
	margin: 0 0 4px;
}
.step-content p {
	margin: 0;
}

/* Code Blocks */
.code-block {
	position: relative;
	background: var(--color-bg-inset);
	border: 1px solid var(--color-bg-hover);
	border-radius: 8px;
	margin: 16px 0;
	overflow: hidden;
}
.code-block .code-header {
	padding: 8px 14px;
	font-size: 12px;
	font-weight: 500;
	color: #52525b;
	background: var(--color-bg-inset);
	border-bottom: 1px solid var(--color-bg-hover);
}
.code-block pre {
	margin: 0;
	padding: 14px;
	overflow-x: auto;
}
.code-block code {
	font-family: "JetBrains Mono", "Fira Code", monospace;
	font-size: 13px;
	line-height: 1.6;
	color: #e4e4e7;
	background: transparent;
	padding: 0;
}
/* Syntax highlighting */
.code-block .hl-tag {
	color: #f472b6;
}
.code-block .hl-attr {
	color: #818cf8;
}
.code-block .hl-string {
	color: #a8e6cf;
}
.code-block .hl-keyword {
	color: #f472b6;
}
.code-block .hl-function {
	color: #67e8f9;
}
.code-block .hl-comment {
	color: #6b7280;
	font-style: italic;
}
.code-block .hl-number {
	color: #fcd34d;
}
.code-block .hl-property {
	color: #93c5fd;
}
.code-block .hl-variable {
	color: #fca5a5;
}
.code-block .hl-method {
	color: #67e8f9;
}
.code-block .hl-operator {
	color: #94a3b8;
}
.copy-btn {
	position: absolute;
	top: 10px;
	right: 10px;
	width: 24px;
	height: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #52525b;
	background: transparent;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	transition: all 0.15s;
}
.copy-btn:hover {
	color: #a1a1aa;
	background: rgba(255, 255, 255, 0.08);
}
.copy-btn.copied {
	color: #22c55e;
}

/* CSS-only icons */
.icon-copy {
	width: 14px;
	height: 14px;
	position: relative;
}
.icon-copy::before,
.icon-copy::after {
	content: "";
	position: absolute;
	border: 1.5px solid currentColor;
	border-radius: 2px;
}
.icon-copy::before {
	width: 9px;
	height: 9px;
	top: 0;
	left: 0;
}
.icon-copy::after {
	width: 9px;
	height: 9px;
	bottom: 0;
	right: 0;
	background: var(--color-bg-inset);
}
.icon-check {
	width: 14px;
	height: 14px;
	position: relative;
}
.icon-check::before {
	content: "";
	position: absolute;
	width: 8px;
	height: 5px;
	border-left: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	transform: rotate(-45deg);
	top: 3px;
	left: 3px;
}
