/* Tropic Reporters Dark Mode 1.0.0 */

:root {
	--trdm-bg: #11100f;
	--trdm-surface: #1b1917;
	--trdm-surface-2: #24211f;
	--trdm-text: #f3f1ee;
	--trdm-muted: #bdb7b0;
	--trdm-border: rgba(255,255,255,.12);
	--trdm-accent: #ff5a1f;
}

/* Fixed switch: deliberately above the radio player's bottom area. */
.trdm-toggle {
	position: fixed !important;
	top: 88px !important;
	right: 18px !important;
	left: auto !important;
	bottom: auto !important;
	width: 52px !important;
	height: 52px !important;
	min-width: 52px !important;
	min-height: 52px !important;
	padding: 0 !important;
	margin: 0 !important;
	border: 0 !important;
	border-radius: 50% !important;
	background: #222 !important;
	color: #fff !important;
	box-shadow: 0 5px 18px rgba(0,0,0,.28) !important;
	cursor: pointer !important;
	z-index: 2147483000 !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	font-size: 24px !important;
	line-height: 1 !important;
	transition: transform .2s ease, background .2s ease !important;
}

.trdm-toggle:hover {
	transform: scale(1.05);
	background: var(--trdm-accent) !important;
}

.trdm-toggle:focus-visible {
	outline: 3px solid rgba(255,90,31,.45) !important;
	outline-offset: 3px !important;
}

.trdm-sun,
.trdm-moon {
	display: block;
	font-family: Arial, sans-serif;
	font-weight: 700;
}

.trdm-moon {
	display: none;
}

body.trdm-dark .trdm-sun {
	display: none;
}

body.trdm-dark .trdm-moon {
	display: block;
}

/* Site-wide dark treatment. The radio player is intentionally excluded. */
body.trdm-dark,
body.trdm-dark .site,
body.trdm-dark #page {
	background: var(--trdm-bg) !important;
	color: var(--trdm-text) !important;
}

body.trdm-dark .jeg_main,
body.trdm-dark .jeg_content,
body.trdm-dark .jeg_sidebar,
body.trdm-dark .jeg_wrapper,
body.trdm-dark .jeg_inner,
body.trdm-dark .jeg_postblock,
body.trdm-dark .jeg_post,
body.trdm-dark .jeg_block_container,
body.trdm-dark .widget,
body.trdm-dark .widget-wrap,
body.trdm-dark .jeg_navbar,
body.trdm-dark .jeg_header,
body.trdm-dark .jeg_footer,
body.trdm-dark footer,
body.trdm-dark .site-footer {
	background-color: var(--trdm-bg) !important;
	color: var(--trdm-text) !important;
}

body.trdm-dark .jeg_post,
body.trdm-dark .jeg_block_container,
body.trdm-dark .widget,
body.trdm-dark .jeg_archive,
body.trdm-dark .jeg_single_tpl {
	background-color: var(--trdm-surface) !important;
	color: var(--trdm-text) !important;
}

body.trdm-dark h1,
body.trdm-dark h2,
body.trdm-dark h3,
body.trdm-dark h4,
body.trdm-dark h5,
body.trdm-dark h6,
body.trdm-dark .jeg_post_title,
body.trdm-dark .entry-title,
body.trdm-dark .jeg_postblock_content {
	color: var(--trdm-text) !important;
}

body.trdm-dark p,
body.trdm-dark li,
body.trdm-dark .jeg_meta,
body.trdm-dark .jeg_post_excerpt,
body.trdm-dark .jeg_post_excerpt p,
body.trdm-dark .jeg_breadcrumb,
body.trdm-dark .jeg_author_name {
	color: var(--trdm-muted) !important;
}

body.trdm-dark a {
	color: #ff7a49;
}

body.trdm-dark input,
body.trdm-dark textarea,
body.trdm-dark select {
	background: var(--trdm-surface-2) !important;
	color: var(--trdm-text) !important;
	border-color: var(--trdm-border) !important;
}

body.trdm-dark .jeg_menu,
body.trdm-dark .jeg_nav,
body.trdm-dark .jeg_navbar .jeg_menu {
	background: #151311 !important;
}

body.trdm-dark .jeg_nav_item a,
body.trdm-dark .jeg_main_menu > li > a,
body.trdm-dark .jeg_navbar a {
	color: #f3f1ee !important;
}

body.trdm-dark img {
	/* Keep photographs/logos natural; do not invert them. */
	filter: none !important;
}

/* Keep the Tropic Reporters Radio player above page content and visually unchanged. */
.tr-radio-player,
.tr-radio-site-player,
.tr-radio-compact,
.tropic-radio-player,
#tropic-radio-player {
	z-index: 2147482990 !important;
}

/* The radio page's own dark UI should not be recolored by this plugin. */
body.trdm-dark .tr-radio-player *,
body.trdm-dark .tr-radio-site-player *,
body.trdm-dark .tr-radio-compact *,
body.trdm-dark .tropic-radio-player *,
body.trdm-dark #tropic-radio-player * {
	color: inherit;
}

@media (max-width: 782px) {
	.trdm-toggle {
		top: 76px !important;
		right: 12px !important;
		width: 46px !important;
		height: 46px !important;
		min-width: 46px !important;
		min-height: 46px !important;
		font-size: 21px !important;
	}
}

/* Respect reduced motion. */
@media (prefers-reduced-motion: reduce) {
	.trdm-toggle {
		transition: none !important;
	}
}
