/*
Theme Name: Kwantonium Child (Twenty Twenty-Five)
Template: twentytwentyfive
Version: 1.0.100
Text Domain: kwantonium
Description: Child theme for Twenty Twenty-Five with a day/night toggle.
*/

/* === DAY MODE (default) sanity === */
:where(html) {
	--kw-toggle-size: 34px;
}

/* === DAY MODE overrides: keep every surface white === */
html:not([data-theme="dark"]) body {
	background-color: #FFFFFF;
}

/* Inverse (navy) sections -> white */
html:not([data-theme="dark"]) .has-contrast-background-color,
html:not([data-theme="dark"]) .wp-block-group.has-accent-5-background-color,
html:not([data-theme="dark"]) .wp-block-group.has-base-background-color,
html:not([data-theme="dark"]) .wp-block-cover.has-base-background-color {
	background-color: #FFFFFF !important;
	border-color: transparent;
}

/* Cover blocks that use only a solid theme background (no image / video / gradient):
   Gutenberg hardcodes the dim overlay to #000 (see core cover style.css, rule that
   targets `.has-background-dim` without a `*-background-color` class). At dimRatio 100
   that paints a fully opaque black layer which hides the theme colour. Drop the overlay
   so the cover follows the active light/dark theme like the rest of the page. */
.wp-block-cover:not(:has(.wp-block-cover__image-background)):not(:has(.wp-block-cover__video-background)):not(.has-background-gradient) > .wp-block-cover__background.has-background-dim:not([class*=-background-color]) {
	background-color: transparent !important;
}

/* All labels inside these sections -> dark & readable */
html:not([data-theme="dark"]) .has-contrast-background-color,
html:not([data-theme="dark"]) .has-contrast-background-color :where(h1, h2, h3, h4, h5, h6, p, li, span, strong, em, legend, label, small) {
	color: #1A1A2E;
}

html:not([data-theme="dark"]) .has-contrast-background-color.has-base-color,
html:not([data-theme="dark"]) .has-contrast-background-color .has-base-color,
html:not([data-theme="dark"]) .has-contrast-background-color :is(a, span, p, strong, li, h1, h2, h3, h4).has-base-color {
	color: #1A1A2E !important;
}

html:not([data-theme="dark"]) .has-contrast-background-color a {
	color: #1A1A2E;
}

html:not([data-theme="dark"]) .has-contrast-background-color a:hover {
	color: #0F3460;
}

/* Outline button borders inside the now-white sections must stay visible */
html:not([data-theme="dark"]) .has-contrast-background-color .has-base-border-color,
html:not([data-theme="dark"]) .has-base-border-color {
	border-color: color-mix(in srgb, #1A1A2E 45%, transparent) !important;
}

html:not([data-theme="dark"]) .has-contrast-background-color hr.wp-block-separator.has-base-color,
html:not([data-theme="dark"]) .has-contrast-background-color .wp-block-separator.has-base-color {
	color: #1A1A2E;
	border-color: color-mix(in srgb, #1A1A2E 25%, transparent);
}

/* === NIGHT MODE overrides (WordPress preset variables) === */
html[data-theme="dark"] {
	--wp--preset--color--base: #0f172a;
	--wp--preset--color--contrast: #FFFFFF;
	--wp--preset--color--accent-3: #0f172a;
	--wp--preset--color--accent-5: #0f172a;
	--wp--preset--color--accent-6: color-mix(in srgb, currentColor 28%, transparent);
	color-scheme: dark;
}

html[data-theme="dark"] body {
	background-color: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
}

/* Header icons that were hard-coded to the light contrast color */
html[data-theme="dark"] .wc-block-customer-account__link svg,
html[data-theme="dark"] .wc-block-customer-account__link {
	color: #FFFFFF !important;
}

/* Zdjęcie profilowe zamiast ikony konta — zalogowany (1.0.81) */
.wc-block-customer-account__link img.kw-account-avatar {
	width: 33px;
	height: 33px;
	box-sizing: border-box;
	display: block;
	border-radius: 50%;
	object-fit: cover;
	border: 2px solid var(--wp--preset--color--contrast, #1A1A2E);
	transition: transform .15s ease;
}
.wc-block-customer-account__link:hover img.kw-account-avatar {
	transform: scale(1.06);
}
html[data-theme="dark"] .wc-block-customer-account__link img.kw-account-avatar {
	border-color: rgba(255, 255, 255, 0.75);
}

/* === Toggle button === */
.kw-theme-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: var(--kw-toggle-size);
	height: var(--kw-toggle-size);
	padding: 0;
	margin: 0 3px 0 0 !important;
	border: 1px solid color-mix(in srgb, currentColor 30%, transparent);
	border-radius: 50%;
	background: transparent;
	color: var(--wp--preset--color--contrast);
	cursor: pointer;
	line-height: 0;
	box-sizing: border-box;
	transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}

.kw-theme-toggle:hover {
	background: color-mix(in srgb, currentColor 12%, transparent);
}

.kw-theme-toggle svg {
	width: 18px;
	height: 18px;
	display: block;
}

/* Icon swap: light theme shows a moon, dark theme shows a sun */
.kw-theme-toggle .kw-icon-sun {
	display: none;
}

html[data-theme="dark"] .kw-theme-toggle .kw-icon-sun {
	display: block;
}

html[data-theme="dark"] .kw-theme-toggle .kw-icon-moon {
	display: none;
}

/* === NIGHT MODE: kill hard-coded light module backgrounds === */
html[data-theme="dark"] .wp-block-navigation:not(.has-background) .wp-block-navigation__submenu-container {
	background-color: var(--wp--preset--color--accent-3);
	border-color: color-mix(in srgb, currentColor 22%, transparent);
	color: var(--wp--preset--color--contrast);
}

html[data-theme="dark"] .wp-block-navigation:not(.has-background) .wp-block-navigation__responsive-container.is-menu-open {
	background-color: var(--wp--preset--color--base);
}

/* Navigation link hover states inside dropdown in dark mode */
html[data-theme="dark"] .wp-block-navigation .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover {
	background-color: color-mix(in srgb, currentColor 14%, transparent);
}

/* WooCommerce sale badge / product badge */
html[data-theme="dark"] .wc-block-grid .wc-block-grid__product-onsale,
html[data-theme="dark"] .wc-block-grid__product-image .wc-block-grid__product-onsale {
	background: var(--wp--preset--color--accent-1);
	border-color: var(--wp--preset--color--accent-1);
	color: #fff;
}

/* WooCommerce notice banners */
html[data-theme="dark"] .wc-block-components-notice-banner {
	background-color: var(--wp--preset--color--accent-3);
	border-color: color-mix(in srgb, currentColor 30%, transparent);
	color: var(--wp--preset--color--contrast);
}

html[data-theme="dark"] .wc-block-components-notice-banner.is-error {
	background-color: color-mix(in srgb, var(--wp--preset--color--accent-1) 22%, transparent);
	border-color: var(--wp--preset--color--accent-1);
}

html[data-theme="dark"] .wc-block-components-notice-banner.is-warning {
	background-color: color-mix(in srgb, var(--wp--preset--color--accent-1) 14%, transparent);
	border-color: color-mix(in srgb, var(--wp--preset--color--accent-1) 70%, transparent);
}

/* WooCommerce product gallery zoom trigger */
html[data-theme="dark"] .woocommerce div.product div.images .woocommerce-product-gallery__trigger,
html[data-theme="dark"] .woocommerce div.product div.images .woocommerce-product-gallery__wrapper .zoomImg {
	background-color: var(--wp--preset--color--accent-3);
}

/* WooCommerce product tabs active state */
html[data-theme="dark"] .woocommerce div.product .woocommerce-tabs ul.tabs li.active {
	background: var(--wp--preset--color--accent-3);
	color: var(--wp--preset--color--contrast);
	border-bottom-color: var(--wp--preset--color--accent-3);
}

/* Accessibility skip-link focus (rarely triggers, keep readable) */
html[data-theme="dark"] .screen-reader-text:focus,
html[data-theme="dark"] .skip-link.screen-reader-text:focus {
	background-color: var(--wp--preset--color--accent-3);
	color: var(--wp--preset--color--contrast);
}

/* Color-mix fallback surface helper used above (older browsers) */
@supports not (background-color: color-mix(in srgb, #fff 10%, #000)) {
	html[data-theme="dark"] .wc-block-components-notice-banner.is-error { background-color: #3a1f38; }
	html[data-theme="dark"] .wc-block-components-notice-banner.is-warning { background-color: #3a3323; }
}

/* === NIGHT MODE: inverse navy blocks (footer, product section) stay DARK === */
html[data-theme="dark"] .has-contrast-background-color {
	background-color: #0f172a !important;
	border-color: transparent;
}

/* Every label inside stays light & readable */
html[data-theme="dark"] .has-contrast-background-color,
html[data-theme="dark"] .has-contrast-background-color :where(h1, h2, h3, h4, h5, h6, p, li, span, strong, em, legend, label, small) {
	color: #FFFFFF;
}

/* Global styles ship .has-base-color with !important; force it light inside navy blocks */
html[data-theme="dark"] .has-contrast-background-color.has-base-color,
html[data-theme="dark"] .has-contrast-background-color .has-base-color,
html[data-theme="dark"] .has-contrast-background-color :is(a, span, p, strong, li, h1, h2, h3, h4).has-base-color {
	color: #FFFFFF !important;
}

html[data-theme="dark"] .has-contrast-background-color a {
	color: #FFFFFF;
	text-underline-offset: 3px;
}

html[data-theme="dark"] .has-contrast-background-color a:hover {
	color: #FFFFFF;
}

/* Separators + horizontal rules inside these navy blocks */
html[data-theme="dark"] .has-contrast-background-color hr.wp-block-separator.has-base-color,
html[data-theme="dark"] .has-contrast-background-color .wp-block-separator.has-base-color {
	color: #FFFFFF;
	border-color: color-mix(in srgb, #FFFFFF 35%, transparent);
}

/* WooCommerce product query / grid cards on the navy section */
html[data-theme="dark"] .has-contrast-background-color .wp-block-woocommerce-product-query,
html[data-theme="dark"] .has-contrast-background-color .wc-block-grid__product {
	color: #FFFFFF;
}

html[data-theme="dark"] .has-contrast-background-color .wc-block-grid__product .wc-block-grid__product-title a,
html[data-theme="dark"] .has-contrast-background-color .wc-block-grid__product .add_to_cart_button,
html[data-theme="dark"] .has-contrast-background-color .wc-block-grid__product-onsale {
	color: #FFFFFF;
}

/* WooCommerce coming-soon page header (navy on the shop archive) */
html[data-theme="dark"] .wp-block-woocommerce-coming-soon .has-contrast-background-color {
	color: #FFFFFF;
}

/* === NIGHT MODE: mobile responsive menu overlay - force LIGHT links === */
html[data-theme="dark"] .wp-block-navigation__responsive-container.is-menu-open,
html[data-theme="dark"] .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content,
html[data-theme="dark"] .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-dialog {
	color: #FFFFFF;
}

html[data-theme="dark"] .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content,
html[data-theme="dark"] .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__label,
html[data-theme="dark"] .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content:visited {
	color: #FFFFFF;
}

html[data-theme="dark"] .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content:hover,
html[data-theme="dark"] .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content:focus {
	color: #FFFFFF;
}

/* Keep hamburger / close icons visible (they inherit currentColor) */
html[data-theme="dark"] .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-close,
html[data-theme="dark"] .wp-block-navigation__responsive-container-open {
	color: #FFFFFF;
}

/* === MOBILE ONLY: move the hamburger to the left, before the site title === */
@media (max-width: 599px) {
	header .wp-block-group.is-content-justification-space-between {
		justify-content: flex-start !important;
		padding-left: 16px;
		padding-right: 16px;
	}

	header .wp-block-navigation {
		order: -2;
	}

	header .wp-block-site-title {
		order: -1;
		margin-right: auto;
	}

	/* Bigger, finger-friendly tap target for the hamburger */
	header .wp-block-navigation__responsive-container-open {
		padding: 8px;
	}

	/* Drawer content: single column with LEFT-aligned labels. Applied in BOTH states
	   so the panel width stays stable while sliding in/out. */
	.wp-block-navigation__responsive-container .wp-block-navigation__responsive-container-content,
	.wp-block-navigation__responsive-container .wp-block-navigation__container {
		flex-direction: column !important;
		align-items: flex-start !important;
	}

	/* Pull the close (X) button away from the top/right edges + bigger tap target */
	.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-close {
		top: 10px !important;
		right: 8px !important;
		padding: 10px !important;
	}

	/* Match the theme-toggle ↔ cart gap to the cart ↔ account gap */
	.kw-theme-toggle {
		margin-right: 1px !important;
	}
}

/* === MOBILE ONLY: off-canvas slide-out drawer (slides in from the LEFT) === */
@media (max-width: 599px) {

	/* Keep the overlay in the render tree so transform can animate BOTH ways */
	.wp-block-navigation__responsive-container {
		display: flex !important;
		padding: 0 !important;
		visibility: hidden;
		pointer-events: none;
		opacity: 0;
		transition: opacity .6s ease, visibility 0s linear .6s;
	}

	.wp-block-navigation__responsive-container.is-menu-open {
		visibility: visible;
		pointer-events: auto;
		opacity: 1;
		transition: opacity .6s ease;
	}

	/* Dim backdrop behind the drawer (clicking it closes the menu) */
	.wp-block-navigation__responsive-container.is-menu-open {
		background-color: rgba(0, 0, 0, .45) !important;
	}

	/* Neutralize core centering of the inner wrapper */
	.wp-block-navigation__responsive-container .wp-block-navigation__responsive-close {
		margin: 0 !important;
		max-width: none !important;
		width: 100% !important;
	}

	/* The drawer panel itself: width follows the menu content, like the WP admin
	   sidebar. It grows for longer labels / submenu items, up to the full viewport. */
	.wp-block-navigation__responsive-container .wp-block-navigation__responsive-dialog {
		position: fixed;
		top: 0;
		left: 0;
		bottom: 0;
		width: max-content;
		min-width: 140px;
		max-width: 100vw;
		margin: 0;
		overflow-y: auto;
		overflow-x: hidden;
		transform: translateX(-100%);
		transition: transform .6s ease-in-out;
		will-change: transform;
		box-shadow: 0 0 24px rgba(0, 0, 0, .25);
	}

	.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-dialog {
		transform: translateX(0);
	}

	/* Drawer surface color, per theme */
	html:not([data-theme="dark"]) .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-dialog {
		background-color: #FFFFFF;
	}

	html[data-theme="dark"] .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-dialog {
		background-color: #0f172a;
	}

	/* Comfortable inner spacing inside the drawer, labels centered */
	.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
		padding: 56px 16px 16px;
	}

	.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content,
	.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__label {
		text-align: center;
		font-family: 'Lato', system-ui, -apple-system, 'Segoe UI', sans-serif;
		font-weight: 400;
	}
}

/* Role-aware entries (Log in / Account / Dashboard / Log out) live only in the
   mobile slide-out drawer, never in the inline desktop navigation. */
.kw-role-nav .kw-role-item {
	display: none !important;
}

@media (max-width: 599px) {
	.kw-role-nav .kw-role-item {
		display: flex !important;
	}
}

/* Exactly one cart icon per device:
   - desktop (>=600px): the classic cart-link that opens the Cart page;
   - mobile  (<=599px): the slide-out WooCommerce mini-cart drawer. */
.wp-block-woocommerce-mini-cart .wc-block-mini-cart__icon {
	width: 33px !important;
	height: 33px !important;
	display: block !important;
}

@media (min-width: 600px) {
	.wp-block-woocommerce-mini-cart {
		display: none !important;
	}
}

@media (max-width: 599px) {
	/* Hide the classic redirect cart on mobile ONLY when the slide-out mini-cart
	   is actually rendered. WooCommerce skips the mini-cart for guests while the
	   store is in "Coming Soon", so this guarantees exactly one cart icon. */
	body:has(.wc-block-mini-cart__button) .wp-block-woocommerce-cart-link {
		display: none !important;
	}

	/* Szuflada mini-koszyka na telefonie: zajmuje połowę ekranu,
	   druga połowa zostaje przyciemniona overlayem. */
	.wc-block-mini-cart__drawer {
		width: 50vw !important;
	}
	.wc-block-components-drawer__screen-overlay {
		background-color: rgba(0, 0, 0, 0.5) !important;
	}
}

/* === Freqtrade panel (Rodzina) === */
.kw-freqtrade-embed {
	width: 100%;
}

.kw-freqtrade-embed iframe {
	display: block;
	width: 100%;
	height: calc(100vh - 160px);
	min-height: 620px;
	border: 0;
	border-radius: 8px;
	background: #ffffff;
}

.kw-freqtrade-notice {
	max-width: 720px;
	margin: 0 auto;
	padding: 2rem 1.5rem;
	text-align: center;
	border: 1px solid rgba(128, 128, 128, 0.35);
	border-radius: 12px;
}

.kw-freqtrade-notice h2 {
	margin-top: 0;
}

.kw-freqtrade-hint {
	font-size: 0.85rem;
	opacity: 0.75;
}

.kw-freqtrade-hint code {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	background: rgba(128, 128, 128, 0.18);
	padding: 0.1em 0.35em;
	border-radius: 4px;
}

html[data-theme="dark"] .kw-freqtrade-embed iframe {
	background: #0f172a;
}

html[data-theme="dark"] .kw-freqtrade-notice {
	border-color: rgba(255, 255, 255, 0.25);
}

@media (max-width: 599px) {
	.kw-freqtrade-embed iframe {
		height: calc(100vh - 140px);
		min-height: 480px;
		border-radius: 6px;
	}
}

/* === Cookie consent banner (plugin: cookie-notice / Cookie Compliance) ===
   Theme-adaptive surface + muted teal buttons + tidy mobile layout. */

/* Surface: light & subtle in day mode, dark in night mode (no hard cut-off) */
html:not([data-theme="dark"]) #cookie-notice {
	background-color: rgba(255, 255, 255, 0.97) !important;
	border-top: 1px solid rgba(26, 26, 46, 0.12);
	box-shadow: 0 -6px 24px rgba(26, 26, 46, 0.08);
}

html[data-theme="dark"] #cookie-notice {
	background-color: rgba(15, 23, 42, 0.97) !important;
	border-top: 1px solid rgba(255, 255, 255, 0.12);
	box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.45);
}

/* Message text follows the surface colour */
html:not([data-theme="dark"]) #cookie-notice .cookie-notice-container,
html:not([data-theme="dark"]) #cookie-notice .cn-text-container,
html:not([data-theme="dark"]) #cookie-notice .cn-text-container a {
	color: #1A1A2E !important;
}

html[data-theme="dark"] #cookie-notice .cookie-notice-container,
html[data-theme="dark"] #cookie-notice .cn-text-container,
html[data-theme="dark"] #cookie-notice .cn-text-container a {
	color: #F5F5F5 !important;
}

/* Buttons: muted dark teal instead of red/pink */
#cookie-notice .cn-button,
#cookie-notice .cn-button:not(.cn-button-custom) {
	background-color: #008080 !important;
	color: #FFFFFF !important;
	border: none !important;
	transition: background-color 0.15s ease, transform 0.15s ease;
}

#cookie-notice .cn-button:hover,
#cookie-notice .cn-button:focus-visible {
	background-color: #009688 !important;
}

/* Buttons layout: even, wrapping row of equal items */
#cookie-notice .cn-buttons-container {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 10px;
	vertical-align: middle;
}

#cookie-notice .cn-button {
	margin: 0 !important;
}

/* Close (X): keep it in the corner on small screens */
@media (max-width: 600px) {
	#cookie-notice .cn-text-container {
		display: block;
		margin: 0 0 12px 0;
	}

	#cookie-notice .cn-buttons-container {
		display: flex;
		flex-direction: column;
		align-items: stretch;
		width: 100%;
		gap: 10px;
	}

	#cookie-notice .cn-button,
	#cookie-notice .cn-button:not(.cn-button-custom) {
		display: block;
		width: 100%;
		padding: 12px 16px;
	}

	#cookie-notice .cn-close-icon {
		top: 12px;
		margin-top: 0;
	}
}

/* === Unified CTA buttons: muted dark teal (matches the cookie banner) ===
   Applies to every block button (fill AND outline) so all call-to-actions
   share one consistent colour in both day and night mode.
   High specificity (html body + 2/3 classes) beats the theme's per-block
   colour classes and the outline-border override above. */
html body .wp-block-button .wp-block-button__link,
html body .wp-block-button.is-style-outline .wp-block-button__link,
html body .wp-element-button.wp-block-button__link {
	background-color: #008080 !important;
	border-color: #008080 !important;
	color: #FFFFFF !important;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}

html body .wp-block-button .wp-block-button__link:hover,
html body .wp-block-button.is-style-outline .wp-block-button__link:hover,
html body .wp-element-button.wp-block-button__link:hover,
html body .wp-block-button .wp-block-button__link:focus,
html body .wp-block-button.is-style-outline .wp-block-button__link:focus,
html body .wp-element-button.wp-block-button__link:focus {
	background-color: #009688 !important;
	border-color: #009688 !important;
	color: #FFFFFF !important;
}

/* === My Account / WooCommerce: teal login+register buttons (both themes) === */
.woocommerce form.login .button,
.woocommerce-form-login__submit,
.woocommerce-Button,
.woocommerce form.register .button,
.woocommerce-form-register__submit {
	background-color: #008080 !important;
	border-color: #008080 !important;
	color: #FFFFFF !important;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}
.woocommerce-form-login__submit:hover,
.woocommerce-form-register__submit:hover {
	background-color: #009688 !important;
	border-color: #009688 !important;
	color: #FFFFFF !important;
}

@media (max-width: 599px) {
	/* Mobile drawer: hierarchia podmenu (wzorzec #adminmenu: offset bloku dzieci
	   na prawo od rodzica) — parent wyrównany do lewej, dzieci wcięte w prawo */
	.wp-block-navigation__responsive-container.is-menu-open
		.wp-block-navigation-item.has-child {
		align-items: flex-start !important;
	}
	.wp-block-navigation__responsive-container.is-menu-open
		.wp-block-navigation__submenu-container {
		padding-left: 2em !important;
		/* core daje 2rem z prawej na KAŻDYM poziomie (32px × 2 = 64px
		   sztucznego luzu) — tu wąski: panel ma opierać się na tekście */
		padding-right: 8px !important;
		padding-top: 0.5em !important;
		padding-bottom: 0.5em !important;
		min-width: 0 !important;
	}
	.wp-block-navigation__responsive-container.is-menu-open
		.wp-block-navigation__submenu-container .wp-block-navigation-item {
		align-items: flex-start !important;
	}
	.wp-block-navigation__responsive-container.is-menu-open
		.wp-block-navigation__submenu-container .wp-block-navigation-item__content,
	.wp-block-navigation__responsive-container.is-menu-open
		.wp-block-navigation__submenu-container .wp-block-navigation-item__label {
		justify-content: flex-start !important;
		text-align: left !important;
		font-family: 'Lato', system-ui, -apple-system, 'Segoe UI', sans-serif;
		font-weight: 400;
		font-size: 0.9em;
		opacity: 0.9;
	}
}

/* === MOBILE drawer: focus bez białej ramki + grafitowy kafelek aktywnej strony === */
@media (max-width: 599px) {
	/* Oddech dla tła kafelka bez przesuwania tekstu */
	.wp-block-navigation__responsive-container.is-menu-open
		.wp-block-navigation-item__content {
		padding: 4px 10px;
		margin: -4px -10px;
		border-radius: 6px;
	}

	/* Biały outline focus → znika (kolor przezroczysty = kolor tła powierzchni) */
	.wp-block-navigation__responsive-container.is-menu-open
		.wp-block-navigation-item__content:focus,
	.wp-block-navigation__responsive-container.is-menu-open
		.wp-block-navigation-item__content:focus-visible {
		outline-color: transparent !important;
		box-shadow: none !important;
	}

	/* Rodzic submenu (li.has-child + toggle "Moje konto") — bez białej ramki
	   outline wokół całego bloku parenta (odpowiedzialna za submenu) */
	.wp-block-navigation__responsive-container.is-menu-open
		.wp-block-navigation-item.has-child,
	.wp-block-navigation__responsive-container.is-menu-open
		.wp-block-navigation-item.has-child:focus-within,
	.wp-block-navigation__responsive-container.is-menu-open
		.wp-block-navigation-submenu__toggle,
	.wp-block-navigation__responsive-container.is-menu-open
		.wp-block-navigation-submenu__toggle:focus,
	.wp-block-navigation__responsive-container.is-menu-open
		.wp-block-navigation-submenu__toggle:focus-visible {
		outline: none !important;
		box-shadow: none !important;
	}

	/* Mobile tap flash (biały/szary highlight po tapnięciu) */
	.wp-block-navigation__responsive-container.is-menu-open
		.wp-block-navigation-item__content,
	.wp-block-navigation__responsive-container.is-menu-open
		.wp-block-navigation-submenu__toggle,
	.wp-block-navigation__responsive-container.is-menu-open
		.wp-block-navigation-item.has-child {
		-webkit-tap-highlight-color: transparent;
	}

	/* Aktywna strona (aria-current z functions.php) → grafitowy kafelek */
	html:not([data-theme="dark"])
		.wp-block-navigation__responsive-container.is-menu-open
		.wp-block-navigation-item__content[aria-current="page"] {
		background-color: #d8d8dc;
	}

	html[data-theme="dark"]
		.wp-block-navigation__responsive-container.is-menu-open
		.wp-block-navigation-item__content[aria-current="page"] {
		background-color: #2f2f38;
	}
}

/* === Nawigacja: Lato 500 + czytelniejszy rozmiar (+1px) === */
.wp-block-navigation,
.wp-block-navigation-item__label,
.wp-block-navigation-item__content {
    font-family: 'Lato', system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-weight: 400;
    line-height: 1.4;
}
.wp-block-navigation-item__label,
.wp-block-navigation-item__content {
    font-size: calc(1em + 1px);
}

/* === Panel Freqtrade — FreqUI bez własnego skrolowania, skroluje tylko WP === */
body.kw-frequi-fullscreen .wp-block-post-title {
    display: none !important;
}

body.kw-frequi-fullscreen {
    overflow-x: hidden;
}

body.kw-frequi-fullscreen .wp-block-post-content,
body.kw-frequi-fullscreen main,
body.kw-frequi-fullscreen .wp-block-post-content > *,
body.kw-frequi-fullscreen main > * {
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.kw-frequi-fullscreen #kw-frequi-wrap {
    position: relative;
    width: 100%;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.kw-frequi-fullscreen #kw-frequi-pad {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 20;
    pointer-events: none;
}

@media (pointer: coarse) {
    body.kw-frequi-fullscreen #kw-frequi-pad {
        pointer-events: auto;
    }
}

body.kw-frequi-fullscreen #kw-frequi-frame {
    width: 100%;
    height: 85vh;
    min-height: 600px;
    border: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    display: block;
}

/* Stopka: ukrycie kolumny "Kontakt" (ostatnia kolumna w stopce).
   Zawartość zostaje w HTML (decyzja: przykrycie CSS, nie edycja pliku).
   Kolumny: Kwantonium 40% | Nawigacja | Konto | Kontakt. */
footer.wp-block-template-part .wp-block-columns>.wp-block-column:last-child {
    display: none !important;
}

/* Ciemny motyw: białe napisy w panelu WPUF (lewa kolumna — nazwa użytkownika
   i linki nawigacji były szare rgb(55,65,81) na ciemnym tle = nieczytelne). */
html[data-theme="dark"] .wpuf-account-sidebar {
    color: #e5e7eb;
}

html[data-theme="dark"] .wpuf-account-sidebar .wpuf-profile-name,
html[data-theme="dark"] a.wpuf-account-nav-item:not([class*="red"]),
html[data-theme="dark"] .wpuf-profile-section a:not(.wpuf-btn):not([class*="red"]) {
    color: #e5e7eb !important;
}
/* ================================================================
   KARTA UI/UX konta 2026-10-18 (#3), KROK 2
   1) aktywna pozycja menu bocznego WPUF = czarne tlo + biale napisy
      (w ciemnym motywie byl bialy tekst #e5e7eb na jasnym tle #f3f4f6
       = "biala na bialej" - nieczytelne; mierzone 2026-10-18)
   2) przyciski akcji (Zaktualizuj profil / Przeslij / Usun obraz)
   3) miniatura awatara = kolo zamiast kwadratu
   4) badge "Zmien zdjecie" przy kole awatara (styl FB/GitHub)
   ================================================================ */

/* --- 1. aktywna pozycja + hover/focus: czarne tlo + biale napisy (oba motywy) ---
   KROK 2b (2026-10-18): po najechaniu na NIEaktywna pozycje WPUF dawal jasne
   tlo + jasny tekst (w ciemnym motywie = nieczytelne). :hover/:focus teraz
   tez czarne/biale - spojnie z .active. */
.wpuf-account-nav-item.active,
.wpuf-account-nav-item:hover,
.wpuf-account-nav-item:focus,
html[data-theme="dark"] .wpuf-account-nav-item.active,
html[data-theme="dark"] .wpuf-account-nav-item:hover,
html[data-theme="dark"] .wpuf-account-nav-item:focus,
html[data-theme="dark"] a.wpuf-account-nav-item.active:not([class*="red"]),
html[data-theme="dark"] a.wpuf-account-nav-item:hover:not([class*="red"]),
html[data-theme="dark"] a.wpuf-account-nav-item:focus:not([class*="red"]) {
    background-color: #000 !important;
    color: #fff !important;
}
.wpuf-account-nav-item.active svg,
.wpuf-account-nav-item:hover svg,
.wpuf-account-nav-item:focus svg,
html[data-theme="dark"] .wpuf-account-nav-item.active svg,
html[data-theme="dark"] .wpuf-account-nav-item:hover svg,
html[data-theme="dark"] .wpuf-account-nav-item:focus svg {
    color: #fff !important;
    stroke: #fff !important;
}

/* --- 2. przyciski akcji: czarne tlo + biale napisy --- */
.wpuf-account-container .wpuf-btn-primary,
.wpuf-account-container .wpuf-btn-primary:hover,
.wpua-edit-container .button,
.wpua-edit-container button.button,
.wpua-edit-container .button:hover,
/* submit formularza OUA "Zaktualizuj profil" (FORM.wpua-edit, poza .wpua-edit-container) */
.wpua-edit .button.button-primary,
.wpua-edit input[type="submit"],
.wpua-edit .button.button-primary:hover {
    background-color: #000 !important;
    color: #fff !important;
    border-color: #000 !important;
}

/* --- 3. miniatura awatara = kolo (OUA: #wpua-thumbnail[-existing] img) --- */
#wpua-thumbnail img,
#wpua-thumbnail-existing img {
    border-radius: 50% !important;
}

/* --- 4. badge "Zmien zdjecie" przy kole (styl FB/GitHub) --- */
/* WPUF ustawia .wpuf-profile-avatar na flex pelnej szerokosci (260px) -
   zaweżamy do zawartosci (96px wrapper), zeby badge przysil do kola,
   a nie do krawedzi sidebarza. */
.wpuf-profile-avatar {
    position: relative;
    display: inline-block;
    width: fit-content;
}
.kw-avatar-change {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #000;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease;
}
.kw-avatar-change:hover,
.kw-avatar-change:focus {
    background: #1a1a1a;
    color: #fff;
}
.kw-avatar-change svg {
    width: 15px;
    height: 15px;
    display: block;
}

/* === Awatar frontend — sekcja /moje-konto/ (1.0.58, jedna linia, bez zapasu) === */
.kw-avatar-card {
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 12px;
    background: transparent;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    margin: 0 0 10px;
}
html[data-theme="dark"] .kw-avatar-card {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.14);
}
.kw-avatar-card h2 {
    margin: 0;
    font-size: 0.95rem;
    flex: 1 0 100%;
}
.kw-avatar-row {
    display: contents;
}
.kw-avatar-preview img,
.kw-avatar-preview .kw-avatar-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(0, 0, 0, 0.12);
    display: block;
    background: transparent;
    flex: 0 0 auto;
}
html[data-theme="dark"] .kw-avatar-preview img {
    border-color: rgba(255, 255, 255, 0.16);
    background: transparent;
}
.kw-avatar-form {
    flex: 1 1 auto;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.kw-avatar-btns {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.kw-avatar-card .button {
    border: 1px solid #008080;
    background: #008080;
    color: #fff;
    padding: 6px 11px;
    border-radius: 7px;
    font-weight: 600;
    font-size: 0.84rem;
    line-height: 1.2;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
    text-decoration: none;
    display: inline-block;
}
.kw-avatar-card .button:hover,
.kw-avatar-card .button:focus {
    background: #009999;
    border-color: #009999;
    color: #fff;
}
html[data-theme="dark"] .kw-avatar-card .button {
    background: #fff;
    color: #000;
    border-color: #fff;
}
html[data-theme="dark"] .kw-avatar-card .button:hover,
html[data-theme="dark"] .kw-avatar-card .button:focus {
    background: #000;
    color: #fff;
}
.kw-avatar-filename {
    font-size: 0.8rem;
    color: #555;
}
html[data-theme="dark"] .kw-avatar-filename {
    color: #aaa;
}
.kw-avatar-msg {
    flex: 1 0 100%;
    margin: 0;
    padding: 5px 9px;
    border-radius: 7px;
    font-size: 0.86rem;
}
.kw-avatar-ok {
    background: #e9f7ec;
    color: #17632b;
    border: 1px solid #bfe3c8;
}
.kw-avatar-err {
    background: #fdecec;
    color: #8a1f1f;
    border: 1px solid #f3c6c6;
}
html[data-theme="dark"] .kw-avatar-ok {
    background: #14301c;
    color: #9fe0b0;
    border-color: #245c33;
}
html[data-theme="dark"] .kw-avatar-err {
    background: #341515;
    color: #f0a8a8;
    border-color: #6b2a2a;
}
@media (max-width: 560px) {
    .kw-avatar-card {
        flex-direction: column;
        align-items: flex-start;
    }
    .kw-avatar-btns {
        width: 100%;
    }
    .kw-avatar-card .button {
        flex: 1 1 auto;
        text-align: center;
    }
}

/* === CIEMNY TEMAT: wszystkie guziki — kolor tematu (1.0.62) === */
html[data-theme="dark"] button,
html[data-theme="dark"] input[type="submit"],
html[data-theme="dark"] .button,
html[data-theme="dark"] a.button,
html[data-theme="dark"] .wp-block-button__link,
html[data-theme="dark"] .wc-block-components-button {
    background-color: #0f172a !important;
    border-color: #0f172a !important;
    color: #fff !important;
}
html[data-theme="dark"] button:hover,
html[data-theme="dark"] button:focus,
html[data-theme="dark"] input[type="submit"]:hover,
html[data-theme="dark"] input[type="submit"]:focus,
html[data-theme="dark"] .button:hover,
html[data-theme="dark"] .button:focus,
html[data-theme="dark"] a.button:hover,
html[data-theme="dark"] a.button:focus,
html[data-theme="dark"] .wp-block-button__link:hover,
html[data-theme="dark"] .wp-block-button__link:focus,
html[data-theme="dark"] .wc-block-components-button:hover,
html[data-theme="dark"] .wc-block-components-button:focus {
    background-color: #1e293b !important;
    border-color: #1e293b !important;
    color: #fff !important;
}

/* === CIEMNY TEMAT: TYLKO guziki sekcji zdjęcia profilowego — teal (1.0.62) === */
html[data-theme="dark"] .kw-avatar-card .button {
    background-color: #008080 !important;
    border-color: #008080 !important;
    color: #fff !important;
}
html[data-theme="dark"] .kw-avatar-card .button:hover,
html[data-theme="dark"] .kw-avatar-card .button:focus {
    background-color: #009999 !important;
    border-color: #009999 !important;
    color: #fff !important;
}

/* === CIEMNY TEMAT: pola formularza Szczegóły konta — #0f172a (1.0.65) === */
html[data-theme="dark"] .woocommerce-EditAccountForm input:not([type="submit"]):not([type="button"]),
html[data-theme="dark"] .woocommerce-EditAccountForm select,
html[data-theme="dark"] .woocommerce-EditAccountForm textarea {
    background-color: #0f172a !important;
    color: #fff !important;
    border-color: rgba(255, 255, 255, 0.22) !important;
}
html[data-theme="dark"] .woocommerce-EditAccountForm input::placeholder {
    color: rgba(255, 255, 255, 0.45) !important;
}

/* === CIEMNY TEMAT: GLOBALNE pola tekstowe — #0f172a (1.0.66) === */
html[data-theme="dark"] input:not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="image"]):not([type="hidden"]),
html[data-theme="dark"] textarea,
html[data-theme="dark"] select {
    background-color: #0f172a !important;
    color: #fff !important;
    border-color: rgba(255, 255, 255, 0.22) !important;
}
html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
    color: rgba(255, 255, 255, 0.45) !important;
}

/* === Przycisk Zapisz (Szczegóły konta) — teal w obu tematach (1.0.67) === */
.woocommerce-EditAccountForm button[type="submit"],
.woocommerce-EditAccountForm input[type="submit"] {
    background-color: #008080 !important;
    border-color: #008080 !important;
    color: #fff !important;
}
.woocommerce-EditAccountForm button[type="submit"]:hover,
.woocommerce-EditAccountForm button[type="submit"]:focus,
.woocommerce-EditAccountForm input[type="submit"]:hover,
.woocommerce-EditAccountForm input[type="submit"]:focus {
    background-color: #009999 !important;
    border-color: #009999 !important;
    color: #fff !important;
}
html[data-theme="dark"] .woocommerce-EditAccountForm button[type="submit"],
html[data-theme="dark"] .woocommerce-EditAccountForm input[type="submit"] {
    background-color: #008080 !important;
    border-color: #008080 !important;
    color: #fff !important;
}
html[data-theme="dark"] .woocommerce-EditAccountForm button[type="submit"]:hover,
html[data-theme="dark"] .woocommerce-EditAccountForm button[type="submit"]:focus,
html[data-theme="dark"] .woocommerce-EditAccountForm input[type="submit"]:hover,
html[data-theme="dark"] .woocommerce-EditAccountForm input[type="submit"]:focus {
    background-color: #009999 !important;
    border-color: #009999 !important;
    color: #fff !important;
}

/* === CIEMNY TEMAT: koszyk / przełącznik motywu / menu — kolor tematu (1.0.60) === */
html[data-theme="dark"] .wc-block-cart-link,
html[data-theme="dark"] .wc-block-cart-link a,
html[data-theme="dark"] .wc-block-cart-link__button,
html[data-theme="dark"] .wc-block-mini-cart__button,
html[data-theme="dark"] .kw-theme-toggle,
html[data-theme="dark"] .wp-block-navigation__responsive-container-open,
html[data-theme="dark"] .wp-block-navigation__responsive-container-close,
html[data-theme="dark"] .wp-block-navigation-submenu__toggle,
html[data-theme="dark"] .wp-block-navigation__submenu-icon,
html[data-theme="dark"] .wc-block-components-drawer__close {
    background-color: #0f172a !important;
    color: #fff !important;
}
html[data-theme="dark"] .wc-block-cart-link:hover,
html[data-theme="dark"] .wc-block-cart-link a:hover,
html[data-theme="dark"] .wc-block-cart-link__button:hover,
html[data-theme="dark"] .wc-block-mini-cart__button:hover,
html[data-theme="dark"] .kw-theme-toggle:hover,
html[data-theme="dark"] .wp-block-navigation__responsive-container-open:hover,
html[data-theme="dark"] .wp-block-navigation__responsive-container-close:hover,
html[data-theme="dark"] .wp-block-navigation-submenu__toggle:hover,
html[data-theme="dark"] .wp-block-navigation__submenu-icon:hover,
html[data-theme="dark"] .wc-block-components-drawer__close:hover {
    background-color: #1e293b !important;
    color: #fff !important;
}
html[data-theme="dark"] .kw-theme-toggle {
    border-radius: 50%;
}

/* ==================== KREATOR WPISÓW — /moje-konto/napisz-wpis/ (1.0.68) ==================== */
.kw-post-card {
    border: 1px solid rgba(0, 0, 0, 0.14);
    border-radius: 10px;
    padding: 16px;
    background: transparent;
}
html[data-theme="dark"] .kw-post-card {
    border-color: rgba(255, 255, 255, 0.14);
}
.kw-post-heading {
    margin: 0 0 12px;
    font-size: 1.15rem;
}
.kw-post-field {
    margin: 0 0 12px;
}
.kw-post-field label,
.kw-post-field .kw-post-label {
    display: block;
    font-weight: 600;
    margin: 0 0 4px;
    font-size: 0.9rem;
}
.kw-post-field input[type="text"],
.kw-post-field select {
    width: 100%;
    max-width: 480px;
    padding: 7px 10px;
    border-radius: 7px;
    border: 1px solid rgba(0, 0, 0, 0.22);
    background: #fff;
    color: #111;
}
html[data-theme="dark"] .kw-post-field input[type="text"],
html[data-theme="dark"] .kw-post-field select {
    background: #0f172a;
    color: #fff;
    border-color: rgba(255, 255, 255, 0.22);
}
.kw-post-img-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.kw-post-img-row .kw-post-label {
    margin: 0;
}
#kw-post-image-preview {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.14);
}
html[data-theme="dark"] #kw-post-image-preview {
    border-color: rgba(255, 255, 255, 0.16);
}
.kw-post-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 14px 0 0;
}
.kw-post-card .button {
    border: 1px solid #008080;
    background: #008080;
    color: #fff;
    padding: 7px 14px;
    border-radius: 7px;
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}
.kw-post-card .button:hover,
.kw-post-card .button:focus {
    background: #009999;
    border-color: #009999;
    color: #fff;
}
html[data-theme="dark"] .kw-post-card .button {
    background: #008080;
    border-color: #008080;
    color: #fff;
}
html[data-theme="dark"] .kw-post-card .button:hover,
html[data-theme="dark"] .kw-post-card .button:focus {
    background: #009999;
    border-color: #009999;
    color: #fff;
}
.kw-post-msg {
    padding: 8px 12px;
    border-radius: 7px;
    background: rgba(0, 128, 128, 0.12);
    border: 1px solid rgba(0, 128, 128, 0.35);
    font-size: 0.9rem;
}
.kw-post-err {
    background: rgba(180, 40, 40, 0.12);
    border-color: rgba(180, 40, 40, 0.4);
}
.kw-post-card .wp-editor-wrap {
    max-width: 100%;
}
.kw-post-card .wp-editor-wrap.mce-editor-focus .mce-container.mce-panel {
    border-color: rgba(0, 0, 0, 0.2);
}

/* === CIEMNY TEMAT: Select2 (kraj/region itp.) — pole = kolor tła, teksty białe (1.0.69) === */
html[data-theme="dark"] .select2-container .select2-selection,
html[data-theme="dark"] .select2-container--default .select2-selection {
    background-color: #0f172a !important;
    border-color: rgba(255, 255, 255, 0.22) !important;
    color: #fff !important;
}
html[data-theme="dark"] .select2-container--default .select2-selection__rendered,
html[data-theme="dark"] .select2-container--default .select2-selection__placeholder {
    color: #fff !important;
}
html[data-theme="dark"] .select2-container--default .select2-selection--single .select2-selection__arrow b {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: center center !important;
    background-size: 16px 16px !important;
    border: 0 !important;
}
html[data-theme="dark"] .select2-container--default .select2-dropdown {
    background-color: #0f172a !important;
    border-color: rgba(255, 255, 255, 0.22) !important;
    color: #fff !important;
}
html[data-theme="dark"] .select2-container--default .select2-results__option {
    background-color: #0f172a !important;
    color: #fff !important;
}
html[data-theme="dark"] .select2-container--default .select2-results__option[aria-selected="true"],
html[data-theme="dark"] .select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #1e293b !important;
    color: #fff !important;
}
html[data-theme="dark"] .select2-search--dropdown .select2-search__field {
    background-color: #0f172a !important;
    color: #fff !important;
    border-color: rgba(255, 255, 255, 0.22) !important;
}
html[data-theme="dark"] .select2-container--default .select2-results__message {
    color: #fff !important;
}

/* Ciemny motyw: „Nie pamiętasz hasła?" w szufladzie konta = biały (1.0.77) */
html[data-theme="dark"] .kw-login-drawer-links a {
	color: #fff !important;
}

/* === CIEMNY TEMAT: edytor kreatora wpisów (TinyMCE/quicktags) (1.0.82) ===
   Chrome edytora lezy w dokumencie strony (toolbar/statusbar/menus) + BIALY
   iframe z trescia (temat wstrzykuje post-submit.js). Admin jest nietkniety —
   data-theme istnieje tylko na stronie frontowej. */
html[data-theme="dark"] .kw-post-card .wp-editor-container {
	border-color: rgba(255, 255, 255, 0.22) !important;
}
html[data-theme="dark"] .kw-post-card .mce-container.mce-panel {
	background: #0f172a !important;
	border-color: rgba(255, 255, 255, 0.22) !important;
}
html[data-theme="dark"] .kw-post-card .mce-container.mce-panel.mce-toolbar-grp {
	background: #1e293b !important;
	border-color: rgba(255, 255, 255, 0.22) !important;
}
html[data-theme="dark"] .kw-post-card .mce-edit-area {
	background: #0f172a !important;
	border-color: rgba(255, 255, 255, 0.22) !important;
}
html[data-theme="dark"] .kw-post-card .mce-container.mce-panel.mce-statusbar {
	background: #1e293b !important;
	border-color: rgba(255, 255, 255, 0.22) !important;
	color: #cbd5e1 !important;
}
html[data-theme="dark"] .kw-post-card .mce-statusbar .mce-path,
html[data-theme="dark"] .kw-post-card .mce-path-item {
	color: #cbd5e1 !important;
}
html[data-theme="dark"] .kw-post-card .mce-btn .mce-ico,
html[data-theme="dark"] .kw-post-card .mce-btn button {
	color: #e2e8f0 !important;
}
html[data-theme="dark"] .kw-post-card .mce-btn:hover .mce-ico,
html[data-theme="dark"] .kw-post-card .mce-btn:hover button,
html[data-theme="dark"] .kw-post-card .mce-btn.mce-active .mce-ico,
html[data-theme="dark"] .kw-post-card .mce-btn.mce-active button {
	color: #fff !important;
}
html[data-theme="dark"] .kw-post-card .quicktags-toolbar {
	background: #1e293b !important;
	border-color: rgba(255, 255, 255, 0.22) !important;
}
html[data-theme="dark"] .kw-post-card .quicktags-toolbar button {
	background: #0f172a !important;
	border-color: rgba(255, 255, 255, 0.22) !important;
	color: #fff !important;
}
/* menu/dropdowny i selectory koloru doklejane do body (poza .kw-post-card) */
html[data-theme="dark"] .mce-menu,
html[data-theme="dark"] .mce-floatpanel,
html[data-theme="dark"] .mce-colorpicker {
	background: #1e293b !important;
	border-color: rgba(255, 255, 255, 0.22) !important;
	color: #fff !important;
}
html[data-theme="dark"] .mce-menu .mce-menu-item,
html[data-theme="dark"] .mce-menu .mce-menu-item span {
	color: #fff !important;
}
html[data-theme="dark"] .mce-menu .mce-menu-item .mce-ico {
	color: #e2e8f0 !important;
}
html[data-theme="dark"] .mce-menu .mce-menu-item:hover,
html[data-theme="dark"] .mce-menu .mce-menu-item.mce-active {
	background: #334155 !important;
	color: #fff !important;
}
html[data-theme="dark"] .mce-menu .mce-menu-item .mce-caret {
	border-left-color: #e2e8f0 !important;
}
html[data-theme="dark"] .mce-fullscreen-ui,
html[data-theme="dark"] .mce-fullscreen-editor {
	background: #0f172a !important;
}

/* Pasek quicktags (sekcja Kod) — NORMALNE kolory WP, nie teal (1.0.87).
   Przyciski quicktags = <input type="button" class="ed_button button">;
   teal pochodzi z .kw-post-card .button. Tylko MOTYW JASNY
   (w ciemnym maja zostac granatowe z reguly ciemnej). */
html:not([data-theme="dark"]) .kw-post-card .quicktags-toolbar input.button,
html:not([data-theme="dark"]) .kw-post-card .quicktags-toolbar button.button,
html:not([data-theme="dark"]) .kw-post-card .quicktags-toolbar input.ed_button {
    background: #f6f7f7;
    border: 1px solid #ccc;
    color: #2c3338;
    box-shadow: none;
}
html:not([data-theme="dark"]) .kw-post-card .quicktags-toolbar input.button:hover,
html:not([data-theme="dark"]) .kw-post-card .quicktags-toolbar input.button:focus,
html:not([data-theme="dark"]) .kw-post-card .quicktags-toolbar button.button:hover,
html:not([data-theme="dark"]) .kw-post-card .quicktags-toolbar button.button:focus,
html:not([data-theme="dark"]) .kw-post-card .quicktags-toolbar input.ed_button:hover,
html:not([data-theme="dark"]) .kw-post-card .quicktags-toolbar input.ed_button:focus {
    background: #fff;
    border-color: #2271b1;
    color: #2271b1;
}

/* === CIEMNY TEMAT: modal mediów WP (#wp-media-modal) — „Dodaj medium" /
   „Wybierz zdjęcie" (1.0.83). Modal doklejany do body wiec kluczymy po
   html[data-theme] (admin nietkniety). */
html[data-theme="dark"] .media-modal {
	background: rgba(0, 0, 0, 0.75) !important;
	color: #fff;
}
html[data-theme="dark"] #wp-media-modal,
html[data-theme="dark"] #wp-media-modal .media-modal-root,
html[data-theme="dark"] #wp-media-modal .media-frame,
html[data-theme="dark"] #wp-media-modal .media-frame-content,
html[data-theme="dark"] #wp-media-modal .media-frame-left,
html[data-theme="dark"] #wp-media-modal .media-frame-right,
html[data-theme="dark"] #wp-media-modal .media-frame-body,
html[data-theme="dark"] #wp-media-modal .media-frame-router,
html[data-theme="dark"] #wp-media-modal .media-modal-header,
html[data-theme="dark"] #wp-media-modal .media-modal-content,
html[data-theme="dark"] #wp-media-modal .media-modal-footer,
html[data-theme="dark"] #wp-media-modal .media-content-area,
html[data-theme="dark"] #wp-media-modal .media-sidebar,
html[data-theme="dark"] #wp-media-modal .media-frame-title,
html[data-theme="dark"] #wp-media-modal .media-frame-title h1 {
	background: #0f172a !important;
	color: #fff !important;
	border-color: rgba(255, 255, 255, 0.22) !important;
}
html[data-theme="dark"] #wp-media-modal .media-toolbar,
html[data-theme="dark"] #wp-media-modal .media-toolbar-primary,
html[data-theme="dark"] #wp-media-modal .media-toolbar-secondary {
	background: #1e293b !important;
	color: #fff !important;
	border-color: rgba(255, 255, 255, 0.22) !important;
}
html[data-theme="dark"] #wp-media-modal .media-menu,
html[data-theme="dark"] #wp-media-modal .media-frame-menu {
	background: #1e293b !important;
	color: #fff !important;
	border-color: rgba(255, 255, 255, 0.22) !important;
}
html[data-theme="dark"] #wp-media-modal .media-menu a,
html[data-theme="dark"] #wp-media-modal .media-menu-item,
html[data-theme="dark"] #wp-media-modal .media-menu .separator {
	color: #e2e8f0 !important;
}
html[data-theme="dark"] #wp-media-modal .media-menu a:hover,
html[data-theme="dark"] #wp-media-modal .media-menu a:focus,
html[data-theme="dark"] #wp-media-modal .media-menu-item:hover,
html[data-theme="dark"] #wp-media-modal .media-menu-item:focus {
	background: #334155 !important;
	color: #fff !important;
	box-shadow: none !important;
}
/* pola formularza w modalu */
html[data-theme="dark"] #wp-media-modal input[type="text"],
html[data-theme="dark"] #wp-media-modal input[type="search"],
html[data-theme="dark"] #wp-media-modal input[type="url"],
html[data-theme="dark"] #wp-media-modal input[type="email"],
html[data-theme="dark"] #wp-media-modal textarea,
html[data-theme="dark"] #wp-media-modal select {
	background: #0f172a !important;
	color: #fff !important;
	border-color: rgba(255, 255, 255, 0.22) !important;
}
html[data-theme="dark"] #wp-media-modal input::placeholder,
html[data-theme="dark"] #wp-media-modal textarea::placeholder {
	color: #94a3b8 !important;
}
/* przyciski: zwykly = navy jasny, primary (Wstaw/Wybierz) = teal jak kreator */
html[data-theme="dark"] #wp-media-modal .button,
html[data-theme="dark"] #wp-media-modal button.button {
	background: #1e293b !important;
	color: #fff !important;
	border-color: rgba(255, 255, 255, 0.35) !important;
}
html[data-theme="dark"] #wp-media-modal .button:hover,
html[data-theme="dark"] #wp-media-modal button.button:hover {
	background: #334155 !important;
	color: #fff !important;
}
html[data-theme="dark"] #wp-media-modal .button-primary,
html[data-theme="dark"] #wp-media-modal .media-toolbar-primary .button,
html[data-theme="dark"] #wp-media-modal .media-button-insert,
html[data-theme="dark"] #wp-media-modal button.media-button {
	background: #008080 !important;
	border-color: #008080 !important;
	color: #fff !important;
}
html[data-theme="dark"] #wp-media-modal .button-primary:hover,
html[data-theme="dark"] #wp-media-modal .media-toolbar-primary .button:hover,
html[data-theme="dark"] #wp-media-modal .media-button-insert:hover {
	background: #009999 !important;
	border-color: #009999 !important;
}
html[data-theme="dark"] #wp-media-modal .button[disabled],
html[data-theme="dark"] #wp-media-modal .button.disabled,
html[data-theme="dark"] #wp-media-modal .media-toolbar .button:disabled {
	background: #334155 !important;
	border-color: #334155 !important;
	color: #94a3b8 !important;
}
/* siatka zalacznikow + panel szczegolow */
html[data-theme="dark"] #wp-media-modal .attachment,
html[data-theme="dark"] #wp-media-modal .attachment .inside,
html[data-theme="dark"] #wp-media-modal .attachment-info,
html[data-theme="dark"] #wp-media-modal .attachment-details,
html[data-theme="dark"] #wp-media-modal .attachment-details .settings,
html[data-theme="dark"] #wp-media-modal .uploader-inline-content,
html[data-theme="dark"] #wp-media-modal .upload-ui,
html[data-theme="dark"] #wp-media-modal .media-upload-form,
html[data-theme="dark"] #wp-media-modal .browse-attachments,
html[data-theme="dark"] #wp-media-modal .media-notice {
	background: #0f172a !important;
	color: #fff !important;
	border-color: rgba(255, 255, 255, 0.22) !important;
}
html[data-theme="dark"] #wp-media-modal .attachment .filename,
html[data-theme="dark"] #wp-media-modal .attachment .media-icon img + .filename,
html[data-theme="dark"] #wp-media-modal .attachment-details .filename,
html[data-theme="dark"] #wp-media-modal .post-title,
html[data-theme="dark"] #wp-media-modal .post-author,
html[data-theme="dark"] #wp-media-modal .post-type,
html[data-theme="dark"] #wp-media-modal .uploaded-to {
	color: #cbd5e1 !important;
}
html[data-theme="dark"] #wp-media-modal .attachment.selected,
html[data-theme="dark"] #wp-media-modal .attachment.highlighted,
html[data-theme="dark"] #wp-media-modal .attachment:focus {
	background: #1e293b !important;
	outline: 1px solid rgba(255, 221, 87, 0.4);
}
html[data-theme="dark"] #wp-media-modal .attachment .check {
	background: #008080 !important;
	border-color: #fff !important;
	color: #fff !important;
}
/* router / okruszki / zamknij */
html[data-theme="dark"] #wp-media-modal .media-router-item,
html[data-theme="dark"] #wp-media-modal .media-breadcrumb a,
html[data-theme="dark"] #wp-media-modal .view-list a,
html[data-theme="dark"] #wp-media-modal .view-grid a {
	color: #e2e8f0 !important;
}
html[data-theme="dark"] #wp-media-modal .media-router-item.current,
html[data-theme="dark"] #wp-media-modal .media-router-item:hover {
	background: #334155 !important;
	color: #fff !important;
}
html[data-theme="dark"] #wp-media-modal .media-modal-close,
html[data-theme="dark"] #wp-media-modal .media-modal-close .dashicons {
	color: #fff !important;
}
html[data-theme="dark"] #wp-media-modal .media-modal-close:hover {
	background: #334155 !important;
	color: #fff !important;
}

/* kafle podglądu zdjęć w bibliotece (byly #f0f0f1) (1.0.84) */
html[data-theme="dark"] #wp-media-modal .attachment-preview,
html[data-theme="dark"] #wp-media-modal .attachment .thumbnail,
html[data-theme="dark"] #wp-media-modal .attachment .centered {
	background: #1e293b !important;
}
html[data-theme="dark"] #wp-media-modal .attachment:hover .attachment-preview,
html[data-theme="dark"] #wp-media-modal .attachment.selected .attachment-preview,
html[data-theme="dark"] #wp-media-modal .attachment.highlighted .attachment-preview,
html[data-theme="dark"] #wp-media-modal .attachment:focus .attachment-preview {
	background: #334155 !important;
}

/* podpis pod kaflem = li::after z aria-label (byl bialy 80%) (1.0.85) */
html[data-theme="dark"] #wp-media-modal .attachment::after,
html[data-theme="dark"] #wp-media-modal .attachment:hover::after,
html[data-theme="dark"] #wp-media-modal .attachment.selected::after,
html[data-theme="dark"] #wp-media-modal .attachment.highlighted::after {
	background: rgba(15, 23, 42, 0.92) !important;
	color: #e2e8f0 !important;
}
html[data-theme="dark"] #wp-media-modal .attachment:focus::after {
	color: #fff !important;
}

/* === CIEMNY TEMAT: dialog „Wstaw/edytuj odnośnik" (#wp-link-wrap) (1.0.88) ===
   Dialog doklejany do body; bezposrednio pod nim bialy wrap + biale
   powierzchnie (tytul, listy wynikow, submitbox) biały. */
html[data-theme="dark"] #wp-link-wrap {
	background: #0f172a !important;
	color: #fff !important;
	border-color: rgba(255, 255, 255, 0.22) !important;
}
html[data-theme="dark"] #wp-link-wrap #link-modal-title,
html[data-theme="dark"] #wp-link-wrap .most-recent-results,
html[data-theme="dark"] #wp-link-wrap .query-results,
html[data-theme="dark"] #wp-link-wrap .query-notice-message,
html[data-theme="dark"] #wp-link-wrap .query-notice {
	background: #0f172a !important;
	color: #fff !important;
}
html[data-theme="dark"] #wp-link-wrap .submitbox {
	background: #1e293b !important;
	color: #fff !important;
	border-color: rgba(255, 255, 255, 0.22) !important;
}
html[data-theme="dark"] #wp-link-wrap .query-notice-default,
html[data-theme="dark"] #wp-link-wrap .query-notice-hint,
html[data-theme="dark"] #wp-link-wrap label,
html[data-theme="dark"] #wp-link-wrap .wp-link-input-label {
	color: #cbd5e1 !important;
}
html[data-theme="dark"] #wp-link-wrap .item-title {
	color: #e2e8f0 !important;
}
html[data-theme="dark"] #wp-link-wrap .item-info {
	color: #94a3b8 !important;
}
html[data-theme="dark"] #wp-link-wrap li:hover,
html[data-theme="dark"] #wp-link-wrap .item:hover {
	background: #334155 !important;
}
html[data-theme="dark"] #wp-link-wrap hr,
html[data-theme="dark"] #wp-link-wrap .wp-link-separator {
	border-color: rgba(255, 255, 255, 0.22) !important;
}
html[data-theme="dark"] #wp-link-wrap .wp-link-submit {
	background: #0f172a !important;
	border-color: rgba(255, 255, 255, 0.35) !important;
}
html[data-theme="dark"] #wp-link-wrap .wp-link-submit:hover {
	background: #1e293b !important;
}

/* === CIEMNY TEMAT: dialog linku — jasne bordy (1.0.90) === */
html[data-theme="dark"] #wp-link-wrap #link-modal-title,
html[data-theme="dark"] #wp-link-wrap .most-recent-results,
html[data-theme="dark"] #wp-link-wrap .query-results,
html[data-theme="dark"] #wp-link-wrap .query-notice-message {
	border-color: rgba(255, 255, 255, 0.22) !important;
}
html[data-theme="dark"] #wp-link-wrap .query-results li,
html[data-theme="dark"] #wp-link-wrap .most-recent-results li {
	border-color: rgba(255, 255, 255, 0.12) !important;
}

/* === CIEMNY TEMAT: pływający pasek TinyMCE przy zaznaczeniu (.mce-inline-toolbar-grp)
   (1.0.91) — doklejany do body, biały #f6f7f7 + bord #a7aaad; zębatka „Opcje
   odnośnika" juz granatowa z globalnej reguly. === */
html[data-theme="dark"] .mce-inline-toolbar-grp {
	background: #0f172a !important;
	border-color: rgba(255, 255, 255, 0.22) !important;
}
html[data-theme="dark"] .mce-inline-toolbar-grp .mce-flow-layout-item,
html[data-theme="dark"] .mce-inline-toolbar-grp .mce-btn {
	border-color: transparent !important;
}
html[data-theme="dark"] .mce-inline-toolbar-grp .mce-btn:hover button,
html[data-theme="dark"] .mce-inline-toolbar-grp .mce-btn.mce-btn-active button {
	background: #334155 !important;
}
html[data-theme="dark"] .mce-inline-toolbar-grp .wp-link-input input {
	background: #0f172a !important;
	color: #fff !important;
	border-color: rgba(255, 255, 255, 0.22) !important;
}

/* === CIEMNY TEMAT: okna dialogowe TinyMCE (floatpanel/window) — naglowek, stopka
   i siatka tabeli (1.0.92). Dotyczy m.in. „Specjalny znak", „Tabela", „Media". === */
html[data-theme="dark"] .mce-floatpanel .mce-window-head,
html[data-theme="dark"] .mce-floatpanel .mce-foot {
	background: #0f172a !important;
	border-color: rgba(255, 255, 255, 0.22) !important;
}
html[data-theme="dark"] .mce-floatpanel .mce-title {
	color: #fff !important;
}
html[data-theme="dark"] .mce-floatpanel .mce-foot .mce-btn,
html[data-theme="dark"] .mce-floatpanel .mce-foot .mce-btn button {
	background: #1e293b !important;
	color: #fff !important;
	border-color: rgba(255, 255, 255, 0.35) !important;
}
html[data-theme="dark"] .mce-floatpanel .mce-foot .mce-btn:hover,
html[data-theme="dark"] .mce-floatpanel .mce-foot .mce-btn:hover button {
	background: #334155 !important;
}
html[data-theme="dark"] .mce-floatpanel .mce-foot .mce-btn .mce-txt {
	color: #fff !important;
}
html[data-theme="dark"] .mce-floatpanel .mce-charmap td,
html[data-theme="dark"] .mce-floatpanel .mce-charmap-grid td,
html[data-theme="dark"] .mce-floatpanel .mce-charmap-table td {
	border-color: rgba(255, 255, 255, 0.22) !important;
}
html[data-theme="dark"] .mce-floatpanel .mce-charmap td:hover,
html[data-theme="dark"] .mce-floatpanel .mce-charmap-grid td:hover,
html[data-theme="dark"] .mce-floatpanel .mce-charmap-table td:hover {
	background: #334155 !important;
}

/* === LIGHTBOX KW — powiekszenie obrazka w modalu mediow (1.0.95) === */
.kw-lightbox {
	position: fixed;
	inset: 0;
	z-index: 200000;
	background: rgba(2, 6, 23, 0.92);
	display: flex;
	align-items: center;
	justify-content: center;
}
.kw-lightbox[hidden] {
	display: none;
}
.kw-lightbox figure {
	margin: 0;
	max-width: 92vw;
	max-height: 92vh;
	display: flex;
	flex-direction: column;
	align-items: center;
}
.kw-lightbox img {
	max-width: 92vw;
	max-height: 88vh;
	object-fit: contain;
	border-radius: 6px;
	box-shadow: 0 12px 48px rgba(0, 0, 0, 0.5);
}
.kw-lightbox figcaption {
	margin-top: 10px;
	color: #e2e8f0;
	font-size: 14px;
	text-align: center;
}
.kw-lightbox button {
	position: absolute;
	background: rgba(15, 23, 42, 0.85);
	border: 1px solid rgba(255, 255, 255, 0.25);
	color: #fff;
	font-size: 22px;
	line-height: 1;
	width: 44px;
	height: 44px;
	border-radius: 8px;
	cursor: pointer;
}
.kw-lightbox button:hover {
	background: #334155;
}
.kw-lb-close {
	top: 18px;
	right: 18px;
}
.kw-lb-prev {
	left: 18px;
	top: 50%;
	transform: translateY(-50%);
}
.kw-lb-next {
	right: 18px;
	top: 50%;
	transform: translateY(-50%);
}
#wp-media-modal li.attachment .kw-lb-zoom {
	position: absolute;
	top: 6px;
	right: 6px;
	width: 30px;
	height: 30px;
	padding: 0;
	border-radius: 6px;
	border: 1px solid rgba(255, 255, 255, 0.35);
	background: rgba(15, 23, 42, 0.85);
	color: #fff;
	cursor: pointer;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
}
#wp-media-modal li.attachment .kw-lb-zoom:hover {
	background: #334155;
}
