/* Lumen.UI.Mvc - ui-notifications.css. Toast, Message, Badge, Progress Bar, Skeleton and Spinner.
   Linked by @Html.UiStyles() (not loaded on demand) so server-rendered markup is styled at once.
   Colours come from the shared --ui-* tokens in ui-core.css plus the severity tokens below. Sizes and
   colours of the defaults are those of Syncfusion's Fluent 2 theme. */

/* ---------- severity tokens ----------
   Per severity: the solid colour (filled messages, badges, bars), -text (icons, outlined text),
   -soft (light background) and -border (light border). The defaults are Syncfusion's Fluent 2 values;
   -text, -border and the badge colours are Fluent-only and fall back to the solid colour in the other
   themes, which reset them below. */

:root {
    --ui-success: #107c10;
    --ui-success-text: #0e700e;
    --ui-success-soft: #f1faf1;
    --ui-success-border: #9fd89f;
    --ui-info: #0099bc;
    --ui-info-text: #008aa9;
    --ui-info-soft: #f2fafc;
    --ui-info-border: #a4deeb;
    --ui-info-on: #ffffff;
    --ui-warning: #da3b01;
    --ui-warning-text: #c43501;
    --ui-warning-soft: #fdf6f3;
    --ui-warning-border: #f4bfab;
    --ui-danger-solid: #c50f1f;
    --ui-danger-border: #eeacb2;
    --ui-default-soft: #f5f5f5;
    --ui-on-severity: #ffffff;       /* text on a filled success/warning/error background */

    --ui-badge-success: #0e700e;
    --ui-badge-danger: #d13438;
    --ui-badge-warning: #fde300;
    --ui-badge-warning-on: #000000;
    --ui-badge-warning-ghost: #847619;
    --ui-badge-info: #56bfd7;
    --ui-badge-info-on: #242424;

    --ui-skeleton-bg: #e6e6e6;
    --ui-skeleton-shine: rgba(255, 255, 255, 0.6);
    --ui-skeleton-wave-base: #e6e6e6; /* Fluent 2: a grey bone with a light band sweeping over it (a #fafafa bone barely shows on white) */
    --ui-skeleton-wave-band: #fafafa;
}

/* The other themes: drop the Fluent-only values so every token follows the theme's own colours. */
.ui-theme-fluent2-dark,
.ui-theme-bootstrap5,
.ui-theme-bootstrap5-dark,
.ui-theme-material3,
.ui-theme-material3-dark,
.ui-theme-tailwind,
.ui-theme-tailwind-dark,
.ui-theme-fabric,
.ui-theme-highcontrast {
    --ui-success-text: initial;
    --ui-success-border: initial;
    --ui-info: initial;
    --ui-info-text: initial;
    --ui-info-soft: initial;
    --ui-info-border: initial;
    --ui-info-on: initial;
    --ui-warning: #bc4b09;
    --ui-warning-text: initial;
    --ui-warning-soft: #fff9f5;
    --ui-warning-border: initial;
    --ui-danger-solid: initial;
    --ui-danger-border: initial;
    --ui-default-soft: initial;
    --ui-badge-success: initial;
    --ui-badge-danger: initial;
    --ui-badge-warning: initial;
    --ui-badge-warning-on: initial;
    --ui-badge-warning-ghost: initial;
    --ui-badge-info: initial;
    --ui-badge-info-on: initial;
    --ui-skeleton-bg: initial;
    --ui-skeleton-wave-base: initial;
    --ui-skeleton-wave-band: initial;
}

.ui-theme-bootstrap5 {
    --ui-success: #198754;
    --ui-success-soft: #d1e7dd;
    --ui-warning: #b35c00;
    --ui-warning-soft: #fff3cd;
    --ui-badge-warning: #ffc107;
    --ui-badge-warning-on: #000000;
    --ui-badge-warning-ghost: #997404;
    --ui-badge-info: #0dcaf0;
    --ui-badge-info-on: #000000;
    --ui-badge-secondary: #6c757d;
    --ui-badge-secondary-on: #ffffff;
    --ui-badge-secondary-border: #6c757d;
}

.ui-theme-fluent2-dark,
.ui-theme-bootstrap5-dark,
.ui-theme-material3-dark,
.ui-theme-tailwind-dark {
    --ui-success: #54b054;
    --ui-success-soft: #0d2e0d;
    --ui-warning: #fc9d5e;
    --ui-warning-soft: #3d1f0a;
    --ui-on-severity: #000000;
    --ui-skeleton-shine: rgba(255, 255, 255, 0.08);
}

.ui-theme-highcontrast {
    --ui-success: #3ff23f;
    --ui-success-soft: #000000;
    --ui-warning: #ff9a4b;
    --ui-warning-soft: #000000;
    --ui-on-severity: #000000;
    --ui-skeleton-shine: rgba(255, 255, 255, 0.2);
}

/* --ui-sev* = colours of the element's own severity, used by messages, toasts and progress bars. */
.ui-severity-default {
    --ui-sev: var(--ui-muted);
    --ui-sev-text: var(--ui-text);
    --ui-sev-icon: var(--ui-muted);
    --ui-sev-soft: var(--ui-default-soft, var(--ui-button-disabled-bg));
    --ui-sev-border: var(--ui-input-border);
    --ui-sev-on: var(--ui-surface);
}

.ui-severity-info {
    --ui-sev: var(--ui-info, var(--ui-accent));
    --ui-sev-text: var(--ui-info-text, var(--ui-info, var(--ui-accent)));
    --ui-sev-icon: var(--ui-sev-text);
    --ui-sev-soft: var(--ui-info-soft, var(--ui-accent-soft));
    --ui-sev-border: var(--ui-info-border, color-mix(in srgb, var(--ui-info, var(--ui-accent)) 45%, var(--ui-surface)));
    --ui-sev-on: var(--ui-info-on, var(--ui-on-accent));
}

.ui-severity-success {
    --ui-sev: var(--ui-success);
    --ui-sev-text: var(--ui-success-text, var(--ui-success));
    --ui-sev-icon: var(--ui-sev-text);
    --ui-sev-soft: var(--ui-success-soft);
    --ui-sev-border: var(--ui-success-border, color-mix(in srgb, var(--ui-success) 45%, var(--ui-surface)));
    --ui-sev-on: var(--ui-on-severity);
}

.ui-severity-warning {
    --ui-sev: var(--ui-warning);
    --ui-sev-text: var(--ui-warning-text, var(--ui-warning));
    --ui-sev-icon: var(--ui-sev-text);
    --ui-sev-soft: var(--ui-warning-soft);
    --ui-sev-border: var(--ui-warning-border, color-mix(in srgb, var(--ui-warning) 45%, var(--ui-surface)));
    --ui-sev-on: var(--ui-on-severity);
}

.ui-severity-error {
    --ui-sev: var(--ui-danger-solid, var(--ui-danger));
    --ui-sev-text: var(--ui-danger);
    --ui-sev-icon: var(--ui-danger);
    --ui-sev-soft: var(--ui-danger-soft);
    --ui-sev-border: var(--ui-danger-border, color-mix(in srgb, var(--ui-danger) 45%, var(--ui-surface)));
    --ui-sev-on: var(--ui-on-severity);
}

/* Icons are masks filled with the severity colour, so one set serves every control and theme.
   Outlined, like Syncfusion's Fluent 2 icon font. */
.ui-severity-icon {
    flex: none;
    width: 16px;
    height: 16px;
    background-color: var(--ui-sev-icon);
    -webkit-mask: no-repeat center / 16px 16px;
    mask: no-repeat center / 16px 16px;
}

.ui-severity-default .ui-severity-icon,
.ui-severity-info .ui-severity-icon {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='6.5' fill='none' stroke='%23000' stroke-width='1.1'/%3E%3Cpath d='M7.45 7h1.1v4.6h-1.1z'/%3E%3Ccircle cx='8' cy='5.1' r='.75'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='6.5' fill='none' stroke='%23000' stroke-width='1.1'/%3E%3Cpath d='M7.45 7h1.1v4.6h-1.1z'/%3E%3Ccircle cx='8' cy='5.1' r='.75'/%3E%3C/svg%3E");
}

.ui-severity-success .ui-severity-icon {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='6.5' fill='none' stroke='%23000' stroke-width='1.1'/%3E%3Cpath d='M5 8.2l2 2 4-4.2' fill='none' stroke='%23000' stroke-width='1.1' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='6.5' fill='none' stroke='%23000' stroke-width='1.1'/%3E%3Cpath d='M5 8.2l2 2 4-4.2' fill='none' stroke='%23000' stroke-width='1.1' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.ui-severity-warning .ui-severity-icon {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 1.8L14.6 13.7H1.4z' fill='none' stroke='%23000' stroke-width='1.1' stroke-linejoin='round'/%3E%3Cpath d='M7.45 6h1.1v4h-1.1z'/%3E%3Ccircle cx='8' cy='11.6' r='.75'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 1.8L14.6 13.7H1.4z' fill='none' stroke='%23000' stroke-width='1.1' stroke-linejoin='round'/%3E%3Cpath d='M7.45 6h1.1v4h-1.1z'/%3E%3Ccircle cx='8' cy='11.6' r='.75'/%3E%3C/svg%3E");
}

.ui-severity-error .ui-severity-icon {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='6.5' fill='none' stroke='%23000' stroke-width='1.1'/%3E%3Cpath d='M5.6 5.6l4.8 4.8M10.4 5.6l-4.8 4.8' fill='none' stroke='%23000' stroke-width='1.1' stroke-linecap='round'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='6.5' fill='none' stroke='%23000' stroke-width='1.1'/%3E%3Cpath d='M5.6 5.6l4.8 4.8M10.4 5.6l-4.8 4.8' fill='none' stroke='%23000' stroke-width='1.1' stroke-linecap='round'/%3E%3C/svg%3E");
}

/* Close (×) button of messages and toasts: the × character stays in the markup for old browsers and
   screen readers' sake, the visible glyph is a thin cross drawn by ::before. */
.ui-message-close,
.ui-toast-close {
    position: relative;
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 0 0 auto;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: none;
    color: inherit;
    font-size: 0;
    line-height: 0;
    cursor: pointer;
}

.ui-message-close::before,
.ui-toast-close::before {
    content: "";
    width: var(--ui-close-glyph, 12px);
    height: var(--ui-close-glyph, 12px);
    background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M1.5 1.5l9 9M10.5 1.5l-9 9' stroke='%23000' stroke-width='1.2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / contain;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M1.5 1.5l9 9M10.5 1.5l-9 9' stroke='%23000' stroke-width='1.2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / contain;
}

.ui-message-close:hover,
.ui-message-close:focus-visible {
    background-color: color-mix(in srgb, currentColor 12%, transparent);
    box-shadow: 0 0 0 2px color-mix(in srgb, currentColor 12%, transparent);
    outline: none;
}

.ui-toast-close:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 1px;
}

.ui-visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ---------- Message (Syncfusion e-message: Text, Outlined, Filled) ---------- */

.ui-message {
    display: flex;
    align-items: flex-start;
    box-sizing: border-box;
    padding: 9.2px;
    border: 1px solid var(--ui-sev-border);
    border-radius: var(--ui-radius);
    background: var(--ui-sev-soft);
    color: var(--ui-text);
    font-family: var(--ui-font);
    font-size: 12px;
    font-weight: 400;
    line-height: 16px;
}

.ui-message[hidden] {
    display: none;
}

.ui-message-icon {
    margin: 0 4px 0 2px;
}

/* IconCss: the app's own icon, at the size and colour of the severity's. */
.ui-message-custom-icon {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    font-size: 16px;
    line-height: 1;
}

.ui-message-content {
    flex: 1;
    min-width: 0;
    padding: 0 4px;
    overflow-wrap: anywhere;
}

.ui-message-content a {
    color: inherit;
    font-weight: 600;
    text-decoration: underline;
}

.ui-message-close {
    width: 12px;
    height: 12px;
    margin: 2px 2px 2px auto;
    color: var(--ui-muted);
}

.ui-message-outlined {
    background: transparent;
    color: var(--ui-sev-text);
}

.ui-message-filled {
    border-color: var(--ui-sev);
    background: var(--ui-sev);
    color: var(--ui-sev-on);
}

.ui-message-filled .ui-severity-icon {
    background-color: currentColor;
}

.ui-message-filled .ui-message-close {
    color: inherit;
}

/* ContentAlignment: auto margins centre the icon and text in the room left of the × button. */
.ui-message-center > :first-child {
    margin-left: auto;
}

.ui-message-center .ui-message-content,
.ui-message-right .ui-message-content {
    flex: 0 1 auto;
}

.ui-message-center .ui-message-content:last-child {
    margin-right: auto;
}

.ui-message-right {
    justify-content: flex-end;
}

.ui-message-right .ui-message-close {
    margin-left: 4px;
}

/* ---------- Toast (Syncfusion e-toast) ---------- */

.ui-toast {
    position: fixed;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-sizing: border-box;
    max-width: 100vw;
    padding: 10px;
    pointer-events: none; /* only the toasts themselves take clicks */
}

.ui-toast-topleft { top: 0; left: 0; align-items: flex-start; }
.ui-toast-topcenter { top: 0; left: 50%; transform: translateX(-50%); align-items: center; }
.ui-toast-topright { top: 0; right: 0; align-items: flex-end; }
.ui-toast-bottomleft { bottom: 0; left: 0; align-items: flex-start; }
.ui-toast-bottomcenter { bottom: 0; left: 50%; transform: translateX(-50%); align-items: center; }
.ui-toast-bottomright { bottom: 0; right: 0; align-items: flex-end; }

.ui-toast-targeted { position: absolute; }
.ui-toast-custom { align-items: flex-start; }
.ui-toast-full { left: 0; right: 0; transform: none; align-items: stretch; width: 100%; }
.ui-toast-custom-icon { flex: none; width: 20px; height: 20px; }

.ui-toast-item {
    position: relative;
    display: flex;
    align-items: flex-start;
    box-sizing: border-box;
    width: var(--ui-toast-width, 300px);
    max-width: calc(100vw - 20px);
    padding: 16px;
    overflow: hidden;
    border: 1px solid var(--ui-border);
    border-radius: calc(var(--ui-radius) * 1.5);
    background: var(--ui-sev-soft);
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.14), 0 0 2px 0 rgba(0, 0, 0, 0.12);
    color: var(--ui-text);
    font-family: var(--ui-font);
    font-size: 14px;
    line-height: 20px;
    pointer-events: auto;
    animation: ui-toast-in 0.3s ease-out;
}

.ui-toast-item.ui-toast-clickable {
    cursor: pointer;
}

/* A 16px glyph centred in Syncfusion's 20px icon box, 10px from the text. */
.ui-toast-icon {
    margin: 4px 12px 0 2px;
}

.ui-toast-body {
    flex: 1;
    min-width: 0;
    align-self: center;
    overflow-wrap: anywhere;
}

.ui-toast-title {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.ui-toast-title + .ui-toast-content {
    padding-top: 8px;
}

.ui-toast-item.ui-severity-default .ui-toast-content {
    color: var(--ui-muted);
}

.ui-toast-close {
    width: 20px;
    height: 20px;
    margin-left: 8px;
    --ui-close-glyph: 14px;
    color: var(--ui-sev-icon);
}

/* Action buttons (Syncfusion ActionButtons): flat, right-aligned under the text. */
.ui-toast-actions {
    margin: 1px;
    padding: 8px 0 0 8px;
    text-align: right;
}

.ui-toast-action {
    margin-left: 10px;
    padding: 4px 12px;
    border: 1px solid transparent;
    border-radius: var(--ui-radius);
    background: transparent;
    color: var(--ui-text);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 20px;
    cursor: pointer;
}

.ui-toast-action:hover {
    background: color-mix(in srgb, var(--ui-text) 8%, transparent);
}

.ui-toast-action:focus-visible {
    outline: 2px solid var(--ui-accent);
    outline-offset: 1px;
}

.ui-toast-action-primary {
    background: var(--ui-accent);
    color: var(--ui-on-accent);
}

.ui-toast-action-primary:hover {
    background: var(--ui-accent-hover);
}

/* Time left: shrinks from full width to nothing over the toast's timeout. */
.ui-toast-progress {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 4px;
    background: var(--ui-accent);
    transform-origin: left center;
    animation-name: ui-toast-time;
    animation-timing-function: linear;
    animation-fill-mode: forwards;
}

.ui-toast-item.ui-toast-leaving {
    animation: ui-toast-out 0.3s ease-in forwards;
}

@keyframes ui-toast-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes ui-toast-out {
    to { opacity: 0; }
}

@keyframes ui-toast-time {
    from { transform: scaleX(1); }
    to { transform: scaleX(0); }
}

/* ---------- Badge (Syncfusion e-badge) ----------
   --ui-bdg-bg / -fg / -line: the badge's colour, set by its colour class; Ghost turns it into an outline. */

.ui-badge {
    --ui-bdg-bg: var(--ui-accent);
    --ui-bdg-fg: var(--ui-on-accent);
    --ui-bdg-line: var(--ui-bdg-bg);
    --ui-bdg-ghost: var(--ui-bdg-line);
    display: inline-block;
    box-sizing: border-box;
    padding: 2px 6px;
    overflow: hidden;
    border: 0 solid var(--ui-bdg-line);
    border-radius: var(--ui-radius);
    background: var(--ui-bdg-bg);
    color: var(--ui-bdg-fg);
    font-family: var(--ui-font);
    font-size: 12px;
    font-weight: 500;
    line-height: 16px;
    text-align: center;
    text-decoration: none;
    text-indent: 0;
    white-space: nowrap;
    vertical-align: middle;
}

.ui-badge[hidden] {
    display: none;
}

.ui-badge-secondary {
    --ui-bdg-bg: var(--ui-badge-secondary, var(--ui-surface));
    --ui-bdg-fg: var(--ui-badge-secondary-on, var(--ui-text));
    --ui-bdg-line: var(--ui-badge-secondary-border, var(--ui-input-border));
    --ui-bdg-ghost: var(--ui-badge-secondary, var(--ui-muted));
    border-width: 1px;
}

.ui-badge-success {
    --ui-bdg-bg: var(--ui-badge-success, var(--ui-success));
    --ui-bdg-fg: var(--ui-on-severity);
}

.ui-badge-danger {
    --ui-bdg-bg: var(--ui-badge-danger, var(--ui-danger));
    --ui-bdg-fg: var(--ui-on-severity);
}

.ui-badge-warning {
    --ui-bdg-bg: var(--ui-badge-warning, var(--ui-warning));
    --ui-bdg-fg: var(--ui-badge-warning-on, var(--ui-on-severity));
    --ui-bdg-ghost: var(--ui-badge-warning-ghost, var(--ui-warning));
}

.ui-badge-info {
    --ui-bdg-bg: var(--ui-badge-info, var(--ui-info, var(--ui-accent)));
    --ui-bdg-fg: var(--ui-badge-info-on, var(--ui-on-accent));
    --ui-bdg-ghost: var(--ui-info-text, var(--ui-info, var(--ui-accent)));
}

.ui-badge-light {
    --ui-bdg-bg: var(--ui-badge-light, #e6e6e6);
    --ui-bdg-fg: #424242;
    --ui-bdg-ghost: var(--ui-muted);
}

.ui-badge-dark {
    --ui-bdg-bg: var(--ui-text);
    --ui-bdg-fg: var(--ui-surface);
}

.ui-badge-ghost {
    border-width: 1px;
    background: transparent;
    color: var(--ui-bdg-ghost);
}

/* Link badge: a.ui-badge, underlined on hover like Syncfusion's. */
a.ui-badge:hover {
    color: var(--ui-bdg-fg);
    text-decoration: underline;
}

a.ui-badge.ui-badge-ghost:hover {
    color: var(--ui-bdg-ghost);
}

a.ui-badge:focus-visible {
    outline: 2px solid var(--ui-accent);
    outline-offset: 2px;
}

.ui-badge-pill {
    border-radius: 10px;
}

/* Placed badges are positioned against the nearest positioned parent, e.g. <span class="ui-badge-host">. */
.ui-badge-host {
    position: relative;
    display: inline-block;
}

.ui-badge-notification {
    position: absolute;
    top: -10px;
    left: 100%;
    width: auto;
    min-width: 32px;
    height: 20px;
    padding: 2px 6px;
    border-radius: 12px;
    font-size: 12px;
    line-height: 16px;
}

.ui-badge-circle {
    width: 20px;
    min-width: 0;
    height: 20px;
    padding: 2px 4px;
    border-radius: 12px;
    line-height: 16px;
}

.ui-badge-circle.ui-badge-ghost,
.ui-badge-notification.ui-badge-ghost {
    line-height: 14px;
}

.ui-badge-overlap {
    position: absolute;
    top: -10px;
    left: 100%;
    transform: translateX(-50%);
}

.ui-badge-dot {
    position: relative;
    top: -1px;
    width: 10px;
    min-width: 0;
    height: 10px;
    margin: 0;
    padding: 0;
    overflow: visible;
    border-radius: 10px;
    box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.14), 0 0 2px 0 rgba(0, 0, 0, 0.12);
}

.ui-badge-dot.ui-badge-notification,
.ui-badge-dot.ui-badge-overlap {
    position: absolute;
    top: -3px;
    left: 100%;
    min-width: 0;
    height: 10px;
    padding: 0;
}

.ui-badge-bottom.ui-badge-dot.ui-badge-notification,
.ui-badge-bottom.ui-badge-dot.ui-badge-overlap {
    top: auto;
    bottom: 3px;
}

.ui-badge-bottom.ui-badge-notification:not(.ui-badge-dot),
.ui-badge-bottom.ui-badge-overlap:not(.ui-badge-dot) {
    top: auto;
    bottom: -3px;
}

/* Inside a button: sits on the text line. */
button .ui-badge {
    position: relative;
    top: -2px;
    line-height: 0.9;
}

button .ui-badge.ui-badge-circle {
    width: 22px;
    height: 22px;
    line-height: 1.2;
}

button .ui-badge-notification,
button .ui-badge-overlap {
    position: absolute;
    line-height: 16px;
}

button .ui-badge-notification:not(.ui-badge-bottom),
button .ui-badge-overlap:not(.ui-badge-bottom) {
    top: -10px;
}

button .ui-badge-dot.ui-badge-notification:not(.ui-badge-bottom),
button .ui-badge-dot.ui-badge-overlap:not(.ui-badge-bottom) {
    top: -3px;
}

/* Bigger (Syncfusion e-bigger): the touch size. */
.ui-badge-bigger {
    height: 24px;
    padding: 2px 6px;
    font-size: 14px;
    line-height: 20px;
}

.ui-badge-bigger.ui-badge-pill {
    padding: 2px 8px;
}

.ui-badge-bigger.ui-badge-ghost {
    padding: 0 10px;
}

.ui-badge-bigger.ui-badge-notification {
    min-width: 34px;
    padding: 2px 8px;
    border-radius: 10px;
}

.ui-badge-bigger.ui-badge-circle {
    width: 24px;
    min-width: 0;
    padding: 2px 5px;
    border-radius: 12px;
}

.ui-badge-bigger.ui-badge-dot {
    width: 14px;
    height: 14px;
    padding: 0;
}

/* ---------- Progress bar ---------- */

.ui-progressbar {
    position: relative;
    box-sizing: border-box;
    color: var(--ui-text);
    font-family: var(--ui-font);
    font-size: var(--ui-font-size);
}

.ui-progressbar.ui-severity-info { --ui-progress-color: var(--ui-info, var(--ui-accent)); }
.ui-progressbar.ui-severity-success { --ui-progress-color: var(--ui-success); }
.ui-progressbar.ui-severity-warning { --ui-progress-color: var(--ui-warning); }
.ui-progressbar.ui-severity-error { --ui-progress-color: var(--ui-danger); }

.ui-progressbar-label {
    color: var(--ui-muted);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* linear */

.ui-progressbar-linear {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ui-progressbar-linear .ui-progressbar-track {
    position: relative;
    flex: 1;
    height: var(--ui-progress-thickness, 6px);
    overflow: hidden;
    background: var(--ui-progress-track, var(--ui-border));
}

.ui-progressbar-linear .ui-progressbar-value,
.ui-progressbar-linear .ui-progressbar-secondary {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    background: var(--ui-progress-color, var(--ui-accent));
}

.ui-progressbar-linear .ui-progressbar-secondary {
    opacity: 0.35;
}

.ui-progressbar-linear.ui-progressbar-rounded .ui-progressbar-track,
.ui-progressbar-linear.ui-progressbar-rounded .ui-progressbar-value,
.ui-progressbar-linear.ui-progressbar-rounded .ui-progressbar-secondary {
    border-radius: 999px;
}

.ui-progressbar-linear.ui-progressbar-animated .ui-progressbar-value,
.ui-progressbar-linear.ui-progressbar-animated .ui-progressbar-secondary {
    transition: width 0.35s ease;
}

/* Active (Syncfusion's isActive): a light sweeps along the bar. */
.ui-progressbar-active .ui-progressbar-value { position: relative; overflow: hidden; }
.ui-progressbar-active .ui-progressbar-value::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
    transform: translateX(-100%);
    animation: ui-progress-active 1.6s ease-in-out infinite;
}
@keyframes ui-progress-active { to { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) { .ui-progressbar-active .ui-progressbar-value::after { animation: none; } }

.ui-progressbar-striped .ui-progressbar-value {
    background-image: linear-gradient(45deg,
        rgba(255, 255, 255, 0.25) 25%, transparent 25%, transparent 50%,
        rgba(255, 255, 255, 0.25) 50%, rgba(255, 255, 255, 0.25) 75%, transparent 75%, transparent);
    background-size: 16px 16px;
}

.ui-progressbar-striped.ui-progressbar-animated .ui-progressbar-value {
    animation: ui-progress-stripes 0.8s linear infinite;
}

/* Segments: gaps cut into the track, --ui-progress-segments set by the helper. */
.ui-progressbar-segmented .ui-progressbar-track {
    --ui-progress-segment: calc(100% / var(--ui-progress-segments, 1));
    -webkit-mask-image: repeating-linear-gradient(to right, #000 0, #000 calc(var(--ui-progress-segment) - 3px), transparent calc(var(--ui-progress-segment) - 3px), transparent var(--ui-progress-segment));
    mask-image: repeating-linear-gradient(to right, #000 0, #000 calc(var(--ui-progress-segment) - 3px), transparent calc(var(--ui-progress-segment) - 3px), transparent var(--ui-progress-segment));
}

.ui-progressbar-linear.ui-progressbar-indeterminate .ui-progressbar-value {
    width: 40% !important;
    animation: ui-progress-slide 1.5s ease-in-out infinite;
}

/* circular */

.ui-progressbar-circular {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
}

.ui-progressbar-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
    overflow: visible;
}

.ui-progressbar-svg circle {
    fill: none;
}

.ui-progressbar-svg .ui-progressbar-track {
    stroke: var(--ui-progress-track, var(--ui-border));
}

.ui-progressbar-svg .ui-progressbar-value,
.ui-progressbar-svg .ui-progressbar-secondary {
    stroke: var(--ui-progress-color, var(--ui-accent));
}

.ui-progressbar-svg .ui-progressbar-secondary {
    opacity: 0.35;
}

.ui-progressbar-rounded .ui-progressbar-svg .ui-progressbar-value,
.ui-progressbar-rounded .ui-progressbar-svg .ui-progressbar-secondary {
    stroke-linecap: round;
}

.ui-progressbar-circular.ui-progressbar-animated .ui-progressbar-value,
.ui-progressbar-circular.ui-progressbar-animated .ui-progressbar-secondary {
    transition: stroke-dasharray 0.35s ease;
}

.ui-progressbar-circular .ui-progressbar-label {
    position: absolute;
    color: var(--ui-text);
    font-size: 1.15em;
    font-weight: 600;
}

.ui-progressbar-circular.ui-progressbar-indeterminate .ui-progressbar-svg {
    animation: ui-spin 1.2s linear infinite;
}

.ui-progressbar-circular.ui-progressbar-indeterminate .ui-progressbar-value {
    stroke-dasharray: 28 100;
    transition: none;
}

@keyframes ui-progress-stripes {
    from { background-position: 16px 0; }
    to { background-position: 0 0; }
}

@keyframes ui-progress-slide {
    from { left: -40%; }
    to { left: 100%; }
}

/* ShowTooltip: the value over the end of a bar, or over a ring. */
.ui-progressbar-has-tip {
    outline: none;
}

.ui-progressbar-has-tip:focus-visible {
    outline: 2px solid var(--ui-accent);
    outline-offset: 3px;
    border-radius: 4px;
}

.ui-progressbar-tip {
    position: absolute;
    z-index: 2;
    bottom: calc(100% + 8px);
    left: 50%;
    padding: 3px 8px;
    border-radius: 4px;
    background: var(--ui-lay-tip-bg, #323130);
    color: #fff;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    pointer-events: none;
    transform: translateX(-50%);
}

.ui-progressbar-tip[hidden] {
    display: none;
}

.ui-progressbar-tip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border: 5px solid transparent;
    border-top-color: var(--ui-lay-tip-bg, #323130);
}

.ui-progressbar-circular .ui-progressbar-tip {
    bottom: calc(100% + 4px);
}

/* ContentTemplate: in the middle of a ring, after a bar. */
.ui-progressbar-content {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ui-progressbar-circular .ui-progressbar-content {
    position: absolute;
    flex-direction: column;
    justify-content: center;
    text-align: center;
}

/* ---------- Skeleton (Syncfusion e-skeleton: Wave, Fade, Pulse) ---------- */

.ui-skeleton[hidden] {
    display: none;
}

.ui-skeleton-text {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ui-skeleton-bone {
    position: relative;
    display: block;
    overflow: hidden;
    background: var(--ui-skeleton-bg, var(--ui-border));
}

.ui-skeleton-line,
.ui-skeleton-square,
.ui-skeleton-rectangle { border-radius: var(--ui-radius); }
.ui-skeleton-circle { border-radius: 999px; }

/* Wave: a gradient twice as wide as the bone slides across it. Fluent 2 sweeps a grey band over a light
   surface; the other themes sweep a light shine over the grey. */
.ui-shimmer-wave .ui-skeleton-bone::after,
.ui-shimmer-wave.ui-skeleton-bone::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: calc(200% + 200px);
    background-image: linear-gradient(90deg,
        var(--ui-skeleton-wave-base, transparent) calc(50% - 100px),
        var(--ui-skeleton-wave-band, var(--ui-skeleton-shine)) 50%,
        var(--ui-skeleton-wave-base, transparent) calc(50% + 100px));
    animation: ui-skeleton-wave 3s ease-in-out infinite;
}

.ui-shimmer-fade .ui-skeleton-bone,
.ui-shimmer-fade.ui-skeleton-bone {
    animation: ui-skeleton-fade 3s ease-in-out infinite;
}

.ui-shimmer-pulse .ui-skeleton-bone,
.ui-shimmer-pulse.ui-skeleton-bone {
    animation: ui-skeleton-pulse 3s ease-in-out infinite;
}

@keyframes ui-skeleton-wave {
    to { transform: translateX(calc(50% + 100px)); }
}

@keyframes ui-skeleton-fade {
    0% { opacity: 1; }
    50% { opacity: 0.4; }
    100% { opacity: 1; }
}

@keyframes ui-skeleton-pulse {
    0% { transform: scale(1); }
    40% { transform: scale(1); }
    50% { transform: scale(0.975); }
    100% { transform: scale(1); }
}

/* ---------- Spinner (Syncfusion e-spinner: the look follows the theme) ---------- */

.ui-spinner {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: var(--ui-spinner-color, var(--ui-accent));
    font-family: var(--ui-font);
    font-size: 14px;
}

.ui-spinner[hidden] {
    display: none;
}

.ui-spinner-svg {
    width: var(--ui-spinner-size, 36px);
    height: var(--ui-spinner-size, 36px);
    overflow: visible;
    animation: ui-spin 1.3s cubic-bezier(0.53, 0.21, 0.29, 0.67) infinite;
}

.ui-spinner-svg circle {
    fill: none;
    stroke-width: 2.5;
}

/* Fluent 2 / Fabric / High Contrast: a light ring with a quarter arc going round. */
.ui-spinner-track {
    stroke: var(--ui-accent-soft);
}

.ui-spinner-arc {
    stroke: var(--ui-spinner-color, var(--ui-accent));
    stroke-linecap: round;
    stroke-dasharray: 31.4 94.3;
}

/* Material 3: an arc growing and shrinking, no ring. */
.ui-theme-material3 .ui-spinner-svg,
.ui-theme-material3-dark .ui-spinner-svg {
    animation: ui-spin 1.57s linear infinite;
}

.ui-theme-material3 .ui-spinner-svg circle,
.ui-theme-material3-dark .ui-spinner-svg circle {
    stroke-width: 4;
}

.ui-theme-material3 .ui-spinner-track,
.ui-theme-material3-dark .ui-spinner-track {
    stroke: transparent;
}

.ui-theme-material3 .ui-spinner-arc,
.ui-theme-material3-dark .ui-spinner-arc {
    stroke-linecap: square;
    animation: ui-spinner-dash 1.4s ease-in-out infinite;
}

/* Bootstrap 5: a fast three-quarter ring, as Bootstrap's own spinner. */
.ui-theme-bootstrap5 .ui-spinner-svg,
.ui-theme-bootstrap5-dark .ui-spinner-svg {
    animation: ui-spin 0.75s linear infinite;
}

.ui-theme-bootstrap5 .ui-spinner-svg circle,
.ui-theme-bootstrap5-dark .ui-spinner-svg circle {
    stroke-width: 4;
}

.ui-theme-bootstrap5 .ui-spinner-track,
.ui-theme-bootstrap5-dark .ui-spinner-track {
    stroke: transparent;
}

.ui-theme-bootstrap5 .ui-spinner-arc,
.ui-theme-bootstrap5-dark .ui-spinner-arc {
    stroke-linecap: square;
    stroke-dasharray: 94.3 31.4;
}

/* Tailwind: thicker ring, steady speed. */
.ui-theme-tailwind .ui-spinner-svg,
.ui-theme-tailwind-dark .ui-spinner-svg {
    animation-timing-function: linear;
}

.ui-theme-tailwind .ui-spinner-svg circle,
.ui-theme-tailwind-dark .ui-spinner-svg circle {
    stroke-width: 4.5;
}

/* Lumen.showSpinner(element): covers the element until hideSpinner. */
.ui-spinner-overlay {
    position: absolute;
    inset: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: inherit;
    background: var(--ui-overlay);
}

@keyframes ui-spin {
    to { transform: rotate(360deg); }
}

@keyframes ui-spinner-dash {
    0% { stroke-dasharray: 1 150; stroke-dashoffset: 0; }
    50% { stroke-dasharray: 90 150; stroke-dashoffset: -35; }
    100% { stroke-dasharray: 90 150; stroke-dashoffset: -124; }
}

/* ---------- reduced motion: keep what signals activity, drop the rest ---------- */

@media (prefers-reduced-motion: reduce) {
    .ui-toast-item,
    .ui-toast-item.ui-toast-leaving,
    .ui-shimmer-wave .ui-skeleton-bone::after,
    .ui-shimmer-wave.ui-skeleton-bone::after,
    .ui-shimmer-fade .ui-skeleton-bone,
    .ui-shimmer-fade.ui-skeleton-bone,
    .ui-shimmer-pulse .ui-skeleton-bone,
    .ui-shimmer-pulse.ui-skeleton-bone,
    .ui-progressbar-striped.ui-progressbar-animated .ui-progressbar-value {
        animation: none;
    }

    .ui-progressbar-animated .ui-progressbar-value,
    .ui-progressbar-animated .ui-progressbar-secondary {
        transition: none;
    }

    .ui-spinner-svg,
    .ui-progressbar-circular.ui-progressbar-indeterminate .ui-progressbar-svg {
        animation-duration: 3s;
    }
}
