/**
 * Aha Mobile Menu – Documentation styles
 */

:root {
	--doc-color-primary: #2271b1;
	--doc-color-primary-hover: #135e96;
	--doc-color-border: #c3c4c7;
	--doc-color-bg: #f0f0f1;
	--doc-color-sidebar-bg: #f0f0f1;
	--doc-color-sidebar-text: #1d2327;
	--doc-color-sidebar-link: #1d2327;
	--doc-color-sidebar-link-active: #2271b1;
	--doc-font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
	font-family: var(--doc-font-sans);
	color: #1d2327;
	line-height: 1.6;
	margin: 0;
	background: #fff;
	display: flex;
	min-height: 100vh;
}

/* Sidebar */
.doc-sidebar {
	width: 280px;
	min-width: 280px;
	background: var(--doc-color-sidebar-bg);
	color: var(--doc-color-sidebar-text);
	display: flex;
	flex-direction: column;
	position: sticky;
	top: 0;
	height: 100vh;
}

.doc-sidebar-logo {
	padding: 1.5rem 1.25rem;
	border-bottom: 1px solid var(--doc-color-border);
}

.doc-sidebar-logo img {
	max-width: 180px;
	width: 100%;
	height: auto;
	display: block;
}

.doc-sidebar-nav {
	flex: 1;
	overflow-y: auto;
	padding: 1rem 0;
}

.doc-sidebar-nav ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.doc-sidebar-nav li { margin: 0; }

.doc-sidebar-nav a {
	display: block;
	padding: 0.5rem 1.25rem;
	color: var(--doc-color-sidebar-link);
	text-decoration: none;
	font-size: 0.95rem;
	transition: color 0.15s ease, background 0.15s ease;
}

.doc-sidebar-nav a:hover {
	color: var(--doc-color-primary);
	background: rgba(0,0,0,0.04);
}

.doc-sidebar-nav a.is-active {
	color: var(--doc-color-sidebar-link-active);
	background: rgba(0,0,0,0.06);
	border-left: 3px solid var(--doc-color-primary);
	padding-left: calc(1.25rem - 3px);
}

/* Hamburger button (hidden on desktop) */
.doc-hamburger {
	display: none;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	margin: 0 0 0 auto;
	background: transparent;
	border: none;
	cursor: pointer;
	border-radius: 4px;
	transition: background 0.2s ease;
}

.doc-hamburger:hover { background: rgba(0,0,0,0.06); }

.doc-hamburger-icon {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 22px;
	height: 18px;
}

.doc-hamburger-icon span {
	display: block;
	height: 2px;
	background: var(--doc-color-sidebar-text);
	border-radius: 1px;
	transition: transform 0.25s ease, opacity 0.25s ease;
}

.doc-sidebar.is-open .doc-hamburger-icon span:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}

.doc-sidebar.is-open .doc-hamburger-icon span:nth-child(2) {
	opacity: 0;
}

.doc-sidebar.is-open .doc-hamburger-icon span:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

/* Main content */
.doc-main {
	flex: 1;
	overflow-y: auto;
	padding: 2rem 2.5rem 3rem;
	max-width: 720px;
}

.doc-section {
	margin-bottom: 2.5rem;
	scroll-margin-top: 0.5rem;
}

.doc-section h2 {
	font-size: 1.35rem;
	margin: 0 0 1rem;
	padding-bottom: 0.5rem;
	border-bottom: 2px solid var(--doc-color-primary);
	color: #1d2327;
}

.doc-section h3 {
	font-size: 1.1rem;
	margin: 1.5rem 0 0.75rem;
	color: #1d2327;
}

.doc-section p { margin: 0 0 1rem; }

.doc-section ul, .doc-section ol {
	margin: 0 0 1rem;
	padding-left: 1.5rem;
}

.doc-section li { margin-bottom: 0.35rem; }

/* Welcome / CTA */
.doc-welcome {
	background: linear-gradient(135deg, #f0f6fc 0%, #e8f4f8 100%);
	border: 1px solid var(--doc-color-border);
	border-radius: 8px;
	padding: 1.5rem 1.75rem;
	margin-bottom: 2rem;
}

.doc-welcome h2 { border-bottom: none; margin-top: 0; }

.doc-cta {
	display: inline-block;
	margin-top: 1rem;
	padding: 0.6rem 1.25rem;
	background: var(--doc-color-primary);
	color: #fff !important;
	text-decoration: none;
	border-radius: 4px;
	font-weight: 600;
	transition: background 0.2s ease;
}

.doc-cta:hover { background: var(--doc-color-primary-hover); }

/* Plugin info */
.doc-plugin-info {
	background: var(--doc-color-bg);
	padding: 1rem 1.25rem;
	border-radius: 4px;
	margin: 1rem 0;
	font-size: 0.95rem;
}

.doc-plugin-info strong { color: #1d2327; }

/* Screenshots */
.doc-screenshot {
	margin: 1.25rem 0;
	padding: 2rem;
	background: var(--doc-color-bg);
	border: 2px dashed var(--doc-color-border);
	border-radius: 4px;
	text-align: center;
	color: #50575e;
	font-size: 0.9rem;
}

.doc-screenshot a.doc-screenshot-link {
	display: block;
	cursor: zoom-in;
	outline: none;
}

.doc-screenshot img {
	max-width: 100%;
	height: auto;
	border-radius: 4px;
	display: block;
	margin: 0 auto 0.5rem;
	transition: transform 0.25s ease;
}

.doc-screenshot a.doc-screenshot-link:hover img {
	transform: scale(1.03);
}

.doc-screenshot .placeholder-caption { margin-top: 0.5rem; }

/* Lightbox overlay */
.doc-lightbox {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: none;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.85);
	padding: 2rem;
	cursor: zoom-out;
	opacity: 0;
	transition: opacity 0.25s ease;
}

.doc-lightbox.is-open {
	display: flex;
	opacity: 1;
}

.doc-lightbox img {
	max-width: 95%;
	max-height: 95vh;
	width: auto;
	height: auto;
	object-fit: contain;
	border-radius: 6px;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
	cursor: default;
	pointer-events: none;
}

.doc-lightbox-close {
	position: absolute;
	top: 1rem;
	right: 1rem;
	width: 44px;
	height: 44px;
	padding: 0;
	border: none;
	background: rgba(255, 255, 255, 0.15);
	color: #fff;
	font-size: 1.75rem;
	line-height: 1;
	cursor: pointer;
	border-radius: 4px;
	transition: background 0.2s ease;
}

.doc-lightbox-close:hover {
	background: rgba(255, 255, 255, 0.25);
}

/* Video */
.doc-video-wrap {
	margin: 1.5rem 0;
	position: relative;
	padding-bottom: 56.25%;
	height: 0;
	overflow: hidden;
	background: var(--doc-color-bg);
	border-radius: 4px;
	border: 1px solid var(--doc-color-border);
}

.doc-video-wrap iframe {
	position: absolute;
	top: 0; left: 0;
	width: 100%; height: 100%;
}

.doc-video-placeholder {
	position: absolute;
	top: 0; left: 0;
	width: 100%; height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-direction: column;
	color: #50575e;
	text-align: center;
	padding: 1rem;
}

.doc-note {
	background: #f0f6fc;
	border-left: 4px solid var(--doc-color-primary);
	padding: 1rem 1.25rem;
	margin: 1rem 0;
	border-radius: 0 4px 4px 0;
}

.doc-note strong { display: block; margin-bottom: 0.25rem; }

code {
	background: var(--doc-color-bg);
	padding: 0.15rem 0.4rem;
	border-radius: 3px;
	font-size: 0.9em;
}

.doc-footer {
	margin-top: 3rem;
	padding-top: 1rem;
	border-top: 1px solid var(--doc-color-border);
	font-size: 0.85rem;
	color: #50575e;
}

/* Mobile: header with hamburger */
@media (max-width: 768px) {
	body { flex-direction: column; }
	.doc-sidebar {
		width: 100%;
		min-width: 0;
		height: auto;
		position: sticky;
		top: 0;
		z-index: 100;
		box-shadow: 0 1px 3px rgba(0,0,0,0.08);
	}
	.doc-sidebar-logo {
		display: flex;
		align-items: center;
		padding: 0.75rem 1rem;
	}
	.doc-sidebar-logo img { max-width: 140px; }
	.doc-hamburger { display: flex; }
	.doc-sidebar-nav {
		max-height: 0;
		overflow: hidden;
		padding: 0;
		transition: max-height 0.3s ease;
	}
	.doc-sidebar.is-open .doc-sidebar-nav {
		max-height: 320px;
		padding: 0.5rem 0;
		border-top: 1px solid var(--doc-color-border);
	}
	.doc-main { padding: 1.5rem 1.25rem 2rem; }
}
