/* ==========================================================================
   Westminster Law School LMS — Theme
   Palette and typography sampled directly from westminsterlawschool.co.uk
   (see the design-system note in resources/views/layouts/main.twig).
   Layers on top of Bootstrap 5 via its CSS custom properties rather than
   replacing it — Bootstrap stays in the stack, this file is the brand skin.
   ========================================================================== */

:root {
  /* Brand palette, sampled from the live site */
  --wls-navy: #002051;
  --wls-navy-deep: #122448;
  --wls-navy-soft: #1a3a72;
  --wls-gold: #d4af37;
  --wls-gold-deep: #b6922a;
  --wls-gold-soft: #f0e2b6;
  --wls-ink: #292929;
  --wls-ink-muted: #5b6472;
  --wls-paper: #f6f7f9;
  --wls-white: #ffffff;
  --wls-border: #e1e5eb;

  /* Bootstrap variable overrides — this is what actually retints components */
  --bs-primary: var(--wls-navy);
  --bs-primary-rgb: 0, 32, 81;
  --bs-body-color: var(--wls-ink);
  --bs-body-bg: var(--wls-paper);
  --bs-border-color: var(--wls-border);
  --bs-link-color: var(--wls-navy);
  --bs-link-hover-color: var(--wls-gold-deep);
  /* Bootstrap 5.3's actual `a{}` rule reads color: rgba(var(--bs-link-color-rgb), ...)
     — --bs-link-color above is a display convenience alias the compiled CSS
     never consumes on its own. Without these, every plain link silently stays
     Bootstrap's default blue regardless of the override two lines up
     (design-review finding, 2026-07-18). */
  --bs-link-color-rgb: 0, 32, 81;
  --bs-link-hover-color-rgb: 182, 146, 42;
  --bs-body-font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --bs-body-font-size: 0.875rem;
}

body {
  background: var(--wls-paper);
}

h1, h2, h3, h4, h5, h6,
.wls-heading {
  font-family: "Plus Jakarta Sans", var(--bs-body-font-family);
  font-weight: 700;
  color: var(--wls-navy-deep);
}

/* Sentence-case card sub-heading (e.g. "Personal Background", "My Course")
   — the natural-case counterpart to .wls-heading's uppercase/letter-spaced
   treatment, used on a <p> rather than a real heading tag. Had no CSS rule
   at all until now, so every one of its ~15 uses across the student-facing
   app (wizard review cards, status page, student overview) was silently
   rendering as unstyled paragraph text instead of a heading. Same 16px
   size and navy/bold/Jakarta treatment as .wls-heading, so a card heading
   looks the same whichever of the two conventions a given page uses. */
.module-head {
  font-family: "Plus Jakarta Sans", var(--bs-body-font-family);
  font-size: 1rem;
  font-weight: 700;
  color: var(--wls-navy-deep);
}

a {
  text-decoration: none;
}

/* ---- Logo mark (used standalone on public/auth pages too) --------------- */

.wls-logo {
  height: 74px;
  width: auto;
  display: block;
}

/* Rectangular horizontal lockup (wls-logo.png, ~3.1:1) used in the sidebar
   brand and mobile topbar — sized down from the base 74px .wls-logo height
   so it fits the 260px sidebar column (and the mobile topbar strip)
   without overflowing; the square/stacked mark's 74px default would run
   the rectangular version far too wide. */
.wls-sidebar-logo {
  height: 70px;
}

.wls-mobile-topbar-logo {
  height: 70px;
}

/* Square logo mark for the auth pages (login/register) — wls-logo-white.png
   is a transparent white mark, shown directly on the navy page background
   set by body.wls-auth-page below, no boxing needed. */
.wls-auth-logo {
  width: 200px;
  height: 200px;
  object-fit: contain;
}

/* Full-bleed navy background for the auth pages, scoped via bodyClass so it
   doesn't affect any authenticated screen. The card stays light for
   contrast; footer text is dimmed white instead of the default dark ink,
   which would be unreadable on navy. */
body.wls-auth-page .wls-main-column {
  background: var(--wls-navy);
}
/* Vertically centers the card in the space between the (short) content and
   the footer — without this, tall viewports (a full-height phone screen,
   for instance) leave the card pinned near the top with a large dead gap
   below it before the footer. */
body.wls-auth-page main {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
body.wls-auth-page .wls-footer {
  color: rgba(255, 255, 255, 0.55);
}
body.wls-auth-page .wls-footer a {
  color: rgba(255, 255, 255, 0.75);
}

/* ---- Sidebar shell -------------------------------------------------------
   Left sidebar replaces the old horizontal top bar (Module 5, left-sidebar
   redesign) — gold accent still reserved for the active state, same
   restraint as the bar it replaced. Built on Bootstrap's responsive
   offcanvas (offcanvas-lg): a normal static column at ≥992px, a slide-in
   panel below that — no custom JS needed. */

.wls-app-shell {
  min-height: 100vh;
}

/* Flex items default to min-width: auto, so without this the main column
   refuses to shrink below its content's intrinsic width (long text, the
   Bootstrap grid) and overflows the viewport horizontally on mobile. */
.wls-main-column {
  min-width: 0;
}

.wls-sidebar {
  --bs-offcanvas-width: 260px;
}

/* Full-height sidebar with the account card pinned to the bottom (design
   uplift punch-list item 1). Scoped to the ≥992px static-column state only —
   below that, the offcanvas is a fixed-position slide-in panel and already
   spans the viewport on its own; sticky/height:100vh here would fight that.
   `position: sticky` (rather than `fixed`) keeps it in normal flex flow so
   it still sits beside — not on top of — the main column, but pins it to
   the viewport as the page scrolls, guaranteeing full-height coverage even
   when the main column's content is taller than one screen. */
@media (min-width: 992px) {
  .wls-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    align-self: flex-start;
  }

  .wls-sidebar .offcanvas-body {
    height: 100%;
  }
}

/* Bootstrap's offcanvas-lg forces the outer element's background to
   transparent (!important) once it becomes a static column at ≥992px —
   background/border go on the inner offcanvas-body instead, which isn't
   touched by that rule, so the sidebar keeps its surface in both states.
   Dark-navy fill (design uplift) — matches the mockup's dark sidebar; text
   colors below flip to light-on-dark accordingly. */
.wls-sidebar .offcanvas-body {
  background: var(--wls-navy-deep) !important;
  width: 260px;
}

.wls-sidebar-brand {
  display: block;
  padding: 1.20rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.wls-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 1rem 0.75rem;
  overflow-y: auto;
}

.wls-sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.6rem 0.85rem;
  border-radius: 6px;
  transition: background-color 0.15s ease;
}

.wls-sidebar-link i {
  font-size: 1.05rem;
  width: 1.1rem;
  text-align: center;
  flex-shrink: 0;
}

.wls-sidebar-link:hover {
  background: var(--wls-navy-soft);
  color: var(--wls-white);
}

.wls-sidebar-link.active {
  background: var(--wls-gold);
  color: var(--wls-navy-deep);
}

/* First collapsible sidebar submenu (Module 11 nav grouping) — the toggle
   reuses .wls-sidebar-link's own look on a <button> instead of an <a>,
   plus a chevron that rotates open/closed. */
.wls-sidebar-chevron {
  transition: transform 0.15s ease;
}

.wls-sidebar-link[aria-expanded="true"] .wls-sidebar-chevron {
  transform: rotate(180deg);
}

.wls-sidebar-sublink {
  padding-left: 2.4rem;
  font-size: 0.87rem;
}

.wls-account-card {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 1rem 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.wls-avatar-initials {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--wls-gold);
  color: var(--wls-navy-deep);
  font-weight: 700;
  font-size: 0.85rem;
}

.wls-account-info {
  min-width: 0;
  flex-grow: 1;
}

.wls-avatar-img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

/* Square photo box for a passport photograph / avatar preview —
   object-fit: cover crops to fill the box without stretching or
   re-encoding the source file, so image quality is untouched;
   object-position biases the crop toward the top of the frame, since a
   portrait photo's subject is centered horizontally but usually framed
   from the shoulders up, not vertically centered. */
.wls-photo-box {
  width: 160px;
  height: 160px;
  border-radius: 8px;
  overflow: hidden;
  background: #eef0f2;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.wls-photo-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.wls-photo-box .bi {
  font-size: 2.5rem;
  color: #adb5bd;
}

/* The applicant's name in the Applicant Profile Header — deliberately
   larger than this app's standard page-title size (.h3, ~23px) per the
   design brief's "name is the dominant visual element, 26-30px"
   recommendation. Named/documented here rather than left as a bare
   inline style, so it reads as an intentional exception to the h1
   convention elsewhere, not an inconsistency. */
.wls-profile-name {
  font-size: 1.5rem;
}

/* Compact passport-style crop for the Applicant Profile Header — a real
   passport photo is portrait (roughly 35:45mm), not square, so this sits
   noticeably smaller and taller-than-wide next to the applicant's name
   rather than competing with it for space. */
.wls-photo-box-sm {
  width: 104px;
  height: 128px;
  border-radius: 8px;
  overflow: hidden;
  background: #eef0f2;
  border: 1px solid rgba(0, 32, 81, 0.12);
  box-shadow: 0 2px 6px rgba(0, 32, 81, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.wls-photo-box-sm img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.wls-photo-box-sm .bi {
  font-size: 1.75rem;
  color: #adb5bd;
}

/* Application progress strip — a 4-step admissions-pipeline indicator
   (Received → Documents → Review → Decision). Navy fill marks a completed
   step, gold marks the current one (an active/selected-state accent, per
   the navy-for-primary / gold-for-active convention used elsewhere), a
   light neutral marks what's still ahead. */
.wls-progress-strip {
  display: flex;
  align-items: center;
  gap: 0;
}

.wls-progress-step {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1 1 0;
}

.wls-progress-step:last-child {
  flex: 0 0 auto;
}

.wls-progress-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.7rem;
  font-weight: 700;
  background: #e9ecef;
  color: #adb5bd;
}

.wls-progress-step.is-done .wls-progress-dot {
  background: var(--wls-navy);
  color: #fff;
}

.wls-progress-step.is-current .wls-progress-dot {
  background: var(--wls-gold);
  color: var(--wls-navy-deep);
}

.wls-progress-label {
  font-size: 0.8rem;
  color: #6c757d;
  white-space: nowrap;
}

.wls-progress-step.is-done .wls-progress-label,
.wls-progress-step.is-current .wls-progress-label {
  color: var(--wls-navy-deep);
  font-weight: 600;
}

.wls-progress-line {
  flex: 1 1 auto;
  height: 2px;
  background: #e9ecef;
  margin: 0 0.5rem;
}

.wls-progress-step.is-done + .wls-progress-line {
  background: var(--wls-navy);
}

/* Four steps' worth of nowrap labels don't fit a phone-width card — the
   steps' flex-shrink can't go below each label's own min-content width, so
   without this the strip silently overflows the card and the later steps
   (Review, Decision) get cut off past the screen edge with no way to reach
   them, exactly as reported on the Applicant Review page. Scrolling the
   strip itself, rather than letting it spill into the page, keeps every
   step reachable without touching the desktop layout. */
@media (max-width: 575.98px) {
  .wls-progress-strip {
    overflow-x: auto;
    padding-bottom: 0.25rem;
    -webkit-overflow-scrolling: touch;
  }

  .wls-progress-step {
    flex: 0 0 auto;
  }

  .wls-progress-line {
    flex: 0 0 28px;
  }
}

/* Keeps the Decision panel in view while an administrator scrolls a long
   application — same position:sticky pattern the sidebar already uses
   (see .wls-sidebar above), not position:fixed, so it still participates
   in normal column flow instead of overlapping content. */
@media (min-width: 992px) {
  .wls-decision-sticky {
    position: sticky;
    top: 1.5rem;
  }
}

.wls-account-name {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--wls-white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wls-account-role {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.6);
}

.wls-account-logout {
  flex-shrink: 0;
}

/* The logout button is a stock .btn-outline-secondary in the markup — its
   grey-on-white default is illegible against the dark sidebar, so it's
   retinted here rather than adding a one-off button variant just for this
   single spot. */
.wls-account-logout .btn {
  --bs-btn-color: rgba(255, 255, 255, 0.75);
  --bs-btn-border-color: rgba(255, 255, 255, 0.3);
  --bs-btn-hover-color: var(--wls-navy-deep);
  --bs-btn-hover-bg: var(--wls-white);
  --bs-btn-hover-border-color: var(--wls-white);
}

.wls-notification-bell {
  border-color: rgba(255, 255, 255, 0.12) !important;
}

.wls-bell-toggle {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.75rem 1.25rem;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 600;
  font-size: 0.85rem;
}

.wls-bell-toggle:hover {
  background: var(--wls-navy-soft);
  color: var(--wls-white);
}

.wls-bell-toggle i {
  font-size: 1.05rem;
}

.wls-bell-badge {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--wls-gold-deep);
  color: var(--wls-navy);
  font-size: 0.7rem;
  font-weight: 700;
}

.wls-notification-dropdown {
  width: 320px;
  max-height: 360px;
  overflow-y: auto;
  padding: 0;
  border-color: var(--wls-border);
}

.wls-notification-dropdown-header {
  padding: 0.65rem 1rem;
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--wls-ink-muted);
  border-bottom: 1px solid var(--wls-border);
}

.wls-notification-empty {
  padding: 1rem;
  font-size: 0.85rem;
  color: var(--wls-ink-muted);
}

.wls-notification-item {
  display: block;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--wls-border);
  text-decoration: none;
  color: inherit;
}

.wls-notification-item:last-child {
  border-bottom: none;
}

.wls-notification-item.unread {
  background: var(--wls-gold-soft);
}

.wls-notification-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--wls-navy-deep);
}

.wls-notification-time {
  font-size: 0.75rem;
  color: var(--wls-ink-muted);
}

/* Sticky footer action distinguishing this dropdown (a live, recent-only
   preview) from the sidebar's "All Notifications" link (the full list) —
   without this the two looked like plain duplicates of each other. Sticky
   within the dropdown's own scroll container, not the page, so it stays
   reachable without scrolling past every notification first. */
.wls-notification-view-all {
  display: block;
  position: sticky;
  bottom: 0;
  padding: 0.6rem 1rem;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--wls-navy);
  background: var(--wls-white);
  border-top: 1px solid var(--wls-border);
  text-decoration: none;
}

.wls-notification-view-all:hover {
  background: var(--wls-gold-soft);
  color: var(--wls-navy-deep);
}

.wls-mobile-topbar {
  background: var(--wls-navy-deep);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

/* The mobile topbar's menu toggle is a stock .btn-outline-secondary — same
   retint reasoning as .wls-account-logout .btn above. */
.wls-mobile-topbar .btn {
  --bs-btn-color: rgba(255, 255, 255, 0.85);
  --bs-btn-border-color: rgba(255, 255, 255, 0.3);
  --bs-btn-hover-color: var(--wls-navy-deep);
  --bs-btn-hover-bg: var(--wls-white);
  --bs-btn-hover-border-color: var(--wls-white);
}

/* ---- Buttons -------------------------------------------------------------
   Navy solid fill is the primary action style on the live site
   ("CLICK TO APPLY"); gold is an accent, used as an outline/ghost variant
   here, not a competing fill color. */

.btn-primary {
  --bs-btn-bg: var(--wls-navy);
  --bs-btn-border-color: var(--wls-navy);
  --bs-btn-hover-bg: var(--wls-navy-deep);
  --bs-btn-hover-border-color: var(--wls-navy-deep);
  --bs-btn-active-bg: var(--wls-navy-deep);
  --bs-btn-focus-shadow-rgb: 0, 32, 81;
  font-weight: 600;
  letter-spacing: 0.01em;
}

/* Unlike --bs-primary, .btn-outline-primary's colors are baked into
   Bootstrap's compiled CSS at build time, not read from a root variable —
   so it needs the same manual --bs-btn-* override .btn-primary already
   gets above, or it silently stays Bootstrap blue (design-review finding,
   2026-07-18: 9 templates use this class). */
.btn-outline-primary {
  --bs-btn-color: var(--wls-navy);
  --bs-btn-border-color: var(--wls-navy);
  --bs-btn-hover-bg: var(--wls-navy);
  --bs-btn-hover-border-color: var(--wls-navy);
  --bs-btn-active-bg: var(--wls-navy);
  --bs-btn-active-border-color: var(--wls-navy);
  font-weight: 600;
}

.btn-wls-gold {
  --bs-btn-color: var(--wls-navy-deep);
  --bs-btn-bg: transparent;
  --bs-btn-border-color: var(--wls-gold);
  --bs-btn-hover-color: var(--wls-navy-deep);
  --bs-btn-hover-bg: var(--wls-gold-soft);
  --bs-btn-hover-border-color: var(--wls-gold);
  font-weight: 600;
}

/* A per-row action button group (Edit/Open for intake/Delete and similar)
   — on mobile, stack into a single column where every button matches the
   width of the widest one, rather than each sized to its own label (or a
   flex-wrap wrapping into a ragged 2-then-1 layout). A single-column CSS
   grid does this with no JS: grid-template-columns: max-content sizes
   that one column to the widest label's full single-line width — not
   plain `auto`, which lets a grid track shrink below max-content and
   wrap text inside a narrower cell, which is exactly what happened on
   the first pass ("Open for intake" wrapped to two lines because the
   column sized to something between min- and max-content). white-space:
   nowrap on each button is belt-and-suspenders: guarantees no label
   wraps even if some future button text is wide enough to be its own
   longest-content driver. inline-grid (not grid) so the group only takes
   up that column's width, not the full row — it stays right-aligned as
   one unit via the parent's own d-flex justify-content-between. Left at
   natural per-button width from `sm` up, where there's room for
   everything on one line. */
@media (max-width: 575.98px) {
  .wls-action-row {
    display: inline-grid !important;
    grid-template-columns: max-content;
    gap: 0.25rem !important; /* the row also carries Bootstrap's .gap-2 utility, which is !important */
    justify-items: stretch;
  }

  .wls-action-row > .btn,
  .wls-action-row > form > .btn {
    width: 100%;
    white-space: nowrap;
  }

  /* Programme card title — de-emphasized to match the surrounding body
     text size on mobile rather than Bootstrap's larger .h5 (~20px), which
     ate a lot of vertical space for a repeated list of cards. 1em here
     resolves against the mobile body-text rule below (0.75em of the root
     16px = 12px), not against .h5's own would-be size, since em always
     computes from the element's own inherited context, not its class. */
  .wls-programme-title {
    font-size: 1em;
  }
}

/* Global mobile type scale-down: smaller body copy frees up space for
   list-heavy admin screens on a phone, especially table data, which is
   the densest content in the app. rem-based Bootstrap headings (h1-h6,
   .h1-.h6) are unaffected — rem is always relative to the root <html>
   element's size, not body's, so this only shrinks plain body-level text
   and anything sized in em relative to it (including table cells, which
   inherit body's font-size with no size override of their own).

   Buttons and form controls are NOT plain body-level text, though —
   Bootstrap sizes .btn and .form-control/.form-select in rem too
   (14-16px), so they stayed at their desktop size and looked
   inconsistent next to the now-smaller body copy around them. 1em here
   pulls them down to match, inheriting the body rule above instead of
   Bootstrap's own component-level rem sizing. Note this does cross a
   real tradeoff: iOS Safari auto-zooms the page when a focused input's
   font-size is under 16px, which is exactly why Bootstrap defaults form
   controls to 16px in the first place — going to 12px here brings that
   zoom back on iOS. Requested explicitly ("same with the forms and
   input data"), so applied as asked; worth knowing if it turns out to
   be an issue on a real device. */
@media (max-width: 575.98px) {
  body {
    font-size: 0.875em;
  }

  .btn,
  .form-control,
  .form-select {
    font-size: 1em;
  }
}

/* ---- Cards / surfaces ------------------------------------------------- */

.wls-card {
  background: var(--wls-white);
  border: 1px solid var(--wls-border);
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(18, 36, 72, 0.04), 0 8px 24px rgba(18, 36, 72, 0.06);
}

.wls-card-accent-top {
  border-top: 3px solid var(--wls-gold);
}

/* ---- Status pills (reused across modules for lookup-table statuses) --- */

.wls-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
}

.wls-pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.wls-pill-pending { background: #fbf1dd; color: #92650f; }
.wls-pill-approved { background: #e2f3ea; color: #1f7a52; }
.wls-pill-rejected { background: #fbe6e6; color: #a6383e; }
.wls-pill-neutral { background: var(--wls-paper); color: var(--wls-ink-muted); }
.wls-pill-info { background: #e3edf7; color: #2c5c8f; }

/* ---- Wizard stepper (design uplift) -------------------------------------
   Numbered circles connected by a line, replacing the old .wls-wizard-nav
   pill grid. Two states only — active (current stage) and neutral
   (everything else) — since nothing in the reference design distinguishes
   "already completed" from "not yet reached." */

/* Fades both edges so a horizontally-scrollable stepper (more steps than
   fit a phone screen) visibly hints "there's more" in either direction,
   rather than the content just getting hard-clipped with no affordance —
   mask-image works regardless of scroll position, no JS needed to track
   scroll offset. */
.wls-stepper-scroll {
  overflow-x: auto;
  -webkit-mask-image: linear-gradient(to right, transparent 0, black 24px, black calc(100% - 24px), transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, black 24px, black calc(100% - 24px), transparent 100%);
}

.wls-stepper {
  display: flex;
  align-items: flex-start;
  width: max-content;
  min-width: 100%;
}

.wls-stepper-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  width: 6.5rem;
  text-align: center;
}

.wls-stepper-circle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  border: 2px solid var(--wls-border);
  background: var(--wls-white);
  color: var(--wls-ink-muted);
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.wls-stepper-step.is-active .wls-stepper-circle {
  background: var(--wls-navy-deep);
  border-color: var(--wls-navy-deep);
  color: var(--wls-white);
}

.wls-stepper-label {
  margin-top: 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--wls-ink-muted);
  line-height: 1.25;
}

.wls-stepper-step.is-active .wls-stepper-label {
  color: var(--wls-navy-deep);
}

.wls-stepper-line {
  flex-grow: 1;
  height: 2px;
  background: var(--wls-border);
  margin-top: 1.1rem;
  min-width: 0.75rem;
}

/* ---- Wizard card icon header (design uplift) ----------------------------
   A circular icon badge beside a heading + one-line description, used once
   at the top of each wizard stage's card. */

.wls-card-icon-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding-bottom: 1rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--wls-border);
}

.wls-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  flex-shrink: 0;
  border-radius: 50%;
  background: #e3edf7;
  color: var(--wls-navy);
  font-size: 1.3rem;
}

.wls-card-icon-header h2 {
  font-size: 1.05rem;
  margin-bottom: 0.15rem;
}

.wls-card-icon-header p {
  font-size: 0.85rem;
  color: var(--wls-ink-muted);
  margin-bottom: 0;
}

/* Dashboard shortcut cards (Applications, Content Approvals, ...) — icon
   beside the title/subtitle rather than stacked above them, since a
   single-column list of icon-on-top cards on mobile reads as a wall of
   centred icons with no clear scan order. */
.wls-shortcut-card {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.wls-shortcut-card > .bi {
  font-size: 1.4rem;
  color: var(--wls-navy);
  flex-shrink: 0;
  line-height: 1.3;
}

/* ---- Larger, custom-styled checkbox (design uplift) ---------------------
   Used on the declaration consent checkbox — a bigger box, cleaner border,
   and a solid navy fill once checked (native checkbox, no JS). */

.wls-checkbox {
  width: 1.4em;
  height: 1.4em;
  margin-top: 0.15em;
  border: 2px solid var(--wls-border);
}

.wls-checkbox:checked {
  background-color: var(--wls-navy-deep);
  border-color: var(--wls-navy-deep);
}

.wls-checkbox:focus {
  border-color: var(--wls-navy-soft);
  box-shadow: 0 0 0 0.2rem rgba(0, 32, 81, 0.15);
}

.wls-wizard-nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.5rem;
}
.wls-wizard-nav .wls-pill { justify-content: center; }

/* ---- Forms -------------------------------------------------------------- */

.form-control:focus,
.form-select:focus {
  border-color: var(--wls-navy-soft);
  box-shadow: 0 0 0 0.2rem rgba(0, 32, 81, 0.15);
}

/* ---- Footer --------------------------------------------------------------- */

.wls-footer {
  color: var(--wls-ink-muted);
  font-size: 0.85rem;
}

/* color: inherit rather than the sitewide navy link color — a "Powered by"
   credit reads as understated footer text, not a primary call-to-action
   link, and inheriting means it also stays legible for free wherever the
   footer's own color is overridden (e.g. the light-on-navy login page
   below), no separate dark-background rule needed. */
.wls-footer a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: currentColor;
  opacity: 0.85;
}

.wls-footer a:hover {
  opacity: 1;
  color: var(--wls-gold-deep);
}


/* ---- Programme picker & fee/curriculum blocks (applicant-facing) ---------
   One selectable card per open programme/intake: header (name, level,
   duration, dates), a fee summary, and collapsible curriculum/requirements.
   The radio sits beside the header label rather than around the whole card,
   so opening the details never toggles the selection. */

.wls-programme-card {
  border: 2px solid transparent;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.wls-programme-card:has(.wls-programme-radio:checked) {
  border-color: var(--wls-gold);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.18), 0 8px 24px rgba(18, 36, 72, 0.08);
}

.wls-programme-card:has(.wls-programme-radio:focus-visible) {
  outline: 2px solid var(--wls-navy);
  outline-offset: 2px;
}

.wls-programme-head {
  cursor: pointer;
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}

.wls-programme-title {
  font-weight: 700;
  color: var(--wls-navy-deep);
  font-size: 1.05rem;
  line-height: 1.3;
}

.wls-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: #eef1f6;
  color: var(--wls-navy);
  font-size: 0.75rem;
  font-weight: 600;
}

.wls-meta-pill.is-urgent {
  background: #fdecec;
  color: #a12a2a;
}

.wls-fee-box {
  background: #f6f8fb;
  border: 1px solid var(--wls-border);
  border-radius: 10px;
  padding: 0.85rem 1rem;
}

.wls-fee-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
  padding: 0.2rem 0;
}

.wls-fee-row > span:last-child {
  white-space: nowrap;
  text-align: right;
}

.wls-fee-row .wls-fee-when {
  display: block;
  font-size: 0.72rem;
  color: var(--wls-ink-muted);
}

.wls-fee-row.is-total {
  border-top: 1px dashed #c9d1de;
  margin-top: 0.35rem;
  padding-top: 0.5rem;
  font-weight: 700;
  color: var(--wls-navy-deep);
}

.wls-details {
  border-top: 1px solid var(--wls-border);
}

.wls-details > summary {
  list-style: none;
  cursor: pointer;
  padding: 0.7rem 0;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--wls-navy);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.wls-details > summary::-webkit-details-marker {
  display: none;
}

.wls-details > summary::after {
  content: "\F282"; /* bootstrap-icons chevron-down */
  font-family: "bootstrap-icons";
  font-size: 0.8rem;
  transition: transform 0.15s ease;
}

.wls-details[open] > summary::after {
  transform: rotate(180deg);
}

.wls-course-group + .wls-course-group {
  margin-top: 0.9rem;
}

.wls-course-group-title {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--wls-navy-deep);
}

.wls-course-group-title .count {
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  color: var(--wls-ink-muted);
}

.wls-course-list {
  list-style: none;
  margin: 0.4rem 0 0;
  padding: 0;
}

.wls-course-list li {
  padding: 0.35rem 0;
  border-bottom: 1px solid #eef1f6;
  font-size: 0.88rem;
}

.wls-course-list li:last-child {
  border-bottom: 0;
}

.wls-course-list .code {
  color: var(--wls-ink-muted);
  font-size: 0.75rem;
  margin-right: 0.4rem;
}

.wls-picker-bar {
  position: sticky;
  bottom: 0;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(4px);
  border-top: 1px solid var(--wls-border);
  margin: 0 -0.75rem;
  padding: 0.85rem 0.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  z-index: 5;
}

/* Prepayment progress on the applicant status page. */
.wls-progress-bar {
  height: 8px;
  background: #e5e9f0;
  border-radius: 999px;
  overflow: hidden;
}

.wls-progress-bar > span {
  display: block;
  height: 100%;
  background: var(--wls-gold);
  border-radius: 999px;
}

/* ---- Programme picker: filters + compact rows ----------------------------
   One line per programme (name, level/duration/subject, total fees, a
   Details toggle) so a long list is scannable; fees breakdown, courses and
   requirements open underneath on demand. */

.wls-chip-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.4rem;
}

.wls-chip-label {
  flex: 0 0 4.2rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--wls-ink-muted);
}

.wls-chip-scroll {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.wls-chip {
  flex: 0 0 auto;
  border: 1px solid var(--wls-border);
  background: var(--wls-white);
  color: var(--wls-navy);
  border-radius: 999px;
  padding: 0.25rem 0.8rem;
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.wls-chip:hover:not(:disabled) {
  border-color: var(--wls-navy);
}

.wls-chip.is-active {
  background: var(--wls-navy);
  border-color: var(--wls-navy);
  color: #fff;
}

.wls-chip.is-empty,
.wls-chip:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.wls-chip-count {
  font-weight: 500;
  opacity: 0.7;
  margin-left: 0.15rem;
}

.wls-filter-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--wls-border);
  border-radius: 0.5rem;
  background: var(--wls-white);
  color: var(--wls-navy);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.wls-filter-summary::-webkit-details-marker { display: none; }

.wls-filter-panel[open] > .wls-filter-summary {
  margin-bottom: 0.6rem;
}

.wls-filter-badge {
  min-width: 1.4rem;
  padding: 0 0.4rem;
  border-radius: 999px;
  background: var(--wls-navy);
  color: #fff;
  font-size: 0.75rem;
  text-align: center;
}

@media (min-width: 768px) {
  .wls-filter-summary { display: none; }
}

.wls-subject-block {
  margin: 0.6rem 0 0.2rem;
}

.wls-subject-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11.5rem, 1fr));
  gap: 0.5rem;
}

.wls-subject {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 2.75rem;
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--wls-border);
  border-radius: 0.6rem;
  background: var(--wls-white);
  color: var(--wls-navy);
  font-size: 0.85rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.wls-subject > .bi {
  font-size: 1.1rem;
  flex: none;
}

.wls-subject-name {
  flex: 1 1 auto;
  line-height: 1.2;
}

.wls-subject:hover:not(:disabled) {
  border-color: var(--wls-navy);
}

.wls-subject.is-active {
  background: var(--wls-navy);
  border-color: var(--wls-navy);
  color: #fff;
}

.wls-subject.is-empty,
.wls-subject:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.wls-subject-group {
  margin-bottom: 0.9rem;
}

.wls-subject-title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 0.35rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--wls-ink-muted);
}

.wls-section-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--wls-navy-deep);
  margin: 0 0 0.5rem;
}

.wls-section-title .count {
  background: #e5e9f0;
  color: var(--wls-navy);
  border-radius: 999px;
  padding: 0 0.5rem;
  font-size: 0.72rem;
  letter-spacing: 0;
}

.wls-prog-main {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.9rem;
}

.wls-prog-main .wls-programme-head {
  flex: 1 1 auto;
  min-width: 0;
}

.wls-prog-text {
  min-width: 0;
}

.wls-prog-main .wls-programme-title {
  font-size: 0.95rem;
}

.wls-prog-meta {
  display: block;
  font-size: 0.78rem;
  color: var(--wls-ink-muted);
  margin-top: 0.1rem;
}

.wls-prog-fee {
  flex: 0 0 auto;
  text-align: right;
  font-size: 0.75rem;
  line-height: 1.25;
  white-space: nowrap;
}

.wls-prog-fee .fw-semibold {
  font-size: 0.9rem;
  color: var(--wls-navy-deep);
}

.wls-row-toggle {
  flex: 0 0 auto;
  border: 1px solid var(--wls-border);
  background: var(--wls-white);
  color: var(--wls-navy);
  border-radius: 8px;
  padding: 0.3rem 0.6rem;
  font-size: 0.8rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
}

.wls-row-toggle:hover {
  background: #f3f5f9;
}

.wls-row-toggle .bi {
  transition: transform 0.15s ease;
}

.wls-row-toggle.is-open .bi {
  transform: rotate(180deg);
}

.wls-prog-panel {
  border-top: 1px solid var(--wls-border);
  padding: 0.9rem 0.9rem 0.4rem;
  background: #fbfcfe;
  border-radius: 0 0 10px 10px;
}

.wls-programme-card.is-flash {
  animation: wls-flash 1.6s ease;
}

@keyframes wls-flash {
  0%, 60% { box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.5); }
  100% { box-shadow: none; }
}

@media (max-width: 575.98px) {
  .wls-chip-row { align-items: flex-start; flex-direction: column; gap: 0.2rem; }
  .wls-chip-label { flex: none; }
  .wls-subject-grid { grid-template-columns: repeat(2, 1fr); }
  .wls-prog-main { flex-wrap: wrap; row-gap: 0.4rem; }
  .wls-prog-main .wls-programme-head { flex-basis: 100%; }
  .wls-prog-fee { margin-right: auto; text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  .wls-programme-card.is-flash { animation: none; }
}

/* Unselected radios were nearly invisible on white rows. */
.wls-programme-radio {
  width: 1.15rem;
  height: 1.15rem;
  border-color: #8b95a5;
}

.wls-step-compact-text {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.15rem 0.6rem;
  margin-bottom: 0.4rem;
  color: var(--wls-navy-deep);
}

.wls-step-compact-text span {
  color: var(--wls-ink-muted);
  font-size: 0.85rem;
}

.wls-step-compact-bar {
  display: flex;
  gap: 4px;
}

.wls-step-compact-bar span {
  flex: 1 1 0;
  height: 6px;
  border-radius: 3px;
  background: var(--wls-border);
}

.wls-step-compact-bar span.is-done {
  background: var(--wls-navy-deep);
}

/* ---- Phone touch targets -------------------------------------------------
   Small buttons, the menu toggle and the review page's Edit links were
   28-32px; fingers want ~40px+. */

.wls-edit-link {
  display: inline-flex;
  align-items: center;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
}

@media (max-width: 575.98px) {
  .btn-sm {
    min-height: 2.5rem;
    padding-inline: 0.9rem;
  }

  .wls-mobile-topbar .btn {
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    font-size: 1.25rem;
  }

  .wls-edit-link {
    min-height: 2.5rem;
    padding: 0 0.25rem 0 0.5rem;
  }
}

/* ---- Admin programmes list ----------------------------------------------- */

.wls-stat-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}

.wls-stat {
  display: flex;
  flex-direction: column;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--wls-border);
  border-radius: 0.6rem;
  background: var(--wls-white);
}

.wls-stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--wls-navy-deep);
}

.wls-stat-label {
  font-size: 0.78rem;
  color: var(--wls-ink-muted);
}

.wls-stat.is-warn .wls-stat-value { color: #a15c00; }

.wls-admin-prog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 0.9rem;
}

.wls-admin-prog-main { min-width: 0; }

.wls-admin-prog-title {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.15rem 0.6rem;
}

.wls-admin-prog-code {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--wls-ink-muted);
}

.wls-admin-prog-title .wls-programme-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--wls-navy-deep);
}

.wls-admin-prog-meta {
  margin-top: 0.1rem;
  font-size: 0.8rem;
  color: var(--wls-ink-muted);
}

.wls-admin-prog-actions {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 0.4rem;
}

.wls-admin-prog-body {
  padding: 0 0.9rem 0.9rem;
  border-top: 1px solid var(--wls-border);
  padding-top: 0.8rem;
}

.wls-admin-prog-body.collapsing { padding-top: 0.8rem; }

.wls-dot-warn {
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  margin-left: 0.15rem;
  border-radius: 50%;
  background: #d98a00;
}

.wls-admin-prog [aria-expanded="true"] .bi-chevron-down { transform: rotate(180deg); }

@media (max-width: 991.98px) {
  .wls-stat-strip { grid-template-columns: repeat(2, 1fr); }
  .wls-admin-prog-head { flex-direction: column; align-items: stretch; }
  .wls-admin-prog-actions { flex-wrap: wrap; }
}

/* ---- Applicant course-fee card ------------------------------------------- */
.wls-fee-figures {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
}

.wls-fee-figure {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--wls-border);
  border-radius: 0.6rem;
  background: var(--wls-white);
}

.wls-fee-figure.is-balance {
  background: var(--wls-navy);
  border-color: var(--wls-navy);
}

.wls-fee-label {
  font-size: 0.75rem;
  color: var(--wls-ink-muted);
}

.wls-fee-value {
  font-weight: 700;
  color: var(--wls-navy-deep);
  font-variant-numeric: tabular-nums;
}

.wls-fee-figure.is-balance .wls-fee-label { color: rgba(255, 255, 255, 0.75); }
.wls-fee-figure.is-balance .wls-fee-value { color: var(--wls-white); }

.wls-fee-pay {
  padding: 1rem;
  border: 1px solid var(--wls-border);
  border-radius: 0.75rem;
  background: var(--wls-paper);
}

.wls-fee-note { min-height: 1.3em; }

@media (max-width: 575.98px) {
  .wls-fee-figures { grid-template-columns: 1fr; }
  .wls-fee-figure { flex-direction: row; justify-content: space-between; align-items: baseline; }
}

/* ---- Programme picker: breathing room ------------------------------------ */
.wls-filters {
  padding: 1rem 1.1rem;
  border: 1px solid var(--wls-border);
  border-radius: 0.75rem;
  background: var(--wls-white);
}

.wls-filters .wls-chip-row { margin-bottom: 0.85rem; gap: 0.9rem; }
.wls-filters .wls-chip-label { flex-basis: 4.6rem; }
.wls-filters .wls-chip-scroll { gap: 0.5rem; }
.wls-filters .wls-subject-block { margin: 1.4rem 0 0; }
.wls-filters .wls-subject-block > .wls-chip-label { margin-bottom: 0.6rem !important; }
.wls-filters .wls-subject-grid { gap: 0.85rem; }
.wls-filters .wls-subject { padding: 0.6rem 0.85rem; }

.wls-filter-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--wls-border);
}

.wls-prog-section { margin-bottom: 2.75rem; }
.wls-prog-section .wls-section-title {
  justify-content: space-between;
  margin: 0 0 1.1rem;
  padding: 0.7rem 1rem;
  border-radius: 0.6rem;
  background: var(--wls-navy);
  color: var(--wls-white);
  font-size: 1rem;
  letter-spacing: 0.04em;
}

.wls-prog-section .wls-section-title .count {
  background: var(--wls-gold);
  color: var(--wls-navy-deep);
  padding: 0.1rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 700;
}
.wls-subject-group { margin-bottom: 2.5rem; }
.wls-subject-group:last-child { margin-bottom: 0.5rem; }
.wls-subject-title { margin-bottom: 1rem; padding-bottom: 0.45rem; border-bottom: 1px dashed var(--wls-border); font-size: 0.88rem; color: var(--wls-navy); }
.wls-prog-list { display: flex; flex-direction: column; gap: 0.9rem; }
.wls-prog-main { padding: 0.9rem 1.1rem; gap: 1rem; }
.wls-prog-panel { padding: 1rem 1.1rem 0.6rem; }
#programme-form { padding-bottom: 1rem; }
.wls-picker-bar { margin-top: 1.5rem; }

@media (max-width: 575.98px) {
  .wls-filters { padding: 0.85rem; }
  .wls-filters .wls-chip-row { flex-direction: column; align-items: flex-start; gap: 0.4rem; }
  .wls-prog-section { margin-bottom: 1.75rem; }
  .wls-prog-main { padding: 0.8rem 0.9rem; }
}
