/*
Theme Name: BitVolts Lab
Template: twentytwentyfive
Description: Child theme of Twenty Twenty-Five with the look of https://bitvolts.com/ (Docusaurus): Neon Teal palette, Orbitron titles, the same navbar and dark footer, light/dark mode shared with the main site.
Version: 1.0.2
Author: Luana Buscariolo
Text Domain: bitvolts
License: GPL-2.0-or-later
*/

/*
 * Managed in git (Infra/stacks/wordpress/theme/bitvolts) and mounted read-only:
 * edit it there, not in WordPress. Colours/fonts come from theme.json; this file adds what
 * theme.json can't express: dark mode, the Docusaurus-like navbar/footer and the neon touches.
 * Mirrors src/css/custom.css of the main site — keep both in sync.
 */

/* ═════════ DARK MODE ═════════
   <html data-theme="dark|light"> is set before first paint (functions.php), with the same rule
   and localStorage key as the main site. Overriding the presets recolours every block. */
html[data-theme="dark"] {
	--wp--preset--color--base: #1b1b1d;
	--wp--preset--color--contrast: #e3e3e3;
	--wp--preset--color--accent-1: #2ee6d6;
	--wp--preset--color--accent-4: #b4b9c0;
	--wp--preset--color--accent-5: #242526;
	--wp--preset--color--accent-6: #444950;
	color-scheme: dark;
}

/* ═════════ PAGE LAYOUT ═════════
   Footer always at the bottom of the window, even on short pages (as on the main site). */
.wp-site-blocks {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}
.admin-bar .wp-site-blocks { min-height: calc(100vh - var(--wp-admin--admin-bar--height, 32px)); }
.wp-site-blocks > main { flex: 1 0 auto; }

/* ═════════ NAVBAR (like Docusaurus' .navbar) ═════════ */
.bv-navbar {
	position: sticky;
	top: 0;
	z-index: 100;
	min-height: 3.75rem;
	padding: 0.5rem 1rem;
	gap: 1rem;
	background: var(--wp--preset--color--base);
	box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.1);
}
html[data-theme="dark"] .bv-navbar {
	background: #242526;
}
/* Below the WordPress admin bar when logged in */
.admin-bar .bv-navbar { top: var(--wp-admin--admin-bar--height, 32px); }

.bv-navbar__left { gap: 1.25rem; }

.bv-brand {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
}
.bv-brand img { width: 2rem; height: 2rem; }
.bv-brand span {
	font-family: var(--wp--preset--font-family--orbitron);
	font-weight: 700;
	font-size: 1.05rem;
	letter-spacing: 0.03em;
	white-space: nowrap;
}

.bv-nav,
.bv-navbar__right a {
	font-size: 0.95rem;
	font-weight: 500;
}
.bv-nav a,
.bv-navbar__right a {
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
}
.bv-nav a:hover,
.bv-nav button:hover,
.bv-navbar__right a:hover {
	color: var(--wp--preset--color--accent-1);
}
.bv-nav .wp-block-navigation__submenu-container {
	border: 0 !important;
	border-radius: 0.4rem;
	padding: 0.4rem 0;
	min-width: 16rem;
	background: var(--wp--preset--color--base) !important;
	box-shadow: 0 5px 40px rgba(0, 0, 0, 0.2);
}
html[data-theme="dark"] .bv-nav .wp-block-navigation__submenu-container { background: #242526 !important; }
/* The navigation block forces black submenu text (#000) when the block has no text colour of its
   own, which was unreadable on the dark dropdown (1.4:1). Use the theme's text colour instead. */
.bv-nav .wp-block-navigation__submenu-container {
	color: var(--wp--preset--color--contrast) !important;
}
.bv-nav .wp-block-navigation__submenu-container a { color: inherit; }
.bv-nav .wp-block-navigation__submenu-container a:hover { color: var(--wp--preset--color--accent-1); }
.bv-nav .wp-block-navigation__submenu-container a { padding: 0.35rem 1rem; white-space: nowrap; }

.bv-navbar__right {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}
.bv-theme-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2rem;
	height: 2rem;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--wp--preset--color--contrast);
	cursor: pointer;
}
.bv-theme-toggle:hover { background: rgba(127, 127, 127, 0.15); }
.bv-theme-toggle svg { width: 1.3rem; height: 1.3rem; }
html[data-theme="dark"] .bv-icon-moon,
html:not([data-theme="dark"]) .bv-icon-sun { display: none; }

/* ═════════ FOOTER (like Docusaurus' .footer--dark) ═════════ */
.bv-footer {
	margin-top: var(--wp--preset--spacing--60, 3rem);
	padding: 2rem 1rem;
	background: #16202e;
	color: #ebedf0;
	font-size: 0.95rem;
}
.bv-footer__links {
	display: flex;
	flex-wrap: wrap;
	gap: 2rem;
	margin-bottom: 1rem;
}
.bv-footer__title {
	color: #fff;
	font-weight: 700;
	margin-bottom: 0.5rem;
}
.bv-footer ul { list-style: none; margin: 0; padding: 0; line-height: 2; }
.bv-footer a { color: #ebedf0; text-decoration: none; }
.bv-footer a:hover { color: #2ee6d6; text-decoration: underline; }
.bv-footer .bv-copyright { text-align: center; margin: 0; }

/* ═════════ NEON TOUCHES (as on the main site) ═════════ */
.wp-block-button__link,
.wp-element-button {
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.wp-block-button__link:hover,
.wp-element-button:hover {
	box-shadow: 0 0 4px rgba(46, 230, 214, 0.8), 0 0 14px rgba(46, 230, 214, 0.55);
	transform: translateY(-1px);
}

/* Small screens: keep the brand short and the bar compact */
@media (max-width: 599px) {
	.bv-navbar { padding: 0.5rem 0.75rem; gap: 0.5rem; }
	.bv-brand span { font-size: 0.95rem; }
}
