/*
 * Mailpuff's design tokens. They started as Bridle's (bridle/docs/design-system.md)
 * and are Mailpuff's own now: change them for Mailpuff alone. Light theme only.
 *
 * They live on the app root, not `:root`, so they never reach the rest of
 * wp-admin. The look sits next to WordPress's own admin: a soft, near-neutral
 * page with white surfaces on it, calm greys with a hint of violet, faint
 * hairlines only where a boundary is needed, no shadows, and one accent,
 * Mailpuff violet, used sparingly. The canonical palette and usage rules are in
 * docs/branding.md.
 * `@theme inline` maps tokens to Tailwind's colour and radius utilities.
 */
#mailpuff-root {
	--radius: 0.5rem;
	/* The page under the app. Surfaces sit on it in white. */
	--page: #f5f5f8;
	--background: #ffffff;
	--foreground: #24232e;
	--card: #ffffff;
	--card-foreground: #24232e;
	--popover: #ffffff;
	--popover-foreground: #24232e;
	--primary: #1e1c2e;
	--primary-foreground: #ffffff;
	--secondary: #f7f7f9;
	--secondary-foreground: #24232e;
	/* Quiet fills: the sidebar, stat tiles, grouped rows. */
	--muted: #f7f7f9;
	--muted-foreground: #6b6a78;
	/* Hover and selected fills. */
	--accent: #f2f2f6;
	--accent-foreground: #24232e;
	--destructive: #cc1818;
	--border: #ececf0;
	--input: #e4e4ea;
	--ring: #5d5cc2;
	--brand: #5d5cc2;
	--brand-foreground: #ffffff;
	--brand-ink: #4e4bac;
	--brand-soft: #eff1ff;
	--success: #0e6549;
	--success-soft: #e7f8f0;
	/* Notes and warnings: a soft amber that reads as "look at this". */
	--note: #fdf5e3;
	--note-foreground: #8a5a00;
	--note-border: #f2e3bf;
	/* Secondary surfaces and warning dots; never use amber as the brand. */
	--cream: #f7f7f9;
	--amber: #e2a20c;
	--radius-card: 8px;
	--font-sans: "Mona Sans", -apple-system, BlinkMacSystemFont, "Segoe UI",
		Roboto, "Helvetica Neue", sans-serif;
	--font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Monaco,
		Consolas, "Liberation Mono", monospace;

	/* The old kit's --pp-* names that index.scss reads are mapped in
	   src/admin/shell/shell.scss. */

	background-color: var(--page);
	color: var(--foreground);
	font-family: var(--font-sans);
	font-feature-settings: "calt";
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;

	/* shadcn's base layer, scoped: borders default to the token, and the
	   focus outline to a translucent ring. */
	*,
	::before,
	::after {
		border-color: var(--border);
		outline-color: color-mix(in oklab, var(--ring) 50%, transparent);
	}
}

@theme inline {
	--color-page: var(--page);
	--color-background: var(--background);
	--color-foreground: var(--foreground);
	--color-card: var(--card);
	--color-card-foreground: var(--card-foreground);
	--color-popover: var(--popover);
	--color-popover-foreground: var(--popover-foreground);
	--color-primary: var(--primary);
	--color-primary-foreground: var(--primary-foreground);
	--color-secondary: var(--secondary);
	--color-secondary-foreground: var(--secondary-foreground);
	--color-muted: var(--muted);
	--color-muted-foreground: var(--muted-foreground);
	--color-accent: var(--accent);
	--color-accent-foreground: var(--accent-foreground);
	--color-destructive: var(--destructive);
	--color-border: var(--border);
	--color-input: var(--input);
	--color-ring: var(--ring);
	--color-brand: var(--brand);
	--color-brand-foreground: var(--brand-foreground);
	--color-brand-ink: var(--brand-ink);
	--color-brand-soft: var(--brand-soft);
	--color-success: var(--success);
	--color-success-soft: var(--success-soft);
	--color-note: var(--note);
	--color-note-foreground: var(--note-foreground);
	--color-note-border: var(--note-border);
	--color-cream: var(--cream);
	--color-amber: var(--amber);
	--radius-card: var(--radius-card);
	/* WordPress's own corners (Fahim, 2026-10-23): 2px on buttons, inputs,
	   badges and menu items; 4px on tiles; 8px on panels and dialogs.
	   Switches and avatars stay round. */
	--radius-xs: 2px;
	--radius-sm: 2px;
	--radius-md: 2px;
	--radius-lg: 4px;
	--radius-xl: 8px;
}

/* The one surface: white on the soft page, with a barely-there edge and no
   shadow. The fill does the separating; the edge only keeps it crisp. Lists,
   the composer, settings blocks and Home's panels use it; quieter groups
   inside a surface use a muted fill, so the page never stacks boxes in
   boxes. */
@utility surface {
	background-color: var(--card);
	border: 1px solid color-mix(in oklab, var(--border) 60%, transparent);
	border-radius: var(--radius-card);
}
