/* ============ Design tokens (matched from docs.kit.uz/docs) ============ */
:root {
	--docs-bg: #ffffff;
	--docs-bg-subtle: #fafaf9;
	--docs-bg-hover: #f5f5f3;
	--docs-border: #e5e5e3;
	--docs-text: #1a1917;
	--docs-text-secondary: #6b6a65;
	--docs-text-tertiary: #8a8a86;
	--docs-accent: #2563eb;
	--docs-accent-hover: #1d4ed8;
	--docs-accent-soft: #eff6ff;
	--docs-card-hover-border: #c7d7fd;
}

@media (prefers-color-scheme: dark) {
	:root:not([data-wphost-theme]) {
		--docs-bg: #161614;
		--docs-bg-subtle: #161614;
		--docs-bg-hover: #1e1d1b;
		--docs-border: #2a2a28;
		--docs-text: #f0f0ee;
		--docs-text-secondary: #8a8a86;
		--docs-text-tertiary: #6b6a65;
		--docs-accent: #60a5fa;
		--docs-accent-hover: #3b82f6;
		--docs-accent-soft: #172036;
		--docs-card-hover-border: #1e40af;
	}
}

/* Manual toggle override — wins regardless of system preference */
:root[data-wphost-theme="dark"] {
	--docs-bg: #161614;
	--docs-bg-subtle: #161614;
	--docs-bg-hover: #1e1d1b;
	--docs-border: #2a2a28;
	--docs-text: #f0f0ee;
	--docs-text-secondary: #8a8a86;
	--docs-text-tertiary: #6b6a65;
	--docs-accent: #60a5fa;
	--docs-accent-hover: #3b82f6;
	--docs-accent-soft: #172036;
	--docs-card-hover-border: #1e40af;
}

:root[data-wphost-theme="light"] {
	--docs-bg: #ffffff;
	--docs-bg-subtle: #fafaf9;
	--docs-bg-hover: #f5f5f3;
	--docs-border: #e5e5e3;
	--docs-text: #1a1917;
	--docs-text-secondary: #6b6a65;
	--docs-text-tertiary: #8a8a86;
	--docs-accent: #2563eb;
	--docs-accent-hover: #1d4ed8;
	--docs-accent-soft: #eff6ff;
	--docs-card-hover-border: #c7d7fd;
}

/* --- Theme toggle button --- */
.wphost-theme-toggle {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border: 1px solid var( --docs-border );
	border-radius: 999px;
	background: var( --docs-bg );
	color: var( --docs-text-secondary );
	cursor: pointer;
	transition: border-color .18s ease, color .18s ease;
}

.wphost-theme-toggle:hover,
.wphost-theme-toggle:focus {
	background: var( --docs-bg );
	border-color: var( --docs-accent );
	color: var( --docs-accent );
}

.wphost-theme-toggle svg {
	width: 16px;
	height: 16px;
	flex-shrink: 0;
}

.wphost-theme-toggle .wphost-icon-moon {
	display: none;
}

:root[data-wphost-theme="dark"] .wphost-theme-toggle .wphost-icon-sun {
	display: none;
}

:root[data-wphost-theme="dark"] .wphost-theme-toggle .wphost-icon-moon {
	display: block;
}

/* ============ Base ============ */
body {
	font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	background: var( --docs-bg );
	color: var( --docs-text );
}

code, pre, kbd {
	font-family: 'IBM Plex Mono', monospace;
}

a {
	transition: color .15s ease;
}

/* ============ Header ============ */
:root {
	--wphost-siteheader-h: 64px;
}

body {
	padding-top: var( --wphost-siteheader-h );
}

.site-header {
	position: fixed !important;
	top: 0;
	left: 0;
	right: 0;
	z-index: 30;
	height: var( --wphost-siteheader-h );
	background: var( --docs-bg ) !important;
	border-bottom: 1px solid var( --docs-border ) !important;
}

.site-header .inside-header {
	height: 100%;
	display: flex;
	align-items: center;
}

/* GP's "float right" nav positioning auto-pushes #site-navigation itself to the
   far right (grouping it with the login/lang/theme cluster). Pin it right next
   to the logo instead — .wphost-nav-right keeps the auto margin that pushes the
   rest of the cluster to the far right. */
.site-header #site-navigation {
	margin-left: 24px !important;
	margin-right: 0 !important;
}

/* Duplicate page-title heading (e.g. "Главная") — our own hero heading already covers this */
.home .entry-header {
	display: none;
}

.site-header .header-image {
	max-height: 32px;
	width: auto;
}

.site-branding .main-title a {
	color: var( --docs-text ) !important;
	font-weight: 600;
	font-size: 16px;
}

.wphost-site-subtitle {
	margin: 0;
	font-size: 11px;
	line-height: 1.3;
	color: var( --docs-text-secondary );
}

.main-navigation,
.main-navigation .inside-navigation {
	background: transparent !important;
}

.main-navigation .main-nav ul li a {
	color: var( --docs-text-secondary ) !important;
	font-size: 13px;
	font-weight: 500;
}

.main-navigation .main-nav ul li a:hover {
	color: var( --docs-accent ) !important;
}

/* ============ BetterDocs search input ============ */
.betterdocs-live-search input[type="text"],
.betterdocs-search-form-wrapper input[type="text"],
.betterdocs-search input[type="text"] {
	background: var( --docs-bg-hover ) !important;
	border: 1px solid var( --docs-border ) !important;
	border-radius: 8px !important;
	color: var( --docs-text ) !important;
	font-size: 14px !important;
	font-family: 'IBM Plex Sans', sans-serif !important;
	box-shadow: none !important;
}

.betterdocs-live-search input[type="text"]:focus,
.betterdocs-search input[type="text"]:focus {
	border-color: var( --docs-accent ) !important;
	box-shadow: 0 0 0 1px var( --docs-accent ) !important;
	outline: none !important;
}

.betterdocs-live-search input::placeholder {
	color: var( --docs-text-tertiary ) !important;
}

/* Search hero block (rendered by BetterDocs' own JS: .betterdocs-search-layout-1 wrapper
   with hardcoded light colors) — the heading/subheading inherit our token-based text
   color, so the wrapper backgrounds must switch too or dark mode leaves near-invisible
   pale text on a light box. */
.betterdocs-search-layout-1 {
	background: var( --docs-bg-subtle ) !important;
}

.betterdocs-search-layout-1 .search-bar,
.betterdocs-search-layout-1 .search-input-wrapper {
	background: var( --docs-bg ) !important;
	border-color: var( --docs-border ) !important;
}

.betterdocs-search-layout-1 .search-input {
	color: var( --docs-text ) !important;
}

.betterdocs-search-heading .subheading {
	color: var( --docs-text-secondary ) !important;
}

/* ============ Homepage hero ============ */
.wphost-hero {
	max-width: 820px;
	margin: 0 auto;
	padding: 48px 20px 24px;
	text-align: left;
}

.wphost-hero h1 {
	font-size: 34px;
	font-weight: 700;
	color: var( --docs-text );
	line-height: 1.2;
	margin: 0 0 12px;
}

.wphost-hero p {
	font-size: 17px;
	color: var( --docs-text-secondary );
	line-height: 1.6;
	max-width: 560px;
	margin: 0 0 28px;
}

.wphost-hero .betterdocs-live-search,
.wphost-hero .betterdocs-search-form-wrapper {
	max-width: 480px;
}

/* ============ Category card grid ============ */
.wphost-card-grid {
	display: grid;
	grid-template-columns: repeat( auto-fill, minmax( 280px, 1fr ) );
	gap: 20px;
	max-width: 1100px;
	margin: 32px auto 60px;
	padding: 0 20px;
}

.wphost-card {
	border: 1px solid var( --docs-border );
	border-radius: 12px;
	padding: 20px;
	background: var( --docs-bg );
	transition: border-color .15s ease, box-shadow .15s ease;
}

.wphost-card:hover {
	border-color: var( --docs-card-hover-border );
	box-shadow: 0 1px 4px rgba( 0, 0, 0, .08 );
}

.wphost-card-head {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	margin-bottom: 12px;
}

.wphost-card-icon {
	width: 40px;
	height: 40px;
	border-radius: 8px;
	background: var( --docs-accent-soft );
	color: var( --docs-accent );
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.wphost-card-title {
	font-size: 15px;
	font-weight: 600;
	color: var( --docs-text );
	margin: 0;
}

.wphost-card-title a {
	color: inherit;
	text-decoration: none;
}

.wphost-card-title a:hover {
	color: var( --docs-accent );
}

.wphost-card-desc {
	font-size: 13px;
	color: var( --docs-text-secondary );
	line-height: 1.5;
	margin: 4px 0 0;
}

.wphost-card-list {
	list-style: none;
	margin: 14px 0 0;
	padding: 0;
}

.wphost-card-list li a {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	color: var( --docs-text-secondary );
	text-decoration: none;
	padding: 5px 0;
}

.wphost-card-list li a:hover {
	color: var( --docs-accent );
}

.wphost-card-list .wphost-chevron {
	color: var( --docs-border );
	flex-shrink: 0;
	transition: color .15s ease;
}

.wphost-card-list li a:hover .wphost-chevron {
	color: var( --docs-accent );
}

.wphost-card-more {
	display: flex;
	align-items: center;
	gap: 6px;
	margin: 12px 0 0;
	padding-top: 12px;
	border-top: 1px solid var( --docs-border );
	font-size: 13px;
	font-weight: 600;
	color: var( --docs-accent );
	text-decoration: none;
}

.wphost-card-more:hover {
	color: var( --docs-accent-hover );
}

.wphost-card-more .wphost-chevron {
	color: currentColor;
}

/* ============ BetterDocs single article + archive polish ============ */
.betterdocs-single-category-wrapper,
.inside-article {
	background: var( --docs-bg ) !important;
	color: var( --docs-text );
}

/* BetterDocs hardcodes #fff on these two wrapper classes — without overriding
   them the whole article column stays white in dark mode even though the
   surrounding chrome (header/sidebar/footer) switches correctly. */
.betterdocs-wrapper,
.betterdocs-content-inner-area {
	background: var( --docs-bg ) !important;
}

.betterdocs-doc-content h1,
.betterdocs-doc-content h2,
.betterdocs-doc-content h3 {
	color: var( --docs-text );
	font-weight: 600;
}

/* BetterDocs hardcodes a dark navy (#1D2939) for the article H1 — invisible
   against a dark background since it never picks up our text token. */
.betterdocs-entry-title {
	color: var( --docs-text ) !important;
}

/* Same issue for the "Обновлено ..." update-date line (hardcoded #475467). */
.update-date {
	color: var( --docs-text-secondary ) !important;
}

/* Widen the single-article reading column: bump the overall cap and give the
   content area 7/12 grid columns instead of BetterDocs' default 6/12 (matching
   the wider pattern the plugin itself already uses on layout-3/5), shrinking
   the right TOC sidebar from 3 to 2 columns to compensate. */
.betterdocs-wrapper.betterdocs-single-layout-8 .betterdocs-content-wrapper {
	max-width: 1560px;
}

.betterdocs-fluid-wrapper.betterdocs-single-layout-8 .betterdocs-content-wrapper .betterdocs-content-area {
	grid-column-start: 4;
	grid-column-end: 11;
}

.betterdocs-wrapper.betterdocs-single-layout-8 .betterdocs-content-wrapper .betterdocs-sidebar.betterdocs-full-sidebar-right {
	grid-column: 11 / span 2;
}

/* ============ Article body typography ============ */
.betterdocs-entry-content {
	color: var( --docs-text );
	font-size: 16px;
	line-height: 1.7;
}

.betterdocs-entry-content h2,
.betterdocs-entry-content h3,
.betterdocs-entry-content h4 {
	color: var( --docs-text );
	font-weight: 600;
	line-height: 1.3;
}

.betterdocs-entry-content h2 {
	font-size: 24px;
	margin: 40px 0 16px;
	padding-top: 8px;
	border-top: 1px solid var( --docs-border );
}

.betterdocs-entry-content h2:first-child {
	margin-top: 0;
	padding-top: 0;
	border-top: none;
}

.betterdocs-entry-content h3 {
	font-size: 19px;
	margin: 28px 0 12px;
}

.betterdocs-entry-content p {
	margin: 0 0 16px;
	color: var( --docs-text );
}

.betterdocs-entry-content ul,
.betterdocs-entry-content ol {
	margin: 0 0 16px;
	padding-left: 24px;
	color: var( --docs-text );
}

.betterdocs-entry-content li {
	margin-bottom: 8px;
}

.betterdocs-entry-content li > ul,
.betterdocs-entry-content li > ol {
	margin-top: 8px;
	margin-bottom: 0;
}

.betterdocs-entry-content a {
	color: var( --docs-accent );
	text-decoration: underline;
	text-decoration-color: transparent;
	transition: text-decoration-color .15s ease;
}

.betterdocs-entry-content a:hover {
	text-decoration-color: currentColor;
}

.betterdocs-entry-content code {
	font-family: 'IBM Plex Mono', ui-monospace, monospace;
	font-size: 0.88em;
	background: var( --docs-bg-subtle );
	border: 1px solid var( --docs-border );
	border-radius: 4px;
	padding: 1px 6px;
	color: var( --docs-text );
}

.betterdocs-entry-content pre {
	background: var( --docs-bg-subtle );
	border: 1px solid var( --docs-border );
	border-radius: 8px;
	padding: 14px 16px;
	overflow-x: auto;
	margin: 0 0 16px;
}

.betterdocs-entry-content pre code {
	background: none;
	border: none;
	padding: 0;
	font-size: 0.85em;
}

.betterdocs-entry-content strong {
	font-weight: 600;
	color: var( --docs-text );
}

.betterdocs-entry-content img {
	max-width: 100%;
	height: auto;
	border-radius: 8px;
	border: 1px solid var( --docs-border );
}

/* Callout / note boxes for article content */
.wphost-callout {
	display: flex;
	gap: 12px;
	margin: 0 0 20px;
	padding: 14px 16px;
	border-radius: 8px;
	border: 1px solid var( --docs-border );
	background: var( --docs-bg-subtle );
}

.wphost-callout-icon {
	flex-shrink: 0;
	font-size: 18px;
	line-height: 1.4;
}

.wphost-callout-body {
	color: var( --docs-text );
	font-size: 15px;
	line-height: 1.6;
}

.wphost-callout-body strong:first-child {
	color: var( --docs-text );
}

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

.wphost-callout-warning {
	border-color: #b45309;
	background: #fef3c7;
}

:root[data-wphost-theme="dark"] .wphost-callout-warning {
	background: #2a2115;
}

@media ( prefers-color-scheme: dark ) {
	:root:not( [data-wphost-theme] ) .wphost-callout-warning {
		background: #2a2115;
	}
}

/* Step-by-step instruction boxes (numbered steps + info/success banners) */
.wphost-info,
.wphost-success {
	padding: 18px 22px;
	border-radius: 10px;
	margin: 0 0 24px;
	color: var( --docs-text );
}

.wphost-info {
	background: rgba( 43, 176, 214, .1 );
	border-left: 6px solid #2bb0d6;
}

.wphost-success {
	background: rgba( 34, 197, 94, .1 );
	border-left: 6px solid #22c55e;
}

.wphost-info-title,
.wphost-success-title {
	font-size: 18px;
	font-weight: 600;
	display: block;
	margin-bottom: 8px;
}

.wphost-step {
	border: 1px solid var( --docs-border );
	border-left: 4px solid var( --docs-accent );
	border-radius: 12px;
	padding: 22px;
	margin: 0 0 24px;
}

.wphost-step-header {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-bottom: 14px;
}

.wphost-step-num {
	flex-shrink: 0;
	background: var( --docs-accent );
	color: #fff;
	font-weight: 600;
	font-size: 14px;
	padding: 6px 12px;
	border-radius: 8px;
}

/* Dark mode's --docs-accent is lightened for text-on-dark-bg contrast, which
   makes it a weak background for white text specifically — use the darker
   accent-hover value here instead so the badge stays readable. */
:root[data-wphost-theme="dark"] .wphost-step-num {
	background: var( --docs-accent-hover );
}

@media ( prefers-color-scheme: dark ) {
	:root:not( [data-wphost-theme] ) .wphost-step-num {
		background: var( --docs-accent-hover );
	}
}

.wphost-step-title {
	font-size: 18px;
	font-weight: 600;
	color: var( --docs-text );
}

.wphost-step p {
	margin: 0 0 14px;
}

.wphost-note-blue,
.wphost-note-green,
.wphost-note-yellow {
	padding: 12px 16px;
	border-radius: 8px;
	font-size: 14px;
	color: var( --docs-text );
}

.wphost-note-blue {
	background: rgba( 43, 176, 214, .08 );
	border-left: 4px solid #2bb0d6;
}

.wphost-note-green {
	background: rgba( 34, 197, 94, .08 );
	border-left: 4px solid #22c55e;
}

.wphost-note-yellow {
	background: rgba( 250, 204, 21, .12 );
	border-left: 4px solid #facc15;
}

.wphost-note-blue ul,
.wphost-note-green ul,
.wphost-note-yellow ul {
	margin: 10px 0 0;
	padding-left: 20px;
}

/* ============ Sidebar tree (left nav) ============ */
:root {
	--wphost-sidebar-w: 280px;
}

.wphost-sidebar {
	position: fixed;
	top: calc( var( --wphost-topbar-h ) + var( --wphost-siteheader-h ) );
	left: 0;
	bottom: 0;
	width: var( --wphost-sidebar-w );
	background: var( --docs-bg );
	border-right: 1px solid var( --docs-border );
	overflow-y: auto;
	z-index: 39;
	padding: 24px 12px;
	transition: transform .2s ease;
}

.wphost-sidebar-section {
	margin-bottom: 16px;
}

.wphost-sidebar-label {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 0 12px;
	margin: 0 0 6px;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: var( --docs-text-secondary );
}

.wphost-sidebar-label-icon {
	color: var( --docs-accent );
	display: flex;
	flex-shrink: 0;
}

.wphost-sidebar-sublabel {
	padding: 8px 12px 2px;
	margin: 0;
	font-size: 12px;
	font-weight: 600;
	color: var( --docs-text );
}

.wphost-sidebar-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.wphost-sidebar-list li a {
	display: block;
	padding: 6px 12px;
	font-size: 13px;
	line-height: 1.4;
	border-radius: 6px;
	color: var( --docs-text-secondary );
	text-decoration: none;
}

.wphost-sidebar-list li a:hover {
	color: var( --docs-text );
	background: var( --docs-bg-hover );
}

.wphost-sidebar-list li a.wphost-sidebar-active {
	color: var( --docs-accent );
	background: var( --docs-accent-soft );
	font-weight: 500;
}

.wphost-sidebar-backdrop {
	position: fixed;
	inset: 0;
	background: rgba( 0, 0, 0, .4 );
	z-index: 38;
	display: none;
}

.wphost-sidebar-toggle {
	display: none;
	position: fixed;
	top: 14px;
	left: 14px;
	z-index: 41;
	width: 34px;
	height: 34px;
	align-items: center;
	justify-content: center;
	border: 1px solid var( --docs-border );
	border-radius: 6px;
	background: var( --docs-bg );
	color: var( --docs-text );
	cursor: pointer;
}

/* Desktop: sidebar always visible, content shifted right */
@media ( min-width: 1024px ) {
	body.wphost-has-sidebar .site {
		margin-left: var( --wphost-sidebar-w );
	}
}

/* Mobile/tablet: sidebar becomes an off-canvas drawer */
@media ( max-width: 1023px ) {
	.wphost-sidebar {
		top: 0;
		transform: translateX( -100% );
		box-shadow: 2px 0 12px rgba( 0, 0, 0, .15 );
	}

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

	.wphost-sidebar-backdrop.wphost-sidebar-open {
		display: block;
	}

	.wphost-sidebar-toggle {
		display: flex;
	}

	body.wphost-has-sidebar .site-header .inside-header {
		padding-left: 46px;
	}

	body.wphost-sidebar-locked {
		overflow: hidden;
	}
}

/* ============ BetterDocs native single-doc sidebar (restyled to match) ============ */
.betterdocs-sidebar,
.betterdocs-sidebar-content {
	background: var( --docs-bg ) !important;
	border-color: var( --docs-border ) !important;
	font-family: 'IBM Plex Sans', sans-serif !important;
}

.betterdocs-sidebar * {
	font-family: 'IBM Plex Sans', sans-serif !important;
}

/* Search box inside the sidebar */
.betterdocs-search-modal-sidebar input[type="text"],
.betterdocs-sidebar .betterdocs-search-field {
	background: var( --docs-bg-hover ) !important;
	border: 1px solid var( --docs-border ) !important;
	border-radius: 8px !important;
	color: var( --docs-text ) !important;
	box-shadow: none !important;
}

/* Same search box before it's focused into a real input — BetterDocs renders it
   as a faux-input (.betterdocs-search-command span) with its own hardcoded
   light background, separate from the input[type="text"] rule above. */
.betterdocs-search-popup .betterdocs-searchform {
	background: var( --docs-bg-hover ) !important;
}

.betterdocs-search-command {
	color: var( --docs-text-secondary ) !important;
}

.betterdocs-search-modal-sidebar input[type="text"]:focus,
.betterdocs-sidebar .betterdocs-search-field:focus {
	border-color: var( --docs-accent ) !important;
	box-shadow: 0 0 0 1px var( --docs-accent ) !important;
	outline: none !important;
}

/* Category header (section label + count) */
.betterdocs-sidebar .betterdocs-category-header {
	background: transparent !important;
}

.betterdocs-sidebar .betterdocs-category-header:hover {
	background: var( --docs-bg-hover ) !important;
}

.betterdocs-sidebar .betterdocs-single-category-wrapper.active .betterdocs-category-header {
	background: var( --docs-accent-soft ) !important;
	border-color: var( --docs-accent ) !important;
}

/* Customizer sets a translucent white "card" overlay on the expanded article
   list (rgba(255,255,255,.5)) — fine on a white sidebar, but it greys out and
   kills text contrast once the sidebar itself goes dark. */
.betterdocs-sidebar .betterdocs-single-category-inner {
	background: transparent !important;
}

.betterdocs-sidebar .betterdocs-category-title,
.betterdocs-sidebar .betterdocs-category-title a {
	color: var( --docs-text ) !important;
	font-weight: 600 !important;
	font-size: 13px !important;
	text-transform: uppercase;
	letter-spacing: .04em;
}

.betterdocs-sidebar .betterdocs-category-items-counts,
.betterdocs-sidebar .betterdocs-category-items-counts span {
	color: var( --docs-text-tertiary ) !important;
	background: transparent !important;
	font-size: 12px !important;
}

.betterdocs-sidebar .betterdocs-category-icon svg path,
.betterdocs-sidebar .betterdocs-category-collapse {
	fill: var( --docs-accent ) !important;
	color: var( --docs-accent ) !important;
}

/* Article list links */
.betterdocs-sidebar .betterdocs-articles-list li a,
.betterdocs-sidebar .betterdocs-articles-list li a span {
	color: var( --docs-text-secondary ) !important;
	font-size: 13px !important;
	font-weight: 400 !important;
	text-decoration: none !important;
}

.betterdocs-sidebar .betterdocs-articles-list li {
	border-radius: 6px;
	transition: background-color .15s ease;
}

.betterdocs-sidebar .betterdocs-articles-list li:hover {
	background: var( --docs-bg-hover ) !important;
}

.betterdocs-sidebar .betterdocs-articles-list li:hover a,
.betterdocs-sidebar .betterdocs-articles-list li:hover a span {
	color: var( --docs-accent ) !important;
}

.betterdocs-sidebar .betterdocs-articles-list li svg .st0 {
	fill: var( --docs-text-tertiary );
	transition: fill .15s ease;
}

.betterdocs-sidebar .betterdocs-articles-list li:hover svg .st0 {
	fill: var( --docs-accent );
}

.betterdocs-sidebar .betterdocs-articles-list li.active a,
.betterdocs-sidebar .betterdocs-articles-list li.active a span,
.betterdocs-sidebar .betterdocs-articles-list li.current a,
.betterdocs-sidebar .betterdocs-articles-list li.current a span {
	color: var( --docs-accent ) !important;
	font-weight: 500 !important;
}

/* ============ Header nav-right: login menu + language switcher (wp.uz pattern) ============ */
.wphost-nav-right {
	margin-left: auto;
	display: flex;
	align-items: center;
	gap: 12px;
}

/* --- Login button + dropdown (CSS hover, like wp.uz) --- */
.wphost-login-menu {
	position: relative;
}

.wphost-btn-ghost {
	display: inline-flex;
	align-items: center;
	font-family: 'IBM Plex Sans', sans-serif;
	font-weight: 500;
	font-size: 13px;
	color: var( --docs-text-secondary );
	text-decoration: none !important;
	padding: 7px 10px;
	border-radius: 6px;
	position: relative;
	padding-right: 20px;
	background: none;
	border: none;
	cursor: pointer;
}

.wphost-btn-ghost:hover,
.wphost-btn-ghost:focus {
	background: none;
}

.wphost-btn-ghost::after {
	content: '';
	position: absolute;
	right: 6px;
	top: 50%;
	width: 6px;
	height: 6px;
	border: 1.5px solid currentColor;
	border-top: 0;
	border-left: 0;
	transform: translate( 0, -65% ) rotate( 45deg );
	opacity: .55;
	transition: transform .2s ease, opacity .2s ease;
}

.wphost-login-menu:hover .wphost-btn-ghost {
	color: var( --docs-accent );
}

.wphost-login-menu:hover .wphost-btn-ghost::after {
	transform: translate( 0, -25% ) rotate( 225deg );
	opacity: 1;
}

.wphost-login-submenu {
	position: absolute;
	top: 100%;
	right: 0;
	transform: translateY( 8px );
	min-width: 260px;
	padding: 8px;
	background: var( --docs-bg );
	border: 1px solid var( --docs-border );
	border-radius: 12px;
	box-shadow: 0 12px 34px rgba( 20, 16, 40, .14 );
	opacity: 0;
	visibility: hidden;
	transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
	z-index: 60;
}

.wphost-login-menu::after {
	content: '';
	position: absolute;
	left: 0;
	right: 0;
	top: 100%;
	height: 8px;
}

.wphost-login-menu:hover .wphost-login-submenu,
.wphost-login-menu.wphost-dropdown-open .wphost-login-submenu {
	opacity: 1;
	visibility: visible;
	transform: translateY( 0 );
}

.wphost-login-menu.wphost-dropdown-open .wphost-btn-ghost {
	color: var( --docs-accent );
}

.wphost-login-menu.wphost-dropdown-open .wphost-btn-ghost::after {
	transform: translate( 0, -25% ) rotate( 225deg );
	opacity: 1;
}

.wphost-login-submenu a {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 10px;
	border-radius: 9px;
	text-decoration: none !important;
}

.wphost-login-submenu a:hover {
	background: var( --docs-bg-hover );
}

.wphost-sub-ico {
	width: 32px;
	height: 32px;
	flex-shrink: 0;
	background: var( --docs-accent-soft );
	color: var( --docs-accent );
	border-radius: 9px;
	display: grid;
	place-items: center;
}

.wphost-sub-info {
	display: flex;
	flex-direction: column;
	gap: 1px;
	font-size: 13px;
	font-weight: 500;
	color: var( --docs-text );
}

.wphost-sub-info small {
	font-size: 11px;
	font-weight: 400;
	color: var( --docs-text-tertiary );
}

/* --- Language switcher: pill button + click-toggle dropdown --- */
.wphost-lang-switch {
	position: relative;
}

.wphost-lang-flag {
	display: inline-block;
	width: 18px;
	height: 13px;
	border-radius: 3px;
	box-shadow: 0 0 0 1px rgba( 0, 0, 0, .08 );
	object-fit: cover;
}

.wphost-lang-current {
	display: flex;
	align-items: center;
	gap: 7px;
	font-family: 'IBM Plex Sans', sans-serif;
	font-weight: 600;
	font-size: 12px;
	letter-spacing: .03em;
	padding: 5px 8px 5px 7px;
	border: 1px solid var( --docs-border );
	border-radius: 999px;
	color: var( --docs-text );
	background: var( --docs-bg );
	cursor: pointer;
	transition: border-color .18s ease, box-shadow .18s ease;
}

.wphost-lang-current:hover {
	border-color: var( --docs-accent );
}

.wphost-lang-caret {
	color: var( --docs-text-tertiary );
	transition: transform .2s ease;
}

.wphost-lang-switch.wphost-dropdown-open .wphost-lang-current {
	border-color: var( --docs-accent );
	box-shadow: 0 0 0 3px var( --docs-accent-soft );
}

.wphost-lang-switch.wphost-dropdown-open .wphost-lang-caret {
	transform: rotate( 180deg );
}

.wphost-lang-menu {
	position: absolute;
	top: calc( 100% + 8px );
	right: 0;
	min-width: 168px;
	padding: 6px;
	margin: 0;
	background: var( --docs-bg );
	border: 1px solid var( --docs-border );
	border-radius: 14px;
	box-shadow: 0 12px 34px rgba( 20, 16, 40, .14 );
	list-style: none;
	opacity: 0;
	visibility: hidden;
	transform: translateY( -6px );
	transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
	z-index: 70;
}

.wphost-lang-switch.wphost-dropdown-open .wphost-lang-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY( 0 );
}

.wphost-lang-menu li {
	margin: 0;
}

.wphost-lang-menu a {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	padding: 8px 10px;
	border-radius: 9px;
	font-family: 'IBM Plex Sans', sans-serif;
	font-weight: 500;
	font-size: 13px;
	color: var( --docs-text );
	text-decoration: none !important;
	transition: background-color .14s ease;
}

.wphost-lang-menu a:hover {
	background: var( --docs-bg-hover );
}

.wphost-lang-menu a.wphost-lang-active {
	background: var( --docs-accent-soft );
	font-weight: 600;
	color: var( --docs-accent );
}

@media ( max-width: 640px ) {
	.wphost-sub-info,
	.wphost-btn-ghost {
		font-size: 12px;
	}

	.wphost-login-submenu,
	.wphost-lang-menu {
		min-width: 220px;
	}
}

/* ============ Footer copyright ============ */
.site-info {
	background: var( --docs-bg ) !important;
}

.site-info .copyright-bar {
	padding: 20px 0;
	border-top: 1px solid var( --docs-border );
}

.wphost-footer-copyright {
	text-align: center;
}

.wphost-footer-copyright p {
	margin: 0 0 4px;
	font-size: 13px;
	color: var( --docs-text-secondary );
}

.wphost-footer-copyright p:last-child {
	margin-bottom: 0;
}
