@charset "UTF-8";
/* =============================================================================
   ESAMS Material - shared component styles
   =============================================================================

   Reproduces the look of the Angular Material theme for plain HTML, so the IDP
   (ASP.NET Core Razor Pages) matches the Angular app it hands users off to.

   BUILD
   Compiled by gulp ("compile:esamsmaterial:vendor") to
   dist/vendor/css/esams-material.css. Edit THIS file, never the compiled output:
   dist/ is gitignored and "clean:css:vendor" deletes everything in it.

   Consumed by both applications from that one compiled file - ESAMS through the
   Base style bundle, the IDP through a direct <link> in its _Layout, the same
   way it already links esams.css.

   WHY A REPRODUCTION AND NOT A SHARED BUILD
   Angular Material's compiled CSS targets the DOM Angular generates - selectors
   like .mat-mdc-form-field with a specific nested structure - so it cannot style
   Razor markup. What is shared here are the design *tokens*: change a colour in
   ESAMS.Angular/src/styles/material-theme.scss and change it here to match.

   Everything is namespaced .esams-* rather than overriding Bootstrap classes.
   The IDP still loads Bootstrap for its grid, modals and footer, and silently
   restyling .btn or .panel would reach all of that too.
   ============================================================================= */
:root {
  /* --- Palette: mirrors $ESAMS-navy-palette / $ESAMS-green-palette (M2) --- */
  --esams-primary: #628eb5;
  --esams-primary-light: #93bee7;
  --esams-primary-dark: #316185;
  --esams-on-primary: #ffffff;
  --esams-accent: #60ad5e;
  --esams-accent-light: #91df8c;
  --esams-accent-dark: #2e7d32;
  --esams-on-accent: #ffffff;
  --esams-warn: #f44336;
  --esams-warn-dark: #d32f2f;
  /* M2 light theme foreground/background */
  --esams-surface: #ffffff;
  --esams-on-surface: rgba(0, 0, 0, 0.87);
  --esams-on-surface-medium: rgba(0, 0, 0, 0.6);
  --esams-on-surface-disabled: rgba(0, 0, 0, 0.38);
  --esams-outline: rgba(0, 0, 0, 0.38);
  --esams-outline-hover: rgba(0, 0, 0, 0.87);
  --esams-divider: rgba(0, 0, 0, 0.12);
  --esams-hover-overlay: rgba(0, 0, 0, 0.04);
  /* --- Typography: mirrors $custom-typography ---
     Arial, not Roboto. Roboto is declared in the Angular theme but has never
     been shipped - no font files, no CDN link - so the app has always rendered
     its fallback. Naming the real font here keeps the two applications
     identical instead of accidentally diverging on machines that happen to
     have Roboto installed locally. */
  --esams-font-family: Arial, Helvetica, sans-serif;
  --esams-body-size: 14px;
  --esams-body-line: 20px;
  --esams-caption-size: 12px;
  --esams-caption-line: 16px;
  /* --- Elevation: M2 umbra/penumbra/ambient triples --- */
  --esams-elevation-1: 0 2px 1px -1px rgba(0,0,0,.2), 0 1px 1px 0 rgba(0,0,0,.14), 0 1px 3px 0 rgba(0,0,0,.12);
  --esams-elevation-2: 0 3px 1px -2px rgba(0,0,0,.2), 0 2px 2px 0 rgba(0,0,0,.14), 0 1px 5px 0 rgba(0,0,0,.12);
  --esams-elevation-4: 0 2px 4px -1px rgba(0,0,0,.2), 0 4px 5px 0 rgba(0,0,0,.14), 0 1px 10px 0 rgba(0,0,0,.12);
  --esams-elevation-8: 0 5px 5px -3px rgba(0,0,0,.2), 0 8px 10px 1px rgba(0,0,0,.14), 0 3px 14px 2px rgba(0,0,0,.12);
  --esams-radius: 4px;
}

/* =============================================================================
   Card - the mat-card equivalent, replacing .panel.panel-primary
   ============================================================================= */
.esams-card {
  background: var(--esams-surface);
  color: var(--esams-on-surface);
  border-radius: var(--esams-radius);
  box-shadow: var(--esams-elevation-2);
  font-family: var(--esams-font-family);
  font-size: var(--esams-body-size);
  line-height: var(--esams-body-line);
  overflow: hidden;
}

.esams-card__header {
  padding: 16px 24px;
  background: var(--esams-primary);
  color: var(--esams-on-primary);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.0125em;
}

.esams-card__body {
  padding: 24px;
}

.esams-card__title {
  margin: 0 0 4px;
  font-size: 20px;
  font-weight: 500;
  line-height: 28px;
}

.esams-card__subtitle {
  margin: 0 0 16px;
  color: var(--esams-on-surface-medium);
  font-size: var(--esams-body-size);
}

/* =============================================================================
   Form field - matches mat-form-field appearance="outline"
   =============================================================================

   The floating label sits on the border and paints the card colour behind
   itself, which is how the "notch" in the outline is produced without the extra
   elements Angular Material generates.

   Markup contract - the input must come BEFORE the label, and must carry
   placeholder=" " (a single space):

     <div class="esams-field">
       <input id="x" placeholder=" " />
       <label for="x">Label</label>
     </div>

   :placeholder-shown is what detects emptiness, and the sibling selector needs
   the input first. A real placeholder would defeat it, so the space stands in.
   ============================================================================= */
.esams-field {
  position: relative;
  display: block;
  margin-bottom: 22px;
  font-family: var(--esams-font-family);
}

.esams-field > input,
.esams-field > select {
  width: 100%;
  height: 56px;
  padding: 0 15px;
  border: 1px solid var(--esams-outline);
  border-radius: var(--esams-radius);
  background: transparent;
  color: var(--esams-on-surface);
  font-family: inherit;
  font-size: 16px;
  line-height: 24px;
  transition: border-color 0.15s ease-in-out, border-width 0.15s ease-in-out;
}

.esams-field > input:hover,
.esams-field > select:hover {
  border-color: var(--esams-outline-hover);
}

/* 2px border on focus without the content shifting: padding drops by the pixel
   the border gains. */
.esams-field > input:focus,
.esams-field > select:focus {
  outline: none;
  border: 2px solid var(--esams-primary);
  padding: 0 14px;
}

.esams-field > label {
  position: absolute;
  left: 12px;
  top: 28px;
  transform: translateY(-50%);
  padding: 0 4px;
  max-width: calc(100% - 24px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: var(--esams-surface);
  color: var(--esams-on-surface-medium);
  font-size: 16px;
  line-height: 1;
  pointer-events: none;
  transition: top 0.15s ease-out, font-size 0.15s ease-out, color 0.15s ease-out;
}

.esams-field > input:focus + label,
.esams-field > input:not(:placeholder-shown) + label,
.esams-field > select:focus + label,
.esams-field > select:not(:placeholder-shown) + label {
  top: 0;
  font-size: 12px;
}

.esams-field > input:focus + label,
.esams-field > select:focus + label {
  color: var(--esams-primary);
}

/* Invalid only once the field has been touched and left - :invalid alone would
   paint every required field red before the user has typed anything. */
.esams-field > input:not(:focus):not(:placeholder-shown):invalid {
  border-color: var(--esams-warn);
}

.esams-field > input:not(:focus):not(:placeholder-shown):invalid + label {
  color: var(--esams-warn);
}

.esams-field__hint {
  display: block;
  margin: 4px 0 0 16px;
  color: var(--esams-on-surface-medium);
  font-size: var(--esams-caption-size);
  line-height: var(--esams-caption-line);
}

.esams-field__error {
  display: block;
  margin: 4px 0 0 16px;
  color: var(--esams-warn);
  font-size: var(--esams-caption-size);
  line-height: var(--esams-caption-line);
}

/* =============================================================================
   Buttons - mat-flat-button (filled) and mat-stroked-button (outlined)
   ============================================================================= */
.esams-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  height: 40px;
  padding: 0 16px;
  border: none;
  border-radius: var(--esams-radius);
  background: transparent;
  color: var(--esams-primary);
  font-family: var(--esams-font-family);
  font-size: var(--esams-body-size);
  font-weight: 500;
  letter-spacing: 0.0892857143em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.esams-btn:hover {
  background: var(--esams-hover-overlay);
  text-decoration: none;
}

.esams-btn:focus-visible {
  outline: 2px solid var(--esams-primary-dark);
  outline-offset: 2px;
}

.esams-btn:disabled,
.esams-btn.is-disabled {
  color: var(--esams-on-surface-disabled);
  background: transparent;
  cursor: default;
  pointer-events: none;
}

.esams-btn--primary {
  background: var(--esams-primary);
  color: var(--esams-on-primary);
  box-shadow: var(--esams-elevation-2);
}

.esams-btn--primary:hover {
  background: var(--esams-primary-dark);
  color: var(--esams-on-primary);
  box-shadow: var(--esams-elevation-4);
}

.esams-btn--primary:disabled,
.esams-btn--primary.is-disabled {
  background: rgba(0, 0, 0, 0.12);
  color: var(--esams-on-surface-disabled);
  box-shadow: none;
}

.esams-btn--accent {
  background: var(--esams-accent);
  color: var(--esams-on-accent);
  box-shadow: var(--esams-elevation-2);
}

.esams-btn--accent:hover {
  background: var(--esams-accent-dark);
  color: var(--esams-on-accent);
  box-shadow: var(--esams-elevation-4);
}

.esams-btn--stroked {
  border: 1px solid var(--esams-outline);
  background: transparent;
  color: var(--esams-on-surface);
}

.esams-btn--stroked:hover {
  background: var(--esams-hover-overlay);
  border-color: var(--esams-outline-hover);
}

/* The IdP profile picker's card, styled after the legacy Vortex profile well: bold labels with
   plain values in rows, a solid Select button underneath, on a tinted panel that stands apart
   from the card it sits in. */
.esams-profile-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--esams-outline);
  border-radius: var(--esams-radius);
  background: var(--esams-hover-overlay);
  padding: 12px 16px;
  margin-bottom: 12px;
}

/* Inside the two-per-row grid the gap provides the spacing, and the Select form is pushed to
   the bottom so buttons align across cards with different row counts. */
.esams-profile-grid .esams-profile-card {
  margin-bottom: 0;
}

/* All of a card's buttons live in one actions block pinned to the bottom, so buttons align
   across cards with different row counts - including method-gated cards stacking several
   step-up forms. */
.esams-profile-card__actions {
  margin-top: auto;
  display: flex;
  flex-direction: column;
}

.esams-profile-card__actions form {
  margin-top: 0;
}

.esams-profile-card__row {
  display: flex;
  gap: 8px;
  margin-bottom: 4px;
  font-size: var(--esams-body-size);
}

.esams-profile-card__label {
  flex: 0 0 130px;
  font-weight: 600;
}

.esams-profile-card__value {
  color: var(--esams-on-surface);
  overflow-wrap: anywhere;
}

.esams-profile-card__note {
  margin: 6px 0 2px;
  color: var(--esams-on-surface-medium);
}

.esams-profile-card .esams-btn {
  margin-top: 8px;
}

.esams-profile-card--disabled {
  opacity: 0.65;
}

.esams-btn--block {
  display: flex;
  width: 100%;
}

.esams-btn + .esams-btn--block {
  margin-top: 12px;
}

/* Provider buttons carry a brand image (Microsoft, Google), which must not be
   stretched or recoloured by the button. */
.esams-btn__provider-img {
  max-height: 24px;
  max-width: 100%;
}

/* =============================================================================
   Checkbox - approximates mat-checkbox
   =============================================================================

   Markup contract:
     <label class="esams-checkbox">
       <input type="checkbox" /> <span>Label</span>
     </label>
   ============================================================================= */
.esams-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--esams-font-family);
  font-size: var(--esams-body-size);
  color: var(--esams-on-surface);
  cursor: pointer;
  user-select: none;
}

/* A field straight after a checkbox (the MFA page's trust box and device name) would otherwise sit on
   the label's 5px bottom margin. */
.esams-checkbox + .esams-field {
  margin-top: 16px;
}

.esams-checkbox > input[type=checkbox] {
  appearance: none;
  -webkit-appearance: none;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 0;
  border: 2px solid var(--esams-on-surface-medium);
  border-radius: 2px;
  background: transparent;
  cursor: pointer;
  position: relative;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.esams-checkbox > input[type=checkbox]:checked {
  background: var(--esams-primary);
  border-color: var(--esams-primary);
}

/* Drawn rather than a glyph, so it needs no icon font. */
.esams-checkbox > input[type=checkbox]:checked::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 0;
  width: 5px;
  height: 10px;
  border: solid var(--esams-on-primary);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.esams-checkbox > input[type=checkbox]:focus-visible {
  outline: 2px solid var(--esams-primary-dark);
  outline-offset: 2px;
}

/* =============================================================================
   Banners - matches .info-banner in ESAMS.Angular common-styles.scss
   ============================================================================= */
.esams-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  margin: 12px 0 16px;
  padding: 12px 16px;
  border-left: 6px solid #2e74b5;
  background: rgba(46, 116, 181, 0.1);
  font-family: var(--esams-font-family);
  color: var(--esams-on-surface);
}

/* Optional - the coloured left border carries the meaning on its own, so pages
   without an icon font still read correctly. Both applications load the
   SVG-with-JS Font Awesome build, which replaces the <i> with an <svg>; sizing
   therefore has to work for either element. */
.esams-banner__icon,
.esams-banner__icon svg {
  color: #2e74b5;
  font-size: 18px;
  margin-top: 2px;
}

.esams-banner__title {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 2px;
}

.esams-banner__body {
  font-size: 13px;
  line-height: 1.4;
}

.esams-banner--warn {
  border-left-color: #f59e0b;
  background: rgba(245, 158, 11, 0.1);
}

.esams-banner--warn .esams-banner__icon {
  color: #f59e0b;
}

.esams-banner--error {
  border-left-color: var(--esams-warn-dark);
  background: rgba(211, 47, 47, 0.1);
}

.esams-banner--error .esams-banner__icon {
  color: var(--esams-warn-dark);
}

/* For banner bodies that hold a generated list - the validation summary tag helper emits a <ul>,
   and default bullets/margins inside a banner read as a styling accident. */
.esams-banner__body--list ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.esams-banner__body--list li + li {
  margin-top: 2px;
}

/* =============================================================================
   Layout helpers
   ============================================================================= */
/* Centres the sign-in card and keeps it a readable width on large monitors,
   replacing the Bootstrap column offsets the pages used for the same job.
   Used by both the IdP pages and the ESAMS Angular public pages, so the sign-in flow keeps the
   brand and card in the same place as it hands off between the two. */
.esams-auth-shell {
  width: 100%;
  max-width: 448px;
  margin: 32px auto;
  padding: 0 16px;
  font-family: var(--esams-font-family);
  color: var(--esams-on-surface);
}

/* A roomier shell for pages whose content is wider than a login form - the profile picker lays
   its cards out two per row. Same shell otherwise, so branding/banners still line up. */
.esams-auth-shell--wide {
  max-width: 880px;
}

/* Two profile cards per row, collapsing to one on narrow screens. The cards stretch so a pair
   with different row counts still bottom-aligns their Select buttons. */
.esams-profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

@media (max-width: 640px) {
  .esams-profile-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
.esams-auth-shell__brand {
  text-align: center;
  margin-bottom: 24px;
}

.esams-auth-shell__brand img {
  max-width: 100%;
  max-height: 96px;
}

.esams-auth-shell__brand h1,
.esams-auth-shell__brand h2 {
  font-size: 24px;
  font-weight: 400;
  margin: 0;
}

/* Live password checklist on the IdP's forced password change, ticked by password-checklist.js. The
   same look as the Angular PasswordRequirementsComponent (whose styles are component-scoped, so they
   cannot be shared with a Razor page). Markers are drawn in CSS rather than Font Awesome: the IdP
   loads FA's SVG-with-JS build, which swaps an <i> for an <svg> the script would then fight over. */
.esams-requirements {
  margin: 0 0 20px;
  padding: 12px 16px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 4px;
  background: #fafafa;
}

.esams-requirements__title {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
}

.esams-requirements__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.esams-requirements__item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  line-height: 20px;
  transition: color 0.15s ease;
}

.esams-requirements__item + .esams-requirements__item {
  margin-top: 4px;
}

.esams-requirements__note {
  margin-top: 8px;
  font-size: 12px;
  color: rgba(0, 0, 0, 0.6);
}

.esams-requirements__mark {
  position: relative;
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  margin-top: 3px;
  border-radius: 50%;
  box-sizing: border-box;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.esams-requirements__item--pending {
  color: rgba(0, 0, 0, 0.6);
}

.esams-requirements__item--pending .esams-requirements__mark {
  border: 2px solid rgba(0, 0, 0, 0.26);
}

.esams-requirements__item--met {
  color: var(--esams-accent-dark, #2e7d32);
}

.esams-requirements__item--met .esams-requirements__mark {
  background: var(--esams-accent-dark, #2e7d32);
}

/* Tick: two borders on a rotated box. */
.esams-requirements__item--met .esams-requirements__mark::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 2px;
  width: 3px;
  height: 7px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.esams-requirements__item--unmet {
  color: var(--esams-warn-dark, #d32f2f);
}

.esams-requirements__item--unmet .esams-requirements__mark {
  border: 2px solid var(--esams-warn-dark, #d32f2f);
}

/* Cross: two bars through the centre. */
.esams-requirements__item--unmet .esams-requirements__mark::before,
.esams-requirements__item--unmet .esams-requirements__mark::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 1.5px;
  width: 1.5px;
  height: 8px;
  background: var(--esams-warn-dark, #d32f2f);
}

.esams-requirements__item--unmet .esams-requirements__mark::before {
  transform: rotate(45deg);
}

.esams-requirements__item--unmet .esams-requirements__mark::after {
  transform: rotate(-45deg);
}

.esams-divider-text {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--esams-on-surface-medium);
  font-size: var(--esams-caption-size);
}

.esams-divider-text::before,
.esams-divider-text::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--esams-divider);
}

.esams-legal {
  margin-top: 20px;
  color: var(--esams-on-surface-medium);
  font-size: var(--esams-caption-size);
  line-height: var(--esams-caption-line);
}

.esams-legal a {
  color: var(--esams-primary-dark);
}

.esams-text-center {
  text-align: center;
}

.esams-muted {
  color: var(--esams-on-surface-medium);
}

/* =============================================================================
   Page shell - sticky footer
   =============================================================================

   Opt-in via class on <body> rather than styling the bare element, because this
   file is shared and ESAMS has its own page structure. Adding it there would
   change every page in the application.

   Content grows to fill the viewport so the footer sits at the bottom on short
   pages (the sign-in page is one screen of card) and is pushed below the fold on
   long ones - rather than floating mid-page above dead space.
   ============================================================================= */
/* Reserves the scrollbar's width whether or not the page scrolls, so centred content does not shift
   sideways between a short page and a long one - the ESAMS sign-in fits the window, the IdP's
   longer forms do not, and the card should sit in the same place on both. */
html:has(> body.esams-app-shell) {
  scrollbar-gutter: stable;
}

body.esams-app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  font-family: var(--esams-font-family);
  color: var(--esams-on-surface);
}

body.esams-app-shell > .esams-app-shell__content {
  flex: 1 0 auto;
}

/* Sticky rather than Bootstrap's fixed, so the masthead stays in normal flow. Content then starts
   directly below it at whatever height it actually is - including when the browser warning strip
   renders inside it - instead of every page reserving a fixed offset for the tallest case. Each
   layout adds only its own visible gap. margin-bottom undoes Bootstrap's .navbar 20px, which a
   fixed navbar never showed. */
body.esams-app-shell > .navbar-fixed-top {
  position: sticky;
  top: 0;
  margin-bottom: 0;
}

body.esams-app-shell > .esams-footer {
  flex-shrink: 0;
}

/* =============================================================================
   Footer
   ============================================================================= */
.esams-footer {
  /* Explicit auto: esams.css pins #page-bottom to a fixed 190px, and that is an
     ID selector this could never outrank. Markup using this component drops the
     id instead - see the IDP layout. */
  height: auto;
  margin-top: 48px;
  border-top: 1px solid var(--esams-divider);
  background: #fafafa;
  color: var(--esams-on-surface-medium);
  font-family: var(--esams-font-family);
  font-size: 13px;
  line-height: 20px;
}

.esams-footer__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 24px 24px;
  display: grid;
  /* Collapses to fewer columns on narrow screens without media queries. */
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
}

.esams-footer__heading {
  margin: 0 0 12px;
  color: var(--esams-on-surface);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.esams-footer__links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.esams-footer__links li + li {
  margin-top: 8px;
}

.esams-footer a {
  color: var(--esams-primary-dark);
  text-decoration: none;
}

.esams-footer a:hover,
.esams-footer a:focus {
  text-decoration: underline;
}

/* Host block: logo beside the address, replacing the centred table. */
.esams-footer__host {
  display: flex;
  align-items: center;
  gap: 16px;
}

.esams-footer__host img {
  max-height: 56px;
  flex: 0 0 auto;
}

.esams-footer__host-text {
  font-size: 12px;
  line-height: 18px;
}

.esams-footer__host-name {
  display: block;
  margin-bottom: 2px;
  color: var(--esams-on-surface);
  font-size: 13px;
  font-weight: 600;
}

/* Copyright bar - the strip pinned to the very bottom. */
.esams-footer__legal {
  border-top: 1px solid var(--esams-divider);
  padding: 12px 24px;
  text-align: center;
  font-size: var(--esams-caption-size);
  line-height: var(--esams-caption-line);
  color: var(--esams-on-surface-medium);
}

.esams-footer__legal span + span::before {
  content: "·";
  margin: 0 8px;
}