@import url('https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,100..1000&display=swap');
/* Poppins: the .brand-word lockup text only — everything else stays on DM Sans above. */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300&display=swap');

/* Shared values come from ClarkConnect.Styles' cc-tokens.css (linked first by _Layout.cshtml).
   The --idp- block below holds only what the shared contract has no token for; a new page-local
   value goes there, never as a literal in a rule. */

:root {
    /* The full-bleed pages' headline — a raw size in Figma. */
    --idp-font-size-page-title: 64px;
    /* Default document text colour. */
    --idp-color-text-body: #1a1a1a;
    /* Card header/footer rule (raw in Figma). */
    --idp-color-border-divider: #edf2f3;
    /* Neutral status banner (MFA resend outcome). */
    --idp-color-info-bg: #eff6ff;
    --idp-color-info-border: #bfdbfe;

    /* Notification screen margin: Figma's 400px frame less the 376px panel. */
    --idp-toast-offset: 24px;

    /* The shell paints the brand stops onto a much taller half-ellipse than the flat Figma rect,
       so the angle/offsets are re-tuned for that geometry; keep in step if the stops move. */
    --idp-brand-gradient-ellipse: linear-gradient(42deg,
    var(--brandGradientStop1) 10.5%,
    var(--brandGradientStop2) 29.15%,
    var(--brandGradientStop3) 47.76%,
    var(--brandGradientStop4) 76.12%);
    /* The full-bleed pages carry the ramp across the whole 1440x900 frame, so Figma gives them their own angle. */
    --idp-brand-gradient-page: linear-gradient(30.96deg,
    var(--brandGradientStop1) 3.9654%,
    var(--brandGradientStop2) 23.146%,
    var(--brandGradientStop3) 50.205%,
    var(--brandGradientStop4) 91.451%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: var(--colorBgShell);
    font-family: var(--fontFamily);
    font-variation-settings: var(--fontVariationSettings);
    color: var(--idp-color-text-body);
}

/* ========== Utilities ========== */

/* Clip technique, not display:none — the text must stay in the accessibility
   tree so per-rule state announcements reach screen readers. */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ========== Split Layout ========== */

/* The document itself scrolls, never an inner panel: content taller than the viewport
   (e.g. the create-password form at 200% zoom) has to reach the wheel, the scrollbar and
   the browser's own page scrolling, which an inner scroll container did not reliably get. */
.login-page {
    position: relative;
    width: 100%;
    min-height: 100vh;
    background: var(--colorBgShell);
}

.gradient-graphic {
    /* Fixed so the brand half stays put while the form half scrolls. */
    position: fixed;
    left: 0;
    top: 0;
    width: 50%;
    height: 100vh;
    overflow: hidden;
    background: var(--colorBgShell);
}

.gradient-ellipse {
    position: absolute;
    width: calc(100% + 70px);
    height: 175vh;
    top: 50%;
    left: -100px;
    transform: translateY(-50%);
    border-radius: 0 50% 50% 0;
    background: var(--idp-brand-gradient-ellipse);
}

/* Vertical centering comes from the card's auto margins, not justify-content:
   center — centered flex content taller than its box overflows at the top, out of
   reach, while auto margins collapse to 0 and let the page grow. Normal flow (not
   absolute) so a tall card lengthens the document instead of clipping. */
.right-panel {
    position: relative;
    margin-left: 50%;
    width: 50%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px;
}

/* ========== Logo ========== */

/* The brand lockup is the page <h1> ("Clark" from the mark's aria-label +
   the live brand word). Explicit font sizing because an h1's UA defaults must
   not reach the mark or the word. */
.logo-lockup {
    position: absolute;
    top: 50%;
    left: 45%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    z-index: 1;
    font-size: var(--fontSize);
    font-weight: var(--fontWeightRegular);
}

.logo-lockup .logo {
    height: 60px;
    width: auto;
}

/* Swappable brand word (e.g. the vendor name) rendered in Poppins beside the
   "Clark <" vector mark — see _Layout.cshtml. Sized to roughly match the cap
   height of the original "Connect" glyphs. */
.logo-lockup .brand-word {
    margin-left: var(--spacingXS);
    color: var(--colorWhite);
    font-family: 'Poppins', -apple-system, system-ui, sans-serif;
    font-size: 34px;
    font-weight: 300;
    line-height: 1;
    letter-spacing: -0.02em;
    white-space: nowrap;
    /* Cap centres line up: the mark's capitals sit 2/60 of its height above its box centre, less the Poppins cap rise at line-height 1 (measured).
       top, not transform: login.js animates this element's transform. */
    position: relative;
    top: -1.8px;
}

/* ========== Login Card ========== */

.login-card {
    width: 100%;
    max-width: 440px;
    margin: auto 0;
    background: var(--colorWhite);
    border-radius: var(--borderRadiusLG);
    padding: 0;
    box-shadow: var(--shadowCard);
    overflow: hidden;
}

/* Bordered title band — 60px tall, the card's own header row. Pages that have
   not yet moved to the band keep the bare .login-card h1 rules below. */
.login-card .card-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacingXS);
    padding: var(--spacingMD) var(--spacingLG);
    border-bottom: 1px solid var(--idp-color-border-divider);
}

/* A two-line band (title + subtitle) sets its own tighter gap: the design draws 4px
   between the two lines, against the 8px a single-title band is built on. Keyed off the
   subtitle's presence so nothing has to remember to add a modifier. */
.login-card .card-header:has(.card-subtitle) {
    gap: var(--spacingXXS);
}

.login-card .card-header h2 {
    text-align: center;
    white-space: nowrap;
}

/* Optional second line in the band (only the invite flavor of ResetPassword has one).
   SemiBold at body size is deliberate — it's what the design draws. */
.login-card .card-header .card-subtitle {
    margin: 0;
    padding: 0;
    text-align: center;
    font-size: var(--fontSize);
    line-height: var(--lineHeight);
    font-weight: var(--fontWeightStrong);
    color: var(--colorText);
}

.login-card h1 {
    text-align: center;
    font-size: var(--fontSizeHeading4);
    font-weight: var(--fontWeightStrong);
    color: var(--colorText);
    margin: 0;
    padding: var(--spacingMD) var(--spacingLG);
}

.login-card hr {
    border: none;
    border-top: 1px solid var(--idp-color-border-divider);
    margin: 0;
}

.login-card p {
    font-size: var(--fontSize);
    line-height: var(--lineHeight);
    color: var(--colorTextDescription);
    padding: 0 var(--spacingLG);
    margin: var(--spacingMD) 0;
    text-align: center;
}

/* ========== Legal footer ========== */
/* The card's closing band (_LegalFooter): mirrors the header band's rule and padding, so the
   card needs no extra bottom spacing when it is the last child. */
.legal-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--spacingXS);
    padding: var(--spacingMD) var(--spacingLG);
    border-top: 1px solid var(--idp-color-border-divider);
    font-size: var(--fontSizeSM);
    line-height: var(--lineHeightSM);
}

.legal-footer a {
    display: inline-flex;
    align-items: center;
    gap: var(--spacingXXS);
    color: var(--colorTextDescription);
    text-decoration: underline;
    border-radius: 2px;
    transition: color 0.15s ease;

    /* Figma 4458:112218: #595959 at rest, #262626 on hover. */
    &:hover,
    &:focus-visible {
        color: var(--colorText);
    }

    &:focus-visible {
        outline: 3px solid var(--colorLinkActive);
        outline-offset: 2px;
    }
}

/* ========== Form ========== */

.login-form {
    display: flex;
    flex-direction: column;
    gap: var(--spacingLG);
    padding: var(--spacingLG);
}

/* ========== Fields ========== */

.field {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.field label {
    margin-bottom: var(--spacingXS);
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input {
    width: 100%;
}

/* ========== Trailing in-field icons ========== */

/* Reserved right padding so a value never runs under the trailing icons:
   one icon (eye OR error) = 12 + 16 + 8, both = a further 16 + 8. */
.input-wrapper:has(.input-error-icon) .input,
.input-wrapper:has(.password-toggle-btn) .input {
    padding-right: 36px;
}

.input-wrapper:has(.input-error-icon):has(.password-toggle-btn) .input {
    padding-right: 60px;
}

/* CloseCircleFilled shown inside an errored input. Decorative — the message is
   carried by the field caption or the alert, never by the glyph. */
.input-error-icon {
    display: none;
    position: absolute;
    right: var(--spacingSM);
    top: 50%;
    transform: translateY(-50%);
    color: var(--colorDanger);
    line-height: 0;
    pointer-events: none;
}

/* Sits before the eye (design order: value, CloseCircleFilled, eye). */
.input-wrapper:has(.password-toggle-btn) .input-error-icon {
    right: 36px;
}

/* Live success tick on both password fields (they match and meet the policy) — positive
   feedback, so it appears while typing rather than on submit. Shares the error icon's
   slot: the two states are mutually exclusive and the error wins (see below). */
.input-match-icon {
    display: none;
    position: absolute;
    right: var(--spacingSM);
    top: 50%;
    transform: translateY(-50%);
    color: var(--colorSuccess);
    line-height: 0;
    pointer-events: none;
}

.input-wrapper:has(.password-toggle-btn) .input-match-icon {
    right: 36px;
}

.input-wrapper.matched .input-match-icon {
    display: block;
}

.input-wrapper:has(.input[aria-invalid="true"]) .input-match-icon {
    display: none;
}

/* Two independent error looks, deliberately kept separate:
   - aria-invalid marks a FIELD-level failure (server tag helper or
     field-validation.js) and comes with an inline caption;
   - data-credentials-rejected marks the generic auth failure, where the design
     reddens BOTH inputs but attributes the error to neither (the alert carries
     the message). No aria-invalid there — it would tell assistive tech which
     field was wrong, which is exactly what the design forbids. */
.input[aria-invalid="true"],
form[data-credentials-rejected="true"] .input {
    border-color: var(--colorDanger);
}

/* Figma's Error status swaps the Pressed ring to the danger one too. */
.input[aria-invalid="true"]:focus,
form[data-credentials-rejected="true"] .input:focus {
    box-shadow: var(--shadowFocusDanger);
}

.input[aria-invalid="true"] ~ .input-error-icon,
form[data-credentials-rejected="true"] .input-error-icon {
    display: block;
}

/* ========== Password requirements ========== */
/* A hint checklist, not a strength meter. Every row — including the h3 — is body
   type: the heading is semantically a heading (A11Y-4) and visually just another
   line, which is what the design draws. */

.password-requirements {
    font-family: var(--fontFamily);
    font-size: var(--fontSize);
    line-height: var(--lineHeight);
    color: var(--colorText);
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.password-requirements h3 {
    margin: 0;
    padding: 0;
    font-size: var(--fontSize);
    line-height: var(--lineHeight);
    font-weight: var(--fontWeightRegular);
    color: var(--colorText);
}

.password-requirements ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* The four category rows sit indented under their group row. */
.password-requirements ul ul {
    padding-left: var(--spacingMD);
    margin-top: 2px;
}

.password-requirements li {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    margin: 0;
}

/* The nested list is a sibling of the group row's marker and text, so it has to
   claim a full row of its own rather than sitting beside them. */
.password-requirements li > ul {
    flex: 0 0 100%;
}

/* Fixed leading slot so every row's text starts on the same column whichever
   marker is showing. */
.password-requirements .rule-marker {
    flex: 0 0 21px;
    height: var(--lineHeight);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

.password-requirements .rule-text {
    flex: 1 1 auto;
}

/* Marker states. Unevaluated and not-yet-met are the same bullet; the two icon
   variants are display:none until their state applies, which also keeps their
   labels ("requirement met" / "requirement not met") out of the accessibility
   tree until they're true. */
.password-requirements .rule-met,
.password-requirements .rule-failed {
    display: none;
}

.password-requirements .rule-marker::before {
    content: '\2022';
    /* Empty alt text: generated content is otherwise read out, and a neutral row must expose
       no marker at all. The line above is the fallback for engines without the syntax. */
    content: '\2022' / '';
    color: var(--colorText);
    font-weight: 700;
    line-height: var(--lineHeight);
}

.password-requirements li.met > .rule-marker::before {
    content: none;
}

.password-requirements li.met > .rule-marker > .rule-met {
    display: block;
    color: var(--colorSuccess);
}

/* Negative feedback is raised by the submit attempt (the server re-render sets
   data-attempted="true"; reset-password.js sets it on submit), and only ever on the
   two TOP-LEVEL rows — the child selector is what keeps the four category rows out
   of it, since the design never reddens them. */
form[data-attempted="true"] .password-requirements > ul > li:not(.met) > .rule-marker::before {
    content: none;
}

form[data-attempted="true"] .password-requirements > ul > li:not(.met) > .rule-marker > .rule-failed {
    display: block;
    color: var(--colorDanger);
}

/* ========== Password set/reset success ========== */
/* Card-less by design: a bare Result block centred in the right half, with the
   gradient logo half still on the left via _Layout. Auto margins (not
   justify-content) for the same reason .login-card uses them — see .right-panel. */
.password-success {
    width: 100%;
    max-width: 720px;
    margin: auto 0;
    padding: var(--spacingLG);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacingMD);
}

.password-success-icon {
    display: block;
}

.password-success-message {
    font-size: var(--fontSizeLG);
    font-weight: var(--fontWeightStrong);
    line-height: var(--lineHeightLG);
    color: var(--colorText);
    margin: 0;
    padding: 0;
    text-align: center;
}

/* ========== Password show/hide toggle ========== */

.password-toggle-btn {
    position: absolute;
    right: var(--spacingXS);
    top: 50%;
    transform: translateY(-50%);
    height: auto;
    background: none;
    border: 0;
    padding: var(--spacingXXS);
    cursor: pointer;
    color: var(--colorTextPlaceholder);
    line-height: 0;
    border-radius: var(--borderRadiusSM);
}

/* Figma's suffix icons darken on hover with no wash; background: none holds off the base button hover fill. */
.password-toggle-btn:hover {
    color: var(--colorText);
    background: none;
}

.password-toggle-btn:focus-visible {
    outline: 3px solid var(--colorLinkActive);
    outline-offset: 2px;
}

.password-toggle-btn .eye-off-icon {
    display: none;
}

.password-toggle-btn.show-password .eye-icon {
    display: none;
}

.password-toggle-btn.show-password .eye-off-icon {
    display: inline-block;
}

/* ========== Validation messages ========== */

.field-validation-error {
    color: var(--colorDanger);
    font-size: var(--fontSize);
    line-height: var(--lineHeight);
    margin-top: var(--spacingXXS);
}

/* Overlay captions (opt-in per field). The design's card height is identical
   between the valid and the required-error state, so the caption must not be
   flow content: it renders into the 24px gap below the field instead of
   growing it. 62px = label row (22 + 8) + input (32). */
.field-overlay-error {
    position: relative;
}

.field-overlay-error .field-validation-error {
    position: absolute;
    left: 0;
    right: 0;
    top: 62px;
    margin-top: 0;
    padding-top: 2px;
}

/* ResetPassword page ONLY (both the invite and self-service reset flavors share
   this markup) — Figma reserves 80px for these two field blocks in EVERY
   state (62px label+input content + 18px slack), so the card's total height
   (538px) must stay state-invariant whether or not a caption is showing. This
   is the opposite of Login's fields, which intentionally keep the 62px
   content height above and overlay a caption into the .login-form gap instead
   — do not add this class there. min-height, not height, so the block can
   still grow if a caption or the input wraps at extreme zoom. */
.field-reserve-slack {
    min-height: 80px;
}

/* The invalid-credentials banner. Figma "Alert" component: no dismiss button,
   a leading CloseCircleFilled, and — on the login card — placed below the
   password field and above the Login button (see Login.cshtml). The icon is a
   CSS background so the tag-helper-generated markup stays untouched. */
.validation-summary-errors {
    display: flex;
    align-items: center;
    gap: var(--spacingXS);
    background: var(--colorDangerBg);
    border: 1px solid var(--colorDangerBorder);
    border-radius: var(--borderRadius);
    /* Figma draws the 1px stroke INSIDE the 392px frame without consuming
       layout, so its 12px padding is measured from the frame edge and the
       message gets the full 344px. A CSS border sits inside the same box but
       also eats 2px of content width — enough to wrap the designed one-line
       message (it needs 342.7px). Subtracting the border from the horizontal
       padding restores the design's content box exactly. */
    padding: var(--spacingXS) calc(var(--spacingSM) - 1px);
    color: var(--colorText);
    font-size: var(--fontSize);
    line-height: var(--lineHeight);
}

/* Focused by script so the error is announced; the browser's default ring on a
   non-interactive, tabindex=-1 container is the dark outline Figma doesn't draw. */
.validation-summary-errors:focus {
    outline: none;
}

.validation-summary-errors::before {
    content: '';
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    margin: 3px 0;
    background-repeat: no-repeat;
    background-size: 16px 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='8' fill='%23ea0b16'/%3E%3Cpath d='M5.4 5.4 L10.6 10.6 M10.6 5.4 L5.4 10.6' stroke='%23ffffff' stroke-width='1.4' stroke-linecap='round'/%3E%3C/svg%3E");
}

.validation-summary-errors ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.validation-summary-errors li {
    margin: 0;
}

/* Neutral/info counterpart to the error summary — non-error outcomes (MFA
   resend confirmation, cooldown notices) render here as an <output>, whose
   implicit status role means they're never announced as failures. <output>
   is inline by default, so it needs an explicit block display to keep the
   card layout it had as a <div>. */
.form-status {
    display: block;
    background: var(--idp-color-info-bg);
    border: 1px solid var(--idp-color-info-border);
    border-radius: var(--borderRadiusLG);
    padding: var(--spacingXS) var(--spacingSM);
    color: var(--idp-color-text-body);
    font-size: var(--fontSize);
}

/* ========== Buttons ========== */

.form-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacingMD);
}

/* Actions on a card with no form under them (the "Check your email" confirmations)
   supply the padding the .login-form would otherwise have carried. */
.form-actions-footer {
    padding: 0 var(--spacingLG) var(--spacingLG);
}

/* Same shape as .form-actions-footer but with less bottom padding — for a
   footer row that isn't the last one in the card (MfaChallenge's resend link
   sits between the form above and the "wrong account" link below). */
.form-actions-footer-tight {
    padding: 0 var(--spacingLG) var(--spacingMD);
}

/* ========== Modal ========== */
/* cc-base's dialog.modal draws the dialog, its <header>/body/<footer> parts and the ::backdrop.
   A UA that doesn't implement <dialog> treats it as an unknown inline element and would render
   the whole modal into the page; the link is only upgraded to the dialog trigger when showModal()
   exists (reset-password-modal.js), so in that case the modal must simply not be there. */
dialog:not([open]) {
    display: none;
}

/* cc-base pins the modal 100px down and caps it to what is left, which on a short viewport at
   high zoom leaves almost no room; there the offset collapses and the whole dialog scrolls. */
@media (max-height: 500px) {
    dialog.modal {
        margin: var(--spacingXS) auto auto;
        max-height: calc(100vh - 2 * var(--spacingXS));
        overflow: auto;
    }

    dialog.modal > :not(header, footer, form),
    dialog.modal > form > :not(header, footer) {
        flex: none;
        overflow: visible;
    }
}

.reset-password-modal-body {
    display: flex;
    flex-direction: column;
    gap: var(--spacingMD);
}

/* Google permits hiding the floating badge only when _RecaptchaNotice's attribution is shown. */
.grecaptcha-badge {
    visibility: hidden;
}

/* _RecaptchaNotice: left-aligned small print under the form's fields. The .login-card prefix
   outranks `.login-card p` (centred, padded) for the standalone page, where the card's own form
   already supplies the padding. */
.recaptcha-notice,
.login-card .recaptcha-notice {
    margin: 0;
    padding: 0;
    text-align: left;
    font-size: var(--fontSizeSM);
    line-height: var(--lineHeightSM);
    color: var(--colorTextDescription);

    & a {
        color: var(--colorLink);
        text-decoration: underline;
        border-radius: 2px;

        &:focus-visible {
            outline: 3px solid var(--colorLinkActive);
            outline-offset: 2px;
        }
    }
}

/* ========== Toast ========== */
/* The panel is cc-base's .notification; this is placement only. The region is rendered on every
   load and stays in the DOM whether or not it holds a message: a live (alert) container has to exist
   BEFORE its content arrives for the announcement to be made — and has to be EMPTY then, or the
   content is taken for the region's initial state and announced to nobody. So the server renders
   the toast in .toast-staging instead and reset-password-modal.js moves it across after load. The
   two boxes occupy exactly the same place, so the move is invisible; without the script the toast
   simply stays staged — visible, just not announced. */

.toast-region,
.toast-staging {
    position: fixed;
    top: var(--idp-toast-offset);
    right: var(--idp-toast-offset);
    max-width: calc(100vw - 2 * var(--idp-toast-offset));
    z-index: 100;
}

/* ========== Terms of Use modal ========== */
/* The dialog is position:fixed and can be shorter than the login-card behind it, so without this
   the body would still scroll — moving the inert card while the fixed dialog stayed put. Matches
   regardless of the no-JS open attribute or showModal(), which also reflects it. */
body:has(#terms-modal[open]) {
    overflow: hidden;
}

/* /Account/AcceptTerms. The dialog is server-rendered open (non-modal) so the page works without
   JavaScript; this overlay dims the page in that case, and accept-terms.js removes it once the
   dialog is re-opened modally with its own ::backdrop. */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: var(--colorBgMask);
}

/* Fixed + inset keeps the non-modal fallback where the modal rendering puts it. */
.terms-modal {
    position: fixed;
    inset: 0;
    z-index: 101;
    height: fit-content;
}

/* The card behind the modal is inert context drawn as the card just submitted, so its disabled
   controls keep their rest look rather than cc-base's Disabled state. */
.login-card[inert] .input:disabled {
    background: var(--colorFill);
}

.login-card[inert] .primary:disabled {
    background: var(--colorPrimary);
    border-color: var(--colorPrimary);
    color: var(--colorTextLight);
}

.terms-modal-body p {
    color: var(--colorTextDescription);
}

.terms-modal-stop {
    color: var(--colorText);
}

/* The Privacy Policy link's External Link glyph (Terms of Use has none, so this only ever
   renders one child); inline-flex keeps text and icon on one baseline without disturbing the
   sentence's normal word-wrap. */
.terms-modal-body a.underline {
    display: inline-flex;
    align-items: center;
    gap: var(--spacingXXS);
}

/* A second body section under its own divider. One 8px gap whether or not the error line is
   present, so the section only grows by the line. */
.terms-modal-agree {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--spacingXS);
    border-top: 1px solid var(--colorBorder);
}

/* Figma 4458:112252/4261:248200/4458:112368 draw the checkbox choice row as its own bordered,
   tinted box rather than cc-base's bare label — Default/Checked/Error read as three fills, not
   just the glyph. :has() picks the state off the checkbox itself so no extra markup or JS is
   needed to swap classes. */
.terms-modal-agree label {
    box-sizing: border-box;
    width: 100%;
    gap: 10px;
    padding: 9px 17px;
    border: 1px solid var(--colorBorder);
    border-radius: var(--borderRadius);
    background: var(--colorBgContainer);
}

.terms-modal-agree label:has(.terms-checkbox:checked) {
    background: var(--colorPrimaryBg);
    border-color: var(--colorPrimaryBorder);
}

.terms-modal-agree label:has(.terms-checkbox[aria-invalid="true"]) {
    background: var(--colorDangerBg);
    border-color: var(--colorDangerBorder);
}

/* Figma draws no focus band on this tinted row; focus shows as the box's own hover/focus look. */
.terms-modal-agree label:has(.terms-checkbox:focus-visible) {
    outline: none;
}

/* cc-base draws the box; it has no invalid state for a checkbox. */
.terms-checkbox[aria-invalid="true"] {
    border-color: var(--colorDanger);
}

.terms-agree-error {
    font-size: var(--fontSize);
    line-height: var(--lineHeight);
    color: var(--colorDanger);

    &:empty {
        display: none;
    }
}

.terms-modal-agree .validation-summary-errors {
    align-self: stretch;
}

/* ========== Full-bleed pages ========== */
/* The card-less outcome screens (reset link expired, reset email sent): the brand
   gradient across the whole viewport, a keyhole watermark behind the message, and a
   centred headline / sub-line / actions column. Selected by ViewData["FullBleed"] in
   _Layout, which swaps the split shell for this one. */

.fullbleed-page {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: var(--idp-brand-gradient-page);
}

/* Sized against the smaller viewport axis so it never forces a scrollbar — which is
   also why the page itself doesn't need to clip. */
.fullbleed-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(630px, 90vmin);
    height: auto;
    pointer-events: none;
}

/* Same lockup markup as the split shell, but laid out in the content flow and at the
   design's 190x40 rather than the panel's 60px-tall mark. */
.fullbleed-page .logo-lockup {
    position: static;
    transform: none;
}

.fullbleed-page .logo-lockup .logo {
    height: 40px;
}

.fullbleed-page .logo-lockup .brand-word {
    margin-left: 6px;
    font-size: 23px;
    top: -1.2px;
}

.fullbleed-main {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* clamp() is what keeps the 64px headline off the edges at phone widths — see
   responsive.css for the rest. opsz is already pinned on body (tokens.css) and
   inherits — no need to re-set it here. */
.fullbleed-heading {
    margin: var(--spacingXS) 0 0;
    font-size: clamp(32px, 7vw, var(--idp-font-size-page-title));
    font-weight: var(--fontWeightStrong);
    line-height: normal;
    color: var(--colorTextLight);
    text-wrap: balance;
}

.fullbleed-sub {
    margin: var(--spacingXS) 0 0;
    font-size: var(--fontSizeHeading4);
    font-weight: var(--fontWeightLight);
    line-height: normal;
    color: var(--colorTextLight);
}

/* 32px below the sub-line, 16px between the two actions — neither has a Figma variable. */
.fullbleed-actions {
    margin-top: 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacingMD);
}

.fullbleed-back {
    display: inline-flex;
    align-items: center;
    gap: var(--spacingXS);
    color: var(--colorTextLight);
    font-size: var(--fontSize);
    line-height: var(--lineHeight);
    font-weight: var(--fontWeightRegular);
    text-decoration: none;
    border-radius: 2px;
}

/* Underlined always (Figma), but only the text — the icon is a separate span so the
   line doesn't also draw under the svg. */
.fullbleed-back-text {
    text-decoration: underline;
}

.fullbleed-back:hover .fullbleed-back-text {
    text-decoration-thickness: 2px;
}

/* The Focus Highlight blue vanishes against this gradient, so the text-only back link draws a
   white ring with an offset gap instead (the pill's own highlight sits on its white fill). */
.fullbleed-back:focus-visible {
    outline: 2px solid var(--colorTextLight);
    outline-offset: 2px;
}

/* The dialog renders inside the centred message column but is not part of it: without
   this its title and field label inherit that centring and it stops matching the same
   modal on the login card. */
.fullbleed-main .modal {
    text-align: left;
}
