/**
 * PXS Competition Addons — LottoReadme (GitBook-style docs)
 */

:root {
	--doc-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--doc-mono: ui-monospace, "Cascadia Code", "Segoe UI Mono", Menlo, Consolas, monospace;
	--doc-bg: #ffffff;
	--doc-bg-subtle: #f6f7f9;
	--doc-bg-muted: #eceef2;
	--doc-sidebar-bg: #f6f7f9;
	--doc-border: #e1e4ea;
	--doc-text: #1b1f26;
	--doc-text-muted: #606163;
	--doc-text-faint: #8b919a;
	--doc-accent: #2563eb;
	--doc-accent-hover: #1d4ed8;
	--doc-accent-soft: #eff6ff;
	--doc-accent-border: #bfdbfe;
	--doc-callout-bg: #f6f7f9;
	--doc-callout-border: #e1e4ea;
	--doc-badge-new-bg: #dbeafe;
	--doc-badge-new-text: #1d4ed8;
	--doc-shadow: 0 1px 2px rgb(0 0 0 / 0.04);
	--doc-topbar-h: 56px;
	--doc-sidebar-w: 280px;
	--doc-toc-w: 220px;
	--doc-radius: 8px;
	--doc-radius-lg: 12px;
}

[data-theme="dark"] {
	--doc-bg: #0f1117;
	--doc-bg-subtle: #161922;
	--doc-bg-muted: #1e2230;
	--doc-sidebar-bg: #12151c;
	--doc-border: #2a3040;
	--doc-text: #e8eaef;
	--doc-text-muted: #a3a8b3;
	--doc-text-faint: #6b7280;
	--doc-accent: #60a5fa;
	--doc-accent-hover: #93c5fd;
	--doc-accent-soft: #1e293b;
	--doc-accent-border: #334155;
	--doc-callout-bg: #161922;
	--doc-callout-border: #2a3040;
	--doc-badge-new-bg: #1e3a5f;
	--doc-badge-new-text: #93c5fd;
	--doc-shadow: 0 1px 2px rgb(0 0 0 / 0.35);
}

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

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	font-family: var(--doc-font);
	font-size: 15px;
	line-height: 1.65;
	color: var(--doc-text);
	background: var(--doc-bg);
	-webkit-font-smoothing: antialiased;
}

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

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

code {
	font-family: var(--doc-mono);
	font-size: 0.88em;
	background: var(--doc-bg-muted);
	padding: 0.12em 0.4em;
	border-radius: 4px;
}

kbd {
	font-family: var(--doc-mono);
	font-size: 0.85em;
	padding: 2px 6px;
	border-radius: 4px;
	border: 1px solid var(--doc-border);
	background: var(--doc-bg-subtle);
	color: var(--doc-text-muted);
}

/* —— Top bar —— */
.doc-topbar {
	position: sticky;
	top: 0;
	z-index: 100;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	height: var(--doc-topbar-h);
	padding: 0 20px;
	background: var(--doc-bg);
	border-bottom: 1px solid var(--doc-border);
}

.doc-topbar__brand {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
	color: var(--doc-text);
	text-decoration: none;
	font-weight: 600;
	font-size: 15px;
}

.doc-topbar__brand:hover {
	text-decoration: none;
	color: var(--doc-text);
}

.doc-topbar__logo {
	flex-shrink: 0;
	width: auto;
	height: 28px;
	max-width: 120px;
	border-radius: 6px;
	object-fit: contain;
	display: block;
}

.doc-topbar__title {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.doc-topbar__search-wrap {
	flex: 1;
	display: flex;
	justify-content: flex-end;
	max-width: 360px;
}

.doc-topbar__search {
	display: flex;
	align-items: center;
	gap: 8px;
	width: 100%;
	max-width: 320px;
	padding: 8px 12px;
	background: var(--doc-bg-subtle);
	border: 1px solid var(--doc-border);
	border-radius: var(--doc-radius);
	color: var(--doc-text-muted);
	font-size: 14px;
}

.doc-topbar__search input {
	flex: 1;
	min-width: 0;
	border: none;
	background: transparent;
	color: var(--doc-text);
	font: inherit;
	outline: none;
}

.doc-topbar__search input::placeholder {
	color: var(--doc-text-faint);
}

.doc-topbar__search kbd {
	flex-shrink: 0;
	font-family: inherit;
	font-size: 11px;
	padding: 2px 6px;
	border-radius: 4px;
	border: 1px solid var(--doc-border);
	background: var(--doc-bg);
	color: var(--doc-text-faint);
}

.doc-topbar__menu-btn {
	display: none;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 1px solid var(--doc-border);
	border-radius: var(--doc-radius);
	background: var(--doc-bg);
	color: var(--doc-text);
	cursor: pointer;
}

/* —— Layout —— */
.doc-shell {
	display: flex;
	min-height: calc(100vh - var(--doc-topbar-h));
}

.doc-sidebar {
	flex: 0 0 var(--doc-sidebar-w);
	width: var(--doc-sidebar-w);
	position: sticky;
	top: var(--doc-topbar-h);
	align-self: flex-start;
	max-height: calc(100vh - var(--doc-topbar-h));
	overflow-y: auto;
	padding: 16px 12px 24px;
	background: var(--doc-sidebar-bg);
	border-right: 1px solid var(--doc-border);
}

.doc-sidebar__inner {
	padding: 0 4px;
}

.doc-nav__group-label {
	margin: 20px 0 8px;
	padding: 0 10px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--doc-text-faint);
}

.doc-nav__group-label:first-child {
	margin-top: 4px;
}

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

.doc-nav__item {
	margin: 2px 0;
}

.doc-nav__link {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 7px 10px;
	border-radius: var(--doc-radius);
	font-size: 14px;
	color: var(--doc-text-muted);
	text-decoration: none;
	line-height: 1.35;
}

.doc-nav__link:hover {
	background: var(--doc-bg-muted);
	color: var(--doc-text);
	text-decoration: none;
}

.doc-nav__link.is-active {
	background: var(--doc-accent-soft);
	color: var(--doc-accent);
	font-weight: 500;
}

.doc-nav__item.is-hidden {
	display: none;
}

.doc-nav__link.is-hidden {
	display: none;
}

.doc-nav__chevron {
	flex-shrink: 0;
	width: 16px;
	height: 16px;
	opacity: 0.5;
	transition: transform 0.15s ease;
}

.doc-nav__group.is-open > .doc-nav__toggle .doc-nav__chevron {
	transform: rotate(90deg);
}

.doc-nav__toggle {
	width: 100%;
	border: none;
	background: none;
	cursor: pointer;
	font: inherit;
	text-align: left;
	padding: 0;
}

.doc-nav__children {
	list-style: none;
	margin: 0;
	padding: 0 0 4px 12px;
	display: none;
}

.doc-nav__group.is-open > .doc-nav__children {
	display: block;
}

.doc-nav__children .doc-nav__link {
	font-size: 13px;
	padding: 5px 10px;
}

.doc-sidebar__footer {
	margin-top: 24px;
	padding: 12px 10px 0;
	border-top: 1px solid var(--doc-border);
	font-size: 12px;
	color: var(--doc-text-faint);
}

/* —— Main —— */
.doc-main {
	flex: 1;
	min-width: 0;
	display: flex;
	justify-content: center;
	padding: 32px 40px 80px;
}

.doc-article {
	width: 100%;
	max-width: 720px;
}

.doc-page-header {
	margin-bottom: 28px;
}

.doc-page-header__row {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 12px;
}

.doc-page-header h1 {
	margin: 0;
	font-size: 2rem;
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: -0.02em;
	color: var(--doc-text);
}

.doc-badge {
	display: inline-flex;
	align-items: center;
	padding: 3px 8px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	border-radius: 4px;
	background: var(--doc-badge-new-bg);
	color: var(--doc-badge-new-text);
	vertical-align: middle;
	margin-right: 8px;
}

.version-badge {
	display: inline-flex;
	align-items: center;
	padding: 3px 9px;
	margin-left: 10px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	border-radius: 4px;
	background: linear-gradient(135deg, #ffe27a 0%, #f4c542 45%, #c9962b 100%);
	color: #2a1c00;
	border: 1px solid #b8860b;
	box-shadow: 0 1px 2px rgba(160, 110, 0, 0.25);
	vertical-align: middle;
	white-space: nowrap;
}

.doc-lead {
	font-size: 16px;
	color: var(--doc-text-muted);
	margin: 0 0 20px;
}

.doc-callout {
	display: flex;
	gap: 12px;
	padding: 14px 16px;
	margin: 20px 0;
	background: var(--doc-callout-bg);
	border: 1px solid var(--doc-callout-border);
	border-radius: var(--doc-radius-lg);
	font-size: 14px;
	color: var(--doc-text-muted);
}

.doc-callout__icon {
	flex-shrink: 0;
	width: 20px;
	height: 20px;
	margin-top: 2px;
	border-radius: 50%;
	background: var(--doc-bg-muted);
	color: var(--doc-text-faint);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	font-weight: 700;
	font-style: normal;
}

.doc-callout--tip {
	border-color: var(--doc-accent-border);
	background: var(--doc-accent-soft);
}

.doc-callout--tip .doc-callout__icon {
	background: var(--doc-accent);
	color: #fff;
}

.doc-section {
	margin-bottom: 48px;
	scroll-margin-top: calc(var(--doc-topbar-h) + 16px);
}

.doc-section h2,
.doc-section #how-to-use-heading {
	margin: 0 0 16px;
	padding-bottom: 8px;
	font-size: 1.5rem;
	font-weight: 700;
	letter-spacing: -0.02em;
	color: var(--doc-text);
	border-bottom: 1px solid var(--doc-border);
}

.doc-page-header + #how-to-use-heading {
	margin-top: 28px;
}

.doc-section h3 {
	margin: 28px 0 12px;
	font-size: 1.15rem;
	font-weight: 600;
	color: var(--doc-text);
}

.doc-section h4 {
	margin: 24px 0 8px;
	padding-left: 12px;
	font-size: 0.95rem;
	font-weight: 600;
	color: var(--doc-text-muted);
	border-left: 2px solid var(--doc-border);
}

.doc-toc__link--h4 {
	padding-left: 28px;
	font-size: 11px;
}

.doc-section p {
	margin: 0 0 14px;
}

.doc-section ul,
.doc-section ol {
	margin: 0 0 16px;
	padding-left: 1.35rem;
}

.doc-section li {
	margin: 6px 0;
}

.doc-section li::marker {
	color: var(--doc-text-faint);
}

.doc-whats-new-note {
	margin-top: 20px;
	padding-top: 16px;
	border-top: 1px solid var(--doc-border);
	font-size: 14px;
	color: var(--doc-text-muted);
}

/* Tables */
table.guide {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
	margin: 16px 0 20px;
	border: 1px solid var(--doc-border);
	border-radius: var(--doc-radius);
	overflow: hidden;
}

.guide th,
.guide td {
	border-bottom: 1px solid var(--doc-border);
	padding: 10px 14px;
	text-align: left;
	vertical-align: top;
}

.guide th {
	background: var(--doc-bg-subtle);
	font-weight: 600;
	font-size: 13px;
	color: var(--doc-text-muted);
}

.guide tr:last-child td {
	border-bottom: none;
}

/* Widget cards */
.widget-block {
	margin: 20px 0;
	padding: 20px 22px;
	background: var(--doc-bg-subtle);
	border: 1px solid var(--doc-border);
	border-radius: var(--doc-radius-lg);
	scroll-margin-top: calc(var(--doc-topbar-h) + 16px);
}

.widget-block h3 {
	margin-top: 0;
	font-size: 1.05rem;
	color: var(--doc-text);
}

.widget-meta {
	font-size: 14px;
	color: var(--doc-text-muted);
	margin: -4px 0 12px;
}

.badge {
	display: inline-block;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	padding: 2px 8px;
	border-radius: 4px;
	background: var(--doc-accent-soft);
	color: var(--doc-accent);
	border: 1px solid var(--doc-accent-border);
}

/* Figures */
figure.shot {
	margin: 20px 0;
}

figure.shot img {
	max-width: 100%;
	height: auto;
	display: block;
	border-radius: var(--doc-radius);
	border: 1px solid var(--doc-border);
	background: var(--doc-bg);
	box-shadow: var(--doc-shadow);
}

figcaption {
	font-size: 13px;
	color: var(--doc-text-muted);
	margin-top: 10px;
	line-height: 1.5;
}

figcaption strong {
	color: var(--doc-text);
	font-weight: 600;
}

/* Image placeholder used in the Elementor widgets section in lieu of screenshots. */
.img-placeholder {
	margin: 12px 0 0;
	padding: 8px 12px;
	font-size: 13px;
	line-height: 1.4;
	color: var(--doc-text-muted);
	background: var(--doc-bg-subtle);
	border: 1px dashed var(--doc-border);
	border-radius: var(--doc-radius);
}

.img-placeholder code {
	color: var(--doc-text);
	background: transparent;
	padding: 0;
}

/* Video embed */
.doc-video {
	position: relative;
	margin: 20px 0 24px;
	padding-bottom: 56.25%;
	height: 0;
	overflow: hidden;
	border-radius: var(--doc-radius-lg);
	border: 1px solid var(--doc-border);
	background: var(--doc-bg-muted);
}

.doc-video iframe {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

/* Footer */
.doc-foot {
	margin-top: 48px;
	padding-top: 24px;
	border-top: 1px solid var(--doc-border);
	font-size: 13px;
	color: var(--doc-text-muted);
}

/* —— Right TOC —— */
.doc-toc {
	flex: 0 0 var(--doc-toc-w);
	width: var(--doc-toc-w);
	position: sticky;
	top: var(--doc-topbar-h);
	align-self: flex-start;
	max-height: calc(100vh - var(--doc-topbar-h));
	overflow-y: auto;
	padding: 28px 16px 24px 8px;
}

.doc-toc__label {
	display: flex;
	align-items: center;
	gap: 6px;
	margin: 0 0 12px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--doc-text-faint);
}

.doc-toc__list {
	list-style: none;
	margin: 0;
	padding: 0;
	border-left: 1px solid var(--doc-border);
}

.doc-toc__item {
	margin: 0;
}

.doc-toc__link {
	display: block;
	padding: 4px 0 4px 12px;
	margin-left: -1px;
	font-size: 13px;
	line-height: 1.4;
	color: var(--doc-text-muted);
	text-decoration: none;
	border-left: 2px solid transparent;
}

.doc-toc__link:hover {
	color: var(--doc-text);
	text-decoration: none;
}

.doc-toc__link.is-active {
	color: var(--doc-accent);
	border-left-color: var(--doc-accent);
	font-weight: 500;
}

.doc-toc__link--h3 {
	padding-left: 22px;
	font-size: 12px;
	color: var(--doc-text-faint);
}

/* —— Theme switcher —— */
.doc-theme-switch {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 90;
	display: flex;
	padding: 4px;
	background: var(--doc-bg);
	border: 1px solid var(--doc-border);
	border-radius: var(--doc-radius-lg);
	box-shadow: 0 4px 16px rgb(0 0 0 / 0.08);
}

.doc-theme-switch button {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	padding: 0;
	border: none;
	border-radius: 6px;
	background: transparent;
	color: var(--doc-text-muted);
	cursor: pointer;
	font-size: 14px;
	line-height: 1;
}

.doc-theme-switch button:hover {
	background: var(--doc-bg-muted);
	color: var(--doc-text);
}

.doc-theme-switch button.is-active {
	background: var(--doc-accent-soft);
	color: var(--doc-accent);
}

.doc-sidebar-backdrop {
	display: none;
}

/* —— Responsive —— */
@media (max-width: 1100px) {
	.doc-toc {
		display: none;
	}
}

@media (max-width: 900px) {
	.doc-topbar__menu-btn {
		display: flex;
	}

	.doc-topbar__search-wrap {
		display: none;
	}

	.doc-sidebar {
		position: fixed;
		top: var(--doc-topbar-h);
		left: 0;
		bottom: 0;
		z-index: 80;
		transform: translateX(-100%);
		transition: transform 0.2s ease;
		box-shadow: 4px 0 24px rgb(0 0 0 / 0.12);
	}

	.doc-sidebar.is-open {
		transform: translateX(0);
	}

	.doc-sidebar-backdrop {
		display: none;
		position: fixed;
		inset: var(--doc-topbar-h) 0 0 0;
		z-index: 70;
		background: rgb(0 0 0 / 0.4);
	}

	.doc-sidebar-backdrop.is-visible {
		display: block;
	}

	.doc-main {
		padding: 24px 20px 64px;
	}
}

@media print {
	.doc-topbar,
	.doc-sidebar,
	.doc-toc,
	.doc-theme-switch,
	.doc-sidebar-backdrop {
		display: none !important;
	}

	.doc-main {
		padding: 0;
		max-width: none;
	}

	.doc-section,
	.widget-block {
		break-inside: avoid;
	}

	a {
		color: inherit;
		text-decoration: underline;
	}
}
