/* AltaScribe portal: the legacy site's own bold colour scheme (prod Content/Site.css, login-site.css,
   OB/transcription.css and Kendo BlueOpal): solid yellow bar #f4de71 with brand #8D770A, blue buttons
   #2A6CC2, cyan section links #24ADD1 and a green Logout #5FC08F, BlueOpal menus and grid headers,
   bright cyan row hover, teal selection, full-colour flag rows, mint footer. */
:root {
  --bar: #f4de71;
  --bar-top: #f4de71;
  --bar-line: #d4b93f;
  --brand: #8d770a;
  --brand-dark: #6b5a06;
  --btn: #2a6cc2;
  --btn-hover: #173d6e;
  --ink: #1f2933;
  --muted: #5f6c7b;
  --line: #d9e1ea;
  --bg: #f6f8fb;
  --busy: #ffd800;
  --error: #c01f1f;
  /* legacy section links, logout and footer */
  --cyan: #24add1;
  --cyan-dark: #156479;
  --leaf: #5fc08f;
  --magenta: #c05f90;
  --mint: #ccebdb;
  --forest: #173b29;
  /* Kendo BlueOpal */
  --opal-50: #e6f2f8;
  --opal-100: #daecf4;
  --opal-200: #c6e2ee;
  --opal-300: #a3d0e4;
  --opal-ink: #00435e;
  --opal-hover: #7ad2f7;
  --opal-sel: #13688c;
  --art: url("/static/bg-care-v1.svg");
}

/* Inter (SIL OFL 1.1, static/fonts/Inter-OFL.txt): a screen-first typeface with a tall x-height and
   clear I/l/1 and 0/O shapes; self-hosted because the CSP allows same-origin fonts only. */
@font-face {
  font-family: "Inter";
  src: url("/static/fonts/inter-latin-wght-v5.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308,
    U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-feature-settings: "cv05", "cv08"; /* l with a tail, slashed zero: easier names and IDs */
  font-size: 15px;
  line-height: 1.45;
  padding-top: 50px;
}
/* The legacy site showed a full-page photo; this is a light SVG version of the same scene, on the
   login page only (signed-in pages keep a plain background). */
body.login { background: var(--art) center / cover no-repeat fixed, var(--bg); }

.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 50px;
  background: var(--bar);
  border-bottom: 1px solid var(--bar-line);
  box-shadow: 0 1px 6px rgba(111, 92, 6, .18);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px;
  z-index: 10;
}
.brand {
  color: var(--brand);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: .02em;
  text-decoration: none;
}
.brand:hover { color: var(--brand-dark); }

/* ---------------------------------------------------------------- login */
.home-row {
  display: flex;
  justify-content: center;
  padding: 10vh 16px 32px;
}
.login-card {
  width: 100%;
  max-width: 380px;
  text-align: center;
  background: rgba(255, 255, 255, .9);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(217, 225, 234, .9);
  border-radius: 12px;
  padding: 28px 24px 24px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 10px 32px rgba(29, 58, 87, .12);
}
.login-logo img { width: 128px; max-width: 100%; height: auto; }
#loginArea { margin-top: 18px; }
/* Legacy's sign-in (Views/Home/Login.cshtml): each label above its box, the boxes in one centred
   column, the Login button centred under them, plain (a link drawn as a button). */
.input-row {
  margin: 10px auto;
  width: 240px;
  max-width: 100%;
  text-align: left;
}
.input-row label { display: block; margin: 0 0 4px 2px; font-size: 14px; font-weight: 600; color: var(--muted); }
.input-row input {
  display: block;
  box-sizing: border-box;
  width: 100%;
  padding: 8px 10px;
  font: inherit;
  border: 1px solid #2b5797;
  border-radius: 0;
  background: #fff;
}
.input-row input:focus { outline: 2px solid var(--btn); outline-offset: 0; border-color: var(--btn); }
.input-row:last-of-type { text-align: center; }

#btnLogin {
  background: var(--btn);
  color: #fff;
  border: 0;
  border-radius: 0;
  padding: 6px 12px;
  font: inherit;
  font-size: 15px;
  font-weight: 400;
  cursor: pointer;
}
#btnLogin:hover, #btnLogin:focus-visible { background: var(--btn-hover); }

.status { color: var(--error); font-size: 15px; font-style: italic; margin-top: 8px; }

#loginText {
  display: inline-block;
  margin-top: 20px;
  background: var(--busy);
  padding: .3em .6em;
  font-weight: 700;
  border-radius: 4px;
}

@media (max-width: 600px) {
  .brand { font-size: 16px; }
  .section-link-common { padding: 5px 7px; font-size: 14px; }
}

/* ---------------------------------------------------------------- signed-in shell */
/* Full width: no max-width and no side gutters; the title and section links live in the top bar. */
.body-content { padding: 0 0 40px; }
#top-level-title { white-space: nowrap; }
.section-links-band {
  display: flex;
  gap: 2px 4px;
  margin-left: auto;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.section-links-band > span { flex: none; }
/* Pages that fill the window (the inbox): the content column takes all height between the top
   bar (50px) and the fixed footer (~31px); the grid card flexes into what is left. */
.page-fill {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 50px);
  height: calc(100dvh - 50px);
  padding-bottom: 31px;
}
/* Legacy login-site.css: solid cyan section links (#24ADD1, hover #156479) and a green Logout
   (#5FC08F, hover #C05F90). The current section is the dark cyan with a yellow underline. */
.section-link-common {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 4px;
  background: var(--cyan);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}
.section-link-common:hover, .section-link-common:focus-visible { background: var(--cyan-dark); color: #fff; }
.section-link-common.active { background: var(--cyan-dark); color: #fff; box-shadow: inset 0 -3px 0 var(--busy); }
.section-link-common:focus-visible { outline: 2px solid var(--forest); outline-offset: 1px; }
.section-link-logout { background: var(--leaf); color: #fff; }
.section-link-logout:hover, .section-link-logout:focus-visible { background: var(--magenta); color: #fff; }

.grid-area, .notice {
  margin: 12px 8px 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 240px;
  padding: 24px;
}
.grid-empty, .notice p { color: var(--muted); margin: 0; }

body > footer {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 8px;
  background: var(--mint);
  border-top: 1px solid var(--leaf);
  color: var(--forest);
  font-size: 12px;
}
/* A "view as" session (src/superadmin): the footer says who is looking and as whom, on every
   page, and the top bar carries a stripe so it cannot be mistaken for an ordinary session. */
body.viewing-as .topbar { box-shadow: inset 0 -4px 0 #c0267e, 0 1px 6px rgba(111, 92, 6, .18); }
body.viewing-as > footer { background: #fbe3f0; border-top-color: #c0267e; color: #5a1239; align-items: center; }
.viewing-as form { display: flex; align-items: center; gap: 10px; margin: 0 0 0 auto; min-width: 0; }
.viewing-as form span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viewing-as form button {
  font: inherit; font-weight: 600; flex: none; border: 0; border-radius: 4px; background: #c0267e; color: #fff; padding: 2px 10px; cursor: pointer;
}
.viewing-as form button:hover, .viewing-as form button:focus-visible { background: #8f1b5d; }
@media (max-width: 720px) { .viewing-as form span { white-space: normal; } }

/* legacy .version-info: light text on dark green */
body > footer .version-info {
  background: var(--forest);
  color: #f1f9f5;
  padding: 1px 6px;
  border-radius: 3px;
}
