/* Rebranded Subscribers error page (ErrorPage/AppErrors.aspx). Loaded only when rebranding is active.
   Self-contained: values copied from change-password-rebrand.css because the shared rebrand tokens
   (--text-color-*, --spacing-*) aren't defined anywhere this page can load them. Light theme only. */
:root {
    /* Surfaces */
    --rebrand-page-bg: #FFFFFF;             /* white page (same value as --rebrand-card-bg) */

    /* Text */
    --rebrand-text-primary: #17201C;        /* near-black: headings, links, button bg */
    --rebrand-text-muted: #5E6F6B;          /* gray: body copy, footer */
    --rebrand-text-on-primary: #FFFFFF;     /* button text */

    /* Notices */
    --rebrand-error: #D61D36;               /* request-validation notice */

    /* Typography */
    --rebrand-font-family: 'Suisse Intl', Arial, sans-serif;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

body {
    background: var(--rebrand-page-bg);
    color: var(--rebrand-text-primary);
    font-family: var(--rebrand-font-family);
    -webkit-text-size-adjust: 100%;
}

.cv-error {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding: 44px 56px 36px; /* the right padding is the illustration's right margin */
}

.cv-error *,
.cv-error *::before,
.cv-error *::after {
    box-sizing: inherit;
}

.cv-error__content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.cv-error__title {
    margin: 0 0 8px;
    font-size: 30px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.01em;
    color: var(--rebrand-text-primary);
}

.cv-error__body {
    max-width: 52ch;
    margin: 0 0 16px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--rebrand-text-muted);
}

.cv-error__body a {
    color: var(--rebrand-text-primary);
    text-decoration: underline;
}

.cv-error__notice {
    max-width: 52ch;
    margin: 0 0 16px;
    padding: 8px 12px;
    border-left: 4px solid var(--rebrand-error);
    font-size: 14px;
    line-height: 1.5;
    color: var(--rebrand-error);
}

/* Debug output from ErrorLogic (non-production only); the <pre> carries an inline red color */
.cv-error pre {
    max-width: 100%;
    margin: 0 0 16px;
    overflow-x: auto;
    font-size: 12px;
    white-space: pre-wrap;
    word-break: break-word;
}

.cv-error__button {
    padding: 8px 12px;
    border: 0;
    border-radius: 4px;
    background: var(--rebrand-text-primary);
    color: var(--rebrand-text-on-primary);
    font-family: var(--rebrand-font-family);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
    cursor: pointer;
}

.cv-error__button:hover {
    background: #000000;
}

.cv-error__button:focus-visible,
.cv-error__body a:focus-visible {
    outline: 2px solid var(--rebrand-text-primary); /* 3:1+ focus contrast on white; the green accent is only 1.6:1 */
    outline-offset: 2px;
}

.cv-error__illustration {
    display: block;
    width: 100%; /* fills the content width (page width minus .cv-error's side padding), up to max-width */
    max-width: 528px; /* left-aligned: a block element with no auto margins sits at the left edge */
    height: auto;
    max-height: 50vh;
    /* When max-height applies, keep the drawing's proportions and left-align it with the text
       (by default an SVG image would be centered in its box). */
    object-fit: contain;
    object-position: left center;
    margin: 48px 0 0;
}

.cv-error__footer {
    margin-top: 16px; /* sits directly beneath the illustration */
    font-size: 11px;
    line-height: 1.5;
    color: var(--rebrand-text-muted);
    font-variant-numeric: tabular-nums;
}

.cv-error__footer dl,
.cv-error__footer dd {
    margin: 0;
}

.cv-error__footer dt,
.cv-error__footer dd {
    display: inline;
    font-weight: normal;
}

.cv-error__footer dd {
    word-break: break-all;
}

/* Compact */
@media (max-width: 600px) {
    .cv-error {
        padding: 28px 16px 24px;
    }

    .cv-error__title {
        font-size: 20px;
    }

    .cv-error__illustration {
        margin-top: 32px;
    }
}
