/*
 * Chiaroscuro theme styles.
 * The dark theme uses neutral colors on common WordPress content surfaces;
 * images, videos and other media are not inverted or recolored.
 */
:root {
	color-scheme: light;
}

html[data-chiaroscuro-theme="dark"] {
	color-scheme: dark;
	background-color: #14171c !important;
}

html[data-chiaroscuro-theme="dark"] body {
	background-color: #14171c !important;
	color: #e8eaf0 !important;
}

html[data-chiaroscuro-theme="dark"] body :where(
	main,
	article,
	aside,
	nav,
	.site,
	.site-content,
	#page,
	#content,
	#primary,
	#secondary,
	.content-area,
	.widget,
	.entry-content,
	.entry-header,
	.entry-footer,
	.wp-block-group,
	.wp-block-columns,
	.wp-block-column,
	.wp-block-quote,
	.wp-block-table,
	.wp-block-latest-posts,
	.wp-block-archives,
	.wp-block-categories,
	.wp-block-search,
	.wp-block-calendar,
	.wp-block-cover,
	.wp-block-media-text,
	.wp-block-post,
	.wp-block-query,
	.wp-block-comments,
	.wp-block-comment-template,
	.wp-block-navigation,
	.wp-block-navigation__responsive-container,
	.wp-block-template-part,
	.wp-block-site-title,
	.wp-block-site-tagline,
	.wp-block-post-title,
	.wp-block-post-content,
	.wp-block-post-excerpt,
	.wp-block-post-featured-image,
	.wp-block-post-author,
	.wp-block-post-date,
	.wp-block-post-terms,
	.wp-block-post-navigation-link,
	.wp-block-query-pagination,
	.wp-block-search__inside-wrapper,
	.wp-block-button__link,
	.woocommerce,
	.woocommerce-page,
	.woocommerce-cart,
	.woocommerce-checkout,
	.woocommerce-account,
	.woocommerce div.product,
	.woocommerce ul.products li.product,
	.woocommerce-cart .cart-collaterals,
	.woocommerce-checkout #order_review,
	.card,
	.panel,
	.modal-content
) {
	background-color: #1d2128 !important;
	color: #e8eaf0 !important;
	border-color: #363c47 !important;
}

html[data-chiaroscuro-theme="dark"] body :where(
	p, h1, h2, h3, h4, h5, h6, li, dt, dd, label, legend,
	blockquote, address, figcaption, small, strong, em, b, i,
	th, td, caption, summary, details, time, cite, q, code, pre
) {
	color: #e8eaf0 !important;
	border-color: #363c47 !important;
}

html[data-chiaroscuro-theme="dark"] body a:not(.chiaroscuro-toggle) {
	color: #9ecbff !important;
}

html[data-chiaroscuro-theme="dark"] body :where(input, textarea, select, option) {
	background-color: #222731 !important;
	color: #f1f3f7 !important;
	border-color: #596171 !important;
}

html[data-chiaroscuro-theme="dark"] body :where(button, .button, input[type="button"], input[type="submit"], input[type="reset"]) {
	border-color: #596171;
}

html[data-chiaroscuro-theme="dark"] body hr {
	border-color: #363c47 !important;
}

.chiaroscuro-toggle {
	position: fixed !important;
	z-index: 2147483000 !important;
	bottom: max(20px, env(safe-area-inset-bottom)) !important;
	display: inline-flex !important;
	width: 52px !important;
	height: 52px !important;
	align-items: center !important;
	justify-content: center !important;
	padding: 0 !important;
	border: 1px solid rgba(255, 255, 255, 0.18) !important;
	border-radius: 50% !important;
	background: #20242b !important;
	color: #fff !important;
	box-shadow: 0 4px 18px rgba(0, 0, 0, 0.28) !important;
	cursor: pointer !important;
	transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease !important;
	-webkit-tap-highlight-color: transparent;
}

.chiaroscuro-toggle--right {
	right: max(20px, env(safe-area-inset-right)) !important;
	left: auto !important;
}

.chiaroscuro-toggle--left {
	left: max(20px, env(safe-area-inset-left)) !important;
	right: auto !important;
}

.chiaroscuro-toggle:hover {
	transform: translateY(-2px) !important;
	box-shadow: 0 7px 22px rgba(0, 0, 0, 0.35) !important;
}

.chiaroscuro-toggle:focus-visible {
	outline: 3px solid #7db7ff !important;
	outline-offset: 3px !important;
}

.chiaroscuro-toggle__icon {
	width: 23px;
	height: 23px;
	fill: none;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 1.8;
}

.chiaroscuro-toggle__icon--moon {
	display: none;
}

html[data-chiaroscuro-theme="dark"] .chiaroscuro-toggle__icon--sun {
	display: none;
}

html[data-chiaroscuro-theme="dark"] .chiaroscuro-toggle__icon--moon {
	display: block;
}

.chiaroscuro-toggle .screen-reader-text {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

@media (max-width: 480px) {
	.chiaroscuro-toggle {
		width: 48px !important;
		height: 48px !important;
		bottom: max(14px, env(safe-area-inset-bottom)) !important;
	}

	.chiaroscuro-toggle--right {
		right: max(14px, env(safe-area-inset-right)) !important;
	}

	.chiaroscuro-toggle--left {
		left: max(14px, env(safe-area-inset-left)) !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	.chiaroscuro-toggle {
		transition: none !important;
	}
}
