/*
 * Lef Creative huisstijl voor de schermen buiten de site: inlogpagina's (admin-login.php)
 * en de thema-update/logboekpagina (base/updates.php).
 * Tokens = lefcreative.nl (custom-leftheme.json + html[data-theme="dark"] van de child).
 * Licht/donker: standaard de systeeminstelling, html[data-theme] (gezet door admin-theme-toggle.js) wint.
 */

/* Dezelfde lettertypes als lefcreative.nl (CORS staat open); valt terug op de systeemletter */
@font-face { font-family: "Satoshi"; font-style: normal; font-weight: 900; font-display: swap; src: url("https://lefcreative.nl/app/themes/leflite-child/fonts/satoshi-900.woff2") format("woff2"); }
@font-face { font-family: "Open Sans"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("https://lefcreative.nl/app/themes/leflite-child/fonts/open-sans-latin.woff2") format("woff2"); }

:root {
	--lef-scheme: light;
	--lef-bg: #fcfcfc;
	--lef-surface: #ffffff;
	--lef-ink: #18181b;
	--lef-ink-hover: #3a3a40;
	--lef-on-ink: #ffffff;
	--lef-muted: #5b5b63;
	--lef-line: #e7e7ea;
	--lef-tint: #f3f3f4;
	--lef-dot: #d9d9de;
	--lef-accent: #bd3737;
	--lef-accent-soft: #fbeeee;
	--lef-ok: #16a34a;
	--lef-ok-soft: #e8f6ed;
	--lef-warn: #ffa000;
	--lef-error: #e74c3c;
	--lef-error-ink: #b42318;
	--lef-ring: rgba(24, 24, 27, .10);
	--lef-shadow-tile: 0 18px 40px -22px rgba(24, 24, 27, .35);
	--lef-shadow-float: 0 12px 32px -16px rgba(24, 24, 27, .18);
	--lef-btn-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2 8h11M8.5 3.5 13 8l-4.5 4.5' fill='none' stroke='%23ffffff' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");

	--lef-heading: "Satoshi", "Open Sans", system-ui, sans-serif;
	--lef-body: "Open Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
	--lef-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	--lef-ease: cubic-bezier(.16, 1, .3, 1);
	--lef-radius: 8px;
	--lef-radius-btn: 10px;
}
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--lef-scheme: dark;
		--lef-bg: #111113; --lef-surface: #1c1c1f; --lef-ink: #f4f4f5; --lef-ink-hover: #d4d4d8; --lef-on-ink: #1c1c1f;
		--lef-muted: #a1a1aa; --lef-line: #2e2e33; --lef-tint: #232327; --lef-dot: #26262b; --lef-accent-soft: #2c1b1b; --lef-ok-soft: #13241a;
		--lef-error-ink: #f8a29a; --lef-ring: rgba(244, 244, 245, .12);
		--lef-shadow-tile: 0 18px 40px -22px rgba(0, 0, 0, .8); --lef-shadow-float: 0 12px 32px -16px rgba(0, 0, 0, .6);
		--lef-btn-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2 8h11M8.5 3.5 13 8l-4.5 4.5' fill='none' stroke='%231c1c1f' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	}
}
/* .lef-brand-dark = altijd donker, los van systeem of keuze (dashboard-widget) */
:root[data-theme="dark"], .lef-brand-dark {
	--lef-scheme: dark;
	--lef-bg: #111113; --lef-surface: #1c1c1f; --lef-ink: #f4f4f5; --lef-ink-hover: #d4d4d8; --lef-on-ink: #1c1c1f;
	--lef-muted: #a1a1aa; --lef-line: #2e2e33; --lef-tint: #232327; --lef-dot: #26262b; --lef-accent-soft: #2c1b1b; --lef-ok-soft: #13241a;
	--lef-error-ink: #f8a29a; --lef-ring: rgba(244, 244, 245, .12);
	--lef-shadow-tile: 0 18px 40px -22px rgba(0, 0, 0, .8); --lef-shadow-float: 0 12px 32px -16px rgba(0, 0, 0, .6);
	--lef-btn-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2 8h11M8.5 3.5 13 8l-4.5 4.5' fill='none' stroke='%231c1c1f' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* Native controls/scrollbars volgen licht/donker alleen binnen Lef-schermen; zo verandert het WP-dashboard
   rond de hulp-widget (.lef-brand-scope) niet mee. */
html:has(> body.lef-branded), .lef-brand-scope { color-scheme: var(--lef-scheme); }

/* Pagina-ondergrond: stippenraster van lefcreative.nl */
.lef-branded {
	color: var(--lef-ink);
	background-color: var(--lef-bg);
	background-image: radial-gradient(circle at 1px 1px, var(--lef-dot) 1px, transparent 0);
	background-size: 22px 22px;
	-webkit-font-smoothing: antialiased;
}
.lef-branded a, .lef-branded button, .lef-branded input, .lef-branded select { -webkit-tap-highlight-color: transparent; }
.lef-branded :focus:not(:focus-visible) { outline: none; }
.lef-branded :focus-visible { outline: 2px solid var(--lef-accent); outline-offset: 2px; }
.lef-period { color: var(--lef-accent); }
.lef-branded .lef-logo { display: block; width: auto; color: var(--lef-ink); }

/* Licht/donker-schakelaar: zelfde component en plek als lefcreative.nl (linksonder) */
.lef-new-theme-toggle {
	position: fixed; z-index: 90;
	left: max(16px, env(safe-area-inset-left, 0px));
	bottom: calc(16px + env(safe-area-inset-bottom, 0px));
	display: inline-flex; gap: 2px; margin: 0; padding: 4px;
	font: inherit; cursor: pointer;
	border: 1px solid var(--lef-line); border-radius: 999px;
	background: color-mix(in srgb, var(--lef-surface) 82%, transparent);
	-webkit-backdrop-filter: blur(14px) saturate(160%); backdrop-filter: blur(14px) saturate(160%);
	box-shadow: var(--lef-shadow-float);
}
.lef-new-theme-toggle__btn { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: var(--lef-muted); transition: background-color .3s var(--lef-ease), color .3s; }
.lef-new-theme-toggle__btn svg { display: block; width: auto; height: 15px; } /* = .icon font-size 15px op lefcreative.nl */
.lef-new-theme-toggle:hover .lef-new-theme-toggle__btn { color: var(--lef-ink); }
.lef-new-theme-toggle .lef-new-theme-toggle__btn[data-active] { background: var(--lef-ink); color: var(--lef-on-ink); }
.lef-theme-switching *, .lef-theme-switching *::before, .lef-theme-switching *::after { transition: none !important; }

@media (prefers-reduced-motion: reduce) {
	.lef-branded *, .lef-branded *::before, .lef-branded *::after { transition: none !important; }
}
