/* These MUST stay in step with the app's own body colours, or the sign-in chain
   changes shade at every redirect. Light comes from --body-bg/--body-color in
   common-ui's grapefruit theme (_variables.scss); dark from the pre-auth block in
   common-ui's _site-template.scss. brand.js overrides both with the colours the app
   last actually painted, which also covers custom brands - these are the fallback
   for a first visit. */
html { 
  --body-bg: hsl(201, 18%, 95%);
  --body-color: hsl(240, 2%, 20%);
  --button-text: #fff;
  --button-bg: #444;
  --button-bg-hover: #555;
  --button-bg-active: #666;
}

/* Basic styles for non-Angular pages */
* { box-sizing: border-box; }
html { margin: 0; height: 100% }
body { margin: 0; min-height: 100%; padding: 2.5rem; font-family: "Noto Sans", Arial, sans-serif;
  display: flex; justify-content: center; align-items: center; 
  background-color: var(--body-bg); color: var(--body-color); }
body > div { text-align: center; }
p { margin-bottom: 1.75rem; max-width: 36rem; }
.card { background-color: transparent; background-clip: border-box; text-align: center; }
.btn { color: var(--button-text); background-color: var(--button-bg); font-size: 0.9375rem; padding: 0.5rem 1rem;
  border: none; border-radius: 5px; cursor: pointer; }
.btn:active { outline:none; background-color: var(--button-bg-active); }
.btn:hover { outline:none; background-color: var(--button-bg-hover); }
.btn:focus { outline:none; background-color: var(--button-bg-active); }
.divider { width: 100%; position: relative; text-align: center; margin-top: 1rem; }
.divider::before, .divider::after {
  content: ''; background-color: #ccc; height: 1px; width: calc(50% - 1em); top: 50%; position: absolute;
}
.divider::before { left: 0; }
.divider::after { right: 0; }
.col { width: 100%; }
.error { color: #f54; }
.d-none { display: none; }
.d-block { display: block; }

/* Boot splash. Signing in walks the browser through several of these pages
   (portal root -> IDP -> signin-callback -> portal root), so each one has to
   paint the SAME thing as the inline splash in index.html - any difference in
   font, size or spacing reads as a flicker rather than one continuous page.
   Keep these values in step with the inline styles there. */
.splash { display: flex; flex-direction: column; align-items: center; justify-content: center; }
/* padding-left offsets the trailing letter-space so the word stays optically centred. */
.splash-text { font-weight: 700; letter-spacing: 5px; font-size: 1.125rem; line-height: 1.5;
  margin: 1rem 0 0; padding-left: 10px; }

@media (prefers-color-scheme: dark) {
  html:has(meta[name="color-scheme"]:not([content="light"])) {
    --body-bg: hsl(220, 14%, 18%);
    --body-color: hsl(220, 14%, 90%);
    --button-bg: hsl(220, 14%, 29%);
    --button-bg-hover: hsl(220, 14%, 33%);
    --button-bg-active: hsl(220, 14%, 36%);
  }
}

html:has(meta[name="color-scheme"][content="dark"]) { 
  --body-bg: hsl(220, 14%, 18%);
  --body-color: hsl(220, 14%, 90%);
  --button-bg: hsl(220, 14%, 29%);
  --button-bg-hover: hsl(220, 14%, 33%);
  --button-bg-active: hsl(220, 14%, 36%);
}