/**
 * Dark mode color fix.
 *
 * main.css shipped with incorrect dark-mode CSS variables (generic grays
 * instead of the original shadcn/Next.js hued blues). This file overrides
 * them with the canonical values from the Next.js globals.css.
 *
 * It also overrides the WordPress block-system preset colors
 * (--wp--preset--color--*) so that core blocks (post-title, query-title,
 * headings, paragraphs, buttons, etc.) respond to dark mode.
 *
 * Loaded after main.css via functions.php.
 */
.dark {
	/* Tailwind / shadcn custom properties */
	--background: 222.2 84% 4.9%;
	--foreground: 210 40% 98%;
	--card: 222.2 84% 4.9%;
	--card-foreground: 210 40% 98%;
	--popover: 222.2 84% 4.9%;
	--popover-foreground: 210 40% 98%;
	--primary: 262.1 83.3% 57.8%;
	--primary-foreground: 210 40% 98%;
	--secondary: 217.2 32.6% 17.5%;
	--secondary-foreground: 210 40% 98%;
	--muted: 217.2 32.6% 17.5%;
	--muted-foreground: 215 20.2% 65.1%;
	--accent: 217.2 32.6% 17.5%;
	--accent-foreground: 210 40% 98%;
	--destructive: 0 62.8% 30.6%;
	--destructive-foreground: 210 40% 98%;
	--border: 217.2 32.6% 17.5%;
	--input: 217.2 32.6% 17.5%;
	--ring: 262.1 83.3% 57.8%;
}

/*
 * WordPress block-system preset overrides for dark mode.
 * html.dark gives specificity (0,1,1) which beats :root (0,1,0)
 * used by WordPress global-styles-inline-css.
 */
html.dark {
	--wp--preset--color--background: hsl(222.2 84% 4.9%);
	--wp--preset--color--foreground: hsl(210 40% 98%);
	--wp--preset--color--primary: hsl(262.1 83.3% 57.8%);
	--wp--preset--color--primary-foreground: hsl(210 40% 98%);
	--wp--preset--color--card: hsl(222.2 84% 4.9%);
	--wp--preset--color--card-foreground: hsl(210 40% 98%);
	--wp--preset--color--secondary: hsl(217.2 32.6% 17.5%);
	--wp--preset--color--secondary-foreground: hsl(210 40% 98%);
	--wp--preset--color--muted: hsl(217.2 32.6% 17.5%);
	--wp--preset--color--muted-foreground: hsl(215 20.2% 65.1%);
	--wp--preset--color--accent: hsl(217.2 32.6% 17.5%);
	--wp--preset--color--accent-foreground: hsl(210 40% 98%);
	--wp--preset--color--destructive: hsl(0 62.8% 30.6%);
	--wp--preset--color--destructive-foreground: hsl(210 40% 98%);
	--wp--preset--color--border: hsl(217.2 32.6% 17.5%);
	--wp--preset--color--input: hsl(217.2 32.6% 17.5%);
	--wp--preset--color--ring: hsl(262.1 83.3% 57.8%);
}

/*
 * Force round avatars everywhere (WordPress core post-author block
 * renders a square <img> by default).
 */
.wp-block-post-author__avatar img,
.author-avatar img {
	border-radius: 9999px !important;
	object-fit: cover;
}
