/*
 * Shared shell baseline - the document-level typography and page furniture every
 * NightBuilds host shell assumes, independent of which shell components it renders.
 *
 * WHY THIS FILE EXISTS
 * Before this file, these exact rules were hand-copied into IdentityService.API's
 * global.css and into FIVE byte-for-byte-identical `site.css` copies (NotificationService,
 * Licensing, Provisioning, Subscription, Payment). The copies had already drifted: the
 * site.css line used `line-height: var(--line-height-base)` (= 1.5) while IdentityService
 * hardcoded 1.6, which is why "the same list renders ~7% tighter on NotificationService"
 * was reported as a component bug when it was really a host-stylesheet bug
 * (SHELL_NORMALIZATION.md instance #2).
 *
 * VALUES ARE IdentityService.API's. That host is the visual reference; taking its numbers
 * means this file changes nothing there (its global.css still loads after this one and
 * re-declares the same values), and levels every other host up to it.
 *
 * LOAD ORDER: after tokens/theme.css (which defines the custom properties consumed here)
 * and after Bootstrap, before any host stylesheet. See ShellStylesheets for the canonical
 * ordered link block, and ShellCssGuard for the check that enforces it.
 *
 * Consumes theme.css's tokens; defines none of its own.
 */

/* Base Typography ------------------------------------------------------------------- */

/* Deliberately line-height: 1.6, NOT var(--line-height-base). That token IS 1.5, so using
   it here would drag IdentityService's shell tighter instead of levelling the other hosts
   up to it - the wrong direction for the one host that is the visual reference. Same
   reasoning as .dropdown-menu-account's explicit line-height in site-header.css. */
body {
  font-family: var(--font-family-sans-serif);
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  transition: var(--transition-base);
}

/* Heading Scale. The five site.css copies stopped at h3 and omitted margin-bottom, so an
   <h4> on those hosts fell back to the browser default (bold, ~1.33em) instead of the
   token scale, and headings sat flush against the text under them. */
h1, .h1 { font-size: var(--font-size-4xl); font-weight: 700; line-height: 1.2; margin-bottom: var(--spacing-lg); }
h2, .h2 { font-size: var(--font-size-3xl); font-weight: 600; line-height: 1.3; margin-bottom: var(--spacing-md); }
h3, .h3 { font-size: var(--font-size-2xl); font-weight: 600; line-height: 1.4; margin-bottom: var(--spacing-md); }
h4, .h4 { font-size: var(--font-size-xl); font-weight: 500; line-height: 1.5; margin-bottom: var(--spacing-sm); }
h5, .h5 { font-size: var(--font-size-lg); font-weight: 500; line-height: 1.5; margin-bottom: var(--spacing-sm); }
h6, .h6 { font-size: var(--font-size-base); font-weight: 500; line-height: 1.5; margin-bottom: var(--spacing-sm); }

/* Links ------------------------------------------------------------------------------
   Bootstrap's Reboot colours anchors from --bs-link-color-RGB - a "r, g, b" triple - not
   from --bs-link-color, so setting the latter in bootstrap-bridge.css left every plain
   link at Bootstrap's own #0d6efd. Measured 2026-08-21: 4.50:1 on a white page (passing,
   but the wrong colour), 4.14 on the dark page and 3.68 on a card, i.e. failing AA in the
   default theme - and identical on all three brand accents, which is what gave it away.

   Supplying the triple instead would mean carrying every accent a second time as raw
   channel numbers and keeping the two spellings in step: exactly the forked-value problem
   the token set exists to prevent. An element rule costs nothing and loses only the
   .link-opacity-* utilities, which nothing in this workspace uses.

   Specificity is (0,0,1), so every .btn / .nav-link / .home-card-link / .dropdown-item
   class rule still wins - this only reaches anchors nobody styled. */
a {
  color: var(--text-link);
}

a:hover {
  color: var(--text-link-hover);
}

/* Focus Management ------------------------------------------------------------------ */

/* Universal focus ring. A blunt instrument, but it is the reference host's behaviour and
   the alternative - every host deciding for itself - is what produced shells where
   keyboard focus was invisible on some pages and not others. Individual components may
   still override it with a tighter ring (see .nav-icon-btn:focus-visible). */
*:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Cookie notice --------------------------------------------------------------------- */

/* Functional cookies only (theme preference, culture), so this is a notice-and-acknowledge
   banner rather than a granular consent manager. The dismissal script is each host's own
   wwwroot/js/cookie-consent.js; only the presentation is shared.

   Shipped here rather than per-host because the banner is page furniture the shell renders
   on every route - the same argument that moved .site-footer into site-footer.css. It was
   previously duplicated across six host stylesheets. */
.cookie-consent-banner {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 1050;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  max-width: 42rem;
  margin: 0 auto;
  padding: 1rem 1.25rem;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-lg);
}

.cookie-consent-banner p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
  flex: 1 1 16rem;
}

.cookie-consent-banner a {
  color: var(--text-link);
}
