@import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&display=swap");

:root {
  --lex-blue: #004776;
  --lex-dark-blue: #00385d;
  --lex-mid-blue: #096eb5;
  --lex-mid-light-blue: #419bda;
  --lex-light-blue: #a9cce5;
  --lex-lightest-blue: #e1edf6;
  --alice-blue: #f1f6fa;
  --lex-yellow: #fff200;
  --dark-yellow: #ffcf00;
  --auth-fg-1: #333333;
  --auth-fg-2: #5a5a5a;
  --auth-success: #09ab1f;
  --auth-error: #e21e26;
  --auth-border-input: var(--lex-light-blue);
  --auth-grad-yellow: linear-gradient(180deg, #fff200 0%, #ffcf00 100%);
  --auth-font: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --auth-shadow-big: 0 28px 50px rgba(0, 0, 0, 0.16);
  --auth-radius: 15px;
}

html,
body.auth-body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body.auth-body {
  font-family: var(--auth-font);
  font-size: 14px;
  color: var(--auth-fg-1);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.auth-stage {
  min-height: 100vh;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 46px 20px 60px;
  background: radial-gradient(1200px 600px at 50% -10%, #0a5a93 0%, var(--lex-blue) 55%, var(--lex-dark-blue) 130%);
}

.auth-col {
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.auth-col .brand-logo {
  width: 92px;
  height: 92px;
  margin-bottom: 22px;
}

.auth-col .card {
  width: 100%;
  box-sizing: border-box;
  background: #fff;
  border-radius: var(--auth-radius);
  box-shadow: var(--auth-shadow-big);
  padding: 36px 34px 30px;
  text-align: left;
}

.auth-col .support-row {
  margin-top: 22px;
}

.support-row {
  text-align: center;
  font-size: 13.5px;
  color: #cfe2f1;
}

.support-row p {
  margin: 0 0 6px;
}

.support-row a {
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.support-row a:hover {
  text-decoration: underline;
  opacity: 1;
}

.support-row .support-help {
  font-size: 12.5px;
}
.support-row .support-help a {
  font-weight: 500;
  text-decoration: underline;
}

.auth-stage .card-head {
  margin-bottom: 22px;
}

.auth-stage .card-eyebrow {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lex-mid-blue);
  margin: 0 0 8px;
}

.auth-stage .card-title {
  font-size: 25px;
  font-weight: 700;
  color: var(--lex-blue);
  margin: 0 0 8px;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.auth-stage .card-desc {
  font-size: 14.5px;
  color: var(--auth-fg-2);
  margin: 0;
  line-height: 1.5;
}

/* fields */
.auth-stage .field {
  margin-bottom: 18px;
}

.auth-stage .field-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--lex-dark-blue);
  margin-bottom: 7px;
}

.auth-stage .field-hint {
  font-size: 12px;
  color: var(--auth-fg-2);
  margin: 5px 0 0;
  line-height: 1.45;
}

.auth-stage .input-wrap {
  position: relative;
}

.auth-stage .input {
  width: 100%;
  box-sizing: border-box;
  font-family: inherit;
  font-size: 15px;
  color: var(--auth-fg-1);
  background: #fff;
  border: 2px solid var(--auth-border-input);
  border-radius: 10px;
  padding: 12px 14px;
  transition:
    border-color 0.15s,
    box-shadow 0.15s,
    background 0.15s;
  outline: none;
}

.auth-stage .input::placeholder {
  color: #9bb4c8;
}
.auth-stage .input:hover {
  border-color: var(--lex-mid-light-blue);
}

.auth-stage .input:focus {
  border-color: var(--lex-mid-blue);
  box-shadow: 0 0 0 3px rgba(9, 110, 181, 0.16);
}

.auth-stage .input.has-icon {
  padding-left: 44px;
}

.auth-stage .input.has-trail {
  padding-right: 44px;
}

.auth-stage .input-trail {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  padding: 6px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--lex-mid-blue);
  cursor: pointer;
}

.auth-stage .input-trail:hover {
  background: rgba(9, 110, 181, 0.08);
}

.auth-stage .input-trail:focus-visible {
  outline: 2px solid var(--lex-mid-blue);
  outline-offset: 1px;
}

.auth-stage .input-ico {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--lex-mid-blue);
  pointer-events: none;
  display: flex;
}

/* error states — both server-rendered and unobtrusive-validation */
.auth-stage .field-err,
.auth-stage #date-error {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--auth-error);
  margin-top: 7px;
  font-weight: 500;
}

.auth-stage .field-err:empty,
.auth-stage #date-error:empty,
.auth-stage .field-validation-valid {
  display: none;
}

.auth-stage .input.input-validation-error {
  border-color: var(--auth-error);
  background: rgba(226, 30, 38, 0.04);
}

.auth-stage .input.input-validation-error:focus {
  box-shadow: 0 0 0 3px rgba(226, 30, 38, 0.16);
}

.auth-stage .validation-summary-errors {
  background: rgba(226, 30, 38, 0.06);
  border: 1px solid rgba(226, 30, 38, 0.25);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 18px;
  font-size: 13px;
  font-weight: 500;
}

.auth-stage .validation-summary-errors ul {
  margin: 0;
  padding-left: 18px;
}
.auth-stage .validation-summary-valid {
  display: none;
}

/* date of birth */
.auth-stage .dob-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr 1fr;
  gap: 10px;
}

.auth-stage .select-wrap {
  position: relative;
}

.auth-stage .dob-grid select {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  font-family: inherit;
  font-size: 15px;
  color: var(--auth-fg-1);
  background: #fff;
  border: 2px solid var(--auth-border-input);
  border-radius: 10px;
  padding: 12px 34px 12px 14px;
  cursor: pointer;
  outline: none;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}

.auth-stage .dob-grid select:hover {
  border-color: var(--lex-mid-light-blue);
}

.auth-stage .dob-grid select:focus {
  border-color: var(--lex-mid-blue);
  box-shadow: 0 0 0 3px rgba(9, 110, 181, 0.16);
}

.auth-stage .dob-grid select:has(option[hidden]:checked) {
  color: #9bb4c8;
}

.auth-stage .dob-grid select option {
  color: var(--auth-fg-1);
  background: #fff;
}

/* invalid selects carry LexhamUI's b--red; mirror .input.input-validation-error */
.auth-stage .dob-grid select.b--red {
  border-color: var(--auth-error);
  background: rgba(226, 30, 38, 0.04);
}

.auth-stage .dob-grid select.b--red:focus {
  box-shadow: 0 0 0 3px rgba(226, 30, 38, 0.16);
}

.auth-stage .select-wrap .chev {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--lex-dark-blue);
  pointer-events: none;
  display: flex;
}

/* password strength */
.auth-stage .strength {
  margin-top: 9px;
}
.auth-stage .strength.dn {
  display: none;
}
.auth-stage .strength-track {
  display: flex;
  gap: 5px;
}

.auth-stage .strength-seg {
  height: 5px;
  flex: 1;
  border-radius: 999px;
  background: #e3ebf3;
  transition: background 0.25s;
}

.auth-stage .strength-label {
  font-size: 12px;
  margin-top: 6px;
  font-weight: 600;
  color: var(--strength-color);
}

.auth-stage .strength[data-score="1"] {
  --strength-color: #e21e26;
}
.auth-stage .strength[data-score="2"] {
  --strength-color: #f6a01c;
}
.auth-stage .strength[data-score="3"] {
  --strength-color: #3aa6e0;
}
.auth-stage .strength[data-score="4"] {
  --strength-color: #09ab1f;
}
.auth-stage .strength[data-score="1"] .strength-seg:nth-child(-n + 1),
.auth-stage .strength[data-score="2"] .strength-seg:nth-child(-n + 2),
.auth-stage .strength[data-score="3"] .strength-seg:nth-child(-n + 3),
.auth-stage .strength[data-score="4"] .strength-seg:nth-child(-n + 4) {
  background: var(--strength-color);
}

/* password rules tooltip */
.auth-stage .field-label label {
  cursor: inherit;
}
.auth-stage .tooltip {
  position: relative;
  display: flex;
}

.auth-stage .pw-tip-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  padding: 0;
  background: none;
  color: var(--lex-mid-blue);
  cursor: pointer;
  border-radius: 50%;
}

.auth-stage .pw-tip-btn:hover {
  color: var(--lex-blue);
}
.auth-stage .pw-tip-btn:focus-visible {
  outline: 2px solid var(--lex-mid-blue);
  outline-offset: 2px;
}

.auth-stage .tooltip-text {
  display: block;
  visibility: hidden;
  opacity: 0;
  position: absolute;
  left: 50%;
  right: auto;
  top: calc(100% + 10px);
  bottom: auto;
  transform: translateX(-50%) translateY(-4px);
  width: 240px;
  max-width: calc(100vw - 40px);
  box-sizing: border-box;
  background: var(--lex-dark-blue);
  color: #fff;
  text-align: left;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
  border-radius: 10px;
  padding: 12px 14px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
  transition:
    opacity 0.15s,
    transform 0.15s,
    visibility 0.15s;
  z-index: 10;
  pointer-events: none;
}

.auth-stage .tooltip-text::after {
  content: none;
}

.auth-stage .tooltip-text::before {
  content: "";
  position: absolute;
  top: -5px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 10px;
  height: 10px;
  background: var(--lex-dark-blue);
  border-radius: 2px;
}

.auth-stage .tooltip:hover .tooltip-text,
.auth-stage .tooltip:focus-within .tooltip-text {
  visibility: visible;
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.auth-stage .tooltip-text strong {
  display: block;
  font-weight: 600;
  margin-bottom: 4px;
}
.auth-stage .tooltip-text ul {
  margin: 0;
  padding-left: 16px;
}
.auth-stage .tooltip-text li {
  margin: 2px 0;
}

.auth-stage .tooltip-text li.met {
  color: #7be08a;
  list-style: none;
  margin-left: -16px;
}

.auth-stage .tooltip-text li.met svg {
  vertical-align: -1px;
  margin-right: 4px;
}

/* OTP */
.auth-stage .otp {
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.auth-stage .otp input {
  width: 100%;
  aspect-ratio: 1 / 1;
  box-sizing: border-box;
  text-align: center;
  font-family: inherit;
  font-size: 26px;
  font-weight: 700;
  color: var(--lex-blue);
  border: 2px solid var(--auth-border-input);
  border-radius: 12px;
  background: #fff;
  outline: none;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
  min-width: 0;
}

.auth-stage .otp input:focus {
  border-color: var(--lex-mid-blue);
  box-shadow: 0 0 0 3px rgba(9, 110, 181, 0.16);
}

.auth-stage .otp input.filled {
  border-color: var(--lex-mid-blue);
  background: var(--alice-blue);
}

/* checkbox */
.auth-stage .check {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 13.5px;
  color: var(--auth-fg-1);
  user-select: none;
}

.auth-stage .check + .check {
  margin-top: 10px;
}
.auth-stage .check input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.auth-stage .check .box {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  flex: none;
  border: 2px solid var(--lex-mid-light-blue);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background 0.15s,
    border-color 0.15s;
}

.auth-stage .check input:checked + .box {
  background: var(--lex-mid-blue);
  border-color: var(--lex-mid-blue);
}

.auth-stage .check input:focus-visible + .box {
  box-shadow: 0 0 0 3px rgba(9, 110, 181, 0.2);
}
.auth-stage .check .box svg {
  opacity: 0;
  transform: scale(0.6);
  transition: 0.15s;
}
.auth-stage .check input:checked + .box svg {
  opacity: 1;
  transform: scale(1);
}

/* rows */
.auth-stage .row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 4px 0 20px;
}

.auth-stage .check-group {
  margin: 4px 0 18px;
}

/* buttons */
.auth-stage .btn-auth {
  width: 100%;
  box-sizing: border-box;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  border-radius: 11px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  transition:
    filter 0.15s,
    opacity 0.15s,
    transform 0.05s,
    box-shadow 0.15s;
}

.auth-stage .btn-auth:active {
  transform: translateY(1px);
}

.auth-stage .btn-auth-primary {
  background: var(--auth-grad-yellow);
  color: #1a1a1a;
  box-shadow: 0 6px 16px rgba(255, 207, 0, 0.35);
}

.auth-stage a.btn-auth-primary:hover,
.auth-stage .btn-auth-primary:hover {
  filter: brightness(1.04);
  opacity: 1;
}

.auth-stage .btn-auth-primary:disabled {
  background: #d9dde2;
  color: #fff;
  box-shadow: none;
  cursor: not-allowed;
}

.auth-stage .btn-auth-ghost {
  background: var(--lex-lightest-blue);
  color: var(--lex-dark-blue);
  box-shadow: none;
  margin-top: 10px;
}

.auth-stage .btn-auth-ghost:hover {
  background: var(--lex-light-blue);
  opacity: 1;
}
.auth-stage .btn-auth .chev {
  margin-left: 2px;
  display: flex;
}

/* links + secondary text */
.auth-stage .alt-line {
  text-align: center;
  font-size: 14px;
  color: var(--auth-fg-2);
  margin: 18px 0 0;
}

.auth-stage .link {
  color: var(--lex-mid-blue);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.auth-stage .link:hover {
  text-decoration: underline;
  opacity: 1;
}
.auth-stage .forgot-link {
  font-size: 13px;
}

/* reassurance */
.auth-stage .reassure {
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--alice-blue);
  border-radius: 10px;
  padding: 11px 13px;
  margin: 4px 0 16px;
  font-size: 12.5px;
  color: var(--auth-fg-2);
  line-height: 1.4;
}

.auth-stage .reassure .r-ico {
  color: var(--lex-mid-blue);
  flex: none;
  display: flex;
}

/* staff chip + notice banner (impersonation) */
.auth-stage .staff-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--lex-dark-blue);
  background: var(--lex-lightest-blue);
  border-radius: 999px;
  padding: 5px 12px 5px 10px;
  margin-bottom: 18px;
}

.auth-stage .notice {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  border-radius: 11px;
  padding: 13px 15px;
  margin: 0 0 18px;
  font-size: 13px;
  line-height: 1.5;
}

.auth-stage .notice-ico {
  flex: none;
  margin-top: 1px;
  display: flex;
}
.auth-stage .notice-body strong {
  font-weight: 700;
}

.auth-stage .notice-warn {
  background: #fff6e0;
  color: #7a5600;
  border: 1px solid #f3dca0;
}

.auth-stage .notice-warn .notice-ico {
  color: #b7791f;
}
.auth-stage .notice-warn .notice-body strong {
  color: #6b4b00;
}

/* Cloudflare Turnstile (real widget) slot */
.auth-stage .turnstile-wrap {
  margin: 0 0 16px;
}

/* success screens */
.auth-stage .screen-center {
  text-align: center;
}
.auth-stage .screen-center .card-desc {
  margin: 0 auto 24px;
  max-width: 34ch;
}

.auth-stage .success-icon {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: linear-gradient(180deg, #22d332, #0e7a2d);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 4px auto 22px;
  box-shadow: 0 10px 24px rgba(14, 122, 45, 0.32);
  animation: auth-pop 0.4s cubic-bezier(0.2, 1.3, 0.5, 1) both;
}

@keyframes auth-pop {
  from {
    transform: scale(0.4);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* error screen */
.auth-stage .error-icon {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: linear-gradient(180deg, #ff8a3d, #e2481b);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 4px auto 22px;
  box-shadow: 0 10px 24px rgba(226, 72, 27, 0.3);
  animation: auth-pop 0.4s cubic-bezier(0.2, 1.3, 0.5, 1) both;
}

.auth-stage .err-ref {
  margin-top: 18px;
  font-size: 12px;
  color: var(--auth-fg-2);
  line-height: 1.5;
  border-top: 1px solid #eef2f6;
  padding-top: 14px;
}

.auth-stage .err-ref span {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  color: var(--lex-dark-blue);
  font-weight: 600;
}

/* screen entry transition */
.auth-stage .screen {
  animation: auth-screen-in 0.32s ease;
}

@keyframes auth-screen-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* resend */
.auth-stage .resend {
  font-size: 13px;
  color: var(--auth-fg-2);
  text-align: center;
  margin: 16px 0 0;
}

.auth-stage .dn {
  display: none;
}

@media (max-width: 480px) {
  .auth-stage {
    padding: 30px 16px 60px;
  }
  .auth-col .card {
    padding: 28px 22px 26px;
  }
  .auth-stage .card-title {
    font-size: 22px;
  }
  .auth-stage .dob-grid {
    gap: 8px;
  }
  .auth-stage .otp {
    gap: 7px;
  }
}

/* ReciteMe consent popup (rendered by React before the third-party toolbar loads) */
.recite-preload-popup {
  position: fixed;
  top: 35%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 20px;
  z-index: 10000;
  max-width: 500px;
  min-width: 300px;
  font-family: "Varela Round", sans-serif;
  font-weight: 400;
  border-radius: 4px;
  background: conic-gradient(from 180deg at 100% 100%, #eaf4ff, #f4f9ff, white);
  box-shadow: 2px 4px 9.6px 0 rgba(0, 0, 0, 0.15);
}

.recite-preload-popup .recite-popup-topLogo {
  display: flex;
  justify-content: flex-end;
  margin: 20px 0;
}

.recite-preload-popup .recite-popup-topLogo .recite-popup-imageHolder {
  background-image: url(https://assets.lexhaminsurance.co.uk/images/reciteme/3.11.4/sprite@2x.png);
  background-origin: padding-box;
  background-position-x: -291px;
  background-position-y: -195px;
  background-repeat: no-repeat;
  background-size: 566px 554px;
  width: 125px;
  height: 40px;
}

.recite-preload-popup .recite-popup-mainContent {
  border-radius: 4px;
  background: var(--Colour-White, #fff);
  padding: 1em;
}
.recite-preload-popup .recite-popup-artsLogo {
  max-width: 150px;
  margin: 0 auto;
  display: block;
}
.recite-preload-popup h3 {
  color: var(--Primary-Colours-Navy, #06334a);
  text-align: center;
}
.recite-preload-popup .recite-popup-buttons {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
  text-align: center;
}
.recite-preload-popup .recite-popup-buttons button {
  padding: 10px 24px;
  font-size: 16px;
  border-radius: 4px;
  cursor: pointer;
}
.recite-preload-popup .recite-popup-cancelButton {
  background-color: #fff;
  color: #06334a;
  border: 2px solid #06334a;
}
.recite-preload-popup .recite-popup-proceedButton {
  background-color: #d63232;
  color: #fff;
  border: none;
}
