/*
  Shared design tokens + components for the LSM site (Bootstrap 5).
  Hosted here in lsmroot (the IIS site root / shared static-asset host) so both
  lsmroot's own pages and LSM/lsmweb's pages can reference this one file via a
  root-relative path — same pattern as the existing bootstrap-*-dist folders.
  Promoted from docs/prototype/kcl-admin-theme.css (login.html/admin-shell.html).

  Brand colours approximated from docs/login.png by eye — swap for KCL's
  documented brand hex values if/when available.
*/

:root {
  --kcl-red: #e22319;
  --kcl-red-hover: #b51c14;
  --kcl-navy: #0a2d50;
  --kcl-navy-soft: #14294f;
  --kcl-slate: #5c6670;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  color: #212529;
  background: #f7f8f9;
}

a {
  color: var(--kcl-navy);
}

/* ---- Top bar (shared across every page) ---- */
.topbar {
  background: var(--kcl-slate);
}
.topbar .faculty-name {
  color: #fff;
  font-size: 1.15rem;
  font-weight: 600;
}
.topbar .top-nav a {
  color: #fff;
  text-decoration: none;
  font-size: .9rem;
}
.topbar .signed-in-as {
  color: #eef0f2;
}
.topbar .top-nav a:hover {
  text-decoration: underline;
}

/* ---- Hero (marketing/login pages only — see page-title strip for admin pages) ---- */
.hero {
  background: var(--kcl-navy);
  color: #fff;
  padding: 3rem 0 3.5rem;
}
.hero .accent-bar {
  width: 56px;
  height: 4px;
  background: var(--kcl-red);
  margin-bottom: 1.25rem;
}
.hero h1 {
  font-weight: 700;
  font-size: 2.5rem;
}
.hero p {
  color: #dfe3ea;
  max-width: 40rem;
  font-size: 1.05rem;
}

/* ---- Page-title strip (admin/working pages — slim, so content-heavy pages
   aren't pushed down by a full hero) ---- */
.page-title-strip {
  background: var(--kcl-navy);
  color: #fff;
  padding: 1rem 0;
}
.page-title-strip .breadcrumb {
  --bs-breadcrumb-divider-color: #93a0b8;
  margin-bottom: .15rem;
}
.page-title-strip .breadcrumb a {
  color: #c3cbdb;
  text-decoration: none;
}
.page-title-strip .breadcrumb a:hover {
  color: #fff;
  text-decoration: underline;
}
.page-title-strip .breadcrumb-item.active {
  color: #fff;
}
.page-title-strip h1 {
  font-weight: 700;
  font-size: 1.5rem;
  margin: 0;
}

/* ---- Cards ---- */
.card-kcl {
  border: 1px solid #dee2e6;
  border-radius: .3rem;
  overflow: hidden;
}
.card-kcl .card-header-kcl {
  background: var(--kcl-navy);
  color: #fff;
  font-weight: 600;
  font-size: 1.05rem;
  padding: .85rem 1.25rem;
}
.card-kcl .card-body {
  padding: 1.5rem;
}

/* ---- Buttons ---- */
.btn-kcl-primary {
  background: var(--kcl-red);
  border-color: var(--kcl-red);
  color: #fff;
  font-weight: 600;
}
.btn-kcl-primary:hover,
.btn-kcl-primary:focus {
  background: var(--kcl-red-hover);
  border-color: var(--kcl-red-hover);
  color: #fff;
}
.btn-kcl-outline {
  border: 1px solid var(--kcl-navy);
  color: var(--kcl-navy);
  font-weight: 600;
  background: #fff;
}
.btn-kcl-outline:hover {
  background: var(--kcl-navy);
  color: #fff;
}
.btn-icon-kcl {
  border: 1px solid #dee2e6;
  background: #fff;
  color: var(--kcl-navy);
  width: 2.1rem;
  height: 2.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: .25rem;
}
.btn-icon-kcl:hover {
  background: var(--kcl-navy);
  color: #fff;
  border-color: var(--kcl-navy);
}
.btn-icon-kcl.danger:hover {
  background: var(--kcl-red);
  border-color: var(--kcl-red);
}

/* ---- Forms ---- */
.form-label small.text-muted-help {
  display: block;
  font-size: .8rem;
  color: #6c757d;
  font-weight: 400;
  margin-bottom: .25rem;
}

.section-heading {
  color: var(--kcl-navy);
  font-weight: 700;
  font-size: 1.05rem;
}

.faq-term {
  font-weight: 600;
  color: #212529;
}

/* ---- Admin sidebar ---- */
.admin-sidebar .card-kcl {
  margin-bottom: 1.5rem;
}
.admin-sidebar .accordion-button {
  background: var(--kcl-navy);
  color: #fff;
  font-weight: 600;
  box-shadow: none;
}
.admin-sidebar .accordion-button:not(.collapsed) {
  background: var(--kcl-navy-soft);
  color: #fff;
}
.admin-sidebar .accordion-button::after {
  filter: invert(1) grayscale(100%) brightness(200%);
}
.admin-sidebar .accordion-button:focus {
  box-shadow: none;
  border-color: transparent;
}
.admin-sidebar .accordion-item {
  border: none;
  border-bottom: 1px solid #e9ecef;
}
.admin-sidebar .accordion-item:last-child {
  border-bottom: none;
}
.admin-sidebar .list-group-item {
  border: none;
  border-radius: 0;
  padding: .6rem 1.25rem;
  font-size: .92rem;
  color: #212529;
}
.admin-sidebar .list-group-item:hover {
  background: #f1f3f5;
}
.admin-sidebar .list-group-item.active {
  background: #f5e6e8;
  color: var(--kcl-red);
  font-weight: 600;
  border-left: 3px solid var(--kcl-red);
  padding-left: calc(1.25rem - 3px);
}

/* ---- Data table ---- */
.table-kcl thead th {
  background: #f1f3f5;
  color: var(--kcl-navy);
  font-weight: 600;
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .03em;
  border-bottom: 2px solid #dee2e6;
}
.table-kcl td {
  vertical-align: middle;
}

/* Fixed-height scrollable grid with a sticky header - used where a long results grid
   would otherwise push the rest of the page (e.g. the module selector grids). */
.table-scroll-kcl {
  max-height: 480px;
  overflow-y: auto;
}
.table-scroll-kcl table.table-kcl thead th {
  position: sticky;
  top: 0;
  z-index: 1;
}

/* Skill tags on the module detail panel (MISSSkills.ascx) - replaces the old per-skill
   JPG icons with Font Awesome + a label, styled as small pills. */
.badge-skill-kcl {
  display: inline-block;
  background: #eef2f7;
  color: var(--kcl-navy);
  border-radius: 999px;
  padding: .3rem .75rem;
  margin: .15rem .3rem .15rem 0;
  font-size: .85rem;
  font-weight: 500;
}
.badge-skill-kcl i {
  color: var(--kcl-red);
  margin-right: .25rem;
}

/* Keeps a selected row visibly highlighted even when the mouse isn't over it -
   table-hover alone only lights up on hover, not for the current selection.
   Bootstrap 5 tables paint each cell via box-shadow reading --bs-table-accent-bg
   (the same mechanism .table-primary etc. use), not a plain <tr> background-color -
   so this feeds that variable instead of fighting it. */
.table-kcl tbody tr.row-selected-kcl > * {
  --bs-table-accent-bg: #dce6f5;
}

footer.site-footer {
  background: #f4f5f6;
  border-top: 1px solid #e2e4e7;
  font-size: .9rem;
}
