/**
 * Rainbows in the Dark — works with Blocksy (and other themes).
 */

:root {
	--ritd-bg: #0f0f18;
	--ritd-bg-elevated: #171724;
	--ritd-text: #e8e8f2;
	--ritd-text-muted: #a8a8bc;
	--ritd-rainbow: linear-gradient(
		90deg,
		#ff6b6b,
		#ffb347,
		#ffe066,
		#6bcb77,
		#4dabf7,
		#9775fa,
		#ff6b6b
	);

	/* Blocksy palette hooks */
	--theme-palette-color-1: #9775fa;
	--theme-palette-color-2: #4dabf7;
	--theme-palette-color-3: #6bcb77;
	--theme-palette-color-4: #ffb347;
	--theme-palette-color-5: #171724;
	--theme-palette-color-6: #0f0f18;
	--theme-palette-color-7: #252536;
	--theme-palette-color-8: #ff6b6b;
	--theme-text-color: #e8e8f2;
	--theme-link-initial-color: #c4b5fd;
	--theme-link-hover-color: #ffe066;
}

body {
	background-color: var(--ritd-bg) !important;
	color: var(--ritd-text) !important;
}

a {
	color: var(--theme-link-initial-color);
}

a:hover {
	color: var(--theme-link-hover-color);
}

/* Blocksy header */
[data-header],
header[data-id="type-1"],
.ct-header,
#header {
	background-color: var(--ritd-bg-elevated) !important;
	border-bottom: 2px solid transparent;
	border-image: var(--ritd-rainbow) 1;
}

/* Blocksy + generic nav — prevent label wrapping */
.ct-header .menu > li > a,
.ct-header .menu-item > a,
.main-navigation ul li > a,
nav[class*="menu"] > ul > li > a {
	white-space: nowrap;
}

.ct-header [data-id="menu"] > ul > li > a,
.ct-header .ct-menu-link {
	color: var(--ritd-text) !important;
	font-size: 0.92rem;
}

.ct-header [data-id="menu"] > ul > li:hover > a,
.ct-header [data-id="menu"] > ul > li.current-menu-item > a,
.ct-header [data-id="menu"] > ul > li.current_page_item > a {
	background: var(--ritd-rainbow);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent !important;
}

/* Dropdown submenus */
.ct-header .sub-menu,
.ct-header .children,
.main-navigation ul ul {
	background: var(--ritd-bg-elevated) !important;
	border: 1px solid #2a2a3d;
}

.ct-header .sub-menu a {
	color: var(--ritd-text-muted) !important;
}

.ct-header .sub-menu a:hover {
	color: var(--ritd-text) !important;
	background: #252536 !important;
}

/* Page title / hero */
.hero-section,
.page-title,
.entry-header,
[data-prefix="single_page"] .entry-header,
.ct-page-title {
	background: var(--ritd-bg-elevated) !important;
	color: var(--ritd-text) !important;
	border-bottom: 3px solid transparent;
	border-image: var(--ritd-rainbow) 1;
}

.hero-section h1,
.page-title h1,
.entry-header h1,
.ct-page-title {
	color: var(--ritd-text) !important;
}

/* Main content */
#main-container,
.site-main,
#content,
.entry-content {
	background-color: var(--ritd-bg);
	color: var(--ritd-text);
}

.entry-content h1,
.entry-content h2,
.entry-content h3 {
	color: var(--ritd-text);
}

/* Footer */
[data-footer],
footer.ct-footer,
.site-footer {
	background-color: #0a0a12 !important;
	color: var(--ritd-text-muted);
	border-top: 2px solid transparent;
	border-image: var(--ritd-rainbow) 1;
}

[data-footer] a,
footer.ct-footer a {
	color: #c4b5fd;
}

/* Buttons / WooCommerce */
button,
input[type="submit"],
.ct-button,
.wp-block-button__link,
.woocommerce a.button,
.woocommerce button.button {
	background: linear-gradient(135deg, #4dabf7, #9775fa) !important;
	color: #fff !important;
	border: none !important;
}

/* Mobile menu */
@media (max-width: 999px) {
	.ct-header [data-id="menu"] > ul > li > a,
	.ct-header .ct-menu-link {
		white-space: normal;
		line-height: 1.4;
		padding-top: 0.6rem;
		padding-bottom: 0.6rem;
	}
}

@media (max-width: 1024px) {
	.main-navigation ul li > a {
		white-space: normal;
	}
}
