/* Migud Media Manager documentation – standalone, independent of the plugin */
:root {
	--bg: #f6f7f9;
	--surface: #fff;
	--text: #3b4350;
	--heading: #1f2328;
	--muted: #5b6573;
	--border: #e2e5ea;
	--border-strong: #c9ccd3;
	--accent: #6d4fd8;
	--accent-text: #5b3fc4;
	--accent-soft: #f5f3ff;
	--radius: 12px;
	--font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
	--nav-w: 260px;
	--bar-h: 60px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	* { transition: none !important; animation: none !important; }
}

body {
	margin: 0;
	color: var(--text);
	background: var(--bg);
	font: 16px/1.65 var(--font);
	overflow-wrap: break-word;
}

a { color: var(--accent-text); text-underline-offset: 2px; }
a:hover { color: var(--heading); }

:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
	border-radius: 4px;
}

.skip-link {
	position: absolute;
	top: -100px;
	left: 12px;
	z-index: 100;
	padding: 10px 16px;
	color: #fff;
	background: var(--accent-text);
	border-radius: 8px;
	text-decoration: none;
}
.skip-link:focus { top: 12px; color: #fff; }

.visually-hidden {
	position: absolute !important;
	width: 1px; height: 1px;
	margin: -1px; padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

/* Layout */
.layout { display: block; }

.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: var(--surface);
	border-bottom: 1px solid var(--border);
}

.site-header__bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	min-height: var(--bar-h);
	padding: 8px 16px;
}

.brand {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
	color: var(--heading);
	text-decoration: none;
}
.brand:hover { color: var(--heading); }
.brand__mark { flex: none; width: 36px; height: auto; }
.brand__text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.brand__name { font-weight: 650; font-size: 15px; }
.brand__sub { color: var(--muted); font-size: 13px; }

.nav-toggle {
	display: none;
	flex: none;
	align-items: center;
	min-height: 40px;
	padding: 0 14px;
	color: var(--heading);
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	background: var(--surface);
	border: 1px solid var(--border-strong);
	border-radius: 8px;
	cursor: pointer;
}
.nav-toggle::after { content: ""; width: 7px; height: 7px; margin-inline-start: 10px; border: solid currentColor; border-width: 0 2px 2px 0; transform: translateY(-2px) rotate(45deg); }
.nav-toggle[aria-expanded="true"]::after { transform: translateY(1px) rotate(-135deg); }
.js .nav-toggle { display: inline-flex; }

.toc ol { margin: 0; padding: 8px 12px 16px; list-style: none; }
.toc a {
	display: block;
	padding: 7px 12px;
	color: var(--text);
	font-size: 14.5px;
	line-height: 1.4;
	text-decoration: none;
	border-inline-start: 3px solid transparent;
	border-radius: 0 8px 8px 0;
}
.toc a:hover { color: var(--heading); background: var(--bg); }
.toc a[aria-current="location"] {
	color: var(--accent-text);
	font-weight: 600;
	background: var(--accent-soft);
	border-inline-start-color: var(--accent);
}

/* Mobile and tablet: the contents list opens under the top bar */
@media (max-width: 1023.98px) {
	.js .toc { display: none; max-height: calc(100vh - var(--bar-h)); overflow-y: auto; border-top: 1px solid var(--border); }
	.js .toc.is-open { display: block; }
	.toc ol { padding: 8px 8px 16px; }
	main section[id] { scroll-margin-top: calc(var(--bar-h) + 12px); }
	#top { scroll-margin-top: var(--bar-h); }
}

@media (min-width: 1024px) {
	.js .nav-toggle { display: none; }
	.layout { display: grid; grid-template-columns: var(--nav-w) minmax(0, 1fr); align-items: start; }
	.site-header {
		height: 100vh;
		overflow-y: auto;
		border-bottom: 0;
		border-inline-end: 1px solid var(--border);
	}
	.site-header__bar { display: block; padding: 24px 20px 8px; }
	.brand__mark { width: 40px; }
	.toc { display: block; }
	main section[id] { scroll-margin-top: 24px; }
}

main:focus { outline: none; }

.content {
	max-width: 800px;
	margin: 0 auto;
	padding: 24px 16px 48px;
}
@media (min-width: 1024px) { .content { padding: 48px 40px 64px; } }

.hero { padding: 8px 4px 24px; }
.eyebrow { margin: 0 0 6px; color: var(--accent-text); font-size: 13px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; }
h1 { margin: 0 0 12px; color: var(--heading); font-size: clamp(28px, 5vw, 38px); line-height: 1.15; letter-spacing: -.01em; }
.lead { margin: 0; max-width: 60ch; color: var(--muted); font-size: 18px; }

.card {
	margin: 0 0 20px;
	padding: 24px 20px;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
}
@media (min-width: 640px) { .card { padding: 32px 36px; } }

h2 { margin: 0 0 16px; color: var(--heading); font-size: 24px; line-height: 1.25; }
h3 { margin: 28px 0 8px; color: var(--heading); font-size: 17px; line-height: 1.35; }
h2 + h3, .card > h3:first-child { margin-top: 0; }
p { margin: 0 0 14px; }
ul, ol { margin: 0 0 16px; padding-inline-start: 1.4em; }
li { margin: 0 0 6px; padding-inline-start: 2px; }
li::marker { color: var(--muted); }
ol li::marker { font-weight: 600; }
strong { color: var(--heading); font-weight: 600; }

code, kbd { font-family: var(--mono); font-size: .86em; }
code {
	padding: 1px 6px;
	color: var(--heading);
	background: var(--bg);
	border: 1px solid var(--border);
	border-radius: 5px;
	overflow-wrap: anywhere;
}
kbd {
	display: inline-block;
	min-width: 1.7em;
	padding: 1px 7px;
	color: var(--heading);
	line-height: 1.5;
	text-align: center;
	white-space: nowrap;
	background: var(--bg);
	border: 1px solid var(--border-strong);
	border-bottom-width: 2px;
	border-radius: 6px;
}

/* Callouts */
.callout { margin: 0 0 18px; padding: 12px 16px; background: var(--bg); border: 1px solid var(--border); border-inline-start: 4px solid var(--border-strong); border-radius: 8px; }
.callout p { margin: 0; }
.callout__label { margin-inline-end: 6px; color: var(--heading); text-transform: uppercase; font-size: 12px; letter-spacing: .06em; }
.callout--important { background: var(--accent-soft); border-color: #ddd6fe; border-inline-start-color: var(--accent); }
.callout--important .callout__label { color: var(--accent-text); }

/* Tables */
.table-wrap { margin: 0 0 18px; overflow-x: auto; border: 1px solid var(--border); border-radius: 8px; }
.table-wrap:focus-visible { outline-offset: 0; }
table { width: 100%; min-width: 440px; border-collapse: collapse; font-size: 15px; }
th, td { padding: 10px 14px; text-align: start; vertical-align: top; border-bottom: 1px solid var(--border); }
thead th { color: var(--heading); font-weight: 600; background: var(--bg); }
tbody tr:last-child > * { border-bottom: 0; }
tbody th { color: var(--heading); font-weight: 600; }

/* Screenshots */
.shot { position: relative; display: grid; margin: 20px 0 24px; }
.shot > img,
.shot > .shot__placeholder { grid-area: 1 / 1; }
.shot > figcaption { grid-area: 2 / 1; margin-top: 8px; color: var(--muted); font-size: 14px; }

.shot img {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
	pointer-events: none;
}
.shot__placeholder {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 6px;
	aspect-ratio: var(--ratio);
	width: 100%;
	padding: 12px;
	text-align: center;
	background: #f1f2f4;
	border: 1.5px dashed var(--border-strong);
	border-radius: 10px;
}
.shot__file { color: var(--heading); font: 600 14px var(--mono); overflow-wrap: anywhere; }
.shot__desc { max-width: 40ch; color: var(--muted); font-size: 13.5px; }

.shot.is-loaded img {
	position: static;
	display: block;
	width: 100%;
	height: auto;
	opacity: 1;
	pointer-events: auto;
	border: 1px solid var(--border);
	border-radius: 10px;
}
.shot.is-loaded .shot__placeholder { display: none; }

.shot--narrow { max-width: 320px; margin-inline: auto; }

/* Footer */
.site-footer { padding: 24px 16px 40px; color: var(--muted); font-size: 14px; text-align: center; }
.site-footer p { margin: 0; }
@media (min-width: 1024px) { .site-footer { margin-inline-start: var(--nav-w); } }

/* Forced colors */
@media (forced-colors: active) {
	.toc a[aria-current="location"] { border-inline-start-color: Highlight; }
	.callout--important { border-inline-start-color: Highlight; }
}

/* Print */
@media print {
	body { color: #000; background: #fff; font-size: 11pt; }
	.skip-link, .site-header__bar .nav-toggle, .toc { display: none !important; }
	.site-header { position: static; height: auto; border: 0; }
	.layout { display: block; }
	.site-footer { margin: 0; }
	.card { break-inside: avoid-page; border: 0; padding: 0 0 12px; }
	a { color: #000; }
	.shot__placeholder { border-color: #999; }
}
