/* ── WP Career Board — global frontend styles ────────────────────────────── */

/*
 * Color bridge — ensures a good first-load on any theme, no config required.
 *
 * The hardcoded fallbacks (#2563eb etc.) are the plugin's brand defaults and
 * are used automatically on classic themes or any theme that does not define
 * matching wcb-* color slugs.
 *
 * Recommended override path (block themes / child themes):
 *   Add a "wcb-primary" slug to your theme.json color palette and WordPress
 *   will automatically recolor all WCB UI — no extra CSS needed.
 *
 *   Example child theme.json:
 *   { "settings": { "color": { "palette": [
 *     { "slug": "wcb-primary",      "color": "#6d28d9" },
 *     { "slug": "wcb-primary-dark", "color": "#5b21b6" }
 *   ] } } }
 *
 * Classic theme override: set --wcb-primary directly in :root.
 */
:root {
	--wcb-primary:      var( --wp--preset--color--wcb-primary,      #2563eb );
	--wcb-primary-dark: var( --wp--preset--color--wcb-primary-dark, #1d4ed8 );
	--wcb-avatar-bg:    var( --wp--preset--color--wcb-avatar-bg,    #1e293b );
	--wcb-base:         var( --wp--preset--color--wcb-base,         #ffffff );
	--wcb-contrast:     var( --wp--preset--color--wcb-contrast,     #0f172a );
	--wcb-muted:        var( --wp--preset--color--wcb-muted,        #6b7280 );
	--wcb-surface:      var( --wp--preset--color--wcb-surface,      #f1f5f9 );
	--wcb-border:       var( --wp--preset--color--wcb-border,       #e2e8f0 );
	--wcb-featured:     var( --wp--preset--color--wcb-featured,     #f59e0b );
}

/*
 * Dark-mode overrides. Reign adds `dark-mode` to <html>; any block theme that
 * follows the same convention, or a user-agent preference, flips the tokens
 * so every WCB component using `var(--wcb-*)` re-colors automatically.
 *
 * Keep every override in this single block so dark-mode config lives in one
 * place across the core palette (from frontend.css) and the semantic palette
 * (from frontend-tokens.css).
 */
html.dark-mode {
	/* Core palette. */
	--wcb-base:            #1e1f24;
	--wcb-contrast:        #f1f5f9;
	--wcb-muted:           #94a3b8;
	--wcb-surface:         #2a2d36;
	--wcb-border:          #3a3d46;
	--wcb-avatar-bg:       #0f172a;

	/* Semantic palette (frontend-tokens.css). */
	--wcb-bg-subtle:       #16181d;
	--wcb-bg-hover:        #2a2d36;
	--wcb-text-secondary:  #cbd5e1;
	--wcb-text-tertiary:   #94a3b8;

	/* Status tint backgrounds — keep readable against a dark card. */
	--wcb-success-bg:      rgba( 22, 163, 74, 0.22 );
	--wcb-warning-bg:      rgba( 217, 119, 6, 0.22 );
	--wcb-danger-bg:       rgba( 220, 38, 38, 0.22 );
	--wcb-info-bg:         rgba( 37, 99, 235, 0.22 );
}

/* Suppress the theme's page title on WCB app / archive pages. */
.wcb-page .entry-title,
.wcb-page .page-title,
.wcb-page h1.post-title,
.wcb-page .wp-block-post-title {
	display: none !important;
}

/* Suppress the theme sidebar on WCB app / archive pages. */
.wcb-page #secondary,
.wcb-page .widget-area,
.wcb-page aside.sidebar,
.wcb-page .sidebar-area,
.wcb-page .site-sidebar,
.wcb-page #sidebar {
	display: none !important;
}

/* ── Page heading — rendered inside listing blocks ───────────────────────── */
.wcb-page-heading {
	font-size: var(--wcb-text-2xl);
	font-weight: var( --wcb-font-bold, 700 );
	color: var( --wcb-contrast, #0f172a );
	margin: 0 0 var(--wcb-space-2xl);
	line-height: 1.2;
}
