/* ============================================================
   Decoding Dreams — Theme Modes
   Dark is the native theme: NO overrides (zero visual change).
   Light & Colorful override below via [data-dd-mode] on <html>.
   The toggle UI itself keeps fixed brand colors in every mode.
   ============================================================ */

/* ---------- Toggle UI (fixed navy/gold in all modes) ---------- */
.dd-mode-toggle {
	position: fixed;
	left: 16px;
	bottom: 16px;
	z-index: 99990;
	display: flex;
	gap: 2px;
	background: #0d0b26;
	border: 1px solid #d4af37;
	border-radius: 999px;
	padding: 4px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.dd-mode-toggle button {
	border: 0;
	background: transparent;
	color: #f5edd6;
	font: 600 12px/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	padding: 8px 12px;
	border-radius: 999px;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 6px;
}
.dd-mode-toggle button:hover { color: #d4af37; }
.dd-mode-toggle button[aria-pressed="true"] { background: #d4af37; color: #0d0b26; }
.dd-mode-toggle button[aria-pressed="true"]:hover { color: #0d0b26; }
.dd-mode-toggle button:focus-visible { outline: 2px solid #d4af37; outline-offset: 2px; }
@media (max-width: 480px) {
	.dd-mode-toggle { left: 12px; bottom: 12px; }
	.dd-mode-toggle button { padding: 8px 9px; font-size: 11px; }
}

/* ============================================================
   LIGHT MODE — warm paper daytime theme
   Specificity note: the Customizer "Additional CSS" paints the
   dark theme with ID selectors (#page, #masthead, #colophon)
   carrying !important. Every override below is prefixed with
   html[data-dd-mode="light"] and re-targets those same IDs —
   without that, the dark rules win and text goes unreadable.
   Dark imagery zones (hero cover, cover blocks, FireBox panel,
   search drawer) intentionally stay dark with light text.
   ============================================================ */
html[data-dd-mode="light"] { color-scheme: light; }

/* ---- Page canvas ---- */
html[data-dd-mode="light"] body,
html[data-dd-mode="light"] .site,
html[data-dd-mode="light"] #page {
	background-color: #faf8f2 !important;
	color: #232a45 !important;
}

/* ---- Header ---- */
html[data-dd-mode="light"] .site-header,
html[data-dd-mode="light"] .site-header-wrap,
html[data-dd-mode="light"] #masthead,
html[data-dd-mode="light"] .site-header-row,
html[data-dd-mode="light"] .site-header-row-container-inner {
	background: #ffffff !important;
	background-color: #ffffff !important;
	border-bottom: 1px solid #e7e0cf !important;
}
html[data-dd-mode="light"] .site-header .main-navigation a,
html[data-dd-mode="light"] #masthead .main-navigation a { color: #232a45 !important; }
html[data-dd-mode="light"] .site-header .main-navigation a:hover,
html[data-dd-mode="light"] #masthead .main-navigation a:hover,
html[data-dd-mode="light"] .site-header .main-navigation a:focus,
html[data-dd-mode="light"] #masthead .main-navigation a:focus { color: #8a6d1c !important; }
html[data-dd-mode="light"] .site-branding .site-title,
html[data-dd-mode="light"] .site-branding .site-title a { color: #1a2140 !important; }

/* ---- Dropdown submenu ---- */
html[data-dd-mode="light"] .header-navigation .header-menu-container ul ul.sub-menu {
	background: #ffffff !important;
	border: 1px solid #e7e0cf !important;
	box-shadow: 0 12px 32px rgba(26, 32, 64, 0.12) !important;
}
html[data-dd-mode="light"] .header-navigation .header-menu-container ul ul li.menu-item > a { color: #232a45 !important; }
html[data-dd-mode="light"] .header-navigation .header-menu-container ul ul li.menu-item > a:hover,
html[data-dd-mode="light"] .header-navigation .header-menu-container ul ul li.menu-item > a:focus {
	color: #8a6d1c !important;
	background: #f4efe2 !important;
}

/* ---- Content wrappers: drop the dark canvas ---- */
html[data-dd-mode="light"] #inner-wrap,
html[data-dd-mode="light"] #primary,
html[data-dd-mode="light"] .content-container,
html[data-dd-mode="light"] #main,
html[data-dd-mode="light"] .content-wrap,
html[data-dd-mode="light"] .entry-content-wrap,
html[data-dd-mode="light"] .content-bg,
html[data-dd-mode="light"] article.entry {
	background: transparent !important;
	background-color: transparent !important;
}

/* ---- Headings ---- */
html[data-dd-mode="light"] h1,
html[data-dd-mode="light"] h2,
html[data-dd-mode="light"] h3,
html[data-dd-mode="light"] h4,
html[data-dd-mode="light"] h5,
html[data-dd-mode="light"] h6,
html[data-dd-mode="light"] .entry-title,
html[data-dd-mode="light"] .widget-title { color: #1a2140 !important; }

/* ---- Dark imagery zones keep light text ---- */
html[data-dd-mode="light"] .dd-hero h1,
html[data-dd-mode="light"] .wp-block-cover h1,
html[data-dd-mode="light"] .wp-block-cover h2,
html[data-dd-mode="light"] .wp-block-cover h3,
html[data-dd-mode="light"] #dialog190 h1,
html[data-dd-mode="light"] #dialog190 h2,
html[data-dd-mode="light"] #dialog190 h3 { color: #f9f5eb !important; }
html[data-dd-mode="light"] .dd-hero p { color: #c7d2fe !important; }
html[data-dd-mode="light"] #dialog190 a { color: #d4af37 !important; }

/* ---- Body copy ---- */
html[data-dd-mode="light"] p,
html[data-dd-mode="light"] li,
html[data-dd-mode="light"] .entry-content p { color: #232a45 !important; }

/* ---- Links ---- */
html[data-dd-mode="light"] a { color: #8a6d1c !important; }
html[data-dd-mode="light"] a:hover,
html[data-dd-mode="light"] a:focus { color: #6e5716 !important; }

/* ---- Buttons ---- */
html[data-dd-mode="light"] .wp-block-button__link,
html[data-dd-mode="light"] .wp-element-button,
html[data-dd-mode="light"] button:not(.dd-mode-toggle button),
html[data-dd-mode="light"] input[type="submit"],
html[data-dd-mode="light"] .button {
	background: #1c2340 !important;
	background-color: #1c2340 !important;
	color: #f7f1de !important;
	border-color: #1c2340 !important;
}
html[data-dd-mode="light"] .wp-block-button__link:hover,
html[data-dd-mode="light"] .wp-element-button:hover,
html[data-dd-mode="light"] .button:hover {
	background: #d4af37 !important;
	background-color: #d4af37 !important;
	color: #1c2340 !important;
	border-color: #d4af37 !important;
}

/* ---- Homepage cards ---- */
html[data-dd-mode="light"] .dd-cards .wp-block-post {
	background: #ffffff !important;
	background-color: #ffffff !important;
	border: 1px solid #e7e0cf !important;
}
html[data-dd-mode="light"] .dd-cards .wp-block-post-title a { color: #1a2140 !important; }
html[data-dd-mode="light"] .dd-cards .wp-block-post-excerpt p { color: #4a5470 !important; }
html[data-dd-mode="light"] .dd-cards .wp-block-post-excerpt__more-link { color: #8a6d1c !important; }
html[data-dd-mode="light"] .dd-readtime { color: #6b7280 !important; }
html[data-dd-mode="light"] .wp-block-query-pagination a.page-numbers { color: #8a6d1c !important; }
html[data-dd-mode="light"] .wp-block-query-pagination .page-numbers.current { color: #1a2140 !important; }

/* ---- Sidebar (block widgets, transparent) ---- */
html[data-dd-mode="light"] .wp-block-latest-posts a,
html[data-dd-mode="light"] .wp-block-latest-comments { color: #232a45 !important; }

/* ---- Footer: light paper ---- */
html[data-dd-mode="light"] .site-footer,
html[data-dd-mode="light"] .site-footer-wrap,
html[data-dd-mode="light"] #colophon {
	background: #ffffff !important;
	background-color: #ffffff !important;
	border-top: 1px solid #e7e0cf !important;
	color: #3a4160 !important;
}
html[data-dd-mode="light"] .site-footer h1,
html[data-dd-mode="light"] .site-footer h2,
html[data-dd-mode="light"] .site-footer h3,
html[data-dd-mode="light"] .site-footer h4 { color: #1a2140 !important; }
html[data-dd-mode="light"] .site-footer p,
html[data-dd-mode="light"] .site-footer li { color: #3a4160 !important; }
html[data-dd-mode="light"] .site-footer a { color: #8a6d1c !important; }

/* ---- Forms ---- */
html[data-dd-mode="light"] input[type="text"],
html[data-dd-mode="light"] input[type="search"],
html[data-dd-mode="light"] input[type="email"],
html[data-dd-mode="light"] input[type="url"],
html[data-dd-mode="light"] textarea,
html[data-dd-mode="light"] select {
	background: #ffffff !important;
	background-color: #ffffff !important;
	color: #232a45 !important;
	border: 1px solid #d8d0b8 !important;
}
html[data-dd-mode="light"] input::placeholder,
html[data-dd-mode="light"] textarea::placeholder { color: #8b93ad !important; }

/* ============================================================
   COLORFUL MODE — cosmic aurora
   ============================================================ */
html[data-dd-mode="colorful"] { color-scheme: dark; }

html[data-dd-mode="colorful"] body {
	background:
		radial-gradient(1200px 600px at 15% -5%, rgba(45, 212, 191, 0.16), transparent 60%),
		radial-gradient(1000px 520px at 90% 8%, rgba(244, 114, 182, 0.15), transparent 60%),
		radial-gradient(900px 700px at 50% 112%, rgba(212, 175, 55, 0.12), transparent 60%),
		#141033 !important;
	color: #f4efff !important;
}

/* Header */
html[data-dd-mode="colorful"] .site-header {
	background: rgba(26, 20, 64, 0.96) !important;
	border-bottom: 1px solid #3d3480 !important;
}
html[data-dd-mode="colorful"] .site-header a,
html[data-dd-mode="colorful"] .main-navigation a,
html[data-dd-mode="colorful"] #site-navigation a { color: #f4efff !important; }
html[data-dd-mode="colorful"] .site-header a:hover,
html[data-dd-mode="colorful"] .main-navigation a:hover { color: #5eead4 !important; }
html[data-dd-mode="colorful"] .site-branding .site-title a { color: #ffe9a8 !important; }

/* Content */
html[data-dd-mode="colorful"] #main,
html[data-dd-mode="colorful"] .content-area,
html[data-dd-mode="colorful"] .entry-content { color: #f4efff !important; }

/* Headings with a soft neon glow */
html[data-dd-mode="colorful"] h1,
html[data-dd-mode="colorful"] h2,
html[data-dd-mode="colorful"] h3,
html[data-dd-mode="colorful"] h4,
html[data-dd-mode="colorful"] h5,
html[data-dd-mode="colorful"] h6,
html[data-dd-mode="colorful"] .entry-title,
html[data-dd-mode="colorful"] .widget-title {
	color: #fff7e6 !important;
	text-shadow: 0 0 26px rgba(244, 114, 182, 0.28);
}

/* Links */
html[data-dd-mode="colorful"] .entry-content a:not(.wp-block-button__link):not(.wp-element-button),
html[data-dd-mode="colorful"] .comments-area a { color: #5eead4 !important; }
html[data-dd-mode="colorful"] .entry-content a:hover:not(.wp-block-button__link):not(.wp-element-button) { color: #f472b6 !important; }

/* Gradient buttons */
html[data-dd-mode="colorful"] .wp-block-button__link,
html[data-dd-mode="colorful"] .wp-element-button,
html[data-dd-mode="colorful"] button:not(.dd-mode-toggle button),
html[data-dd-mode="colorful"] input[type="submit"],
html[data-dd-mode="colorful"] .button {
	background: linear-gradient(135deg, #2dd4bf 0%, #f472b6 100%) !important;
	color: #141033 !important;
	border: 0 !important;
	font-weight: 700;
}

/* Sidebar widgets */
html[data-dd-mode="colorful"] .widget {
	background: #1e1848 !important;
	border: 1px solid #4c3a8c !important;
	color: #f4efff !important;
}
html[data-dd-mode="colorful"] .widget a { color: #5eead4 !important; }

/* Footer */
html[data-dd-mode="colorful"] .site-footer {
	background: #100c2b !important;
	color: #e8e2ff !important;
	border-top: 1px solid #3d3480 !important;
}
html[data-dd-mode="colorful"] .site-footer a { color: #5eead4 !important; }

/* Forms */
html[data-dd-mode="colorful"] input[type="text"],
html[data-dd-mode="colorful"] input[type="search"],
html[data-dd-mode="colorful"] input[type="email"],
html[data-dd-mode="colorful"] input[type="url"],
html[data-dd-mode="colorful"] textarea,
html[data-dd-mode="colorful"] select {
	background: #1e1848 !important;
	color: #f4efff !important;
	border: 1px solid #4c3a8c !important;
}
html[data-dd-mode="colorful"] input::placeholder,
html[data-dd-mode="colorful"] textarea::placeholder { color: #9d92d8 !important; }
