#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;
}

:root {
    --rz-primary: #1862F8;
    font-size: var(--rz-root-font-size);
    /* Filled form-field tint derived from primary + the THEME's surface colour, not a hard-coded
       light blue: the old #D7E4FE persisted into dark mode (this file loads after the theme css),
       leaving light text on a light fill — unreadable inputs. Light theme renders ~the same
       #D7E4FE; dark theme gets a dark navy tint. Also follows tenant brand primaries. */
    --rz-form-field-filled-background-color: color-mix(in srgb, var(--rz-primary) 16%, var(--rz-base-background-color, #ffffff));
    /* Theme-adaptive brand accent for icons/labels: the tenant primary pulled toward the theme's
       text colour, so a dark brand (e.g. SEC navy) stays visible on the dark theme and a light
       brand deepens on the light theme. Use instead of raw var(--rz-primary) for foreground
       accents on cards. */
    --eqp-brand-icon-color: color-mix(in srgb, var(--rz-primary) 50%, var(--rz-text-color, #4f4f50));
    --equiprove-dark-blue-color: #0C2A52;
    --equiprove-light-blue-color: #1862F8;
    --rz-on-warning: #000000;
    /* Radzen ships --rz-on-warning-lighter as raw amber (#ffae11) in BOTH themes — 1.7:1 on the
       lighter warning wash (booking-wizard "non-refundable" alert, warning badges). Pull it toward
       the theme's text colour: 4.6:1 light / 6.5:1 dark, wash + icon keep the warning semantics. */
    --rz-on-warning-lighter: color-mix(in srgb, var(--rz-warning, #ffae11) 30%, var(--rz-text-color, #4f4f50));
    --rz-tabs-tab-padding-inline: 0.8rem;
/*    --rz-text-font-family: 'Open Sans', sans-serif;
    --rz-root-font-size: 16px;*/
}

.rz-heading {
    font-family: 'Montserrat', sans-serif;
}

/* Filled primary buttons: a faint inner edge derived from the button's own text colour. Tenant
   primaries can be near-black (e.g. SEC), so filled buttons melt into dark-theme surfaces
   (booking wizard Add/Next, login Sign in, dashboard CTAs). Inset shadow, not border — no layout
   shift; Radzen's focus ring is outline-based so this doesn't fight it. In the light theme a 30%
   on-primary wash over a saturated fill is barely perceptible. Flat/outlined/text variants keep
   their transparent backgrounds untouched. */
.rz-button.rz-primary:not(.rz-variant-flat):not(.rz-variant-outlined):not(.rz-variant-text) {
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rz-on-primary, #ffffff) 30%, transparent);
}

body {
    font-family: var(--rz-text-font-family);
    color: var(--rz-text-color);
    font-size: var(--rz-body-font-size);
    line-height: var(--rz-body-line-height);
    background-color: var(--rz-body-background-color);
}

.rz-body {
    --rz-body-padding: 0;
}

a {
    color: var(--rz-link-color);
}

a:hover,
a:focus {
    color: var(--rz-link-hover-color);
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyID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1rem 3.7rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "An error has occurred."
}

.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");
}

/* Font Awesome 6 Free font CSS */

@font-face {
    font-family: 'Font Awesome 6 Free';
    font-style: normal;
    font-weight: 900;
    src: url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/webfonts/fa-solid-900.woff2') format('woff2');
}

.font-awesome {
    --rz-icon-font-family: 'Font Awesome 6 Free'
}

/* Font Awesome 6 Free font CSS */

.equiprove-blue-gradient-background {
    background-color: transparent;
    /* Tenant-branded page-header gradient: a dark→brand sweep derived from the tenant's primary
       (--tenant-brand-colour, emitted by TenantThemeProvider). The Equiprove blue remains the
       fallback on the master / unbranded tenancies. Both stops mix toward a near-black anchor so
       the white header text keeps contrast even on lighter brand colours. */
    background-image: linear-gradient(100deg,
        color-mix(in srgb, var(--tenant-brand-colour, var(--equiprove-light-blue-color)) 45%, #0a1220) 0%,
        color-mix(in srgb, var(--tenant-brand-colour, var(--equiprove-light-blue-color)) 85%, #0a1220) 100%);
}

/* wrapper that ensures the grid can grow to full available width */
.eqp-grid-fullwidth .rz-grid-table {
    width: 100% !important;
    max-width: 100%;
    box-sizing: border-box;
}

/* Size the table to the sum of its column widths instead of stretching to 100%.
   Stops the widest column ballooning to absorb leftover space (and the rest
   getting crushed) — used by the People / Organisation list grids, which set an
   explicit width on every column. Cells wrap rather than truncate. */
.eqp-grid-autowidth .rz-grid-table {
    width: 100% !important;
    table-layout: fixed;
}
.eqp-grid-autowidth .rz-grid-table td,
.eqp-grid-autowidth .rz-grid-table th {
    white-space: normal;
    word-break: break-word;
    vertical-align: top;
}

.highlight-text {
    width: fit-content;
    padding: 6px 12px;
    position: relative;
    font-size: 32px;
    font-weight: 600;
    user-select: none;
    text-align: center;
    white-space: nowrap;

    &:before {
        content: '';
        position: absolute;
        inset: 0;
        z-index: -1;
        border-radius: 3px 5px 3px 5px;
        background: conic-gradient(at 0 100%, rgb(var(--mark-color) / 100%) 1%, #fff0 3%) no-repeat 0 0 / auto 120%, conic-gradient(from 180deg at 100% 0, #fff0, rgb(var(--mark-color) / 100%) 1%, #fff0 4%) no-repeat 100% 100% / auto 120%, linear-gradient(var(--mark-bg-angle), rgb(var(--mark-color) / 60%), rgb(var(--mark-color) / 20%) 75%, rgb(var(--mark-color) / 55%)) no-repeat center / auto;
    }

    &.yellow-mark:before {
        rotate: 1deg;
        scale: 1.1;
        transform: skew(-5deg);
        --mark-color: 255 232 62;
        --mark-bg-angle: 50deg;
    }

    &.green-mark:before {
        scale: 0.92;
        transform: skew(7deg);
        --mark-color: 91 233 92;
        --mark-bg-angle: 30deg;
    }

    &.red-mark:before {
        rotate: 0.5deg;
        transform: skew(5deg);
        --mark-color: 255 100 185;
        --mark-bg-angle: 150deg;
    }
}

/* ==== Calendar appointment bars + hover cards (CalendarItemBar) ====
   Global because the hover card renders in Radzen's tooltip portal, outside
   any component's markup, and the bar is used by multiple scheduler surfaces. */
.cal-bar { display: flex; align-items: center; gap: 0.25rem; min-width: 0; height: 100%; }
.cal-bar__logo { width: 1rem; height: 1rem; border-radius: 2px; object-fit: cover; flex: 0 0 auto; background: #fff; margin-right: 0.3rem; }
.cal-bar__icon { flex: 0 0 auto; display: inline-flex; align-items: center; line-height: 1; margin-right: 0.3rem; }
.cal-bar__icon .rzi { font-size: 0.85rem; }
.cal-bar__icon .fa-solid { font-size: 0.7rem; }
.cal-bar__text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-hover { max-width: 320px; display: flex; flex-direction: column; gap: 0.4rem; }
/* The hover card must never capture the pointer: it opens UNDER the cursor, which fired
   mouseleave on the bar -> close -> mouseenter -> open in a rapid flicker loop. */
.rz-tooltip:has(.cal-hover) { pointer-events: none; }
.cal-hover__head { display: flex; align-items: flex-start; gap: 0.5rem; }
.cal-hover__logo { width: 2.25rem; height: 2.25rem; border-radius: 4px; object-fit: contain; background: #fff; flex: 0 0 auto; }
.cal-hover__icon { width: 2rem; height: 2rem; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff; flex: 0 0 auto; }
.cal-hover__titles { flex: 1; min-width: 0; }
.cal-hover__title { font-weight: 600; font-size: 0.9rem; }
.cal-hover__subtitle { font-size: 0.78rem; opacity: 0.85; }
.cal-hover__row { font-size: 0.8rem; display: flex; align-items: center; gap: 0.3rem; }
.cal-hover__row .rzi { font-size: 0.9rem; }
.cal-hover__desc { font-size: 0.78rem; white-space: pre-line; opacity: 0.9; max-height: 7rem; overflow: hidden; }
.cal-hover__hint { opacity: 0.6; font-size: 0.72rem; }
