/* «Нуль-Один»: dark theme for Magazine Booster through its --hoot-* variables.
   html[data-theme] outranks the theme's :root, so these win over customizer output too. */

html[data-theme="dark"] {
	color-scheme: dark;

	--nulodyn-bg: #0b111c;
	--nulodyn-surface: #121a28;
	--nulodyn-surface-2: #1a2436;
	--nulodyn-line: rgba(255, 255, 255, 0.09);
	--nulodyn-text: #e3e7ee;
	--nulodyn-muted: #98a2b3;

	--hoot-body-bg: var(--nulodyn-bg);
	--hoot-box-bg: var(--nulodyn-surface);
	--hoot-article-bg: var(--nulodyn-surface);
	--hoot-menudd-bg: var(--nulodyn-surface);
	--hoot-subfooter-bg: #0e1522;
	--hoot-footer-bg: #070b12;

	--hoot-basefont-color: var(--nulodyn-text);
	--hoot-basefont-light: var(--nulodyn-muted);
	--hoot-headings-color: #ffffff;
	--hoot-subheadings-color: #c5ccd8;
	--hoot-sitehead-color: var(--nulodyn-text);
	--hoot-logo-color: #ffffff;
	--hoot-topbar-fontcolor: var(--nulodyn-muted);
	--hoot-menufont-color: var(--nulodyn-text);
	--hoot-menuicon-color: var(--nulodyn-text);
	--hoot-menuddfont-color: var(--nulodyn-text);

	/* Yellow reads well on dark: 11:1 against the background. */
	--hoot-linkcolor: #ffc800;
	--hoot-linkhovercolor: #ffe27a;

	--hoot-form-bg: var(--nulodyn-surface);
	--hoot-form-color: var(--nulodyn-text);
	--hoot-form-fieldbg: var(--nulodyn-bg);
	--hoot-form-fielddisabledbg: var(--nulodyn-surface);
	--hoot-form-highlightcolor: var(--nulodyn-line);
	--hoot-form-highlightdarkcolor: #3a4659;

	--hoot-highlight10: rgba(255, 255, 255, 0.04);
	--hoot-highlight20: rgba(255, 255, 255, 0.07);
	--hoot-highlight10background: rgba(255, 255, 255, 0.05);
	--hoot-shadow10: rgba(0, 0, 0, 0.35);
	--hoot-shadow30: rgba(0, 0, 0, 0.45);
	--hoot-shadow50: rgba(0, 0, 0, 0.6);

	--hoot-textstyle-dark: var(--nulodyn-text);
	--hoot-textstyle-darker: #ffffff;
	--hoot-textstyle-darkbg: rgba(255, 255, 255, 0.08);
	--hoot-textstyle-lightbg: rgba(11, 17, 28, 0.75);
}

html[data-theme="dark"] body {
	background-color: var(--nulodyn-bg);
	color: var(--nulodyn-text);
}

/* The light logo would flash before theme.js swaps it in. */
html[data-theme="dark"] .custom-logo:not([data-light-src]),
html[data-theme="dark"] #site-logo-image img:not([data-light-src]) {
	visibility: hidden;
}

/* ---------- switcher ---------- */

.nulodyn-theme-item {
	display: flex !important;
	align-items: center;
	margin-left: auto !important;
}

.nulodyn-theme-switch {
	display: inline-flex;
	gap: 2px;
	padding: 3px;
	border-radius: 999px;
	background: rgba(14, 23, 38, 0.06);
}

html[data-theme="dark"] .nulodyn-theme-switch {
	background: rgba(255, 255, 255, 0.07);
}

.nulodyn-theme-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	padding: 0;
	margin: 0;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: var(--hoot-menufont-color, #222);
	opacity: 0.6;
	cursor: pointer;
	box-shadow: none;
	transition: background-color 0.15s, opacity 0.15s, color 0.15s;
}

.nulodyn-theme-btn:hover {
	opacity: 1;
	background: transparent;
	color: var(--hoot-menufont-color, #222);
}

.nulodyn-theme-btn[aria-pressed="true"] {
	opacity: 1;
	background: #ffc800;
	color: #0e1726;
}

.nulodyn-theme-btn:focus-visible {
	outline: 2px solid #ffc800;
	outline-offset: 2px;
}

/* ---------- front page: "Новина дня" slider, caption over a gradient like news agencies ---------- */

.hootkitslider-widget.slider-style1 .hootkitslide-content {
	left: 0;
	right: 0;
	bottom: 0 !important;
	margin: 0;
	width: 100%;
	max-width: none;
	padding: 90px 28px 26px;
	background: linear-gradient(to bottom, rgba(11, 17, 28, 0) 0%, rgba(11, 17, 28, 0.88) 75%);
}

.hootkitslider-widget.slider-style1 .wrap-light-on-dark .hootkitslide-head {
	background: none;
	color: #ffffff;
	padding: 0;
	font-size: clamp(20px, 2.1vw, 30px);
	line-height: 1.25;
	font-weight: 700;
}

.hootkitslider-widget.slider-style1 .hootkitslide-head a {
	color: #ffffff;
}

.hootkitslider-widget.slider-style1 .hootkitslide-head a:hover {
	color: #ffc800;
}

/* ---------- tags as chips ---------- */

.entry-byline-tags {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
}

a.nulodyn-chip {
	--chip-h: 212;
	display: inline-block;
	padding: 3px 11px;
	border-radius: 999px;
	background: hsl(var(--chip-h) 70% 93%);
	color: hsl(var(--chip-h) 50% 27%);
	font-size: 0.92em;
	font-style: normal;
	line-height: 1.5;
	text-decoration: none;
	transition: background-color 0.15s, color 0.15s;
}

a.nulodyn-chip:hover,
a.nulodyn-chip:focus-visible {
	background: #ffc800;
	color: #0e1726;
}

html[data-theme="dark"] a.nulodyn-chip {
	background: hsl(var(--chip-h) 32% 23%);
	color: hsl(var(--chip-h) 75% 86%);
}

html[data-theme="dark"] a.nulodyn-chip:hover,
html[data-theme="dark"] a.nulodyn-chip:focus-visible {
	background: #ffc800;
	color: #0e1726;
}

/* ---------- sidebar: popular this week ---------- */

.nulodyn-popular {
	list-style: none;
	margin: 0;
	padding: 0;
	counter-reset: none;
}

.nulodyn-popular-item {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 12px 0;
	border-bottom: 1px solid var(--hoot-highlight20, rgba(0, 0, 0, 0.06));
	margin: 0;
}

.nulodyn-popular-item.has-image {
	flex-wrap: wrap;
	padding-top: 0;
}

.nulodyn-popular-imglink {
	display: block;
	flex: 0 0 100%;
}

.nulodyn-popular-img {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	border-radius: 6px;
}

.nulodyn-popular-num {
	flex: 0 0 auto;
	min-width: 34px;
	height: 34px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 999px;
	background: rgba(14, 23, 38, 0.07);
	font-weight: 700;
	font-size: 13px;
	color: var(--hoot-basefont-light, #919191);
}

.nulodyn-popular-item:first-child .nulodyn-popular-num {
	background: #ffc800;
	color: #0e1726;
}

.nulodyn-popular-title {
	flex: 1;
	font-weight: 600;
	line-height: 1.35;
	color: var(--hoot-headings-color, #000);
	text-decoration: none;
}

.nulodyn-popular-title:hover {
	color: var(--hoot-linkcolor);
}

html[data-theme="dark"] .nulodyn-popular-num {
	background: rgba(255, 255, 255, 0.08);
}

/* ---------- related news under a post ---------- */

.nulodyn-related {
	margin-top: 2.5em;
	padding-top: 1.5em;
	border-top: 2px solid #ffc800;
}

.nulodyn-related-heading {
	margin: 0 0 1em;
	font-size: 1.3em;
}

.nulodyn-related-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 20px;
}

@media (max-width: 600px) {
	.nulodyn-related-grid {
		grid-template-columns: 1fr;
	}
}

a.nulodyn-related-card {
	display: flex;
	flex-direction: column;
	gap: 8px;
	text-decoration: none;
	color: var(--hoot-headings-color, #000);
}

.nulodyn-related-img {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	border-radius: 6px;
	background: var(--hoot-highlight10background, rgba(200, 200, 200, 0.15));
}

.nulodyn-related-title {
	font-weight: 600;
	line-height: 1.35;
}

a.nulodyn-related-card:hover .nulodyn-related-title {
	color: var(--hoot-linkcolor);
}

.nulodyn-related-date {
	font-size: 0.85em;
	color: var(--hoot-basefont-light, #919191);
}

/* The theme's scroll animations misfire inside its sticky sidebar and can leave widgets invisible. */
#sidebar-primary [data-aos] {
	opacity: 1 !important;
	transform: none !important;
}

/* The theme numbers every widget list; the popular list draws its own badges. */
.widget ol.nulodyn-popular,
.widget ol.nulodyn-popular > li {
	list-style: none !important;
	margin-left: 0 !important;
	padding-left: 0 !important;
}

.widget ol.nulodyn-popular {
	display: block !important;
}

.widget ol.nulodyn-popular > li {
	display: flex !important;
}

.widget ol.nulodyn-popular > li::before,
.widget ol.nulodyn-popular > li::marker {
	content: none !important;
}

/* ---------- rubrics as solid chips ---------- */

.entry-byline-cats {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
}

a.nulodyn-chip.nulodyn-chip-cat,
html[data-theme="dark"] a.nulodyn-chip.nulodyn-chip-cat {
	background: hsl(var(--chip-h) 60% var(--chip-l, 42%));
	color: #ffffff;
	font-weight: 600;
}

a.nulodyn-chip.nulodyn-chip-cat:hover,
a.nulodyn-chip.nulodyn-chip-cat:focus-visible {
	background: #ffc800;
	color: #0e1726;
}

/* Prev/next post cards sit in the middle of the screen by default and cover the text; dock them low. */
.loop-nav-fixed .loop-nav-unit {
	top: auto;
	bottom: max(24px, 15vh);
	transform: none;
}

/* An empty "Головні новини" grid (young site, nothing beyond the slider yet) is hidden, title and all. */
.widget_hootkit-posts-grid:not(:has(.hk-gridunit)) {
	display: none;
}

/* The theme underlines links in the byline; chips are buttons-like and never underlined. */
.entry-byline a.nulodyn-chip,
.entry-byline a.nulodyn-chip:hover,
.entry-byline a.nulodyn-chip:focus,
a.nulodyn-chip,
a.nulodyn-chip:hover {
	text-decoration: none !important;
	border-bottom: 0 !important;
	box-shadow: none !important;
}

/* ---------- contact form ---------- */

.nulodyn-contact {
	max-width: 640px;
}

.nulodyn-contact p {
	margin: 0 0 1.1em;
}

.nulodyn-contact label {
	display: block;
	margin-bottom: 0.35em;
	font-weight: 600;
}

.nulodyn-contact input[type="text"],
.nulodyn-contact input[type="email"],
.nulodyn-contact select,
.nulodyn-contact textarea {
	display: block;
	width: 100%;
	box-sizing: border-box;
	padding: 10px 12px;
	border: 1px solid var(--hoot-form-highlightcolor, #ddd);
	border-radius: 6px;
	background: var(--hoot-form-fieldbg, #fff);
	color: var(--hoot-basefont-color, #222);
	font: inherit;
}

.nulodyn-contact input:focus,
.nulodyn-contact select:focus,
.nulodyn-contact textarea:focus {
	outline: 2px solid #ffc800;
	outline-offset: 1px;
	border-color: transparent;
}

.nulodyn-contact .nulodyn-hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.nulodyn-field-error {
	display: block;
	margin-top: 0.3em;
	color: #d63638;
	font-size: 0.9em;
}

html[data-theme="dark"] .nulodyn-field-error {
	color: #ff8a8a;
}

.nulodyn-contact-submit {
	padding: 11px 28px;
	border: 0;
	border-radius: 999px;
	background: #ffc800;
	color: #0e1726;
	font-weight: 700;
	cursor: pointer;
}

.nulodyn-contact-submit:hover {
	background: #ffd84d;
	color: #0e1726;
}

.nulodyn-contact-note {
	font-size: 0.85em;
	color: var(--hoot-basefont-light, #919191);
}

.nulodyn-contact-notice {
	padding: 12px 16px;
	border-radius: 6px;
	margin-bottom: 1.2em;
}

.nulodyn-contact-notice.is-success {
	background: hsl(150 60% 92%);
	color: hsl(150 50% 22%);
}

.nulodyn-contact-notice.is-error {
	background: hsl(4 70% 94%);
	color: hsl(4 55% 32%);
}

html[data-theme="dark"] .nulodyn-contact-notice.is-success {
	background: hsl(150 32% 20%);
	color: hsl(150 70% 85%);
}

html[data-theme="dark"] .nulodyn-contact-notice.is-error {
	background: hsl(4 32% 22%);
	color: hsl(4 75% 87%);
}
