/* ShareX-inspired Dark Theme Overrides for Prespa
 * Loaded after main.css to override light-mode defaults
 * Dark mode is always on (.dark-mode class on body) */

/* ── Base: override body-level CSS variables ─────────────────── */
body {
	--p-border-color: #3b3b3b;
	--p-line: rgba(255, 255, 255, 0.08);
	--p-line-light: rgba(255, 255, 255, 0.15);
	--p-shadow: rgba(0, 0, 0, 0.3);
	--p-border: rgba(255, 255, 255, 0.12);
	--p-box-shadow: 0 3px 45px 14px rgba(0, 0, 0, 0.5);
	--p-box-shadow-hover: 0 3px 45px 26px rgba(0, 0, 0, 0.7);
	--wp--preset--color--btn-bgr: #333;
	--wp--preset--color--text-primary: #e7e9ea;
	--wp--preset--color--links: #c8deff;
	--wp--preset--color--link-headings: #e7e9ea;
}

/* ── Backgrounds ─────────────────────────────────────────────── */
body,
.site-header,
.main-navigation-container,
.top-menu {
	background-color: #1e1e1e;
}

.site-footer {
	background-color: #1a1a1a;
}

/* ── Navigation ──────────────────────────────────────────────── */
.main-navigation-container {
	border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.top-menu {
	border-bottom: 1px solid rgba(255, 255, 255, 0.15);
	box-shadow: none;
}

.top-menu a,
.top-menu .feather {
	color: #e7e9ea;
}

.main-navigation-container *,
.main-navigation-container a {
	color: #e7e9ea;
}

.site-title a,
body p.site-description {
	color: #e7e9ea;
}

/* ── Dropdown menus ─────────────────────────────────────────── */
.site-menu ul ul a {
	background-color: #272727;
	border-top: 1px solid rgba(255, 255, 255, 0.15);
	border-right: 1px solid rgba(255, 255, 255, 0.15);
	border-bottom: 1px solid rgba(0, 0, 0, 0.2);
	color: #e7e9ea;
}

.site-menu ul ul li:hover > ul,
.site-menu ul ul li:focus > ul {
	left: 100%;
}

/* ── Sticky header ──────────────────────────────────────────── */
.sticky-header.show {
	background-color: #1e1e1e;
}

.fixed-header {
	border-bottom: 1px solid rgba(255, 255, 255, 0.15);
	box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

/* ── Mobile slide menu ─────────────────────────────────────── */
.slide-menu {
	background-color: #1e1e1e;
}

.slide-menu ul li a,
.moved-items {
	color: #e7e9ea;
}

.moved-items {
	border-top: 1px solid rgba(255, 255, 255, 0.15);
}

/* ── Burger menu ────────────────────────────────────────────── */
.menu-toggle .burger,
.menu-toggle .burger::before,
.menu-toggle .burger::after {
	border-bottom: 2px solid #e7e9ea;
}

.burger {
	border-bottom: 2px solid #e7e9ea;
}

.burger::before,
.burger::after {
	border-bottom: 2px solid #e7e9ea;
}

.burger-check:checked ~ .burger::before,
.burger-check:checked ~ .burger::after {
	border-bottom: 2px solid #e7e9ea;
}

/* ── Text & Headings ───────────────────────────────────────── */
body,
.entry-content,
.single .entry-content {
	color: #ccc;
}

h1, h2, h3, h4, h5, h6 {
	color: #fafafa;
}

.entry-title a,
.entry-title a:hover,
.entry-title a:focus {
	color: #fafafa;
}

/* ── Links ───────────────────────────────────────────────────── */
a {
	color: #c8deff;
}

a:hover {
	color: #e7e9ea;
}

/* ── Entry meta ─────────────────────────────────────────────── */
.entry-meta a,
.entry-footer a,
.pretitle-meta a,
.widget-area a {
	color: #999 !important;
}

.entry-footer {
	border-top: none;
}

.footer-content {
	border-top: 2px solid rgba(255, 255, 255, 0.08);
}

/* ── Tables ─────────────────────────────────────────────────── */
.entry-content thead,
.entry-content tr:nth-child(2n) td,
.entry-content tr:nth-child(2n) th {
	background-color: transparent;
}

.entry-content th,
.entry-content td {
	border-color: rgba(255, 255, 255, 0.1);
	color: #ccc;
}

.entry-content th {
	color: #e7e9ea;
}

/* ── Code blocks ────────────────────────────────────────────── */
pre,
code,
.wp-block-code,
.wp-block-code code {
	background-color: #282c34;
	color: #abb2bf;
	border-radius: 5px;
}

pre {
	background-color: #282c34;
	border: 1px solid #3b3b3b;
}

/* ── Forms & Inputs ─────────────────────────────────────────── */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="number"],
input[type="tel"],
input[type="date"],
input[type="search"],
textarea,
select {
	background-color: #2e2e2e;
	color: #e7e9ea;
	border: 1px solid #3b3b3b;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="search"]:focus,
textarea:focus {
	color: #fafafa;
	border-color: #555;
}

/* ── Buttons (ShareX neutral gray style) ───────────────────── */
button,
input[type="button"],
input[type="reset"],
input[type="submit"],
.wp-element-button,
.wp-block-button__link {
	background-color: #2e2e2e;
	color: #e7e9ea;
	border: none;
	border-radius: 5px;
	font-weight: 300;
	transition: background-color 0.15s ease;
}

button:hover,
input[type="button"]:hover,
input[type="reset"]:hover,
input[type="submit"]:hover,
.wp-element-button:hover,
.wp-block-button__link:hover {
	background-color: #363636;
	color: #fafafa;
}

/* ── Call-to-action buttons ─────────────────────────────────── */
.call-to-action a {
	border: none;
}

/* ── Pagination ────────────────────────────────────────────── */
.navigation .page-numbers {
	background-color: transparent;
	border: 1px solid rgba(255, 255, 255, 0.15);
	color: #e7e9ea;
}

.navigation .page-numbers:hover,
.navigation .page-numbers.current {
	background-color: #333;
	border-color: #555;
	color: #fafafa;
}

/* ── Search overlay ────────────────────────────────────────── */
#search-open {
	background-color: #1e1e1e;
}

#search-open .search-field {
	border-bottom: 2px solid #555;
	color: #e7e9ea;
}

#search-open .search-field:focus {
	border-bottom: 2px solid #c8deff;
}

.header-search-form .feather {
	stroke: #e7e9ea;
}

/* ── Blockquote ─────────────────────────────────────────────── */
blockquote {
	border-left: 1px solid rgba(255, 255, 255, 0.3);
	color: #ccc;
}

/* ── HR ─────────────────────────────────────────────────────── */
hr {
	background-color: rgba(255, 255, 255, 0.15);
	border-color: rgba(255, 255, 255, 0.15);
}

/* ── Newsletter ─────────────────────────────────────────────── */
.prespa-newsletter {
	background: #272727;
}

/* ── Preloader ─────────────────────────────────────────────── */
.preloader {
	background: #1e1e1e;
}

.bounce-loader .bounce1,
.bounce-loader .bounce2,
.bounce-loader .bounce3 {
	background-color: #555;
}

/* ── Widgets ───────────────────────────────────────────────── */
.widget-area ul li {
	border-bottom-color: rgba(255, 255, 255, 0.08);
}

.widget-column:not(:last-child) {
	border-right-color: rgba(255, 255, 255, 0.08);
}

/* ── Comment reply ─────────────────────────────────────────── */
.comment-reply-link {
	background: transparent;
	border: none;
	color: #e7e9ea;
}

/* ── Content sections ───────────────────────────────────────── */
.entry-content > .wp-block-group:not(:last-child),
.entry-content > .wp-block-cover:not(:last-child),
.entry-content > .wp-block-columns:not(:last-child) {
	border-bottom: 2px solid rgba(255, 255, 255, 0.08);
}

/* Transparent pattern backgrounds in dark mode */
.pattern-features .wp-block-column,
.section-features,
.section-faq,
.section-stats-counter,
.pattern-pricing-plans .wp-block-column,
.pattern-pricing-plans .has-white-background-color,
.pattern-services .wp-block-group,
.pattern-statistics,
.six-services,
.six-services .wp-block-column,
.prespa-newsletter,
.section-newsletter {
	background: transparent !important;
}

/* ── Cover blocks ──────────────────────────────────────────── */
.wp-block-cover__inner-container {
	color: #e7e9ea !important;
}

.wp-block-cover__background {
	filter: brightness(20%);
	opacity: 0.6 !important;
}

/* ── Calendar ──────────────────────────────────────────────── */
.wp-block-calendar table th {
	background-color: transparent;
}

.wp-block-calendar table tbody,
.wp-block-calendar table caption {
	color: #999;
}

/* ── ins/mark ──────────────────────────────────────────────── */
ins {
	background: #3b3b3b;
}

/* ── Header image ───────────────────────────────────────────── */
.header-image-wrapper::before {
	filter: brightness(40%);
}

/* ── Footer content ────────────────────────────────────────── */
.footer-content .social-icon {
	padding-top: 2rem;
}

/* ── Tags ─────────────────────────────────────────────────── */
.tagcloud a:hover {
	color: #fafafa;
}

/* ── Custom scrollbar (ShareX-style) ───────────────────────── */
::-webkit-scrollbar,
::-webkit-scrollbar-corner {
	width: 15px;
	background-color: #2e2e2e;
}

::-webkit-scrollbar-thumb {
	background-color: rgba(255, 255, 255, 0.1);
	min-height: 60px;
}

::-webkit-scrollbar-thumb:hover {
	background-color: rgba(255, 255, 255, 0.15);
}

/* ── WordPress admin bar override (frontend) ─────────────────── */
#wpadminbar {
	background: #1e1e1e;
}

/* ── ShareX-style buttons (override Otter blue defaults) ── */
.wp-block-button__link,
.wp-block-themeisle-blocks-button .wp-block-button__link {
	background-color: #2e2e2e !important;
	color: #e7e9ea !important;
	border: none !important;
	border-radius: 5px;
	padding: 8px 24px !important;
	font-size: 18px !important;
	font-weight: 300 !important;
	line-height: 27px !important;
	display: inline-block !important;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.15s ease;
	box-sizing: border-box;
}

/* Button icons — tint SVG images to match text color */
.wp-block-button__link .btn-icon,
.wp-block-themeisle-blocks-button .wp-block-button__link .btn-icon {
	filter: brightness(0) invert(91%);
	opacity: 0.9;
}

.wp-block-button__link:hover .btn-icon,
.wp-block-themeisle-blocks-button .wp-block-button__link:hover .btn-icon {
	opacity: 1;
}

.wp-block-button__link:hover,
.wp-block-themeisle-blocks-button .wp-block-button__link:hover {
	background-color: #363636 !important;
	color: #fafafa !important;
}

/* ── Otter Tabs: ShareX-style ─────────────────────────────── */
/* Override Otter's CSS custom properties set by the block */
.wp-block-themeisle-blocks-tabs {
	--border-color: #3b3b3b !important;
	--border-width: 1px !important;
	--border-radius: 5px !important;
	--title-color: #999 !important;
	--tab-color: #2e2e2e !important;
	--active-title-color: #e7e9ea !important;
	--active-title-background: #2e2e2e !important;
	--active-title-border-color: #4a9eff !important;
	--content-text-color: #ccc !important;
	--content-padding: 16px !important;
	--title-padding: 10px 16px !important;
	--title-border-width: 1px !important;
	--font-size: 16px !important;
}

.wp-block-themeisle-blocks-tabs__header_item {
	font-weight: 300;
	color: #999 !important;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.wp-block-themeisle-blocks-tabs__header_item.active {
	color: #e7e9ea !important;
}

.wp-block-themeisle-blocks-tabs__header_item:hover {
	color: #ccc !important;
}

/* Tab content panels */
.wp-block-themeisle-blocks-tabs-item__content {
	background-color: #2e2e2e !important;
	color: #ccc !important;
}

.wp-block-themeisle-blocks-tabs-item__content p {
	color: #ccc;
}

/* Accordion-style tab items (mobile) */
.wp-block-themeisle-blocks-tabs-item__header {
	font-weight: 300;
	color: #999 !important;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.wp-block-themeisle-blocks-tabs-item__header:hover {
	color: #ccc !important;
}

.wp-block-themeisle-blocks-tabs-item__header:hover {
	color: #ccc !important;
}

/* ── Otter Blocks overrides ────────────────────────────────── */
.wp-block-themeisle-blocks-advanced-columns {
	background-color: transparent;
}

/* ── Image glow (matching blog card --p-box-shadow) ─────── */
.entry-content .wp-block-image img:not([src$=".svg"]),
.page-content .wp-block-image img:not([src$=".svg"]) {
	box-shadow: 0 2px 22px 7px rgba(19, 37, 68, 0.38);
	border-radius: 5px;
	transition: box-shadow 0.3s ease;
}

.entry-content .wp-block-image img:not([src$=".svg"]):hover,
.page-content .wp-block-image img:not([src$=".svg"]):hover {
	box-shadow: 0 2px 22px 13px rgba(19, 37, 68, 0.48);
}

/* ── Compact section headings (align with screenshots) ────── */
.entry-content h3.compact-heading,
.entry-content .wp-block-themeisle-blocks-advanced-heading.compact-heading {
	margin-top: 0 !important;
}

/* ── ShareX-style section headings ────────────────────────────── */
.entry-content h3.sharex-section-heading,
.entry-content .wp-block-themeisle-blocks-advanced-heading.sharex-section-heading {
	font-family: "Roboto Condensed", "Open Sans", sans-serif;
	font-size: 40px;
	font-weight: 400;
	color: #e7e9ea;
	line-height: 48px;
	margin-top: 14px !important;
	margin-bottom: 28px !important;
	text-align: center;
}
.entry-content .sharex-section-heading i {
	font-size: 45px;
	margin-right: 15px;
	color: #e7e9ea;
	vertical-align: middle;
}

/* ── ShareX-style feature grid (no border) ────────────────────── */
.entry-content .wp-block-columns.sharex-feature-grid {
	border-bottom: none !important;
}

/* ── Documentation card grid ─────────────────────────────────── */
.entry-content .wp-block-columns.docs-card-grid {
	border-bottom: none !important;
	gap: 16px;
}

.entry-content .docs-card-grid .wp-block-column {
	background: #272727;
	border: 1px solid #333;
	border-radius: 8px;
	padding: 24px;
	transition: border-color 0.2s ease;
	cursor: pointer;
	position: relative;
	overflow: hidden;
}

.entry-content .docs-card-grid .wp-block-column:hover {
	border-color: #4a9eff;
}

.entry-content .docs-card-grid .wp-block-column h3 {
	margin-top: 0 !important;
	margin-bottom: 8px !important;
	font-size: 18px;
	font-weight: 600;
	position: static;
}

/* Stretch the heading link over the entire card via invisible overlay */
.entry-content .docs-card-grid .wp-block-column h3 a::after {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100vh;
}

.entry-content .docs-card-grid .wp-block-column h3 a {
	color: #e7e9ea;
	text-decoration: none;
}

.entry-content .docs-card-grid .wp-block-column h3 a:hover {
	color: #c8deff;
}

.entry-content .docs-card-grid .wp-block-column p {
	color: #999;
	font-size: 15px;
	line-height: 1.5;
}

@media (max-width: 575.98px) {
	.entry-content .docs-card-grid .wp-block-column {
		padding: 20px;
	}
}

/* ── Subtle heading underlines (ShareX gradient style) ─────── */
.markdown h1,
.markdown h2 {
	background: linear-gradient(to right, rgba(255, 255, 255, 0.15) 0%, transparent 80%) left bottom no-repeat;
	background-size: 100% 1px;
	padding-bottom: 5px;
}

/* ── Selection color ────────────────────────────────────────── */
::selection {
	background-color: rgba(74, 158, 255, 0.3);
	color: #fafafa;
}

/* ── ShareX-style Navbar (FSE header template part) ────────── */
/* The FSE header replaces the classic theme header on all pages */
header.wp-block-group {
	background-color: #272727 !important;
	padding: 0 !important;
	margin: 0 !important;
	border-bottom: none;
}

header.wp-block-group .wp-block-group.has-raft-bg-alt-background-color {
	background-color: #272727 !important;
	padding-top: 0 !important;
	padding-bottom: 0 !important;
}

/* Navigation container: full width, 52px height, left-aligned */
header.wp-block-group .sharex-nav,
header.wp-block-group .wp-block-group.alignwide {
	max-width: 980px;
	margin: 0 auto;
	height: 52px;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

/* Nav links: 14px, white, 15px padding, Open Sans */
header.wp-block-group .wp-block-navigation .wp-block-navigation-item a {
	font-family: "Open Sans", sans-serif;
	font-size: 14px;
	font-weight: 400;
	color: #fafafa;
	padding: 15px;
	text-decoration: none;
	line-height: 21px;
	display: block;
}

/* Remove left padding from first nav item so text aligns with page content */
header.wp-block-group .wp-block-navigation .wp-block-navigation-item:first-child a {
	padding-left: 0;
}

header.wp-block-group .wp-block-navigation .wp-block-navigation-item a:hover {
	color: #fff;
}

/* Social icons: 22px, matching ShareX icon size */
header.wp-block-group .sharex-social-icons .wp-block-social-link a,
header.wp-block-group .sharex-social-icons .wp-social-link,
header.wp-block-group .sharex-social-icons .wp-block-social-link,
header.wp-block-group .sharex-social-icons svg {
	font-size: 22px;
	color: #fafafa !important;
	fill: #fafafa !important;
	padding: 3px 5px;
	display: block;
	width: auto;
	height: auto;
	line-height: 33px;
	transition: color 0.15s ease;
}

/* Remove right padding from last social icon so it aligns with page content */
header.wp-block-group .sharex-social-icons li:last-child a,
header.wp-block-group .sharex-social-icons li:last-child {
	padding-right: 0;
}

header.wp-block-group .sharex-social-icons .wp-block-social-link a:hover,
header.wp-block-group .sharex-social-icons .wp-social-link:hover {
	color: #fff !important;
	fill: #fff !important;
}

/* Hide the hamburger menu on desktop when inside the FSE header */
header.wp-block-group .wp-block-navigation__responsive-container-open {
	display: none;
}

header.wp-block-group .wp-block-navigation__responsive-container {
	display: none;
}

/* On mobile, show the hamburger and hide the inline nav */
@media (max-width: 575.98px) {
	header.wp-block-group .sharex-nav {
		justify-content: flex-end;
	}

	header.wp-block-group .wp-block-navigation .wp-block-navigation__container {
		display: none;
	}

	header.wp-block-group .wp-block-navigation__responsive-container-open {
		display: flex;
	}

	header.wp-block-group .wp-block-navigation__responsive-container.is-menu-open {
		display: block;
	}

	header.wp-block-group .sharex-social-icons {
		display: none;
	}
}

/* Remove the 14px spacer that was in the old header */
header.wp-block-group .wp-block-spacer {
	display: none;
}

/* ── Hero Heading (ShareX-style, reusable) ──────────────────── */
/* Apply to any page by adding "hero-heading" to the <article> or
   body class, or target a specific page via .page-id-N selector. */

/* Push md-link icon to the far right, top-aligned; keep title centered */
.hero-heading main .is-content-justification-space-between {
	justify-content: space-between !important;
	align-items: flex-start !important;
}

.hero-heading main .is-content-justification-space-between > .wp-block-post-title {
	flex: 1;
	text-align: center;
}

.hero-heading main .md-link {
	align-self: flex-start;
	margin-top: 0;
}

/* Align md-link icon with Telegram icon in the header */
.md-link {
	transform: translateX(-6px);
}

/* Ensure header nav is never centered by the above rule */
header .sharex-nav.is-content-justification-space-between {
	justify-content: space-between !important;
}

.hero-heading .wp-block-post-title {
	font-family: "Roboto Condensed", "Open Sans", sans-serif;
	font-size: 130px;
	font-weight: 400;
	margin-top: 0;
	margin-bottom: 10px;
	text-align: center;
	line-height: 1.2;
	color: #fafafa;
}

.hero-tagline {
	font-family: "Open Sans", sans-serif;
	font-size: 25px;
	font-weight: 300;
	text-align: center;
	margin: 25px 0 20px;
	color: #fafafa;
	line-height: 1.5;
}

@media (max-width: 575.98px) {
	.hero-heading .wp-block-post-title {
		font-size: 100px;
	}

	.hero-tagline {
		font-size: 20px;
		margin: 20px 0 25px;
	}
}

/* ── Home page: Xedant Code section ──────────────────────── */
.home-hero-separator {
	max-width: 200px;
	margin: 15px auto;
	border-color: #3b3b3b;
}

.home-xedant-code-title {
	font-family: "Roboto Condensed", "Open Sans", sans-serif;
	font-size: 91px;
	font-weight: 400;
	text-align: center;
	margin-top: 15px !important;
	margin-bottom: 15px !important;
	line-height: 1.2;
}

.home-xedant-code-title a {
	color: #fafafa;
	text-decoration: none;
}

.home-xedant-code-tagline {
	font-family: "Open Sans", sans-serif;
	font-size: 25px;
	font-weight: 300;
	text-align: center;
	margin: 0 0 30px;
	color: #fafafa;
	line-height: 1.5;
}

.home-xedant-code-btn-wrap {
	margin: 20px 0 0;
}

.home-xedant-code-btn {
	display: inline-block;
	background-color: #2e2e2e;
	color: #e7e9ea;
	font-family: "Open Sans", sans-serif;
	font-size: 22px;
	font-weight: 300;
	padding: 10px 50px;
	border-radius: 5px;
	border: 1px solid #3b3b3b;
	text-decoration: none;
	transition: none;
}

.home-xedant-code-btn:hover {
	background-color: #323232;
	color: #fafafa;
}

@media (max-width: 575.98px) {
	.home-xedant-code-title {
		font-size: 70px;
	}

	.home-xedant-code-tagline {
		font-size: 20px;
		margin: 0 0 20px;
	}

	.home-xedant-code-btn {
		font-size: 18px;
		padding: 8px 30px;
	}
}
