/*
 * OneAccess authentication surfaces (Phase B2). Loaded by _MetronicAuthLayout after oa-ui.css. Vendor files are never edited.
 * Layout skeleton: Demo 1 authentication/layouts/creative/sign-in.html (flex-column flex-lg-row, centred form, footer row).
 * The brand region is a real responsive region over the approved login background, not a flattened mock-up image.
 * No inline styles (CSP style-src 'self'); the background image is referenced from this stylesheet only.
 */
:root {
  --oa-ke-black: #111111;
  --oa-ke-red: #d90a1c;
  --oa-ke-green: #06783a;
}

body.oa-auth {
  background-color: #f4f7fb;
}

/*
 * The approved Nairobi background (1536x1024, curved edge at about 49% of its width) paints the split region (brand panel plus
 * sign-in region) from lg upward. It is held by .oa-auth-split, not by body, so the brand panel and its overlays share one
 * box with the picture. cover keeps the aspect ratio, never tiles or stretches; left bottom keeps the skyline and the curve at
 * the panel edge at every width. The image is decorative (a CSS background, no alt text, no meaning).
 */
@media (min-width: 992px) {
  .oa-auth-split {
    background-color: #f4f7fb;
    background-image: url("../../img/brand/login-background.png");
    background-repeat: no-repeat;
    background-size: cover;
    background-position: left bottom;
  }
}

/* Kenyan accent rule: three short segments. Decorative only; it carries no meaning. */
.oa-flag-rule {
  display: flex;
  gap: 0.25rem;
  width: 8rem;
  height: 0.25rem;
}
.oa-flag-rule > span { flex: 1; border-radius: 1px; }
.oa-flag-rule > span:nth-child(1) { background: var(--oa-ke-black); }
.oa-flag-rule > span:nth-child(2) { background: var(--oa-ke-red); }
.oa-flag-rule > span:nth-child(3) { background: var(--oa-ke-green); }

/* Left brand region */
.oa-auth-brand {
  position: relative;
  padding: 3rem 3.5rem 2.5rem;
  color: var(--oa-navy-900, #0b2545);
}
.oa-auth-brand > * { position: relative; z-index: 1; }
/*
 * Legibility overlays over the one continuous photograph (no solid block replaces any part of it):
 * ::before is a gradual navy ramp over the lower part of the panel (behind the tagline), faded out towards the panel's right edge
 * with a mask so it never ends in a hard vertical seam against the image that continues behind the sign-in region;
 * ::after is a faint light wash over the sky behind the dark upper text.
 */
.oa-auth-brand::before,
.oa-auth-brand::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  z-index: 0;
  pointer-events: none;
}
.oa-auth-brand::before {
  bottom: 0;
  height: min(55%, 30rem);
  background: linear-gradient(to top, rgba(7, 26, 52, 0.86) 0%, rgba(7, 26, 52, 0.6) 35%, rgba(7, 26, 52, 0.22) 70%, rgba(7, 26, 52, 0) 100%);
  -webkit-mask-image: linear-gradient(to right, #000 0%, #000 60%, transparent 100%);
  mask-image: linear-gradient(to right, #000 0%, #000 60%, transparent 100%);
}
.oa-auth-brand::after {
  top: 0;
  height: 65%;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0.34) 55%, rgba(255, 255, 255, 0) 100%);
  -webkit-mask-image: linear-gradient(to right, #000 0%, #000 55%, transparent 100%);
  mask-image: linear-gradient(to right, #000 0%, #000 55%, transparent 100%);
}
.oa-auth-brand__motto { color: #fff; text-shadow: 0 1px 3px rgba(7, 26, 52, 0.6); }
.oa-auth-brand__lead { color: #35476b; }
.oa-auth-brand__point-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: #fff;
  color: var(--bs-primary);
  box-shadow: 0 2px 8px rgba(11, 37, 69, 0.12);
}
/*
 * Benefit list: no container. The wrapper is visually transparent (no background, border, shadow, radius or blur); the three items
 * sit directly on the photograph. Legibility comes from dark navy text, a very light glow, the white icon discs, and the soft
 * light wash (.oa-auth-brand::after) that fades gradually behind this region of the image.
 */
.oa-auth-brand__points {
  width: fit-content;
  max-width: 30rem;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.oa-auth-brand__points .fw-bold { color: var(--oa-navy-900, #0b2545); text-shadow: 0 0 6px rgba(255, 255, 255, 0.7); }
.oa-auth-brand__point-text { color: #14305a; text-shadow: 0 0 6px rgba(255, 255, 255, 0.7); }
/* Shorter laptop heights: slightly tighter rows, every item kept. */
@media (min-width: 992px) and (max-height: 820px) {
  .oa-auth-brand__points > li.mb-5 { margin-bottom: 0.75rem !important; }
  .oa-auth-brand { padding-top: 2rem; padding-bottom: 1.5rem; }
  .oa-auth-brand .mb-9 { margin-bottom: 1.5rem !important; }
  /* Where the picture is cropped vertically, show less sky and more skyline room below the list (cuts only tree line). */
  .oa-auth-split { background-position: left 25%; }
}

/* Right region */
.oa-auth-card {
  width: 100%;
  max-width: 28rem;
  border: 1px solid rgba(11, 37, 69, 0.08);
  border-radius: 0.75rem;
  background: #fff;
  box-shadow: 0 12px 40px rgba(11, 37, 69, 0.1);
}
.oa-auth-card:focus { outline: none; }

/* Requesting-application summary (sign-in, consent). */
.oa-requesting-application {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  background: var(--bs-primary-light);
}
.oa-requesting-application__icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  background: var(--bs-primary);
  color: #fff;
}
.oa-requesting-application__body { flex: 1 1 auto; min-width: 0; }
.oa-requesting-application__name { overflow-wrap: anywhere; }

.oa-auth-footer a { color: var(--bs-gray-700); }
.oa-auth-footer a:hover { color: var(--bs-primary); }

/* Status pages (access denied, errors): same card treatment as the auth family. */
.oa-state-icon {
  display: inline-grid;
  place-items: center;
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 50%;
}

@media (max-width: 991.98px) {
  .oa-auth-card { box-shadow: 0 4px 16px rgba(11, 37, 69, 0.08); }
}

/* Root font size is 13px under Metronic, so rem widths are small: 34rem is about 440px, matching the mock-up card proportion. */
.oa-auth-card { max-width: 34rem; }

/* Field wrappers already carry mb-5; the legacy grid gap would double the spacing and push the card past a 900px viewport. */
.oa-auth-card .oa-auth-form { gap: 0; }
.oa-auth-card .oa-auth-card__section { margin-top: 1rem; }
.oa-auth-card .form-check { margin-bottom: 0 !important; }

/* The footer row sits over the lower part of the photograph, so it gets a bounded light surface for legibility. */
@media (min-width: 992px) {
  .oa-auth-footer { background: rgba(255, 255, 255, 0.88); padding-top: 0.75rem; padding-bottom: 0.75rem !important; }
}
