/* Archive design tokens (VETI-4412 mockup-match rebuild).
   Palette is the Turn 3/4 "client-spec" slate/blue palette from
   Frontend UI creation/Phase 1/Archive Homepage Phase 1/Archive Homepage.dc.html
   (explicitly marked in that file as an intentional override of the Timeline-IT
   Design System's navy/gold brand tokens) -- not the app's official brand colors.
   Values are copied verbatim from that canvas's chipStyleSpec()/resultCards()/
   spec()/rowStyle() functions, not re-estimated.

   Follows the same .pv-scope/.pv-light wrapper-class convention as
   education-tokens.css: the bare .archive-home block is the dark palette
   (app default, see MainLayout.razor's .pv-scope.pv-light rule), and
   .pv-light .archive-home overrides it back to light. No [data-theme]
   selector is introduced -- ThemeStateService's existing toggle already
   drives .pv-light for the whole app. */

.archive-home {
  --archive-bg: #0b1220;
  --archive-panel-bg: #0f172a;
  --archive-input-bg: #1e293b;
  --archive-border: #334155;
  --archive-border-strong: #334155;

  --archive-text-primary: #f8fafc;
  --archive-text-secondary: #94a3b8;
  --archive-text-tertiary: #64748b;

  --archive-accent: #3b82f6;
  --archive-accent-hover: #2563eb;
  --archive-accent-bg-soft: #1e3a8a;
  --archive-accent-text-on-fill: #ffffff;

  --archive-tag-bg: #334155;
  --archive-tag-text: #cbd5e1;

  --archive-row-hover-bg: #1e293b;
  --archive-row-active-bg: #0f172a;
  --archive-row-selected-bg: var(--archive-accent-bg-soft);
  --archive-row-selected-border: var(--archive-accent);

  --archive-radius-sm: 6px;
  --archive-radius-md: 8px;
  --archive-radius-lg: 12px;

  --archive-space-1: 8px;
  --archive-space-2: 16px;
  --archive-space-3: 24px;

  --archive-font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  background: var(--archive-bg);
  color: var(--archive-text-primary);
}

.pv-light .archive-home {
  --archive-bg: #ffffff;
  --archive-panel-bg: #f9fafb;
  --archive-input-bg: #f3f4f6;
  --archive-border: #e5e7eb;
  --archive-border-strong: #d1d5db;

  --archive-text-primary: #111827;
  --archive-text-secondary: #6b7280;
  --archive-text-tertiary: #9ca3af;

  --archive-accent: #2563eb;
  --archive-accent-hover: #1d4ed8;
  --archive-accent-bg-soft: #eff6ff;
  --archive-accent-text-on-fill: #ffffff;

  --archive-tag-bg: #f3f4f6;
  --archive-tag-text: #374151;

  --archive-row-hover-bg: #f9fafb;
  --archive-row-active-bg: #f3f4f6;
  --archive-row-selected-bg: var(--archive-accent-bg-soft);
  --archive-row-selected-border: var(--archive-accent);

  background: var(--archive-bg);
  color: var(--archive-text-primary);
}

/* GlobalSearchBar.razor's <FluentTextField> renders its own root element (the
   `<fluent-text-field>` custom element) from Fluent UI Blazor's own component code, not
   from GlobalSearchBar.razor's markup directly -- so Blazor's CSS isolation scope
   attribute (which it would normally stamp onto elements literally authored in
   GlobalSearchBar.razor.css's owning file) never reaches this element, because
   FluentTextField doesn't forward it via @attributes on its rendered root. A scoped
   `.archive-global-search[b-hash]::part(root)` rule in the isolated .razor.css can
   therefore never match -- confirmed live: the element renders with zero custom
   styling, at Fluent's raw un-styled defaults (32px height, no radius, transparent).
   Defining these rules here instead (this file is already loaded globally, unscoped,
   via index.html) sidesteps the scope-attribute problem entirely: the selector matches
   on class name alone, which IS present on the rendered element regardless of CSS
   isolation. Matched to EventsHomeSearchBar's geometry/treatment per user follow-up --
   46px height, 6px radius, background close in tone to the page background (--archive-panel-bg,
   the token closest in lightness-delta to --archive-bg, mirroring --su's relationship to
   --bg in EventsHomeSearchBar.razor.css) rather than the higher-contrast --archive-input-bg
   used by chips. */
.archive-global-search::part(root) {
  height: 46px;
  padding: 0 14px;
  gap: var(--archive-space-1);
  align-items: center;
  background: var(--archive-panel-bg);
  border: 1px solid var(--archive-border);
  border-radius: var(--archive-radius-sm);
}

.archive-global-search::part(control) {
  height: 100%;
  color: var(--archive-text-primary);
}

.archive-global-search::part(start) {
  color: var(--archive-text-tertiary);
}
