/* Lumen.UI.Mvc - ui-navigation.css. Tabs, Accordion, Sidebar, Context Menu, Toolbar, TreeView,
   Breadcrumb, Stepper (Syncfusion's Navigation group, Fluent 2 metrics).
   Linked by @Html.UiStyles() (not loaded on demand): these controls are rendered as finished HTML and
   must look right, and be open or closed as asked, at first paint.
   Colours come from the shared --ui-* tokens in ui-core.css. */

.ui-tabs,
.ui-accordion,
.ui-sidebar,
.ui-contextmenu {
    box-sizing: border-box;
    color: var(--ui-text);
    font-family: var(--ui-font);
    font-size: var(--ui-font-size);
    color-scheme: var(--ui-color-scheme);
}

/* An icon from the app's own icon font (IconCss). */
.ui-nav-icon {
    flex: none;
    display: inline-block;
    width: 16px;
    height: 16px;
    font-size: 16px;
    line-height: 16px;
    text-align: center;
}

/* ---------- Tabs ---------- */

.ui-tabs {
    display: flex;
    flex-direction: column;
    background: var(--ui-surface);
}

.ui-tab-list {
    display: flex;
    flex: none;
    overflow-x: auto;
    scrollbar-width: thin;
}

.ui-tab {
    position: relative;
    display: inline-flex;
    flex: none;
    align-items: center;
    gap: 6px;
    height: 44px;
    margin: 0;
    padding: 0 10px;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: var(--ui-muted);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 19px;
    white-space: nowrap;
    cursor: pointer;
}

.ui-tab[hidden] {
    display: none;
}

/* The line that marks the selected tab (and, lighter, the one under the pointer). */
.ui-tab::after {
    content: "";
    position: absolute;
    right: 8px;
    bottom: 0;
    left: 8px;
    height: 3px;
    border-radius: 4px;
    background: transparent;
    transition: background-color 0.1s ease;
}

.ui-tab:hover {
    color: var(--ui-text);
}

.ui-tab:hover::after {
    background: var(--ui-input-border);
}

.ui-tab-selected,
.ui-tab-selected:hover {
    color: var(--ui-text);
}

.ui-tab-selected::after,
.ui-tab-selected:hover::after {
    background: var(--ui-accent);
}

.ui-tab:disabled,
.ui-tab:disabled:hover {
    color: var(--ui-disabled);
    cursor: not-allowed;
}

.ui-tab:disabled:hover::after {
    background: transparent;
}

.ui-tab:focus-visible {
    outline: 2px solid var(--ui-accent);
    outline-offset: -2px;
}

.ui-tab-panels {
    flex: 1 1 auto;
    min-width: 0;
    overflow: auto;
}

/* Syncfusion's content has no padding of its own: the template brings it. */
.ui-tab-panel {
    padding: 0;
}

.ui-tab-panel:focus-visible {
    outline: 2px solid var(--ui-accent);
    outline-offset: -2px;
}

/* headers below, left or right */

/* ShowCloseButton */
.ui-tab-close {
    display: inline-block;
    flex: none;
    width: 16px;
    height: 16px;
    margin-left: 8px;
    border-radius: 3px;
    background-color: var(--ui-icon, var(--ui-muted));
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 4l8 8M12 4l-8 8' fill='none' 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 16 16'%3E%3Cpath d='M4 4l8 8M12 4l-8 8' fill='none' stroke='%23000' stroke-width='1.2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / contain;
    cursor: pointer;
}

.ui-tab-close:hover {
    background-color: var(--ui-text);
}

/* Header styles: Fill (a tinted header row) and Accent (the chosen tab in the accent colour). */
.ui-tabs-fill > .ui-tab-list {
    background: var(--ui-header-bg, #f3f2f1);
}

.ui-tabs-accent > .ui-tab-list {
    background: var(--ui-accent);
}

.ui-tabs-accent > .ui-tab-list > .ui-tab {
    color: #fff;
}

.ui-tabs-accent > .ui-tab-list > .ui-tab.ui-tab-selected {
    background: color-mix(in srgb, #000 22%, var(--ui-accent));
    color: #fff;
}

.ui-tabs-bottom {
    flex-direction: column-reverse;
}

.ui-tabs-bottom > .ui-tab-list {
    border-bottom: 0;
}

.ui-tabs-bottom > .ui-tab-list > .ui-tab::after {
    top: 0;
    bottom: auto;
}

.ui-tabs-left {
    flex-direction: row;
}

.ui-tabs-right {
    flex-direction: row-reverse;
}

.ui-tabs-left > .ui-tab-list,
.ui-tabs-right > .ui-tab-list {
    flex-direction: column;
    overflow-x: visible;
    overflow-y: auto;
    border-bottom: 0;
}

.ui-tabs-left > .ui-tab-list { border-right: 1px solid var(--ui-border); }
.ui-tabs-right > .ui-tab-list { border-left: 1px solid var(--ui-border); }

.ui-tabs-left > .ui-tab-list > .ui-tab::after,
.ui-tabs-right > .ui-tab-list > .ui-tab::after {
    top: 10px;
    bottom: 10px;
    width: 3px;
    height: auto;
}

.ui-tabs-left > .ui-tab-list > .ui-tab::after { right: 0; left: auto; }
.ui-tabs-right > .ui-tab-list > .ui-tab::after { right: auto; left: 0; }

/* ---------- Accordion ---------- */

/* Fluent 2: no frame, items 1px apart, 32px headers; the open item's header is bold. */
.ui-accordion {
    border: 1px solid transparent;
    background: var(--ui-surface);
}

.ui-acc-item {
    border-bottom: 1px solid transparent;
    border-radius: 4px 4px 0 0;
}

.ui-acc-header {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 32px;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
    list-style: none;
    cursor: pointer;
    user-select: none;
}

.ui-acc-header::-webkit-details-marker {
    display: none;
}

.ui-acc-header:hover {
    background: var(--ui-row-hover-bg);
}

.ui-acc-header:focus-visible {
    outline: 2px solid var(--ui-accent);
    outline-offset: -2px;
}

.ui-acc-item[open] > .ui-acc-header {
    font-weight: 600;
}

.ui-acc-arrow {
    flex: none;
    width: 16px;
    height: 16px;
    margin-inline-start: auto;
    background-color: var(--ui-icon, var(--ui-muted));
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2.6 5.6L8 11l5.4-5.4' fill='none' stroke='%23000' stroke-width='1.1' stroke-linecap='round' stroke-linejoin='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 16 16'%3E%3Cpath d='M2.6 5.6L8 11l5.4-5.4' fill='none' stroke='%23000' stroke-width='1.1' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain;
    transition: transform 0.15s ease;
}

.ui-acc-item[open] > .ui-acc-header > .ui-acc-arrow {
    transform: rotate(180deg);
}

.ui-acc-panel {
    padding: 12px;
    font-size: 14px;
    line-height: 20px;
}

.ui-acc-disabled > .ui-acc-header,
.ui-acc-disabled > .ui-acc-header:hover {
    background: transparent;
    color: var(--ui-disabled);
    cursor: not-allowed;
}

.ui-acc-disabled > .ui-acc-header > .ui-acc-arrow {
    background-color: var(--ui-disabled);
}

/* ---------- Sidebar ---------- */

.ui-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    z-index: 1040;
    width: var(--ui-sidebar-width, 260px);
    max-width: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    background: var(--ui-surface);
    /* Closed: moved out of sight, then hidden so nothing in it can be reached. */
    visibility: hidden;
    transition: transform 0.2s ease, width 0.2s ease, visibility 0s linear 0.2s;
}

.ui-sidebar-left {
    left: 0;
    border-right: 1px solid var(--ui-border);
    transform: translateX(-100%);
}

.ui-sidebar-right {
    right: 0;
    border-left: 1px solid var(--ui-border);
    transform: translateX(100%);
}

.ui-sidebar-open {
    visibility: visible;
    transform: none;
    transition: transform 0.2s ease, width 0.2s ease, visibility 0s;
}

.ui-sidebar-over.ui-sidebar-open {
    box-shadow: var(--ui-popup-shadow);
}

/* EnableDock: a strip stays when closed. */
.ui-sidebar-dock:not(.ui-sidebar-open) {
    visibility: visible;
    width: var(--ui-sidebar-dock, 56px);
    overflow: hidden;
    transform: none;
    transition: transform 0.2s ease, width 0.2s ease, visibility 0s;
}

/* Contained: the parent element is the frame instead of the window. */
.ui-sidebar-contained {
    position: absolute;
    z-index: 2;
}

:has(> .ui-sidebar-contained) {
    position: relative;
    overflow: hidden;
}

.ui-sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1039;
    background: rgba(0, 0, 0, 0.4);
}

.ui-sidebar-backdrop.ui-sidebar-contained {
    position: absolute;
    z-index: 1;
}

.ui-sidebar-backdrop[hidden] {
    display: none;
}

/* The element a Push sidebar moves aside (the class is set after the first layout, so that one isn't animated). */
.ui-sidebar-pushed {
    transition: margin 0.2s ease;
}

/* ---------- Context Menu ---------- */

.ui-nav-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.ui-nav-item {
    margin: 0;
    padding: 0;
}

.ui-nav-item[hidden] {
    display: none;
}

.ui-nav-link,
.ui-nav-link:hover,
.ui-nav-link:focus {
    display: flex;
    align-items: center;
    gap: 8px;
    box-sizing: border-box;
    width: 100%;
    min-height: 32px;
    margin: 0;
    padding: 6px;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: var(--ui-text);
    font: inherit;
    font-size: 14px;
    line-height: 19px;
    text-align: left;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
}

.ui-nav-link:hover,
.ui-nav-link[aria-expanded="true"] {
    background: var(--ui-row-hover-bg);
}

.ui-nav-link:focus-visible {
    outline: 2px solid var(--ui-accent);
    outline-offset: -2px;
}

.ui-nav-link[aria-disabled="true"],
.ui-nav-link[aria-disabled="true"]:hover {
    background: transparent;
    color: var(--ui-disabled);
    cursor: not-allowed;
}

.ui-nav-text {
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* The mark of an item with a submenu: right, towards the submenu. */
.ui-nav-caret {
    flex: none;
    width: 14px;
    height: 14px;
    margin-right: 0;
    background-color: var(--ui-icon, var(--ui-muted));
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M5.6 2.6L11 8l-5.4 5.4' fill='none' stroke='%23000' stroke-width='1.1' stroke-linecap='round' stroke-linejoin='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 16 16'%3E%3Cpath d='M5.6 2.6L11 8l-5.4 5.4' fill='none' stroke='%23000' stroke-width='1.1' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain;
}

.ui-nav-link[aria-disabled="true"] > .ui-nav-caret {
    background-color: var(--ui-disabled);
}

.ui-nav-separator {
    height: 0;
    margin: 4px 0;
    border-bottom: 1px solid var(--ui-border);
}

/* A submenu, and the context menu itself: a popup placed by the script. */
.ui-nav-sub {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 10000;
    box-sizing: border-box;
    min-width: 120px;
    max-width: min(360px, calc(100vw - 8px));
    max-height: calc(100vh - 8px);
    padding: 4px;
    overflow-y: auto;
    border: 1px solid var(--ui-border);
    border-radius: 8px;
    background: var(--ui-surface);
    box-shadow: var(--ui-popup-shadow);
}

.ui-nav-sub[hidden] {
    display: none;
}

/* ---------- Toolbar, TreeView, Breadcrumb, Stepper ---------- */

.ui-toolbar,
.ui-treeview,
.ui-breadcrumb,
.ui-stepper {
    box-sizing: border-box;
    color: var(--ui-text);
    font-family: var(--ui-font);
    font-size: 14px;
    color-scheme: var(--ui-color-scheme);
    /* Fluent 2's own values; worked out from the theme for the others (other themes set these tokens to initial) */
    --nav-icon: var(--ui-icon, var(--ui-muted));
    --nav-pressed: var(--ui-list-selected, color-mix(in srgb, var(--ui-text) 10%, var(--ui-surface)));
    --nav-step-bg: var(--ui-list-bg, var(--ui-surface));
    --nav-step-border: var(--ui-upload-dash, var(--ui-input-border));
}

.ui-toolbar *,
.ui-treeview *,
.ui-breadcrumb *,
.ui-stepper * {
    box-sizing: border-box;
}

/* ----- Toolbar ----- */

.ui-toolbar {
    position: relative;
    display: flex;
    width: 100%;
    min-height: 40px;
    background: var(--ui-surface);
}

.ui-tb-items {
    display: flex;
    flex: 1 1 auto;
    align-items: stretch;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: thin;
}

.ui-toolbar-popup .ui-tb-items {
    overflow: hidden;
}

/* Extended: the popup is a second row of the toolbar, opened by the expand button. */
.ui-toolbar-extended {
    flex-wrap: wrap;
}

.ui-toolbar-extended .ui-tb-popup {
    position: static;
    flex: 0 0 100%;
    flex-direction: row;
    flex-wrap: wrap;
    min-width: 0;
    padding: 0;
    border-width: 1px 0 0;
    border-radius: 0;
    box-shadow: none;
}

.ui-toolbar-extended .ui-tb-popup .ui-tb-btn {
    width: auto;
}

/* MultiRow: the items that don't fit go on the next row. */
.ui-toolbar-multirow .ui-tb-items {
    flex-wrap: wrap;
    overflow: visible;
}

.ui-toolbar-multirow .ui-tb-left,
.ui-toolbar-multirow .ui-tb-center,
.ui-toolbar-multirow .ui-tb-right {
    flex-wrap: wrap;
}

.ui-toolbar-multirow .ui-tb-left {
    flex: 1 1 auto;
}

.ui-tb-left,
.ui-tb-center,
.ui-tb-right {
    display: flex;
    flex: none;
    align-items: stretch;
}

.ui-tb-center {
    flex: 1 1 auto;
    justify-content: center;
}

.ui-tb-right {
    margin-left: auto;
}

.ui-tb-item {
    display: flex;
    flex: none;
    align-items: center;
    margin-left: 8px;
    padding: 4px 0;
}

.ui-tb-item[hidden] {
    display: none;
}

.ui-tb-btn,
.ui-tb-btn:hover,
.ui-tb-btn:focus {
    display: inline-flex;
    align-items: center;
    height: 32px;
    margin: 0;
    padding: 0 8px;
    border: 0;
    border-radius: 4px;
    background: var(--ui-surface);
    color: var(--ui-text);
    font-family: inherit;
    font-size: 14px;
    line-height: 20px;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
}

.ui-tb-btn .ui-nav-icon {
    box-sizing: content-box;
    padding: 8px 4px;
    color: var(--nav-icon);
}

.ui-tb-icon-only,
.ui-tb-icon-only:hover,
.ui-tb-icon-only:focus {
    padding: 0 4px;
}

.ui-tb-icon-only .ui-nav-icon {
    padding: 8px 0;
}

.ui-tb-text {
    padding: 6px 4px;
}

/* ShowTextOn: the text only in the popup (Overflow) or only in the toolbar (Toolbar). */
.ui-tb-items .ui-tb-text-overflow,
.ui-tb-popup .ui-tb-text-toolbar {
    display: none;
}

.ui-tb-popup .ui-tb-text-on-overflow,
.ui-tb-popup .ui-tb-text-on-overflow:hover,
.ui-tb-popup .ui-tb-text-on-overflow:focus {
    padding: 0 4px;
}

.ui-tb-popup .ui-tb-text-on-overflow .ui-nav-icon {
    padding: 8px 4px;
}

.ui-tb-btn:hover {
    background: var(--ui-row-hover-bg);
}

.ui-tb-btn:active,
.ui-tb-btn[aria-pressed="true"] {
    background: var(--nav-pressed);
}

.ui-tb-btn:focus-visible {
    outline: 0;
    box-shadow: inset 0 0 0 1px var(--ui-text), inset 0 0 0 2px var(--ui-surface);
}

.ui-tb-btn[aria-disabled="true"],
.ui-tb-btn[aria-disabled="true"]:hover {
    background: var(--ui-surface);
    color: var(--ui-disabled);
    cursor: default;
}

.ui-tb-btn[aria-disabled="true"] .ui-nav-icon {
    color: var(--ui-disabled);
}

.ui-tb-separator {
    align-self: center;
    width: 1px;
    height: 24px;
    margin: 8px 4px;
    padding: 0;
    border-right: 1px solid var(--ui-border);
}

.ui-tb-input {
    font-size: 14px;
}

/* Popup mode: "more" and the items that didn't fit */
.ui-tb-more {
    flex: none;
    width: 40px;
    margin: 4px 0 4px 4px;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: var(--nav-icon);
    cursor: pointer;
}

.ui-tb-more::before {
    content: "";
    display: block;
    width: 16px;
    height: 16px;
    margin: auto;
    background-color: currentColor;
    -webkit-mask: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='3' r='1.2'/%3E%3Ccircle cx='8' cy='8' r='1.2'/%3E%3Ccircle cx='8' cy='13' r='1.2'/%3E%3C/svg%3E");
    mask: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='3' r='1.2'/%3E%3Ccircle cx='8' cy='8' r='1.2'/%3E%3Ccircle cx='8' cy='13' r='1.2'/%3E%3C/svg%3E");
}

.ui-tb-more:hover,
.ui-tb-more[aria-expanded="true"] {
    background: var(--ui-row-hover-bg);
}

.ui-tb-more[hidden],
.ui-tb-popup[hidden] {
    display: none;
}

.ui-tb-popup {
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    min-width: 160px;
    padding: 4px;
    border: 1px solid var(--ui-border);
    border-radius: 8px;
    background: var(--ui-surface);
    box-shadow: var(--ui-popup-shadow);
}

.ui-tb-popup .ui-tb-item {
    margin: 0;
    padding: 0;
}

.ui-tb-popup .ui-tb-btn {
    width: 100%;
}

/* Breadcrumb: an item that beforeItemRender disabled */
.ui-bc-disabled .ui-bc-text {
    opacity: .5;
    pointer-events: none;
    cursor: default;
}

/* ----- TreeView ----- */

.ui-treeview {
    overflow: auto;
    border: 1px solid var(--ui-border);
    border-radius: 4px;
    background: var(--ui-surface);
}

.ui-tree-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.ui-tree-list[hidden] {
    display: none;
}

.ui-tree-item {
    margin: 0;
    padding: 0;
    outline: 0;
}

.ui-tree-row {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 38px;
    padding: 4px 0 4px calc(12px + var(--ui-tree-level, 0) * 20px);
    cursor: pointer;
    user-select: none;
}

/* the full-row highlight: Syncfusion's 32px rounded band, 4px in from the sides */
.ui-tree-row::before {
    content: "";
    position: absolute;
    top: 3px;
    right: 4px;
    bottom: 3px;
    left: 4px;
    border: 1px solid transparent;
    border-radius: 4px;
    pointer-events: none;
}

.ui-tree-row:hover::before {
    background: var(--ui-row-hover-bg);
}

.ui-tree-selected > .ui-tree-row::before,
.ui-tree-selected > .ui-tree-row:hover::before {
    background: var(--nav-pressed);
}

.ui-tree-item:focus-visible > .ui-tree-row::before {
    border-color: var(--ui-text);
    box-shadow: inset 0 0 0 1px var(--ui-surface);
}

.ui-tree-toggle {
    position: relative;
    flex: none;
    width: 20px;
    height: 14px;
}

.ui-tree-toggle:not(.ui-tree-leaf)::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 14px;
    height: 14px;
    border-radius: 15px;
    background-color: var(--nav-icon);
    -webkit-mask: no-repeat center / 12px 12px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M6 3.5L10.5 8 6 12.5' fill='none' stroke='%23000' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    mask: no-repeat center / 12px 12px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M6 3.5L10.5 8 6 12.5' fill='none' stroke='%23000' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    transition: transform 0.15s ease;
}

.ui-tree-item[aria-expanded="true"] > .ui-tree-row > .ui-tree-toggle::after {
    transform: rotate(90deg);
}

.ui-tree-check {
    position: relative;
    flex: none;
    width: 16px;
    height: 16px;
    margin-left: 12px;
    border: 1px solid var(--ui-muted);
    border-radius: 2px;
    background: var(--ui-surface);
}

.ui-tree-check.ui-tree-checked {
    border-color: var(--ui-accent);
    background: var(--ui-accent);
}

.ui-tree-check.ui-tree-checked::after {
    content: "";
    position: absolute;
    inset: 0;
    background-color: var(--ui-on-accent);
    -webkit-mask: no-repeat center / 12px 12px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.2 8.4l3 3 6.6-6.8' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    mask: no-repeat center / 12px 12px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.2 8.4l3 3 6.6-6.8' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.ui-tree-check.ui-tree-partly {
    border-color: var(--ui-accent);
}

.ui-tree-check.ui-tree-partly::after {
    content: "";
    position: absolute;
    inset: 3px;
    border-radius: 1px;
    background: var(--ui-accent);
}

.ui-tree-row > .ui-nav-icon {
    position: relative;
    margin-left: 12px;
    color: var(--nav-icon);
}

.ui-tree-text,
.ui-tree-text:hover {
    position: relative;
    padding: 0 12px;
    overflow: hidden;
    color: var(--ui-text);
    line-height: 30px;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ui-tree-disabled > .ui-tree-row {
    cursor: default;
}

.ui-tree-disabled > .ui-tree-row .ui-tree-text,
.ui-tree-disabled > .ui-tree-row .ui-nav-icon {
    color: var(--ui-disabled);
}

.ui-tree-disabled > .ui-tree-row:hover::before {
    background: transparent;
}

/* ----- Breadcrumb ----- */

.ui-bc-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ui-bc-item {
    display: flex;
    align-items: center;
    min-height: 32px;
}

.ui-bc-hidden {
    display: none !important;
}

.ui-bc-text,
.ui-bc-text:hover,
.ui-bc-collapsed {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: var(--nav-icon);
    font-family: inherit;
    font-size: 14px;
    line-height: 20px;
    text-decoration: none;
}

a.ui-bc-text:hover,
.ui-bc-collapsed:hover {
    background: var(--ui-row-hover-bg);
    color: var(--ui-text);
    cursor: pointer;
}

a.ui-bc-text:focus-visible,
.ui-bc-collapsed:focus-visible {
    outline: 0;
    box-shadow: inset 0 0 0 1px var(--ui-text), inset 0 0 0 2px var(--ui-surface);
}

.ui-bc-current .ui-bc-text {
    color: var(--ui-text);
    font-weight: 600;
}

.ui-bc-disabled .ui-bc-text {
    color: var(--ui-disabled);
}

.ui-bc-separator {
    padding: 9px 4px;
    color: var(--nav-icon);
    font-size: 14px;
    line-height: 14px;
}

.ui-bc-no-separator .ui-bc-item + .ui-bc-item {
    margin-left: 20px;
}

/* ----- Stepper ----- */

.ui-stepper {
    position: relative;
    display: block;
}

.ui-step-list {
    position: relative;
    display: flex;
    justify-content: space-between;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ui-stepper-vertical .ui-step-list {
    flex-direction: column;
    gap: 40px;
}

/* The line behind the steps; the steps' own background hides it under them, as in Syncfusion. */
.ui-step-track {
    position: absolute;
    top: 15px;
    right: 0;
    left: 0;
    height: 2px;
    background: var(--ui-border);
}

.ui-stepper:has(.ui-step-label-only) .ui-step-track {
    top: 14px;
}

.ui-step-progress {
    width: var(--ui-step-progress, 0%);
    height: 100%;
    background: var(--ui-accent);
    transition: width 0.2s ease;
}

.ui-stepper-vertical .ui-step-track {
    top: 0;
    bottom: 0;
    left: 15px;
    width: 2px;
    height: auto;
}

.ui-stepper-vertical .ui-step-progress {
    width: 100%;
    height: var(--ui-step-progress, 0%);
}

.ui-step-item {
    position: relative;
    display: flex;
}

.ui-step-button {
    display: inline-flex;
    align-items: center;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--ui-text);
    font-family: inherit;
    font-size: 14px;
    text-align: left;
    cursor: pointer;
}

.ui-stepper-readonly .ui-step-button {
    cursor: default;
}

.ui-step-button:focus-visible {
    outline: 0;
}

.ui-step-button:focus-visible .ui-step,
.ui-step-button:focus-visible .ui-step-label {
    outline: 2px solid var(--ui-text);
    outline-offset: 2px;
}

.ui-step {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 9999px;
    font-size: 16px;
    line-height: 16px;
}

.ui-step .ui-nav-icon {
    width: 16px;
    height: 16px;
}

.ui-step-completed .ui-step,
.ui-step-selected .ui-step {
    background: var(--ui-accent);
    color: var(--ui-on-accent);
    box-shadow: 0 0 0 8px var(--nav-step-bg);
}

.ui-step-selected .ui-step {
    box-shadow: 0 0 0 2px var(--nav-step-bg), 0 0 0 4px var(--ui-accent), 0 0 0 8px var(--nav-step-bg);
}

.ui-step-notstarted .ui-step {
    border: 1px solid var(--nav-step-border);
    background: var(--nav-step-bg);
    color: var(--nav-icon);
    box-shadow: 0 0 0 8px var(--nav-step-bg);
}

.ui-step-label {
    display: inline-flex;
    flex-direction: column;
    padding: 0 8px;
    background: var(--nav-step-bg);
    font-size: 14px;
    line-height: 19px;
    white-space: nowrap;
}

.ui-step-label-only .ui-step-label {
    padding: 5px 8px;
}

.ui-step-completed .ui-step-label {
    color: var(--ui-accent);
}

.ui-step-selected .ui-step-label {
    color: var(--ui-accent);
    font-weight: 600;
}

.ui-step-optional {
    color: var(--ui-muted);
    font-size: 12px;
    font-weight: 400;
}

.ui-step-invalid .ui-step {
    border-color: var(--ui-danger);
    background: var(--ui-danger);
    color: #fff;
    box-shadow: 0 0 0 8px var(--nav-step-bg);
}

.ui-step-invalid .ui-step-label {
    color: var(--ui-danger);
}

.ui-step-disabled .ui-step-button {
    opacity: 0.5;
    cursor: default;
}

/* labels under / above / before the circle */
.ui-stepper-label-bottom .ui-step-button,
.ui-stepper-label-top .ui-step-button {
    flex-direction: column;
    gap: 12px;
    text-align: center;
}

.ui-stepper-label-top .ui-step-button {
    flex-direction: column-reverse;
}

.ui-stepper-label-top .ui-step-track {
    top: auto;
    bottom: 15px;
}

.ui-stepper-label-before .ui-step-button {
    flex-direction: row-reverse;
}

.ui-stepper-label-bottom .ui-step-label,
.ui-stepper-label-top .ui-step-label {
    padding: 0 4px;
    background: transparent;
}

@media (prefers-reduced-motion: reduce) {
    .ui-step-progress,
    .ui-tree-toggle::after {
        animation: none !important;
        transition: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ui-sidebar,
    .ui-sidebar-open,
    .ui-sidebar-pushed,
    .ui-acc-arrow,
    .ui-tab::after {
        transition: none;
    }
}

/* ---------- Breadcrumb OverflowMode ---------- */

.ui-bc-overflow-scroll .ui-bc-list,
.ui-bc-overflow-none .ui-bc-list {
    flex-wrap: nowrap;
}

.ui-bc-overflow-scroll .ui-bc-list {
    overflow-x: auto;
    scrollbar-width: thin;
}

.ui-bc-overflow-scroll .ui-bc-item,
.ui-bc-overflow-scroll .ui-bc-separator,
.ui-bc-overflow-none .ui-bc-item,
.ui-bc-overflow-none .ui-bc-separator {
    flex: none;
    white-space: nowrap;
}

/* Menu: the items left out, in a popup under "...". */
.ui-bc-collapsed-item {
    position: relative;
}

.ui-bc-menu {
    position: absolute;
    z-index: 1050;
    top: 100%;
    left: 0;
    min-width: 160px;
    margin: 2px 0 0;
    padding: 4px;
    list-style: none;
    border: 1px solid var(--ui-border);
    border-radius: var(--ui-radius);
    background: var(--ui-surface);
    box-shadow: var(--ui-popup-shadow);
}

.ui-bc-menu-item {
    display: block;
    padding: 6px 10px;
    border-radius: 4px;
    color: var(--ui-text);
    text-decoration: none;
    white-space: nowrap;
}

a.ui-bc-menu-item:hover,
a.ui-bc-menu-item:focus-visible {
    outline: none;
    background: var(--ui-row-hover-bg);
}

.ui-bc-menu-item[aria-disabled="true"] {
    color: var(--ui-disabled);
}

/* ---------- Context menu ItemTemplate ---------- */

.ui-nav-template {
    display: flex;
    flex: 1;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

/* ---------- Tabs OverflowMode: scroll buttons, or a "more" popup ---------- */

.ui-tabs {
    position: relative;
}

.ui-tabs-nav {
    position: absolute;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    padding: 0;
    border: 0;
    background: var(--ui-surface);
    color: var(--ui-muted);
    cursor: pointer;
}

.ui-tabs-nav[hidden] {
    display: none;
}

.ui-tabs-nav:hover:not(:disabled) {
    background: var(--ui-row-hover-bg);
    color: var(--ui-text);
}

.ui-tabs-nav:disabled {
    color: var(--ui-disabled);
    cursor: default;
}

.ui-tabs-nav::before {
    content: "";
    width: 7px;
    height: 7px;
    border: solid currentColor;
    border-width: 0 0 1.5px 1.5px;
}

.ui-tabs-scroll-prev { left: 0; }
.ui-tabs-scroll-prev::before { transform: translateX(2px) rotate(45deg); }
.ui-tabs-scroll-next { right: 0; }
.ui-tabs-scroll-next::before { transform: translateX(-2px) rotate(-135deg); }

.ui-tabs-overflowing > .ui-tab-list {
    padding: 0 32px;
    scrollbar-width: none;
}

.ui-tabs-overflowing > .ui-tab-list::-webkit-scrollbar {
    display: none;
}

.ui-tabs-more { right: 0; }
.ui-tabs-more::before {
    width: 4px;
    height: 4px;
    border: 0;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 -6px 0 currentColor, 0 6px 0 currentColor;
}

.ui-tabs-popup-mode > .ui-tab-list {
    overflow-x: hidden;
}

.ui-tab.ui-tab-overflowed {
    display: none;
}

.ui-tabs-menu {
    position: absolute;
    z-index: 1050;
    right: 0;
    min-width: 160px;
    padding: 4px;
    border: 1px solid var(--ui-border);
    border-radius: var(--ui-radius);
    background: var(--ui-surface);
    box-shadow: var(--ui-popup-shadow);
}

.ui-tabs-menu-item {
    display: block;
    width: 100%;
    padding: 6px 10px;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: var(--ui-text);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.ui-tabs-menu-item:hover,
.ui-tabs-menu-item:focus-visible {
    outline: none;
    background: var(--ui-row-hover-bg);
}

.ui-tabs-menu-item:disabled {
    color: var(--ui-disabled);
    cursor: default;
}

/* AllowDragAndDrop */
.ui-tabs-draggable > .ui-tab-list > .ui-tab:not(:disabled) {
    touch-action: none;
}

.ui-tab.ui-tab-dragging {
    opacity: 0.5;
}

/* ---------- TreeView: pictures, templates, editing, dragging, load on demand, virtualization ---------- */

.ui-tree-image {
    position: relative;
    flex: none;
    width: 24px;
    height: 24px;
    margin-left: 10px;
    border-radius: 50%;
    object-fit: cover;
}

.ui-tree-text.ui-tree-templated {
    display: inline-flex;
    flex: 1;
    align-items: center;
    gap: 8px;
}

.ui-tree-edit {
    position: relative;
    flex: 1;
    min-width: 0;
    height: 28px;
    margin: 0 8px 0 10px;
    padding: 0 6px;
    border: 1px solid var(--ui-accent);
    border-radius: 4px;
    background: var(--ui-surface);
    color: var(--ui-text);
    font: inherit;
}

.ui-tree-draggable .ui-tree-row {
    touch-action: none;
}

.ui-tree-item.ui-tree-dragging > .ui-tree-row {
    opacity: 0.5;
}

.ui-tree-row.ui-tree-drop-inside::before {
    border-color: var(--ui-accent);
    background: var(--ui-accent-soft, var(--ui-row-hover-bg));
}

.ui-tree-row.ui-tree-drop-before::after,
.ui-tree-row.ui-tree-drop-after::after {
    content: "";
    position: absolute;
    right: 4px;
    left: calc(12px + var(--ui-tree-level, 0) * 20px);
    height: 2px;
    background: var(--ui-accent);
}

.ui-tree-row.ui-tree-drop-before::after { top: 0; }
.ui-tree-row.ui-tree-drop-after::after { bottom: 0; }

.ui-tree-ghost {
    position: fixed;
    z-index: 2000;
    padding: 4px 10px;
    border: 1px solid var(--ui-border);
    border-radius: 4px;
    background: var(--ui-surface);
    box-shadow: var(--ui-popup-shadow);
    color: var(--ui-text);
    font-family: var(--ui-font);
    font-size: var(--ui-font-size);
    pointer-events: none;
}

.ui-tree-toggle.ui-tree-loading::after {
    border: 2px solid var(--ui-border);
    border-top-color: var(--ui-accent);
    background: transparent;
    -webkit-mask: none;
    mask: none;
    animation: ui-tree-spin 0.8s linear infinite;
}

@keyframes ui-tree-spin {
    to { transform: rotate(360deg); }
}

.ui-tree-virtual {
    overflow-y: auto;
}
