﻿/* Localization Editor help */

:root {
	--bg: #ffffff;
	--bg-side: #f4f6f9;
	--bg-code: #f1f3f6;
	--bg-tip: #eef6ee;
	--bg-note: #eef3fb;
	--bg-warn: #fdf4e7;
	--fg: #1f2328;
	--fg-muted: #59636e;
	--accent: #1f5fae;
	--accent-hover: #174a88;
	--border: #d8dee4;
	--tip: #3d8b40;
	--note: #2f6fc0;
	--warn: #c27c0e;
	--header: #1f5fae;
	--header-fg: #ffffff;
}

@media (prefers-color-scheme: dark) {
	:root {
		--bg: #1b1e23;
		--bg-side: #22262c;
		--bg-code: #2a2f36;
		--bg-tip: #1f2d21;
		--bg-note: #1f2836;
		--bg-warn: #33291a;
		--fg: #e3e6ea;
		--fg-muted: #a0a8b2;
		--accent: #7fb2f0;
		--accent-hover: #a6c9f5;
		--border: #3a4048;
		--tip: #6dbb70;
		--note: #6ea2e6;
		--warn: #e0a64a;
		--header: #18304f;
		--header-fg: #e3e6ea;
	}
}

* {
	box-sizing: border-box;
}

html {
	font-size: 100%;
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--fg);
	font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
	font-size: 0.95rem;
	line-height: 1.6;
}

a {
	color: var(--accent);
	text-decoration: none;
}

a:hover {
	color: var(--accent-hover);
	text-decoration: underline;
}


/* header */

.top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 0.5rem 1.5rem;
	padding: 0.7rem 1.5rem;
	background: var(--header);
	color: var(--header-fg);
}

.top .title {
	font-size: 1.1rem;
	font-weight: 600;
	color: var(--header-fg);
}

.top .title:hover {
	text-decoration: none;
	opacity: 0.85;
}

.top .languages {
	font-size: 0.85rem;
}

.top .languages a,
.top .languages span {
	color: var(--header-fg);
	margin-left: 0.8rem;
}

.top .languages span {
	font-weight: 600;
	border-bottom: 2px solid var(--header-fg);
}


/* layout */

.page {
	display: flex;
	align-items: flex-start;
	min-height: calc(100vh - 3rem);
}

nav {
	flex: 0 0 15rem;
	position: sticky;
	top: 0;
	max-height: 100vh;
	overflow-y: auto;
	padding: 1.2rem 0;
	background: var(--bg-side);
	border-right: 1px solid var(--border);
	align-self: stretch;
}

nav h2 {
	margin: 0 1.2rem 0.6rem;
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--fg-muted);
}

nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

nav a {
	display: block;
	padding: 0.3rem 1.2rem;
	color: var(--fg);
	border-left: 3px solid transparent;
}

nav a:hover {
	background: var(--bg-code);
	text-decoration: none;
}

nav a.current {
	border-left-color: var(--accent);
	background: var(--bg);
	color: var(--accent);
	font-weight: 600;
}

main {
	flex: 1 1 auto;
	min-width: 0;
	max-width: 50rem;
	padding: 1.5rem 2.5rem 3rem;
}

@media (max-width: 800px) {
	.page {
		display: block;
	}

	nav {
		position: static;
		max-height: none;
		border-right: none;
		border-bottom: 1px solid var(--border);
		padding: 0.8rem 0;
	}

	nav ul {
		display: flex;
		flex-wrap: wrap;
		padding: 0 0.8rem;
	}

	nav a {
		padding: 0.2rem 0.5rem;
		border-left: none;
		border-radius: 4px;
	}

	main {
		padding: 1rem 1.2rem 2rem;
	}
}


/* text */

h1 {
	margin: 0.3rem 0 0.8rem;
	font-size: 1.7rem;
	font-weight: 600;
	line-height: 1.25;
}

h2 {
	margin: 2rem 0 0.6rem;
	padding-bottom: 0.25rem;
	font-size: 1.25rem;
	font-weight: 600;
	border-bottom: 1px solid var(--border);
}

h3 {
	margin: 1.4rem 0 0.4rem;
	font-size: 1.05rem;
	font-weight: 600;
}

p.lead {
	font-size: 1.05rem;
	color: var(--fg-muted);
}

ul, ol {
	padding-left: 1.5rem;
}

li {
	margin: 0.25rem 0;
}

code {
	padding: 0.05rem 0.3rem;
	background: var(--bg-code);
	border-radius: 3px;
	font-family: Consolas, "Cascadia Mono", Menlo, monospace;
	font-size: 0.88em;
	white-space: nowrap;
}

pre {
	padding: 0.7rem 1rem;
	background: var(--bg-code);
	border-radius: 4px;
	overflow-x: auto;
	font-size: 0.88em;
	line-height: 1.45;
}

pre code {
	padding: 0;
	background: none;
	white-space: pre;
}

kbd {
	display: inline-block;
	padding: 0 0.35rem;
	border: 1px solid var(--border);
	border-bottom-width: 2px;
	border-radius: 3px;
	background: var(--bg);
	font-family: inherit;
	font-size: 0.85em;
	line-height: 1.5;
	white-space: nowrap;
}

.menu {
	font-weight: 600;
	white-space: nowrap;
}

.ui {
	font-weight: 600;
}


/* tables */

table {
	width: 100%;
	margin: 0.8rem 0 1.2rem;
	border-collapse: collapse;
}

th, td {
	padding: 0.4rem 0.6rem;
	border-bottom: 1px solid var(--border);
	text-align: left;
	vertical-align: top;
}

th {
	font-weight: 600;
	background: var(--bg-side);
}

td:first-child {
	white-space: nowrap;
}


/* call-outs */

.tip, .note, .warn {
	margin: 1rem 0;
	padding: 0.6rem 0.9rem;
	border-left: 4px solid;
	border-radius: 0 4px 4px 0;
}

.tip {
	background: var(--bg-tip);
	border-color: var(--tip);
}

.note {
	background: var(--bg-note);
	border-color: var(--note);
}

.warn {
	background: var(--bg-warn);
	border-color: var(--warn);
}

.tip > :first-child, .note > :first-child, .warn > :first-child {
	margin-top: 0;
}

.tip > :last-child, .note > :last-child, .warn > :last-child {
	margin-bottom: 0;
}


/* start page */

.cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
	gap: 0.8rem;
	margin: 1rem 0;
}

.cards a {
	display: block;
	padding: 0.8rem 1rem;
	border: 1px solid var(--border);
	border-radius: 6px;
	color: var(--fg);
}

.cards a:hover {
	border-color: var(--accent);
	text-decoration: none;
}

.cards strong {
	display: block;
	margin-bottom: 0.2rem;
	color: var(--accent);
}

.cards span {
	font-size: 0.88rem;
	color: var(--fg-muted);
}

ol.steps {
	counter-reset: step;
	list-style: none;
	padding-left: 0;
}

ol.steps > li {
	position: relative;
	margin: 0.6rem 0;
	padding-left: 2.4rem;
}

ol.steps > li::before {
	counter-increment: step;
	content: counter(step);
	position: absolute;
	left: 0;
	top: 0.05rem;
	width: 1.6rem;
	height: 1.6rem;
	border-radius: 50%;
	background: var(--accent);
	color: var(--bg);
	font-size: 0.85rem;
	font-weight: 600;
	line-height: 1.6rem;
	text-align: center;
}


/* page navigation */

.pager {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	margin-top: 3rem;
	padding-top: 1rem;
	border-top: 1px solid var(--border);
	font-size: 0.9rem;
}

.pager .next {
	margin-left: auto;
	text-align: right;
}

.pager small {
	display: block;
	color: var(--fg-muted);
}
