/* WPXT Theme Switch — light / dark */

/* ---------- Dark tokens ---------- */
html[data-theme="dark"] {
	color-scheme: dark;
	--ink: #eceae4;
	--ink-2: #d6d3cb;
	--paper: #0e1115;
	--paper-2: #161a20;
	--accent: #3d9be4;
	--accent-dark: #7bbcf0;
	--muted: #9aa3ae;
	--muted-on-dark: #9aa3ae;
	--line: #262c35;
	--line-on-dark: #2c333d;
	--wpxt-line: rgba(236, 234, 228, .12);
	/* Browser-frame mockups (project single template) */
	--frame-bg: #171b21;
	--frame-bar: #1d2229;
	--frame-dot: #3a414b;
}
/* Toggle border reads better a step brighter on the dark header. */
html[data-theme="dark"] .wpxt-theme-toggle { border-color: #3a414b; }
html[data-theme="dark"] body {
	background-color: var(--paper);
	color: var(--ink);
}

/* Sections that are dark by design stay dark (a step lighter than the page). */
html[data-theme="dark"] .wx-dark {
	--ink: #171b21;
	--paper: #f3f1ec;
	--line: #2c333d;
	background-color: #171b21;
}

/* Sections on the blue accent keep their light-mode colours. */
html[data-theme="dark"] .wx-cta,
html[data-theme="dark"] .wx-tone-light {
	--ink: #101318;
	--ink-2: #1a1f27;
	--paper: #f3f1ec;
	--paper-2: #e8e4dc;
	--accent: #117ac9;
	--accent-dark: #0b5a96;
	--muted: #646a73;
	--line: #d8d3c9;
}

/* wpxt-core portfolio cards / frames */
html[data-theme="dark"] .wpxt-browser,
html[data-theme="dark"] .wpxt-card__media { background: #171b21; }
html[data-theme="dark"] .wpxt-browser__bar { background: #1d2229; }
html[data-theme="dark"] .wpxt-browser__bar i { background: #3a414b; }
html[data-theme="dark"] .wpxt-phone a { border-color: #22272f; background: #22272f; }
html[data-theme="dark"] .wpxt-filter button.is-active,
html[data-theme="dark"] .wpxt-filter button.is-active:hover { color: var(--paper); }

/* Fluent Forms */
html[data-theme="dark"] .frm-fluent-form .ff-el-form-control,
html[data-theme="dark"] .frm-fluent-form input[type="text"],
html[data-theme="dark"] .frm-fluent-form input[type="email"],
html[data-theme="dark"] .frm-fluent-form input[type="tel"],
html[data-theme="dark"] .frm-fluent-form input[type="url"],
html[data-theme="dark"] .frm-fluent-form input[type="number"],
html[data-theme="dark"] .frm-fluent-form select,
html[data-theme="dark"] .frm-fluent-form textarea {
	background: rgba(255, 255, 255, .04);
	border-color: rgba(236, 234, 228, .16);
	color: var(--ink);
}
html[data-theme="dark"] .frm-fluent-form .ff-el-form-control:hover,
html[data-theme="dark"] .frm-fluent-form input:hover,
html[data-theme="dark"] .frm-fluent-form select:hover,
html[data-theme="dark"] .frm-fluent-form textarea:hover {
	background: rgba(255, 255, 255, .06);
	border-color: rgba(236, 234, 228, .3);
}
html[data-theme="dark"] .frm-fluent-form .ff-el-form-control:focus,
html[data-theme="dark"] .frm-fluent-form input:focus,
html[data-theme="dark"] .frm-fluent-form select:focus,
html[data-theme="dark"] .frm-fluent-form textarea:focus {
	background: rgba(255, 255, 255, .08);
}
html[data-theme="dark"] .frm-fluent-form select option { background: #161a20; color: var(--ink); }
html[data-theme="dark"] .frm-fluent-form .ff-el-form-check-input {
	background: rgba(255, 255, 255, .04);
	border-color: rgba(236, 234, 228, .35);
}
html[data-theme="dark"] .frm-fluent-form .ff-message-success { background: rgba(255, 255, 255, .04); }
html[data-theme="dark"] .frm-fluent-form .ff-el-progress { background-color: #232830; }
/* The translucent white card the forms sit in */
html[data-theme="dark"] .e-con:has(> * > .fluentform) { background-color: rgba(255, 255, 255, .03); }

/* ---------- Toggle button ---------- */
.wpxt-theme-toggle {
	all: unset;
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 999px;
	border: 1px solid var(--line, #d8d3c9);
	color: var(--ink, #101318);
	cursor: pointer;
	transition: border-color .2s, color .2s, background-color .2s;
	vertical-align: middle;
}
/* Beat Hello Elementor's reset.css button:hover/:focus (pink background). */
button.wpxt-theme-toggle:hover,
button.wpxt-theme-toggle:focus,
button.wpxt-theme-toggle:active {
	background-color: transparent;
	box-shadow: none;
	color: var(--ink, #101318);
	text-decoration: none;
}
button.wpxt-theme-toggle:hover,
button.wpxt-theme-toggle:focus-visible {
	border-color: var(--accent, #117ac9);
	color: var(--accent, #117ac9);
}
button.wpxt-theme-toggle:focus-visible { outline: 2px solid var(--accent, #117ac9); outline-offset: 2px; }
.wpxt-theme-toggle svg { width: 18px; height: 18px; display: block; }
.wpxt-theme-toggle .wpxt-i-sun { display: none; }
html[data-theme="dark"] .wpxt-theme-toggle .wpxt-i-sun { display: block; }
html[data-theme="dark"] .wpxt-theme-toggle .wpxt-i-moon { display: none; }
.wpxt-sr {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0);
	white-space: nowrap; border: 0;
}
@media (max-width: 767px) {
	.wpxt-theme-toggle { width: 32px; height: 32px; }
	.wpxt-theme-toggle svg { width: 16px; height: 16px; }
}

/* Smooth switch, only while toggling (no transition on page load). */
html.wpxt-theme-anim,
html.wpxt-theme-anim *,
html.wpxt-theme-anim *::before,
html.wpxt-theme-anim *::after {
	transition: background-color .3s ease, color .3s ease, border-color .3s ease !important;
}
@media (prefers-reduced-motion: reduce) {
	html.wpxt-theme-anim, html.wpxt-theme-anim * { transition: none !important; }
}
