/* 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;
}

/* ── 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;
}
