/* GoConsent theme - Docs hub, modules and articles. */

.docs-module__link {
	color: inherit;
	text-decoration: none;
}

.docs-module__link::after {
	content: "";
	position: absolute;
	inset: 0;
}

.docs-module {
	position: relative;
}

.docs-module__list {
	position: relative;
	z-index: 1;
	display: grid;
	gap: 6px;
	margin: 16px 0 0;
	padding: 16px 0 0;
	border-top: 1px solid var(--site-border);
	font-size: var(--site-size-sm);
	list-style: none;
}

.docs-module__list a {
	font-weight: 500;
	text-decoration: none;
}

.docs-module__list a:hover {
	text-decoration: underline;
}

/* Layout: navigation beside the article */
.docs-layout {
	display: flex;
	flex-wrap: wrap;
	gap: clamp(28px, 4vw, 56px);
	align-items: flex-start;
	padding-top: clamp(28px, 4vw, 48px);
	padding-bottom: var(--site-section-space);
}

.docs-layout__side {
	position: sticky;
	top: var(--site-sticky-top);
	flex: 0 0 250px;
	max-height: calc(100vh - var(--site-sticky-top) - 24px);
	overflow-y: auto;
}

.docs-layout__main {
	flex: 1 1 560px;
	min-width: 0;
}

.docs-nav__toggle {
	display: none;
}

.docs-nav__heading {
	margin: 18px 0 6px;
	font-size: var(--site-size-xs);
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.docs-nav__heading:first-child {
	margin-top: 0;
}

.docs-nav__heading a {
	color: var(--site-text);
	text-decoration: none;
}

.docs-nav__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.docs-nav__link {
	display: block;
	padding: 6px 10px;
	border-left: 2px solid var(--site-border);
	color: var(--site-text-muted);
	font-size: var(--site-size-sm);
	line-height: 1.4;
	text-decoration: none;
}

.docs-nav__link:hover {
	border-left-color: var(--site-brand);
	color: var(--site-text);
}

.docs-nav__link[aria-current="page"] {
	border-left-color: var(--site-brand);
	background: var(--site-brand-soft);
	color: var(--site-brand-deep);
	font-weight: 600;
}

@media (max-width: 900px) {
	.docs-layout__side {
		position: static;
		flex-basis: 100%;
		max-height: none;
	}

	.docs-nav {
		border: 1px solid var(--site-border);
		border-radius: var(--site-radius);
		background: var(--site-surface);
	}

	.docs-nav__toggle {
		display: flex;
		align-items: center;
		justify-content: space-between;
		min-height: 52px;
		padding: 0 18px;
		color: var(--site-text);
		font-weight: 600;
		list-style: none;
		cursor: pointer;
	}

	.docs-nav__toggle::-webkit-details-marker {
		display: none;
	}

	.docs-nav__chevron {
		width: 20px;
		height: 20px;
		color: var(--site-brand);
		transition: transform 0.2s ease;
	}

	.docs-nav[open] .docs-nav__chevron {
		transform: rotate(180deg);
	}

	.docs-nav nav {
		padding: 0 18px 18px;
	}
}

.docs-title {
	margin-bottom: 10px;
	font-size: var(--site-size-2xl);
}

.docs-lead {
	margin: 0 0 32px;
	color: var(--site-text-muted);
	font-size: var(--site-size-lg);
}

.docs-body .doc-shot {
	margin: 2em 0;
}

.docs-body code {
	padding: 2px 6px;
	border-radius: 6px;
	background: var(--site-bg-sunken);
	font-family: var(--site-font-mono);
	font-size: 0.88em;
	white-space: nowrap;
}

@media (max-width: 600px) {
	.docs-body code {
		white-space: normal;
		overflow-wrap: anywhere;
	}
}

.docs-body pre {
	margin: 1.25em 0;
	padding: 16px 18px;
	overflow-x: auto;
	border: 1px solid var(--site-border);
	border-radius: var(--site-radius-sm);
	background: var(--site-bg-sunken);
	line-height: 1.6;
}

.docs-body pre code {
	padding: 0;
	background: none;
	font-size: 0.85em;
	white-space: pre;
}

.docs-articles {
	display: grid;
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.docs-articles__item {
	position: relative;
	display: block;
	padding: 20px 56px 20px 22px;
	border: 1px solid var(--site-border);
	border-radius: var(--site-radius);
	background: var(--site-surface);
	color: inherit;
	text-decoration: none;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.docs-articles__item:hover {
	border-color: var(--site-green-alpha-24);
	box-shadow: var(--site-shadow);
}

.docs-articles__title {
	display: block;
	color: var(--site-text);
	font-weight: 600;
}

.docs-articles__summary {
	display: block;
	color: var(--site-text-muted);
	font-size: var(--site-size-sm);
}

.docs-articles__icon {
	position: absolute;
	top: 50%;
	right: 20px;
	width: 20px;
	height: 20px;
	color: var(--site-brand);
	transform: translateY(-50%);
}

.docs-pager {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin: 48px 0 24px;
}

.docs-pager__link {
	flex: 1 1 240px;
	min-width: 0;
	padding: 16px 20px;
	border: 1px solid var(--site-border);
	border-radius: var(--site-radius);
	color: var(--site-text);
	font-weight: 600;
	text-decoration: none;
}

.docs-pager__link:hover {
	border-color: var(--site-brand);
}

.docs-pager__link--next {
	text-align: right;
}

.docs-pager__label {
	display: block;
	color: var(--site-text-faint);
	font-size: var(--site-size-xs);
	font-weight: 500;
}

.docs-help a {
	font-weight: 600;
}
