@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: var(--cp-ink, black);
}

a, .btn-link {
    color: var(--cp-link, #0071c1);
}

/* ============================================================
   Layout
   ============================================================ */
.page-background {
    position: relative;
    isolation: isolate;
    width: 100%;
    min-height: 100vh;
    /* The warm off-white of the desktop mockups, a step softer than the old cool #f4f6fa. */
    background-color: var(--cp-page, #f3f4f1);
}

/* 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-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: var(--cp-ink, black) !important;
}

.k-filter-row .k-icon {
    color: var(--cp-ink, black) !important;
}

.k-toolbar .k-icon {
    color: var(--cp-ink, 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: var(--cp-ink, black) !important;
}

.k-master-row * {
    color: var(--cp-ink, black) !important;
}

/* ============================================================
   Form Controls
   ============================================================ */
.k-input.form-control {
    padding: 0;
}

.k-input .k-icon {
    color: var(--cp-ink, 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: var(--cp-ink, #212529);
    background-color: var(--cp-surface, #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: var(--cp-ink, #212529);
        background-color: var(--cp-surface, #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: var(--cp-ink, #212529);
        background-color: var(--cp-surface, #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: var(--cp-surface, #ffffff);
}

.k-radio {
    border: 2px solid #555 !important;
    background-color: var(--cp-surface-alt, #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: var(--cp-ink, 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: var(--cp-surface, #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: var(--cp-ink-muted, #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: var(--cp-surface, #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%, var(--cp-surface, white)),
        color-mix(in srgb, var(--accentColor, var(--bs-secondary, #003366)) 12%, var(--cp-surface, 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: var(--cp-surface-alt, #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: var(--cp-surface, white) !important;
    border-radius: unset !important;
    box-shadow: unset !important;
}

.profile-component > :not(:first-child) {
    border-top: 1px solid var(--cp-line, #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: var(--cp-surface, #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%, var(--cp-surface, white)),
        color-mix(in srgb, var(--accentColor, var(--bs-secondary, #003366)) 12%, var(--cp-surface, 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: var(--cp-surface-alt, #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: var(--cp-surface-alt, #f4f6fa);
    border: 1px dashed lightgray;
    color: var(--kendo-subtle-text, #666666);
    display: flex;
    font-size: 14px;
    justify-content: center;
    padding: 1rem;
    text-align: center;
}

/* Store pins: dark numbered discs, like the list beside the map. Dark rather than a brand colour, so a tenant
   whose colours include red doesn't mark its stores like warnings. The marker is anchored at its bottom centre,
   so the disc sits on the store's coordinates and the label stacks above it. */
.property {
    align-items: center;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.property .icon {
    align-items: center;
    background-color: #1f2421;
    border-radius: 50%;
    box-shadow: 0 0 0 2px #fff, 0 1px 3px rgba(0, 0, 0, .3);
    color: #fff;
    display: flex;
    font-size: 13px;
    font-weight: 700;
    height: 28px;
    justify-content: center;
    transition: width .15s ease-out, height .15s ease-out, background-color .15s ease-out;
    width: 28px;
}

/* The chosen store: a larger disc in the button colour, ringed in white so it stands off the map. */
.property.highlight .icon {
    background-color: var(--accentColor, var(--bs-secondary, #003366));
    box-shadow: 0 0 0 4px #fff, 0 2px 6px rgba(0, 0, 0, .25);
    color: var(--accentTextColor, #fff);
    font-size: 15px;
    height: 36px;
    width: 36px;
}

/* The customer's own store: a house on a primary disc, matching its entry in the store list. */
.property.home .icon {
    background-color: var(--primaryColor, var(--bs-primary, #5C88DA));
    color: var(--primaryTextColor, #fff);
}

    .property.home .icon .fa-house {
        font-size: 14px;
    }

/* The chosen store's name and distance in one line above its pin, from 768px. On a phone StoreLocator docks the
   store's card to the bottom of the map instead, so the label stays hidden there. */
.property .pin-label {
    background-color: var(--cp-surface, #fff);
    border-radius: 999px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .18);
    color: var(--kendo-heading-text, #272727);
    display: none;
    font-size: 13px;
    gap: 6px;
    max-width: 300px;
    overflow: hidden;
    padding: 6px 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.property .pin-label-name {
    font-weight: 700;
}

.property .pin-label-distance {
    color: var(--cp-ink-muted, #555b60);
    margin-left: 6px;
}

@media (min-width: 768px) {
    .property.highlight .pin-label {
        display: block;
    }
}

@media (prefers-reduced-motion: reduce) {
    .property .icon {
        transition: none;
    }
}

/* The customer's own position on a Near me map: the blue dot with a soft halo that phones and map apps use for
   "you are here", so it reads as the customer and never as a store. */
.customer-location {
    background-color: #1a73e8;
    border: 3px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 8px rgba(26, 115, 232, .22), 0 1px 3px rgba(0, 0, 0, .3);
    height: 18px;
    width: 18px;
}

/* ============================================================
   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: var(--cp-surface, #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;
}
