@import url('typography.css');

/* ============================================================
   Design Tokens (system - not tenant configurable)
   ============================================================ */
:root {
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 10px;

    --shadow-1: 0 1px 2px rgba(0, 0, 0, .06), 0 1px 1px rgba(0, 0, 0, .04);
    --shadow-2: 0 8px 24px -8px rgba(0, 0, 0, .18), 0 2px 6px -2px rgba(0, 0, 0, .08);

    --success: #2f7d55;
    --success-bg: #e6f2ea;
    --warning: #966212;
    --warning-bg: #faf1de;
    --danger: #a83c3c;
    --danger-bg: #f7e9e8;

    --space-1: 4px;
    --space-2: 8px;
    --space-3: 16px;
    --space-4: 24px;
    --space-5: 40px;

    --field-border: #868e96;
    --focus-ring: 0 0 0 .1rem white, 0 0 0 .25rem #258cfb;

    /* Shared breakpoint reference (see media queries below and in *.razor.css) */
    --bp-sm: 480px;
    --bp-md: 768px;
    --bp-lg: 1024px;

    /* Shared gradient recipe built from the 2 tenant brand color variables */
    --gradient-brand: linear-gradient(135deg, var(--primaryColor, var(--bs-primary, #5C88DA)), var(--accentColor, var(--bs-secondary, #003366)));
    --gradient-background: linear-gradient(180deg,var(--primaryColor, var(--bs-primary, #5C88DA)) 0%, var(--accentColor, var(--bs-secondary, #003366)) 25%, rgba(255, 255, 255, 1) 50%);
}

/* ============================================================
   Telerik theme variables — tied to tenant branding tokens
   (--primaryColor/--accentColor come from /api/CustomerPortal/styles/head.css,
   see Source/Core/BoundedContexts/.../CustomerPortal/Resources/style.css.txt)
   ============================================================ */
:root {
    --kendo-border-radius: var(--radius-sm);
    --kendo-is-dark-theme: false;
    --kendo-color-primary: var(--primaryColor, var(--bs-primary, #5C88DA));
    --kendo-color-secondary: var(--accentColor, var(--bs-secondary, #003366));
    --kendo-color-info: #3e80ed;
    --kendo-color-success: var(--success);
    --kendo-color-warning: var(--warning);
    --kendo-color-error: var(--danger);
    --kendo-body-bg: #ffffff;
    --kendo-body-text: #424242;
    --kendo-heading-text: #272727;
    --kendo-subtle-text: #666666;
    --kendo-disabled-text: #8f8f8f;
    --kendo-base-bg: #fafafa;
    --kendo-hover-bg: #afafaf;
    --kendo-selected-bg: #efefef;
    --kendo-selected-text: #4c4c4c;
    --kendo-button-bg: #f5f5f5;
    --kendo-button-text: #424242;
    --kendo-link-hover-text: #efefef;
    --kendo-series-a: #4a83c0;
    --kendo-series-b: #a8bf89;
    --kendo-series-c: #e22b02;
    --kendo-series-d: #28b4c8;
    --kendo-series-e: #2d73f5;
    --kendo-series-f: #aa46be;
}

/* ============================================================
   Base / Reset
   ============================================================ */
html, body {
    font-family: var(--font-body);
}

h1:focus {
    outline: none;
}

h4 a {
    text-decoration: none;
    color: black;
}

a, .btn-link {
    color: #0071c1;
}

/* ============================================================
   Layout
   ============================================================ */
.page-background {
    position: relative;
    isolation: isolate;
    width: 100%;
    min-height: 100vh;
    background-color: #f4f6fa;
}

.page-background::before {
    content: "";
    position: fixed;
    top: 0;
    left: -25%;
    width: 150%;
    height: clamp(180px, 30vh, 380px);
    background: linear-gradient(to right,
        var(--primaryColor, var(--bs-primary, #5C88DA)),
        var(--accentColor, var(--bs-secondary, #003366)));
    /* Opposing corner radii sum past 100% on the bottom edge, so the browser scales
       them into one shallow dome rather than two rounded corners. */
    border-radius: 0 0 50% 50% / 0 0 100% 100%;
    opacity: 0.5;
    z-index: -1;
    pointer-events: none;
}

/* Loading shell from App.razor. Shown only where :has() can hide it again; Bootstrap isn't loaded yet. */
.app-shell {
    display: none;
}

@supports selector(body:has(> div)) {
    .app-shell {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    body:has(> .page-background:not(.app-shell)) > .app-shell {
        display: none;
    }
}

.app-shell-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.app-shell-logo {
    height: 4rem !important;
    margin: 0 !important;
}

.app-shell-spinner {
    width: 5rem;
    height: 5rem;
    filter: drop-shadow(2px 2px 5px #222222);
}

.app-shell-text {
    margin: 0;
    font-size: 1rem;
}

.container {
    width: calc(100% - 2rem);
    max-width: 832px;
    margin: 0 auto;
    padding: 1rem 0;
}

.content {
    padding-top: 1.1rem;
}

.k-drawer-container {
    position: relative;
    width: 100%;
    height: 95%;
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
    padding: .4rem;
}

/* .btn-sm is excluded and keeps the small-control radius. The :not() gives this two
   classes of specificity, so it beats Telerik's .k-rounded-md without !important. */
.btn:not(.btn-sm) {
    border-radius: var(--radius-md);
}

@media (min-width: 768px) {
    .btn {
        padding: .5rem;
    }
}

.btn-primary {
    --btn-bg: var(--primaryColor, var(--bs-primary, #5C88DA));
    --btn-text: var(--primaryTextColor, #fff);
    color: var(--btn-text);
    background-color: var(--btn-bg) !important;
}

.btn-outline-primary.active {
    --btn-bg: var(--primaryColor, var(--bs-primary, #5C88DA));
    --btn-text: var(--primaryTextColor, #fff);
    background-color: var(--btn-bg) !important;
    color: var(--btn-text) !important;
}

/* Brand as text uses the ink token (darkened to 4.5:1); the border keeps the brand, which clears 3:1. */
.btn-outline-primary {
    color: var(--primaryColorInk, var(--primaryColor, var(--bs-primary, #5C88DA))) !important;
    border-color: var(--primaryColor, var(--bs-primary, #5C88DA)) !important;
}

/* The accent counterpart to .btn-outline-primary, for a recovery action that has to
   read as secondary to a filled brand button beside it. Fill and border are declared
   here rather than inherited from Bootstrap's .btn-outline-*: bootstrap.min.css is
   fetched with the media="print" onload swap, so a button that depends on it can
   render as a solid Telerik base button if that stylesheet never arrives. */
.btn-outline-secondary {
    --btn-text: var(--accentColorInk, var(--accentColor, var(--bs-secondary, #003366)));
    color: var(--btn-text) !important;
    background-color: transparent !important;
    border: 1px solid var(--accentColor, var(--bs-secondary, #003366)) !important;
}

/* Accent fill, so the label takes --accentTextColor. */
.btn-secondary {
    --btn-bg: var(--accentColor, var(--bs-secondary, #003366));
    --btn-text: var(--accentTextColor, #fff);
    color: var(--btn-text);
    background-color: var(--btn-bg) !important;
}

.btn-gradient {
    --btn-bg: var(--accentColor, var(--bs-secondary, #003366));
    --btn-text: var(--accentTextColor, #fff);
    background: var(--btn-bg) !important;
    color: var(--btn-text) !important;
    border: none;
}

.btn-gradient:hover, .btn-gradient:focus {
    filter: brightness(1.08);
}

.btn-secondary:hover {
    --btn-bg: var(--accentColor, var(--bs-secondary, #003366));
    --btn-text: var(--accentTextColor, #fff);
    color: var(--btn-text) !important;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus,
.k-input:focus-within, .k-picker:focus-within {
    box-shadow: var(--focus-ring);
}

.btn.btn-sm.active {
    --btn-bg: var(--primaryColor, var(--bs-primary, #5C88DA));
    --btn-text: var(--primaryTextColor, #fff);
    color: var(--btn-text) !important;
}

/* ============================================================
   Drawer / Navigation
   ============================================================ */
.k-drawer {
    border: 0;
    background-color: transparent;
}

/* merged from two .k-drawer-content declarations */
.k-drawer-content {
    display: none;
    padding: 25px;
    font-size: 18px;
}

.k-drawer-item {
    color: white;
}

.k-drawer-item .k-icon * {
    color: white;
}

.k-drawer-item:hover {
    background-color: var(--kendo-color-primary);
    color: white;
}

/* ============================================================
   Grid / Pager
   ============================================================ */
.k-grid {
    border-radius: var(--radius-sm);
    border: 1px solid rgb(94, 133, 196);
}

.k-grid .k-icon {
    color: white;
}

.k-grid-filter:hover * {
    color: black !important;
}

.k-filter-row .k-icon {
    color: black !important;
}

.k-toolbar .k-icon {
    color: black !important;
}

.k-header {
    color: white;
}

.k-pager-info {
    color: white;
}

.k-pager-wrap {
    padding: 5px 8px;
}

.k-pager-numbers .k-link {
    color: #ffffff;
}

.k-pager-numbers .k-link.k-state-selected, .k-pager-numbers .k-link.k-selected {
    color: #ffffff;
}

.k-pager-numbers > li > .k-link.k-selected {
    border-radius: 15px;
}

.k-master-row .k-icon * {
    color: black !important;
}

.k-master-row * {
    color: black !important;
}

/* ============================================================
   Form Controls
   ============================================================ */
.k-input.form-control {
    padding: 0;
}

.k-input .k-icon {
    color: black !important;
}

.k-textbox.form-control.k-focus {
    transform: none;
}

.k-textbox.form-control .k-input-inner {
    display: block;
    width: 100%;
    padding: .375rem .75rem !important;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #212529;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid var(--field-border);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border-radius: var(--radius-sm);
    transition: border-color .15s ease-in-out,box-shadow .15s ease-in-out;
    outline: none !important;
    box-shadow: none;
}

    .k-textbox.form-control .k-input-inner:focus {
        color: #212529;
        background-color: #fff;
        border-color: #258cfb;
        outline: 0;
        box-shadow: var(--focus-ring) !important;
    }

.k-dropdownlist {
    cursor: default;
}

    .k-dropdownlist .k-input-inner {
        display: block;
        width: 100%;
        padding: 0.375rem 2.25rem 0.375rem 0.75rem;
        -moz-padding-start: calc(0.75rem - 3px);
        font-size: 1rem;
        font-weight: 400;
        line-height: 1.5;
        color: #212529;
        background-color: #fff;
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
        background-repeat: no-repeat;
        background-position: right .75rem center;
        background-size: 16px 12px;
        border: 1px solid var(--field-border);
        border-radius: var(--radius-sm);
        transition: border-color .15s ease-in-out,box-shadow .15s ease-in-out;
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
    }

    .k-dropdownlist.form-select .k-button {
        display: none;
    }

.form-select.is-invalid:not([multiple]):not([size]) {
    background: none;
    padding-right: 0;
}

.k-datepicker.form-control .k-input-inner {
    border: none;
}

.k-datepicker.form-control .k-input-inner:focus {
    box-shadow: none;
}

.k-checkbox {
    border-color: rgba(0, 0, 0, 0.5);
    background-color: #ffffff;
}

.k-radio {
    border: 2px solid #555 !important;
    background-color: #f5f5f5 !important;
    width: 20px !important;
    height: 20px !important;
}

.k-radio:checked {
    background-color: #007bff !important;
    border-color: #007bff !important;
}

.k-radio:focus {
    outline: 2px solid #007bff !important;
    outline-offset: 2px;
}

/* ============================================================
   Telerik Misc
   ============================================================ */
.k-button .k-icon {
    color: white;
}

.k-button k-icon * {
    color: black !important;
}

.k-menu:not(.k-context-menu) {
    color: var(--kendo-color-on-app-surface, #3d3d3d) !important;
    background-color: rgba(0, 0, 0, 0);
}

.k-menu-popup {
    border-radius: var(--radius-md);
    margin: .5rem 0;
    padding: .5rem;
}

.k-svg-i-caret-alt-down {
    display: none !important;
}

/* Telerik puts the label in a child span, so the button's own color never reaches it.
   Follow --btn-text, which every filled button sets; unfilled buttons inherit, so
   .btn-outline-primary keeps its brand label. */
.k-button-text {
    color: var(--btn-text, inherit);
}

/* ============================================================
   Telerik Dialog
   ============================================================ */
.edit-dialog {
    max-height: calc(100vh - 20%);
}

    .edit-dialog .k-notification-group {
        margin-bottom: 15px;
        position: relative;
    }

.confirm-dialog {
    max-height: 12rem;
    max-width: 25rem;
    border-radius: var(--radius-md);
    color: var(--danger, #a83c3c);
}

.confirm-dialog .k-notification-group {
    margin-bottom: 15px;
    position: relative;
}

.confirm-dialog .k-window-titlebar {
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    background-color: var(--primaryColor, var(--bs-primary, #5C88DA)) !important;
}

/* ============================================================
   Cards / Component Blocks
   ============================================================ */
.component-card {
    max-width: 832px;
    margin: .5rem auto;
    background-color: #fff;
    box-shadow: var(--shadow-2);
    transition: box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    padding: .5rem;
    border-radius: var(--radius-md);
}

/* A card placed straight in <main> has no .container to give it the header pill's 1rem
   mobile edge clearance, so it would otherwise run to the screen edge under a narrower pill. */
@media (max-width: 767.98px) {
    main > .component-card {
        width: calc(100% - 2rem);
    }
}

.component-header-text {
    font-weight: bold;
    font-size: medium;
    text-align: left;
    margin-bottom: 10px;
    margin-top: 10px;
}

/* ------------------------------------------------------------
   Card header — shared by the home and payment pages. Pages still on the
   older fixed-height header keep their own rule, which wins on scope.
   ------------------------------------------------------------ */
.card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .5rem;
    border-bottom: 1px solid lightgray;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    padding: .5rem .75rem .25rem .75rem;
    height: auto;
}

.card-header-standalone {
    border-bottom: none;
    border-radius: var(--radius-md);
}

.card-header-centered {
    display: block;
    text-align: center;
}

.card-header-centered .loan-id-row {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Two classes deep so it outranks a page's own scoped .loan-number rather than
   relying on app.css loading after the scoped bundle. */
.card-header.card-header-centered .loan-number {
    float: none;
    padding-left: 0;
    text-align: center;
}

.card-header-centered .due-on {
    text-align: center;
}

.due-on {
    color: #666;
    font-size: 14px;
    padding-top: 0px;
    margin-top: 0px;
    display: block;
}

.back-btn {
    width: 80px;
    margin-top: 20px;
    margin-left: .25rem;
}

.calendar-icon .k-icon {
    font-size: 25px;
}

.component-card .k-form-error.k-invalid-msg {
    color: var(--danger, #a83c3c);
    font-size: 14px;
}

.align-right {
    text-align: right;
}

.align-left {
    text-align: left;
}

/* ------------------------------------------------------------
   External link — underline on hover, below the login and home cards.
   ------------------------------------------------------------ */
.external-link {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    font-size: 14px;
    font-weight: 600;
    color: var(--kendo-subtle-text, #666666);
    text-decoration: none;
    letter-spacing: .01em;
    transition: color 180ms ease;
}

.external-link span {
    position: relative;
}

.external-link span::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 100%;
    height: 1.5px;
    background: currentColor;
    border-radius: 1px;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 260ms cubic-bezier(.4, 0, .2, 1);
}

.external-link:hover,
.external-link:focus-visible {
    color: var(--accentColorInk, var(--accentColor, var(--bs-secondary, #003366)));
}

.external-link:hover span::after,
.external-link:focus-visible span::after {
    transform: scaleX(1);
    transform-origin: left;
}

.external-link-icon {
    transition: transform 220ms cubic-bezier(.4, 0, .2, 1);
    flex-shrink: 0;
}

.external-link:hover .external-link-icon,
.external-link:focus-visible .external-link-icon {
    transform: translate(2px, -2px);
}

@supports (color: color-mix(in srgb, red, blue)) {
    .external-link:focus-visible {
        outline: none;
        box-shadow: 0 0 0 3px color-mix(in srgb, var(--accentColor, var(--bs-secondary, #003366)) 25%, transparent);
        border-radius: 4px;
    }
}

/* ------------------------------------------------------------
   Telerik form overrides inside a card.
   ------------------------------------------------------------ */
.component-card .k-input-inner,
.component-card-inner-large .k-input-inner {
    width: 100%;
    border-radius: var(--radius-sm);
    border: 1px solid var(--field-border);
}

.component-card .k-form-field-wrap,
.component-card .k-form-field,
.component-card-inner-large .k-form-field-wrap,
.component-card-inner-large .k-form-field {
    margin-bottom: .5rem;
}

.component-card input,
.component-card-inner-large input {
    font-size: 14px;
}

/* ------------------------------------------------------------
   .form-card - a .component-card whose body is a form.

   Opt-in, because it changes field metrics: add it to the card, don't widen these
   selectors to .component-card. The rules above give every card a 30px field with a
   --radius-sm border drawn on the inner <input>; that is too short against a 44px
   button, sits on a different radius from the card and the header pill, and leaves a
   date picker's calendar button and a password reveal *outside* the box they belong
   to. Here the border moves to the wrapper, so each control is one 44px box - the
   app's tap-target minimum - with its affordance inside it.

   Consumers: the login and search cards, the customer's first two screens.
   ------------------------------------------------------------ */
.form-card .k-input,
.form-card .k-picker {
    min-height: 44px;
    border: 1px solid var(--field-border);
    border-radius: var(--radius-md);
    background-color: #fff;
}

.form-card .k-input-inner {
    border: 0;
    border-radius: inherit;
    padding-inline: .75rem;
}

/* One bare icon per field: the date picker ships a divider before its button and a
   reveal button has none. */
.form-card .k-input-button {
    border-inline-start-width: 0;
}

/* The ring itself is the global --focus-ring on .k-input:focus-within; a 25% brand glow
   used to sit here and measured 1.6:1. Note when verifying: .k-input transitions
   border-color and box-shadow over .15s, so a computed style read immediately after
   focus returns the unfocused values. */
.form-card .k-input:focus-within,
.form-card .k-picker:focus-within {
    border-color: var(--primaryColor, var(--bs-primary, #5C88DA));
}

/* A show/hide toggle for a masked field, in a TextBoxSuffixTemplate: the ID number on
   the search page, the password on login. It replaces Edge's own password eye (killed
   below), so a field gets one or the other, never both.

   The width is Telerik's own .k-input-button formula, so the toggle occupies the same
   box as a date picker's calendar button. Two parts of that are load-bearing: the calc
   reads 1em, so the button must carry --kendo-font-size or a bare <button> takes the
   UA's 13.33px and lands ~1px narrow; and the 1rem that sizes the icon to Telerik's
   16px therefore goes on the <i>, never the button. No height on the <i> either - a
   masked icon is an empty box, and any inherited height collapses it. */
.input-reveal-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: stretch;
    flex: none;
    font-size: var(--kendo-font-size, .875rem);
    width: calc(var(--kendo-line-height) * 1em + var(--kendo-spacing-1) * 2);
    padding: 0;
    border: 0;
    border-radius: var(--radius-md);
    background: none;
    color: var(--kendo-subtle-text, #666666);
    cursor: pointer;
}

.input-reveal-btn .fa-regular {
    font-size: 1rem;
}

.input-reveal-btn:hover {
    color: var(--kendo-body-text, #424242);
}

/* Only where our own toggle is present, so a password field without one keeps Edge's. */
.k-input:has(.input-reveal-btn) .k-input-inner::-ms-reveal {
    display: none;
}

.component-card button.telerik-blazor.k-button.btn.btn-action.btn-primary.k-button-solid.k-rounded-md.k-button-rectangle.k-button-md.k-button-solid-base,
.component-card-inner-large button.telerik-blazor.k-button.btn.btn-action.btn-primary.k-button-solid.k-rounded-md.k-button-rectangle.k-button-md.k-button-solid-base {
    width: 100%;
    background-color: var(--primaryColor, var(--bs-primary, #5C88DA)) !important;
    cursor: pointer;
}

/* ============================================================
   Label / value detail rows
   ============================================================ */

/* Kept class-for-class in step with LoanApplicationUi's app.css, so the two customer
   apps share one vocabulary for a block of figures. */
.loan-details-section {
    display: grid;
    grid-template-columns: 3fr 2fr;
    margin-bottom: .5rem;
}

.terms-card {
    background: linear-gradient(135deg,
        color-mix(in srgb, var(--primaryColor, var(--bs-primary, #5C88DA)) 12%, white),
        color-mix(in srgb, var(--accentColor, var(--bs-secondary, #003366)) 12%, white));
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-1);
    margin: 1rem 0;
    overflow: hidden;
}

@supports not (color: color-mix(in srgb, red, blue)) {
    .terms-card {
        background: #f4f6fa;
    }
}

/* Colour and size sit on the row here, unlike in LoanApplicationUi: these cards are
   inside .profile-component, whose smaller near-white text would otherwise inherit. */
.terms-card .loan-details-section {
    align-items: center;
    color: var(--kendo-body-text, #424242);
    font-size: 14px;
    margin-bottom: 0;
    padding: .6rem .75rem;
}

.terms-card .loan-details-section + .loan-details-section {
    border-top: 1px solid rgba(0, 0, 0, .08);
}

.terms-card .loan-details-section > :last-child {
    text-align: right;
}

/* ============================================================
   Profile Components
   ============================================================ */

/* removed double semicolons */
.profile-component {
    color: #eeeeee !important;
    font-size: 12px !important;
    margin: .25rem !important;
    padding: 0 !important;
    background-color: white !important;
    border-radius: unset !important;
    box-shadow: unset !important;
}

.profile-component > :not(:first-child) {
    border-top: 1px solid #AAAAAA;
}

/* No side margin — the cards span the full content column so they line up with
   the header pill (same 832px cap). */
.profile-component-container {
    align-items: flex-start;
    background-color: #fff;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-2);
    color: #ffffff;
    font-size: 13px;
    margin: .5rem 0;
    top: 0;
    overflow: hidden;
}

.profile-component-card {
    align-items: center;
    color: rgba(0, 0, 0, .87);
    display: flex;
    font-size: 13px;
    justify-content: space-between;
    margin: .5rem;
    padding: .5rem;
}

/* The same 12% brand tint the index page's cards use. It is near-white, so the label
   takes heading text, not --primaryTextColor. */
.profile-header {
    background: linear-gradient(135deg,
        color-mix(in srgb, var(--primaryColor, var(--bs-primary, #5C88DA)) 12%, white),
        color-mix(in srgb, var(--accentColor, var(--bs-secondary, #003366)) 12%, white)) !important;
    color: var(--kendo-heading-text, #272727) !important;
    font-weight: 600;
    padding: .5rem .75rem;
    font-size: 1rem;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    display: inline-flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
}

@supports not (color: color-mix(in srgb, red, blue)) {
    .profile-header {
        background: #f4f6fa !important;
    }
}

/* ============================================================
   Section Headings
   ============================================================ */
.section-heading {
    background-color: var(--primaryColor, var(--bs-primary, #5C88DA));
    color: var(--primaryTextColor, #fff);
    border-radius: var(--radius-md);
    font-size: 14px;
    margin: 0 0 1rem 0;
    padding: 0.25rem 0.5rem;
}

.section-heading.section-active {
    margin: 0;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.section-heading-title {
    display: inline-block;
    margin: 0;
    vertical-align: middle;
    line-height: 2rem;
    font-size: 2rem;
}

/* ============================================================
   Page / Typography
   ============================================================ */
.header-text {
    font-size: 2rem;
    font-weight: bold;
    text-align: center;
}

.welcome-text {
    font-weight: 600;
    font-size: 1.75rem;
    text-align: center;
    margin-bottom: 1rem;
}

.page-header-text {
    font-weight: bold;
    font-size: xx-large;
    text-align: center;
    margin-bottom: 30px;
}

.logo {
    margin-bottom: 30px;
}

.red {
    color: #b00000;
}

.message {
    text-align: center;
    word-wrap: break-word;
    display: inline-block;
    font-size: 14px;
}

.text-wrap {
    white-space: pre-wrap;
}

.wrap-text {
    text-wrap: auto;
}

.payment-message {
    font-size: .8rem;
    font-style: italic;
}

.location-finder-text {
    color: var(--primaryTextColor) !important;
}

.home-text {
    color: var(--primaryTextColor) !important;
}

.client-logo {
    margin: 10px auto;
    height: 70px;
    align-self: center;
    display: var(--logoDisplay, none);
    content: var(--logoUrl);
}

/* ============================================================
   Forms / Validation
   ============================================================ */
.container.loan-application-container form {
    border: 1px solid lightgray;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    margin-bottom: 0.5rem;
    padding: 0.5rem;
}

.form-buttons-right {
    justify-content: right;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid var(--danger, #a83c3c);
}

.validation-message {
    color: var(--danger, #a83c3c);
}

.error {
    color: var(--danger, #a83c3c);
}

.mat-card {
    box-shadow: var(--shadow-2);
    transition: box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
    position: relative;
    padding: 16px;
    border-radius: var(--radius-md);
}

.directions-btn {
    align-items: center;
    display: inline-flex;
    gap: .4rem;
    margin-top: .5rem;
    padding: .4rem 1rem;
    text-decoration: none;
}

@media (min-width: 768px) {
    .directions-btn {
        padding: .5rem 1.25rem;
    }
}

/* ============================================================
   Property Map Component
   ============================================================ */

.map-unavailable {
    align-items: center;
    background-color: #f4f6fa;
    border: 1px dashed lightgray;
    color: var(--kendo-subtle-text, #666666);
    display: flex;
    font-size: 14px;
    justify-content: center;
    padding: 1rem;
    text-align: center;
}

.property {
    align-items: center;
    background-color: var(--accentColor, var(--bs-secondary, #003366));
    border-radius: 50%;
    color: var(--primaryTextColor, #fff);
    display: flex;
    font-size: 14px;
    font-weight: 600;
    height: 30px;
    justify-content: center;
    padding: 4px;
    position: relative;
    /* Named properties rather than `all`: transitioning everything put the card on a
       compositing layer for the whole animation, which softened the text. */
    transition: width .3s ease-out, height .3s ease-out, border-radius .3s ease-out, background-color .3s ease-out;
    width: 30px;
}

/* The tail that points at the store's coordinates. It takes the colour of whatever surface it
   hangs off - brand while collapsed, white once the card opens. */
.property::after {
    border-left: 9px solid transparent;
    border-right: 9px solid transparent;
    border-top: 9px solid var(--accentColor, var(--bs-secondary, #003366));
    content: "";
    height: 0;
    left: 50%;
    position: absolute;
    top: 90%;
    transform: translate(-50%, 0);
    transition: all .3s ease-out;
    width: 0;
    z-index: 1;
}

.property .icon {
    align-items: center;
    display: flex;
    flex: 0 0 auto;
    justify-content: center;
}

.property .details {
    display: none;
    flex: 1;
    flex-direction: column;
    /* Lets a long store name wrap inside max-width rather than pushing the card wider. */
    min-width: 0;
}

/* Expanded: the surface, radius and shadow of .component-card, so the popup reads as the
   store card it belongs to. Height follows the content. */
.property.highlight {
    align-items: flex-start;
    background-color: #fff;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-2);
    color: var(--kendo-body-text, #424242);
    height: auto;
    justify-content: flex-start;
    padding: .75rem;
    text-align: left;
    /* Even pixel width on purpose: the Maps API centres marker content with
       translate(-50%), so a fractional width offsets the card by half a pixel and every
       glyph renders soft. rem would not guarantee an even result. */
    width: 240px;
}

.property.highlight::after {
    border-top-color: #fff;
    top: 100%;
}

/* The pin number stays visible, so an open card can still be matched to its list entry. */
.property.highlight .icon {
    background-color: var(--accentColor, var(--bs-secondary, #003366));
    border-radius: 50%;
    color: var(--primaryTextColor, #fff);
    font-size: 12px;
    height: 1.25rem;
    margin: .1rem .5rem 0 0;
    width: 1.25rem;
}

.property.highlight .details {
    display: flex;
}

.property .title {
    color: var(--kendo-heading-text, #272727);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: .35rem;
}

.property .property-line {
    font-size: 14px;
    line-height: 1.35;
}

/* Takes the portal link colour from the global `a` rule rather than the pin's white. */
.property .property-phone {
    align-self: flex-start;
    font-size: 14px;
    margin-top: .35rem;
}

.property .directions-btn {
    font-size: 14px;
    justify-content: center;
    margin-top: .6rem;
    padding: .35rem .75rem;
    width: 100%;
}

/* ============================================================
   Utility Classes
   ============================================================ */
.hidden {
    visibility: hidden;
    max-height: 0;
    display: none;
}

.float-right {
    float: right;
}

.gradient-border-mask {
    position: relative;
    animation: .75s linear infinite spinner-border;
}

    .gradient-border-mask::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        border-radius: 50px;
        border: 5px solid transparent;
        background: linear-gradient(to right, var(--primaryColor, var(--bs-primary, #5C88DA)), var(--accentColor, var(--bs-secondary, #003366))) border-box;
        -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
        -webkit-mask-composite: destination-out;
        mask-composite: exclude;
    }

/* ============================================================
   Loading / Blazor Error UI
   ============================================================ */
.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #1b6ec2;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

/* ============================================================
   Media Queries
   ============================================================ */
@media(min-width: 768px) {
    .client-logo {
        height: 100px;
    }
}

.k-drawer-overlay .k-drawer {
    height: fit-content;
}

/* ============================================================
   Accessibility primitives
   ============================================================ */

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    border: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.skip-link {
    position: absolute;
    top: -100vh;
    left: 1rem;
    z-index: 2000;
    padding: .5rem .875rem;
    background-color: #fff;
    color: var(--kendo-body-text, #424242);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-2);
    text-decoration: none;
}

.skip-link:focus {
    top: 1rem;
    outline: 2px solid #258cfb;
    outline-offset: 2px;
}

/* Keeps a focused element clear of the fixed header pill (.header-spacer height + gap). */
html {
    scroll-padding-top: calc(3.8rem + .5rem);
}

/* Page titles are h1 for FocusOnNavigate, pinned to the h2 scale so nothing moved on screen. */
h1 {
    font-size: calc(1.325rem + .9vw);
}

@media (min-width: 1200px) {
    h1 {
        font-size: 2rem;
    }
}

.vph-close {
    float: right;
    background: none;
    border: 0;
    padding: 0 .25rem;
    font: inherit;
    font-size: 1.1rem;
    line-height: 1;
    color: inherit;
    cursor: pointer;
}

.vph-close:focus-visible {
    outline: 2px solid #258cfb;
    outline-offset: 2px;
}

/* Reproduces Bootstrap's label reboot for text that is not a form label. */
.text-label {
    display: inline-block;
    margin-bottom: .5rem;
}

.authorization-text {
    margin-bottom: .5rem;
}
