/* ==========================================================================
   Error Pages — shared chrome for 404.aspx and Error.aspx.

   Loaded alongside tokens.css / MainWhiteout.css for portals 0/1/2 (see
   Default.master.cs), so token references below resolve on both legacy and
   refreshed page loads.
   ========================================================================== */

.error-page {
    max-width: 640px;
    margin: 32px auto;
    padding: 0 24px;
    text-align: center;
}

.error-page-centered {
    min-height: calc(50vh);
    display: flex;
    align-items: center;
    justify-content: center;
    padding-bottom: 160px;
    box-sizing: border-box;
    max-width: none;
    margin: 0;
    isolation: isolate;
}

.error-page-centered .error-page-inner {
    max-width: 640px;
    padding: 0 24px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.error-page-title {
    font-size: 28px;
    font-weight: bold;
    color: var(--brand-accent);
    margin: 0 0 28px 0;
}

.error-page-copy {
    color: var(--text-primary);
    line-height: 1.6;
    margin: 0 auto 32px auto;
    max-width: 43ch;
    text-align: left;
    font-size: var(--font-size-sm);
}

.error-page-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

/* Unify button chrome across the two cascades so the error pages render the
   same regardless of auth state / EnableRefreshedFrontend. Selective !important
   is needed because MainWhiteout.css legacy rules use !important on
   background-color, color, padding, font-weight, background-image, and
   text-decoration — properties without an !important in legacy don't need one
   here. Specificity (0,3,0) beats the legacy (0,2,1), and !important lifts the
   rule above the refresh (0,3,2) cascade. */
.error-page .error-page-actions .LinkButton {
    background-color: var(--button-primary-bg) !important;
    background-image: none !important;
    color: var(--button-primary-text) !important;
    border: 1px solid var(--button-primary-bg);
    border-radius: 6px;
    padding: 6px 16px !important;
    font-family: var(--raw-font-family-modern);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium) !important;
    text-decoration: none !important;
}

.error-page .error-page-actions .LinkButton.Secondary {
    background-color: var(--surface-secondary) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--raw-slate-200);
}

.error-page-legal {
    margin-top: 48px;
    font-size: 12px;
    text-align: center;
    color: var(--text-muted);
}