/*
 * Jump.Ui.Components — field components.
 *
 * Every value is a token on :root, and every default is the value a Jump.Server field
 * measures today inside .app-page (Bootstrap 4 + site.css + forms.css + Radzen.css, in the
 * _Host.cshtml order). An app that wants another look overrides the tokens after this file;
 * it never restyles the classes.
 *
 * The classes are this library's own (jump-ui-*), never form-control: the components must
 * look the same in an app that does not load Bootstrap, and in Jump.Server they must not be
 * reached by css/Radzen.css, which loads last and wins over bare-class rules.
 */

:root {
    --jump-ui-field-height: 34px;
    --jump-ui-field-padding-y: 4px;
    --jump-ui-field-padding-x: 12px;
    --jump-ui-field-radius: 7px;
    --jump-ui-field-border-width: 1px;
    --jump-ui-field-border: #d6e3f2;
    --jump-ui-field-background: #ffffff;
    --jump-ui-field-ink: #06245d;
    --jump-ui-field-font-size: 12px;
    --jump-ui-field-font-weight: 600;
    --jump-ui-field-line-height: 1.5;
    --jump-ui-field-placeholder: #6c757d;
    --jump-ui-field-focus-border: #62a8ff;
    --jump-ui-field-focus-ring: rgba(0, 87, 184, .11);
    --jump-ui-field-disabled-background: #f3f7fc;
    --jump-ui-field-disabled-ink: #7890ad;
    --jump-ui-field-readonly-background: #e9ecef;
    --jump-ui-field-invalid: #dc3545;
    --jump-ui-field-required: #dc3545;
    --jump-ui-label-ink: #557097;
    --jump-ui-label-font-size: 11px;
    --jump-ui-label-font-weight: 700;
    --jump-ui-label-gap: 4px;
    --jump-ui-textarea-fill-min-height: 120px;
    /* Measured on a live DxCheckBox with jump-form-status-check: the DevExpress sizes after that
       class's scale(.88), so the odd fractions are the rendered pixels, not a choice. */
    --jump-ui-check-size: 17.6px;
    --jump-ui-check-radius: 2.64px;
    --jump-ui-check-border-width: 1.76px;
    /* DxCheckBox draws the empty box at half opacity; rgba keeps that over any background. */
    --jump-ui-check-border: rgba(6, 36, 93, .5);
    --jump-ui-check-background: rgba(245, 247, 250, .5);
    --jump-ui-check-checked: #004987;
    --jump-ui-check-mark: #ffffff;
    --jump-ui-check-mark-size: 12.32px;
    --jump-ui-check-disabled: #06245d;
    --jump-ui-check-disabled-mark: #f5f7fa;
    --jump-ui-check-disabled-opacity: .7;
    --jump-ui-check-disabled-field-opacity: .6;
    --jump-ui-check-gap: 7.04px;
    --jump-ui-check-ink: #06245d;
    --jump-ui-check-font-size: 12.32px;
    --jump-ui-check-line-height: 17.6px;
    /* Radio: the circle shares the checkbox's size, colours and states; only the dot and the
       spacing between choices are its own. */
    --jump-ui-radio-dot-size: 7.04px;
    --jump-ui-radio-gap: 16px;
    --jump-ui-radio-row-gap: 8px;
    --jump-ui-radio-description-ink: #557097;
    --jump-ui-radio-description-font-size: 11px;
    /* File: the button is a field-height control with the field's border and type. */
    --jump-ui-file-gap: 8px;
    --jump-ui-file-icon-size: 14px;
    --jump-ui-file-button-hover-background: #f3f7fc;
    --jump-ui-file-size-ink: #557097;
    --jump-ui-file-hint-ink: #557097;
    --jump-ui-file-hint-font-size: 11px;
    --jump-ui-file-preview-size: 120px;
    --jump-ui-search-icon-size: 14px;
    --jump-ui-search-icon-inset: 10px;
    --jump-ui-search-icon-ink: #557097;
    --jump-ui-search-clear-size: 22px;
    --jump-ui-search-clear-hover-background: #f3f7fc;
    --jump-ui-search-compact-height: 28px;
    /* Colour: a field-height swatch beside the text, the colour inset by the padding. */
    --jump-ui-color-gap: 6px;
    --jump-ui-color-swatch-padding: 3px;
    /* Button: measured on .jump-dialog-button, the footer button every dialog already draws. The
       minimum width is 0 here; the dialog footer raises it so its buttons line up. */
    --jump-ui-button-height: 34px;
    --jump-ui-button-compact-height: 28px;
    --jump-ui-button-padding-x: 16px;
    --jump-ui-button-compact-padding-x: 10px;
    --jump-ui-button-min-width: 0;
    --jump-ui-button-radius: 8px;
    --jump-ui-button-gap: 8px;
    --jump-ui-button-font-size: 12px;
    --jump-ui-button-font-weight: 850;
    --jump-ui-button-accent: #0057b8;
    --jump-ui-button-surface: #ffffff;
    --jump-ui-button-border: #cfdded;
    --jump-ui-button-primary-shadow: 0 10px 24px rgba(16, 42, 84, .10);
    --jump-ui-button-danger-ink: #b42318;
    --jump-ui-button-danger-border: #f1b3b6;
    --jump-ui-button-disabled-opacity: .62;
    --jump-ui-button-spinner-size: 12px;
    --jump-ui-button-spinner-width: 2px;

    /* Status pill: the jump-status-pill family of badges.css, measured in its real compositions. */
    --jump-ui-pill-height: 24px;
    --jump-ui-pill-padding: 3px 10px;
    --jump-ui-pill-font-size: 11px;
    --jump-ui-pill-large-height: 32px;
    --jump-ui-pill-large-padding: 6px 12px;
    --jump-ui-pill-large-font-size: 12px;
    --jump-ui-pill-font-weight: 800;
    --jump-ui-pill-truncate-width: 180px;
    --jump-ui-pill-muted-background: #f4f7fa;
    --jump-ui-pill-muted-ink: #5a6b82;
    --jump-ui-pill-neutral-background: #edf4ff;
    --jump-ui-pill-neutral-ink: #0d63c7;
    --jump-ui-pill-positive-background: #e8f8ee;
    --jump-ui-pill-positive-ink: #16643a;
    --jump-ui-pill-warning-background: #fff5e6;
    --jump-ui-pill-warning-ink: #8b5e00;
    --jump-ui-pill-critical-background: #fdecec;
    --jump-ui-pill-critical-ink: #a13030;
    --jump-ui-pill-dirty-bar: #b26a00;

    /* Context menu: measured on .jump-context-menu, the hand-written menu of Jump.Server. */
    --jump-ui-menu-min-width: 220px;
    --jump-ui-menu-max-width: 280px;
    --jump-ui-menu-radius: 10px;
    --jump-ui-menu-border: #dbe7f6;
    --jump-ui-menu-background: rgba(255, 255, 255, .98);
    --jump-ui-menu-shadow: 0 18px 42px rgba(10, 26, 58, .18);
    --jump-ui-menu-ink: #06245d;
    --jump-ui-menu-muted: #557097;
    --jump-ui-menu-title-background: linear-gradient(180deg, #fbfdff, #f4f8ff);
    --jump-ui-menu-separator: #e8eff8;
    --jump-ui-menu-item-separator: #edf3fb;
    --jump-ui-menu-item-hover-background: #eef6ff;
    --jump-ui-menu-item-hover-ink: #0057b8;
    --jump-ui-menu-item-disabled-ink: #91a2bd;
    --jump-ui-menu-item-danger-ink: #a12b2b;
    --jump-ui-menu-item-danger-hover-background: #fdecec;
    --jump-ui-menu-icon-ink: #6c819f;
    --jump-ui-menu-icon-size: 11px;
    --jump-ui-menu-count-background: #ecfff5;
    --jump-ui-menu-count-ink: #007a3d;
    --jump-ui-menu-z-index: 11000;

    /* Empty state: measured on .jump-form-empty-state of jump-form.css. */
    --jump-ui-empty-min-height: 120px;
    --jump-ui-empty-compact-min-height: 88px;
    --jump-ui-empty-fill-min-height: 180px;
    --jump-ui-empty-padding: 14px;
    --jump-ui-empty-compact-padding: 10px;
    --jump-ui-empty-border: #c9d8eb;
    --jump-ui-empty-radius: 8px;
    --jump-ui-empty-background: #f8fafc;
    --jump-ui-empty-ink: #557097;
    --jump-ui-empty-strong-ink: #06245d;
    --jump-ui-empty-icon-ink: #9bb0cb;
    --jump-ui-empty-icon-size: 16px;
    --jump-ui-empty-detail-ink: #6c7f99;

    /* Tabs: the strip of JumpFormTabsSection as it was drawn in jump-form.css, white with a
       bottom rule; the open tab is a light-blue sheet sitting on that rule. */
    --jump-ui-tabs-gap: 4px;
    --jump-ui-tabs-padding: 6px 8px 0;
    --jump-ui-tabs-border: var(--app-page-border, #dbe7f6);
    --jump-ui-tabs-background: #ffffff;
    --jump-ui-tabs-scrollbar: #9fb2cc;
    --jump-ui-tab-height: 36px;
    --jump-ui-tab-padding-x: 14px;
    --jump-ui-tab-radius: 8px;
    --jump-ui-tab-gap: 6px;
    --jump-ui-tab-font-family: var(--app-page-font-family, 'Inter', 'Segoe UI', sans-serif);
    --jump-ui-tab-font-size: 12px;
    --jump-ui-tab-font-weight: 800;
    --jump-ui-tab-ink: #06245d;
    --jump-ui-tab-hover-background: #f3f8ff;
    --jump-ui-tab-hover-ink: #0057b8;
    --jump-ui-tab-active-background: #eef6ff;
    --jump-ui-tab-active-border: #b9d2f4;
    --jump-ui-tab-active-ink: #0057b8;
    --jump-ui-tab-focus: #0057b8;
    --jump-ui-tab-disabled-opacity: .6;
    --jump-ui-tab-icon-ink: #2f6fdf;
    --jump-ui-tab-icon-size: 11px;
    --jump-ui-tab-count-background: #dbe7f6;
    --jump-ui-tab-count-ink: #0057b8;
    --jump-ui-tab-count-warning-background: #fef0c7;
    --jump-ui-tab-count-warning-ink: #93370d;
    --jump-ui-tab-count-critical-background: #fde2e2;
    --jump-ui-tab-count-critical-ink: #b42318;
    --jump-ui-tab-dirty: #c99400;
    --jump-ui-tab-close-ink: #8798b3;
    --jump-ui-tab-close-hover-background: #dbe7f6;
    --jump-ui-tab-close-hover-ink: #b42318;
    --jump-ui-tab-pin-ink: #8798b3;
    --jump-ui-tab-pin-active-ink: #2f6fdf;
    --jump-ui-tabs-menu-border: #dbe7f6;
    --jump-ui-tabs-menu-shadow: 0 14px 30px rgba(14, 53, 122, .16);

    /* Spinner: a ring in the colour of the text around it, open on one side. The loading state
       uses the same steps as the empty state, without its dashed box: a wait is not an absence. */
    --jump-ui-spinner-color: currentColor;
    --jump-ui-spinner-size: 16px;
    --jump-ui-spinner-small-size: 12px;
    --jump-ui-spinner-large-size: 32px;
    --jump-ui-spinner-width: 2px;
    --jump-ui-spinner-large-width: 3px;
    --jump-ui-spinner-duration: .75s;
    --jump-ui-loading-min-height: 120px;
    --jump-ui-loading-compact-min-height: 88px;
    --jump-ui-loading-fill-min-height: 180px;
    --jump-ui-loading-padding: 14px;
    --jump-ui-loading-compact-padding: 10px;
    --jump-ui-loading-ink: #557097;
    --jump-ui-loading-spinner-color: #0057b8;
    --jump-ui-loading-detail-ink: #6c7f99;

    /* Callout: the look jump-form-callout had (a light box with a border, 12px text, the mark on
       the left), one colour set per state. */
    --jump-ui-callout-padding: 8px 10px;
    --jump-ui-callout-compact-padding: 4px 8px;
    --jump-ui-callout-radius: 8px;
    --jump-ui-callout-gap: 8px;
    --jump-ui-callout-font-size: 12px;
    --jump-ui-callout-compact-font-size: 11px;
    --jump-ui-callout-mark-size: 16px;
    --jump-ui-callout-info-border: #d5e2f2;
    --jump-ui-callout-info-background: #f7fbff;
    --jump-ui-callout-info-ink: #31476d;
    --jump-ui-callout-info-mark: #2f6fdf;
    --jump-ui-callout-positive-border: #b7e4c7;
    --jump-ui-callout-positive-background: #f0faf3;
    --jump-ui-callout-positive-ink: #1d5e34;
    --jump-ui-callout-positive-mark: #1d7a3d;
    --jump-ui-callout-warning-border: #f3d9a6;
    --jump-ui-callout-warning-background: #fff8ea;
    --jump-ui-callout-warning-ink: #6f4a00;
    --jump-ui-callout-warning-mark: #c27c00;
    --jump-ui-callout-critical-border: #f5c2c0;
    --jump-ui-callout-critical-background: #fef3f2;
    --jump-ui-callout-critical-ink: #8a1c14;
    --jump-ui-callout-critical-mark: #d92d20;
    --jump-ui-callout-neutral-border: #dbe3ec;
    --jump-ui-callout-neutral-background: #f8fafc;
    --jump-ui-callout-neutral-ink: #557097;
    --jump-ui-callout-neutral-mark: #8798b3;

    /* KPI: the summary tile of the record pages (jump-form-telemetry-kpi-card), with the coloured
       bar on the left that billing-kpi used for a state. */
    --jump-ui-kpi-min-width: 132px;
    --jump-ui-kpi-group-gap: 8px;
    --jump-ui-kpi-padding: 10px 12px;
    --jump-ui-kpi-gap: 4px;
    --jump-ui-kpi-radius: 12px;
    --jump-ui-kpi-border: rgba(208, 224, 245, .95);
    --jump-ui-kpi-background: linear-gradient(180deg, rgba(255, 255, 255, .99), rgba(250, 253, 255, .99));
    --jump-ui-kpi-shadow: 0 8px 18px rgba(27, 79, 145, .05);
    --jump-ui-kpi-bar-width: 4px;
    --jump-ui-kpi-label-ink: #6883aa;
    --jump-ui-kpi-label-font-size: 10px;
    --jump-ui-kpi-value-ink: #0b4aa2;
    --jump-ui-kpi-value-font-size: 18px;
    --jump-ui-kpi-note-ink: #6883aa;
    --jump-ui-kpi-note-font-size: 11px;
    --jump-ui-kpi-accent: #2f6fdf;
    --jump-ui-kpi-positive: #0f9d58;
    --jump-ui-kpi-warning: #c58a00;
    --jump-ui-kpi-critical: #d93025;
}

.jump-ui-field {
    min-width: 0;
}

.jump-ui-label {
    display: block;
    margin: 0 0 var(--jump-ui-label-gap);
    color: var(--jump-ui-label-ink);
    font-size: var(--jump-ui-label-font-size);
    font-weight: var(--jump-ui-label-font-weight);
    line-height: 1.15;
}

.jump-ui-control {
    display: block;
    box-sizing: border-box;
    width: 100%;
    min-height: var(--jump-ui-field-height);
    margin: 0;
    padding: var(--jump-ui-field-padding-y) var(--jump-ui-field-padding-x);
    border: var(--jump-ui-field-border-width) solid var(--jump-ui-field-border);
    border-radius: var(--jump-ui-field-radius);
    background: var(--jump-ui-field-background);
    color: var(--jump-ui-field-ink);
    font-family: inherit;
    font-size: var(--jump-ui-field-font-size);
    font-weight: var(--jump-ui-field-font-weight);
    line-height: var(--jump-ui-field-line-height);
}

.jump-ui-control::placeholder {
    color: var(--jump-ui-field-placeholder);
    opacity: 1;
}

.jump-ui-control:focus {
    border-color: var(--jump-ui-field-focus-border);
    outline: 0;
    box-shadow: 0 0 0 3px var(--jump-ui-field-focus-ring);
}

.jump-ui-control[readonly] {
    background: var(--jump-ui-field-readonly-background);
}

.jump-ui-control:disabled {
    background: var(--jump-ui-field-disabled-background);
    color: var(--jump-ui-field-disabled-ink);
}

/* Multi-line text: the height comes from the rows the size sets, not from the single-line minimum,
   and the user may make it taller but not wider. */
.jump-ui-control--textarea {
    min-height: 0;
    height: auto;
    resize: vertical;
}

/* Fill: the field takes the height of its container and the box takes what the caption leaves. */
.jump-ui-field--fill {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.jump-ui-control--fill {
    flex: 1 1 auto;
    min-height: var(--jump-ui-textarea-fill-min-height);
    resize: none;
}

/* Numbers always align right, and without the browser's spin arrows. */
.jump-ui-control--number {
    text-align: right;
    -moz-appearance: textfield;
    appearance: textfield;
}

.jump-ui-control--number::-webkit-inner-spin-button,
.jump-ui-control--number::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Same convention as .jump-form-card-field--required in Jump.Server: an outline, not a label mark. */
.jump-ui-field--required .jump-ui-control {
    outline: 1px solid var(--jump-ui-field-required);
    outline-offset: 1px;
}

.jump-ui-field--invalid .jump-ui-control {
    border-color: var(--jump-ui-field-invalid);
}

.jump-ui-error {
    margin-top: 4px;
    color: var(--jump-ui-field-invalid);
    font-size: var(--jump-ui-label-font-size);
    font-weight: var(--jump-ui-field-font-weight);
    line-height: 1.3;
}

/* Checkbox. The box and the text beside it are drawn to look like the app's DxCheckBox with
   jump-form-status-check; the input stays a native checkbox, only its appearance is replaced. */
/* Flex, not inline-block: an inline box adds a line strut under the label, and its height then
   changes with the box's own baseline, so a ticked and an unticked box would not line up. */
.jump-ui-check-field {
    display: inline-flex;
    flex-direction: column;
}

.jump-ui-check {
    display: inline-flex;
    align-items: center;
    gap: var(--jump-ui-check-gap);
    margin: 0;
    color: var(--jump-ui-check-ink);
    font-size: var(--jump-ui-check-font-size);
    line-height: var(--jump-ui-check-line-height);
    cursor: pointer;
}

/* The frame is an inset shadow, not a border: the measured width is 1.76px, and a browser snaps a
   border under 2px down to a whole device pixel. */
.jump-ui-check-input {
    --jump-ui-check-frame: var(--jump-ui-check-border);
    --jump-ui-check-focus: 0 0 transparent;
    -webkit-appearance: none;
    appearance: none;
    display: inline-grid;
    place-content: center;
    flex: 0 0 auto;
    box-sizing: border-box;
    width: var(--jump-ui-check-size);
    height: var(--jump-ui-check-size);
    margin: 0;
    border: 0;
    border-radius: var(--jump-ui-check-radius);
    background: var(--jump-ui-check-background);
    box-shadow: inset 0 0 0 var(--jump-ui-check-border-width) var(--jump-ui-check-frame), var(--jump-ui-check-focus);
    cursor: pointer;
}

.jump-ui-check-input:checked {
    --jump-ui-check-frame: var(--jump-ui-check-checked);
    background: var(--jump-ui-check-checked);
}

/* The tick is a mask, so its colour stays a token and it needs no image request. */
.jump-ui-check-input:checked::before {
    content: "";
    width: var(--jump-ui-check-mark-size);
    height: var(--jump-ui-check-mark-size);
    background-color: var(--jump-ui-check-mark);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M1.6 7.3l3.7 3.6L12.4 3' fill='none' stroke='%23000' stroke-width='2'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M1.6 7.3l3.7 3.6L12.4 3' fill='none' stroke='%23000' stroke-width='2'/%3E%3C/svg%3E") center / contain no-repeat;
}

.jump-ui-check-input:focus-visible {
    --jump-ui-check-focus: 0 0 0 3px var(--jump-ui-field-focus-ring);
    outline: 0;
}

/* Disabled dims the whole check and the box once more, as DxCheckBox does. */
.jump-ui-check:has(.jump-ui-check-input:disabled) {
    cursor: default;
    opacity: var(--jump-ui-check-disabled-field-opacity);
}

.jump-ui-check-input:disabled {
    cursor: default;
    opacity: var(--jump-ui-check-disabled-opacity);
}

.jump-ui-check-input:disabled:checked {
    --jump-ui-check-frame: var(--jump-ui-check-disabled);
    background: var(--jump-ui-check-disabled);
}

.jump-ui-check-input:disabled:checked::before {
    background-color: var(--jump-ui-check-disabled-mark);
}

/* Read-only is rendered disabled but must not look unavailable. */
.jump-ui-check:has(.jump-ui-check-input--readonly:disabled),
.jump-ui-check-input--readonly:disabled {
    opacity: 1;
}

.jump-ui-check-input--readonly:disabled:checked {
    --jump-ui-check-frame: var(--jump-ui-check-checked);
    background: var(--jump-ui-check-checked);
}

.jump-ui-check-input--readonly:disabled:checked::before {
    background-color: var(--jump-ui-check-mark);
}

.jump-ui-field--required .jump-ui-check-input {
    outline: 1px solid var(--jump-ui-field-required);
    outline-offset: 1px;
}

.jump-ui-field--invalid .jump-ui-check-input {
    --jump-ui-check-frame: var(--jump-ui-field-invalid);
}

/* Radio group. Each circle is drawn like the app's DxRadio and shares the checkbox tokens; the
   input stays a native radio, so the browser keeps one choice per name and the arrow keys. */
.jump-ui-radio-group {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: var(--jump-ui-radio-row-gap) var(--jump-ui-radio-gap);
}

.jump-ui-radio-group--vertical {
    flex-direction: column;
}

.jump-ui-radio {
    display: inline-flex;
    align-items: flex-start;
    gap: var(--jump-ui-check-gap);
    margin: 0;
    color: var(--jump-ui-check-ink);
    font-size: var(--jump-ui-check-font-size);
    line-height: var(--jump-ui-check-line-height);
    cursor: pointer;
}

.jump-ui-radio-body {
    display: flex;
    flex-direction: column;
}

.jump-ui-radio-description {
    color: var(--jump-ui-radio-description-ink);
    font-size: var(--jump-ui-radio-description-font-size);
    line-height: 1.4;
}

/* The frame is an inset shadow, for the same sub-pixel reason as the checkbox. */
.jump-ui-radio-input {
    --jump-ui-check-frame: var(--jump-ui-check-border);
    --jump-ui-check-focus: 0 0 transparent;
    -webkit-appearance: none;
    appearance: none;
    display: inline-grid;
    place-content: center;
    flex: 0 0 auto;
    box-sizing: border-box;
    width: var(--jump-ui-check-size);
    height: var(--jump-ui-check-size);
    margin: 0;
    border: 0;
    border-radius: 50%;
    background: var(--jump-ui-check-background);
    box-shadow: inset 0 0 0 var(--jump-ui-check-border-width) var(--jump-ui-check-frame), var(--jump-ui-check-focus);
    cursor: pointer;
}

/* The dot is a gradient on the circle itself, not a box inside it: both sizes are fractional
   (17.6px and 7.04px), and the browser rounds two boxes differently, which left the dot up to half
   a pixel off centre. A gradient is centred on the circle by construction. */
.jump-ui-radio-input:checked {
    --jump-ui-check-frame: var(--jump-ui-radio-fill);
    --jump-ui-radio-fill: var(--jump-ui-check-checked);
    --jump-ui-radio-dot: var(--jump-ui-check-mark);
    background: radial-gradient(circle closest-side,
        var(--jump-ui-radio-dot) calc(var(--jump-ui-radio-dot-size) / 2 - .5px),
        var(--jump-ui-radio-fill) calc(var(--jump-ui-radio-dot-size) / 2 + .5px));
}

.jump-ui-radio-input:focus-visible {
    --jump-ui-check-focus: 0 0 0 3px var(--jump-ui-field-focus-ring);
    outline: 0;
}

.jump-ui-radio:has(.jump-ui-radio-input:disabled) {
    cursor: default;
    opacity: var(--jump-ui-check-disabled-field-opacity);
}

.jump-ui-radio-input:disabled {
    cursor: default;
    opacity: var(--jump-ui-check-disabled-opacity);
}

.jump-ui-radio-input:disabled:checked {
    --jump-ui-radio-fill: var(--jump-ui-check-disabled);
    --jump-ui-radio-dot: var(--jump-ui-check-disabled-mark);
}

/* Read-only is rendered disabled but must not look unavailable. */
.jump-ui-radio:has(.jump-ui-radio-input--readonly:disabled),
.jump-ui-radio-input--readonly:disabled {
    cursor: default;
    opacity: 1;
}

.jump-ui-radio-input--readonly:disabled:checked {
    --jump-ui-radio-fill: var(--jump-ui-check-checked);
    --jump-ui-radio-dot: var(--jump-ui-check-mark);
}

.jump-ui-field--required .jump-ui-radio-input {
    outline: 1px solid var(--jump-ui-field-required);
    outline-offset: 1px;
}

.jump-ui-field--invalid .jump-ui-radio-input {
    --jump-ui-check-frame: var(--jump-ui-field-invalid);
}

/* Colour. The swatch is the browser's own picker, framed like a field; the text beside it takes
   what the user types and shows what is stored. */
.jump-ui-color {
    display: grid;
    grid-template-columns: var(--jump-ui-field-height) minmax(0, 1fr);
    align-items: center;
    gap: var(--jump-ui-color-gap);
}

.jump-ui-color-swatch {
    box-sizing: border-box;
    width: var(--jump-ui-field-height);
    height: var(--jump-ui-field-height);
    margin: 0;
    padding: var(--jump-ui-color-swatch-padding);
    border: var(--jump-ui-field-border-width) solid var(--jump-ui-field-border);
    border-radius: var(--jump-ui-field-radius);
    background: var(--jump-ui-field-background);
    cursor: pointer;
}

.jump-ui-color-swatch::-webkit-color-swatch-wrapper {
    padding: 0;
}

.jump-ui-color-swatch::-webkit-color-swatch {
    border: 0;
    border-radius: calc(var(--jump-ui-field-radius) - var(--jump-ui-color-swatch-padding));
}

.jump-ui-color-swatch::-moz-color-swatch {
    border: 0;
    border-radius: calc(var(--jump-ui-field-radius) - var(--jump-ui-color-swatch-padding));
}

.jump-ui-color-swatch:hover:not(:disabled) {
    border-color: var(--jump-ui-field-focus-border);
}

.jump-ui-color-swatch:disabled {
    background: var(--jump-ui-field-disabled-background);
    cursor: default;
}

.jump-ui-color-text {
    font-variant-numeric: tabular-nums;
}

/* File. The native input is kept, out of sight but focusable, and the button is its <label>: the
   browser's own picker, the caption's for and the keyboard all keep working without script. */
.jump-ui-file {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--jump-ui-file-gap);
    min-width: 0;
}

.jump-ui-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    border: 0;
    opacity: 0;
}

.jump-ui-file-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-sizing: border-box;
    min-height: var(--jump-ui-field-height);
    margin: 0;
    padding: var(--jump-ui-field-padding-y) var(--jump-ui-field-padding-x);
    border: var(--jump-ui-field-border-width) solid var(--jump-ui-field-border);
    border-radius: var(--jump-ui-field-radius);
    background: var(--jump-ui-field-background);
    color: var(--jump-ui-field-ink);
    font-size: var(--jump-ui-field-font-size);
    font-weight: var(--jump-ui-field-font-weight);
    line-height: var(--jump-ui-field-line-height);
    white-space: nowrap;
    cursor: pointer;
}

.jump-ui-file-button:hover {
    background: var(--jump-ui-file-button-hover-background);
}

.jump-ui-file-input:focus-visible + .jump-ui-file-button {
    border-color: var(--jump-ui-field-focus-border);
    box-shadow: 0 0 0 3px var(--jump-ui-field-focus-ring);
}

/* A document outline, drawn as a mask so its colour stays the ink token. */
.jump-ui-file-icon {
    flex: 0 0 auto;
    width: var(--jump-ui-file-icon-size);
    height: var(--jump-ui-file-icon-size);
    background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1.5' stroke-linejoin='round'%3E%3Cpath d='M9.5 1.75H4.25a1.5 1.5 0 0 0-1.5 1.5v9.5a1.5 1.5 0 0 0 1.5 1.5h7.5a1.5 1.5 0 0 0 1.5-1.5V5.5z'/%3E%3Cpath d='M9.5 1.75V5.5h3.75'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1.5' stroke-linejoin='round'%3E%3Cpath d='M9.5 1.75H4.25a1.5 1.5 0 0 0-1.5 1.5v9.5a1.5 1.5 0 0 0 1.5 1.5h7.5a1.5 1.5 0 0 0 1.5-1.5V5.5z'/%3E%3Cpath d='M9.5 1.75V5.5h3.75'/%3E%3C/svg%3E") center / contain no-repeat;
}

.jump-ui-file-input:disabled + .jump-ui-file-button {
    background: var(--jump-ui-field-disabled-background);
    color: var(--jump-ui-field-disabled-ink);
    cursor: default;
}

.jump-ui-file-input:disabled + .jump-ui-file-button--readonly {
    background: var(--jump-ui-field-readonly-background);
    color: var(--jump-ui-field-ink);
}

.jump-ui-file-name {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    color: var(--jump-ui-field-ink);
    font-size: var(--jump-ui-field-font-size);
    font-weight: var(--jump-ui-field-font-weight);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.jump-ui-file-size {
    color: var(--jump-ui-file-size-ink);
    font-size: var(--jump-ui-file-hint-font-size);
    white-space: nowrap;
}

.jump-ui-file-clear {
    display: inline-grid;
    place-content: center;
    width: 22px;
    height: 22px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--jump-ui-file-size-ink);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
}

.jump-ui-file-clear:hover,
.jump-ui-file-clear:focus-visible {
    background: var(--jump-ui-file-button-hover-background);
    color: var(--jump-ui-field-ink);
    outline: 0;
}

.jump-ui-file-hint {
    color: var(--jump-ui-file-hint-ink);
    font-size: var(--jump-ui-file-hint-font-size);
}

.jump-ui-file-preview {
    display: block;
    max-width: var(--jump-ui-file-preview-size);
    max-height: var(--jump-ui-file-preview-size);
    border: var(--jump-ui-field-border-width) solid var(--jump-ui-field-border);
    border-radius: var(--jump-ui-field-radius);
    object-fit: contain;
}

.jump-ui-field--required .jump-ui-file-button {
    outline: 1px solid var(--jump-ui-field-required);
    outline-offset: 1px;
}

.jump-ui-field--invalid .jump-ui-file-button {
    border-color: var(--jump-ui-field-invalid);
}

/* Search. A text control with the magnifying glass inside on the left and, while there is text, a
   cross on the right; the padding leaves room for both, so the text never runs under them. */
.jump-ui-search {
    position: relative;
    min-width: 0;
}

.jump-ui-control--search {
    padding-left: calc(var(--jump-ui-search-icon-inset) + var(--jump-ui-search-icon-size) + 6px);
    padding-right: calc(var(--jump-ui-search-clear-size) + 8px);
    -webkit-appearance: none;
    appearance: none;
}

/* The browser's own cross would sit beside ours, and it clears without telling the page. */
.jump-ui-control--search::-webkit-search-cancel-button,
.jump-ui-control--search::-webkit-search-decoration {
    -webkit-appearance: none;
    appearance: none;
}

/* A magnifying glass, drawn as a mask so its colour stays a token. */
.jump-ui-search-icon {
    position: absolute;
    top: 50%;
    left: var(--jump-ui-search-icon-inset);
    width: var(--jump-ui-search-icon-size);
    height: var(--jump-ui-search-icon-size);
    transform: translateY(-50%);
    background-color: var(--jump-ui-search-icon-ink);
    pointer-events: none;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round'%3E%3Ccircle cx='7' cy='7' r='4.75'/%3E%3Cpath d='M10.5 10.5 14 14'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round'%3E%3Ccircle cx='7' cy='7' r='4.75'/%3E%3Cpath d='M10.5 10.5 14 14'/%3E%3C/svg%3E") center / contain no-repeat;
}

.jump-ui-search-clear {
    position: absolute;
    top: 50%;
    right: 6px;
    display: inline-grid;
    place-content: center;
    width: var(--jump-ui-search-clear-size);
    height: var(--jump-ui-search-clear-size);
    margin: 0;
    padding: 0;
    transform: translateY(-50%);
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--jump-ui-search-icon-ink);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
}

.jump-ui-search-clear:hover,
.jump-ui-search-clear:focus-visible {
    background: var(--jump-ui-search-clear-hover-background);
    color: var(--jump-ui-field-ink);
    outline: 0;
}

/* Compact: the height of a compact button, for toolbars and grid headers. */
.jump-ui-search-field--compact .jump-ui-control--search {
    min-height: var(--jump-ui-search-compact-height);
    padding-top: 0;
    padding-bottom: 0;
}

/* Button. One frame for every role; the role only changes the colours. Hover darkens a step, as the
   dialog footer's buttons already do. */
.jump-ui-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--jump-ui-button-gap);
    box-sizing: border-box;
    min-width: var(--jump-ui-button-min-width);
    min-height: var(--jump-ui-button-height);
    margin: 0;
    padding: 0 var(--jump-ui-button-padding-x);
    border: var(--jump-ui-field-border-width) solid var(--jump-ui-button-border);
    border-radius: var(--jump-ui-button-radius);
    background: var(--jump-ui-button-surface);
    color: var(--jump-ui-button-accent);
    font-family: inherit;
    font-size: var(--jump-ui-button-font-size);
    font-weight: var(--jump-ui-button-font-weight);
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
}

.jump-ui-button:hover:not(:disabled) {
    filter: brightness(.98);
}

.jump-ui-button:focus-visible {
    outline: 0;
    box-shadow: 0 0 0 3px var(--jump-ui-field-focus-ring);
}

.jump-ui-button:disabled {
    opacity: var(--jump-ui-button-disabled-opacity);
    cursor: default;
}

.jump-ui-button--primary {
    border-color: var(--jump-ui-button-accent);
    background: var(--jump-ui-button-accent);
    color: #ffffff;
    box-shadow: var(--jump-ui-button-primary-shadow);
}

.jump-ui-button--primary:focus-visible {
    box-shadow: var(--jump-ui-button-primary-shadow), 0 0 0 3px var(--jump-ui-field-focus-ring);
}

.jump-ui-button--danger {
    border-color: var(--jump-ui-button-danger-border);
    color: var(--jump-ui-button-danger-ink);
}

.jump-ui-button--link {
    border-color: transparent;
    background: transparent;
    padding: 0 6px;
}

.jump-ui-button--link:hover:not(:disabled) {
    filter: none;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.jump-ui-button--compact {
    min-height: var(--jump-ui-button-compact-height);
    padding: 0 var(--jump-ui-button-compact-padding-x);
    border-radius: var(--jump-ui-field-radius);
}

.jump-ui-button-icon {
    flex: 0 0 auto;
    line-height: 1;
}

/* Open Iconic nudges every .oi 1px down to sit on a text baseline; the button centres its icon on
   its own, so the nudge only leaves it low. Two classes, to win over .oi wherever it loads. */
.jump-ui-button .jump-ui-button-icon {
    top: 0;
}

/* An icon alone is a square of the button's height, so a row of them lines up with the fields. */
.jump-ui-button--icon {
    width: var(--jump-ui-button-height);
    min-width: 0;
    padding: 0;
}

.jump-ui-button--icon.jump-ui-button--compact {
    width: var(--jump-ui-button-compact-height);
    padding: 0;
}

.jump-ui-button--icon.jump-ui-button--link {
    color: var(--jump-ui-label-ink);
}

.jump-ui-button--icon.jump-ui-button--link:hover:not(:disabled) {
    background: var(--jump-ui-field-disabled-background);
    color: var(--jump-ui-button-accent);
    text-decoration: none;
}

/* Busy: the spinner takes the icon's place. A busy button is disabled, but it keeps its full colour, so
   it reads as working rather than unavailable. */
.jump-ui-button[aria-busy="true"]:disabled {
    opacity: 1;
    cursor: progress;
}

.jump-ui-button-spinner {
    flex: 0 0 auto;
    box-sizing: border-box;
    width: var(--jump-ui-button-spinner-size);
    height: var(--jump-ui-button-spinner-size);
    border: var(--jump-ui-button-spinner-width) solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: jump-ui-button-spin .7s linear infinite;
}

@keyframes jump-ui-button-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Without motion the ring still says "working", it just does not turn. */
@media (prefers-reduced-motion: reduce) {
    .jump-ui-button-spinner {
        animation: none;
        border-right-color: currentColor;
        opacity: .6;
    }
}

/* Status pill. One radius and one weight; the state only changes the two colours. */
.jump-ui-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-height: var(--jump-ui-pill-height);
    max-width: 100%;
    padding: var(--jump-ui-pill-padding);
    border-radius: 999px;
    background: var(--jump-ui-pill-muted-background);
    color: var(--jump-ui-pill-muted-ink);
    font-size: var(--jump-ui-pill-font-size);
    font-weight: var(--jump-ui-pill-font-weight);
    line-height: 1.2;
    white-space: nowrap;
}

.jump-ui-pill--neutral {
    background: var(--jump-ui-pill-neutral-background);
    color: var(--jump-ui-pill-neutral-ink);
}

.jump-ui-pill--positive {
    background: var(--jump-ui-pill-positive-background);
    color: var(--jump-ui-pill-positive-ink);
}

.jump-ui-pill--warning {
    background: var(--jump-ui-pill-warning-background);
    color: var(--jump-ui-pill-warning-ink);
}

.jump-ui-pill--critical {
    background: var(--jump-ui-pill-critical-background);
    color: var(--jump-ui-pill-critical-ink);
}

.jump-ui-pill--large {
    min-height: var(--jump-ui-pill-large-height);
    padding: var(--jump-ui-pill-large-padding);
    font-size: var(--jump-ui-pill-large-font-size);
}

.jump-ui-pill--caps {
    text-transform: uppercase;
}

/* Caps the pill at 180px but never wider than its container, so it works in a dialog meta row and in
   a narrow list card alike. */
.jump-ui-pill-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.jump-ui-pill--truncate {
    max-width: min(var(--jump-ui-pill-truncate-width), 100%);
}

/* A row edited but not yet saved: a bar on the leading edge, so the state colour stays readable. */
.jump-ui-pill--dirty {
    box-shadow: inset 3px 0 0 0 var(--jump-ui-pill-dirty-bar);
}

/* Context menu. The backdrop closes it on a click outside; the menu stays invisible until the placement script
   has measured and clamped it, and only that script adds `positioned`. */
.jump-ui-menu-backdrop {
    position: fixed;
    inset: 0;
    z-index: calc(var(--jump-ui-menu-z-index) - 1);
    background: transparent;
}

.jump-ui-menu {
    position: fixed;
    z-index: var(--jump-ui-menu-z-index);
    /* The placement script derives max-height from the measured box, so padding and border are inside it. */
    box-sizing: border-box;
    min-width: var(--jump-ui-menu-min-width);
    max-width: var(--jump-ui-menu-max-width);
    overflow: hidden;
    transform: translate(4px, 4px);
    border: 1px solid var(--jump-ui-menu-border);
    border-radius: var(--jump-ui-menu-radius);
    background: var(--jump-ui-menu-background);
    box-shadow: var(--jump-ui-menu-shadow);
    color: var(--jump-ui-menu-ink);
    outline: 0;
}

.jump-ui-menu:not(.positioned) {
    opacity: 0;
    pointer-events: none;
}

/* Set by the script when the menu fits on neither side of the cursor and has to scroll instead of flipping. */
.jump-ui-menu.is-scrollable {
    overflow-y: auto;
}

.jump-ui-menu-title {
    display: grid;
    gap: 2px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--jump-ui-menu-separator);
    background: var(--jump-ui-menu-title-background);
}

.jump-ui-menu-title strong {
    overflow: hidden;
    color: var(--jump-ui-menu-ink);
    font-size: 12px;
    font-weight: 950;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.jump-ui-menu-title span,
.jump-ui-menu-empty,
.jump-ui-menu-item-hint {
    color: var(--jump-ui-menu-muted);
    font-size: 10px;
    font-weight: 750;
}

.jump-ui-menu-empty {
    padding: 12px;
}

.jump-ui-menu-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    box-sizing: border-box;
    width: 100%;
    margin: 0;
    padding: 9px 12px;
    border: 0;
    border-bottom: 1px solid var(--jump-ui-menu-item-separator);
    background: transparent;
    color: var(--jump-ui-menu-ink);
    font-family: inherit;
    font-size: 12px;
    font-weight: 800;
    text-align: left;
    cursor: pointer;
}

.jump-ui-menu-item:last-child {
    border-bottom: 0;
}

.jump-ui-menu-item:hover:not(:disabled),
.jump-ui-menu-item:focus-visible {
    background: var(--jump-ui-menu-item-hover-background);
    color: var(--jump-ui-menu-item-hover-ink);
    outline: 0;
}

.jump-ui-menu-item--danger {
    color: var(--jump-ui-menu-item-danger-ink);
}

.jump-ui-menu-item--danger:hover:not(:disabled),
.jump-ui-menu-item--danger:focus-visible {
    background: var(--jump-ui-menu-item-danger-hover-background);
    color: var(--jump-ui-menu-item-danger-ink);
}

.jump-ui-menu-item:disabled {
    color: var(--jump-ui-menu-item-disabled-ink);
    cursor: not-allowed;
}

.jump-ui-menu-item-text {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

/* Open Iconic nudges every .oi 1px down to sit on a text baseline; the line centres its icon on its own. */
.jump-ui-menu-item .jump-ui-menu-item-icon {
    top: 0;
    flex: 0 0 auto;
    color: var(--jump-ui-menu-icon-ink);
    font-size: var(--jump-ui-menu-icon-size);
    line-height: 1;
}

.jump-ui-menu-item--danger .jump-ui-menu-item-icon {
    color: var(--jump-ui-menu-item-danger-ink);
}

.jump-ui-menu-item-count {
    min-width: 24px;
    padding: 2px 5px;
    border-radius: 999px;
    background: var(--jump-ui-menu-count-background);
    color: var(--jump-ui-menu-count-ink);
    font-size: 9px;
    font-weight: 900;
    text-align: center;
}

/* Empty state: what a list, grid or panel shows when it has nothing, in a dashed box or, Plain, as text only. */
.jump-ui-empty {
    display: grid;
    place-items: center;
    gap: 8px;
    box-sizing: border-box;
    min-height: var(--jump-ui-empty-min-height);
    padding: var(--jump-ui-empty-padding);
    border: 1px dashed var(--jump-ui-empty-border);
    border-radius: var(--jump-ui-empty-radius);
    background: var(--jump-ui-empty-background);
    color: var(--jump-ui-empty-ink);
    font-size: 12px;
    font-weight: 750;
    line-height: 1.25;
    text-align: center;
}

.jump-ui-empty strong {
    color: var(--jump-ui-empty-strong-ink);
}

/* Open Iconic nudges every .oi 1px down to sit on a text baseline; the icon sits on its own row here. */
.jump-ui-empty .jump-ui-empty-icon {
    top: 0;
    color: var(--jump-ui-empty-icon-ink);
    font-size: var(--jump-ui-empty-icon-size);
    line-height: 1;
}

.jump-ui-empty-detail {
    color: var(--jump-ui-empty-detail-ink);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.45;
}

.jump-ui-empty--compact {
    min-height: var(--jump-ui-empty-compact-min-height);
    padding: var(--jump-ui-empty-compact-padding);
}

.jump-ui-empty--fill {
    min-height: var(--jump-ui-empty-fill-min-height);
}

.jump-ui-empty--plain {
    min-height: 0;
    border: 0;
    background: none;
}

/* Tabs ------------------------------------------------------------------------------------
 * JumpTabs. The strip scrolls sideways when the tabs do not fit, with the scrollbar shown only
 * under the mouse; jump-ui-tabs.js turns the wheel into that sideways scroll. */

.jump-ui-tabs {
    display: flex;
    align-items: center;
    gap: var(--jump-ui-tabs-gap);
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    padding: var(--jump-ui-tabs-padding);
    border-bottom: 1px solid var(--jump-ui-tabs-border);
    background: var(--jump-ui-tabs-background);
    scrollbar-width: none;
}

.jump-ui-tabs:hover {
    scrollbar-width: thin;
}

.jump-ui-tabs::-webkit-scrollbar {
    height: 0;
}

.jump-ui-tabs:hover::-webkit-scrollbar {
    height: 6px;
}

.jump-ui-tabs::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: var(--jump-ui-tabs-scrollbar);
}

/* The overflow menu hangs below the strip, which must stop clipping while it is open. */
.jump-ui-tabs--menu-open {
    overflow: visible;
}

.jump-ui-tab {
    appearance: none;
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: var(--jump-ui-tab-gap);
    box-sizing: border-box;
    min-height: var(--jump-ui-tab-height);
    margin: 0;
    padding: 0 var(--jump-ui-tab-padding-x);
    border: 1px solid transparent;
    border-bottom: 0;
    border-radius: var(--jump-ui-tab-radius) var(--jump-ui-tab-radius) 0 0;
    background: transparent;
    color: var(--jump-ui-tab-ink);
    font-family: var(--jump-ui-tab-font-family);
    font-size: var(--jump-ui-tab-font-size);
    font-weight: var(--jump-ui-tab-font-weight);
    line-height: 1.1;
    white-space: nowrap;
    cursor: pointer;
    transition: background .16s ease, color .16s ease, border-color .16s ease;
}

.jump-ui-tab:hover {
    background: var(--jump-ui-tab-hover-background);
    color: var(--jump-ui-tab-hover-ink);
}

.jump-ui-tab:focus-visible {
    position: relative;
    z-index: 1;
    outline: 2px solid var(--jump-ui-tab-focus);
    outline-offset: -2px;
}

.jump-ui-tab--active {
    border-color: var(--jump-ui-tab-active-border);
    background: var(--jump-ui-tab-active-background);
    color: var(--jump-ui-tab-active-ink);
    box-shadow: none;
}

.jump-ui-tab:disabled {
    opacity: var(--jump-ui-tab-disabled-opacity);
    cursor: not-allowed;
}

/* A long caption is cut by the page through the tab's CssClass (a max-width); the text gives way, not the marks. */
.jump-ui-tab-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Two classes: Open Iconic's .oi carries top: 1px of its own. */
.jump-ui-tab .jump-ui-tab-icon {
    top: 0;
    flex: 0 0 auto;
    color: var(--jump-ui-tab-icon-ink);
    font-size: var(--jump-ui-tab-icon-size);
}

.jump-ui-tab-count {
    flex: 0 0 auto;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--jump-ui-tab-count-background);
    color: var(--jump-ui-tab-count-ink);
    font-size: 11px;
    font-weight: 700;
    line-height: 16px;
}

.jump-ui-tab-count--warning {
    background: var(--jump-ui-tab-count-warning-background);
    color: var(--jump-ui-tab-count-warning-ink);
}

.jump-ui-tab-count--critical {
    background: var(--jump-ui-tab-count-critical-background);
    color: var(--jump-ui-tab-count-critical-ink);
}

.jump-ui-tab-dirty {
    flex: 0 0 auto;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--jump-ui-tab-dirty);
}

.jump-ui-tab-close {
    flex: 0 0 auto;
    padding: 0 3px;
    border-radius: 4px;
    color: var(--jump-ui-tab-close-ink);
    font-size: 14px;
    font-weight: 400;
    line-height: 1;
}

.jump-ui-tab-close::before {
    content: "\00d7";
}

.jump-ui-tab-close:hover {
    background: var(--jump-ui-tab-close-hover-background);
    color: var(--jump-ui-tab-close-hover-ink);
}

/* The pin shows on the tab under the pointer and on the open one, tilted; a pinned tab always shows it, upright and
   blue. Hidden, not removed, so the tab keeps its width when the pointer comes and goes. */
.jump-ui-tab-pin {
    flex: 0 0 auto;
    padding: 0 3px;
    border-radius: 4px;
    color: var(--jump-ui-tab-pin-ink);
    font-size: 10px;
    line-height: 1;
    visibility: hidden;
}

.jump-ui-tab-pin .fa-thumbtack {
    transform: rotate(45deg);
}

.jump-ui-tab:hover .jump-ui-tab-pin,
.jump-ui-tab--active .jump-ui-tab-pin,
.jump-ui-tab-pin--pinned {
    visibility: visible;
}

.jump-ui-tab-pin:hover {
    background: var(--jump-ui-tab-close-hover-background);
    color: var(--jump-ui-tab-pin-active-ink);
}

.jump-ui-tab-pin--pinned {
    color: var(--jump-ui-tab-pin-active-ink);
}

.jump-ui-tab-pin--pinned .fa-thumbtack {
    transform: none;
}

.jump-ui-tab-spinner {
    flex: 0 0 auto;
    box-sizing: border-box;
    width: 12px;
    height: 12px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: jump-ui-tab-spin .75s linear infinite;
}

@keyframes jump-ui-tab-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .jump-ui-tab-spinner {
        animation: none;
    }
}

/* The "+" after the last tab: a tab-height square with the tab's hover. */
.jump-ui-tabs-add {
    appearance: none;
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-width: var(--jump-ui-tab-height);
    min-height: var(--jump-ui-tab-height);
    margin: 0;
    padding: 0;
    border: 1px solid transparent;
    border-bottom: 0;
    border-radius: var(--jump-ui-tab-radius) var(--jump-ui-tab-radius) 0 0;
    background: transparent;
    color: var(--jump-ui-tab-ink);
    cursor: pointer;
}

.jump-ui-tabs-add-mark::before {
    content: "+";
    font-size: 18px;
    font-weight: 600;
    line-height: 1;
}

.jump-ui-tabs-add:hover {
    background: var(--jump-ui-tab-hover-background);
    color: var(--jump-ui-tab-hover-ink);
}

.jump-ui-tabs-add:focus-visible {
    outline: 2px solid var(--jump-ui-tab-focus);
    outline-offset: -2px;
}

.jump-ui-tabs-more {
    position: relative;
    flex: 0 0 auto;
}

.jump-ui-tabs-more-caret {
    width: 0;
    height: 0;
    border-top: 4px solid currentColor;
    border-right: 4px solid transparent;
    border-left: 4px solid transparent;
}

.jump-ui-tabs-more-backdrop {
    position: fixed;
    inset: 0;
    z-index: 30;
    background: transparent;
}

.jump-ui-tabs-more-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    z-index: 31;
    display: grid;
    min-width: 180px;
    padding: 6px;
    border: 1px solid var(--jump-ui-tabs-menu-border);
    border-radius: 10px;
    background: var(--jump-ui-tabs-background);
    box-shadow: var(--jump-ui-tabs-menu-shadow);
}

.jump-ui-tabs-more-item {
    appearance: none;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: var(--jump-ui-tab-gap);
    width: 100%;
    padding: 8px 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--jump-ui-tab-ink);
    font-family: var(--jump-ui-tab-font-family);
    font-size: var(--jump-ui-tab-font-size);
    font-weight: 700;
    text-align: left;
    cursor: pointer;
}

.jump-ui-tabs-more-item:hover {
    background: var(--jump-ui-tab-hover-background);
    color: var(--jump-ui-tab-hover-ink);
}

.jump-ui-tabs-more-item--active {
    background: var(--jump-ui-tab-active-background);
    color: var(--jump-ui-tab-active-ink);
}

.jump-ui-tabs-more-item:disabled {
    opacity: var(--jump-ui-tab-disabled-opacity);
    cursor: not-allowed;
}

.jump-ui-tabs-panel {
    min-width: 0;
}

/* Spinner and loading state ----------------------------------------------------------------
 * JumpSpinner is the ring; JumpLoadingState centres it above what is loading. With reduced
 * motion the ring stops: the text, or the spinner's name, still says that it is waiting. */

.jump-ui-spinner {
    display: inline-block;
    flex: 0 0 auto;
    box-sizing: border-box;
    width: var(--jump-ui-spinner-size);
    height: var(--jump-ui-spinner-size);
    border: var(--jump-ui-spinner-width) solid var(--jump-ui-spinner-color);
    border-right-color: transparent;
    border-radius: 50%;
    vertical-align: -2px;
    animation: jump-ui-spinner-spin var(--jump-ui-spinner-duration) linear infinite;
}

.jump-ui-spinner--small {
    width: var(--jump-ui-spinner-small-size);
    height: var(--jump-ui-spinner-small-size);
    vertical-align: -1px;
}

.jump-ui-spinner--large {
    width: var(--jump-ui-spinner-large-size);
    height: var(--jump-ui-spinner-large-size);
    border-width: var(--jump-ui-spinner-large-width);
}

@keyframes jump-ui-spinner-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .jump-ui-spinner {
        animation: none;
    }
}

.jump-ui-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-sizing: border-box;
    min-height: var(--jump-ui-loading-min-height);
    padding: var(--jump-ui-loading-padding);
    color: var(--jump-ui-loading-ink);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
}

.jump-ui-loading .jump-ui-spinner {
    --jump-ui-spinner-color: var(--jump-ui-loading-spinner-color);
}

.jump-ui-loading-detail {
    color: var(--jump-ui-loading-detail-ink);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.45;
}

.jump-ui-loading--compact {
    gap: 8px;
    min-height: var(--jump-ui-loading-compact-min-height);
    padding: var(--jump-ui-loading-compact-padding);
}

.jump-ui-loading--fill {
    flex: 1 1 auto;
    min-height: var(--jump-ui-loading-fill-min-height);
}

/* One line: the spinner before the text, left-aligned like the row it stands in for. */
.jump-ui-loading--inline {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 8px;
    min-height: 0;
    padding: 0;
    text-align: left;
}

/* Callout ----------------------------------------------------------------------------------
 * JumpCallout. Each state sets the four colours on the box; the parts only read them. The mark
 * is drawn here (a filled circle with a glyph), so the component needs no icon font. */

.jump-ui-callout {
    --jump-ui-callout-border: var(--jump-ui-callout-info-border);
    --jump-ui-callout-background: var(--jump-ui-callout-info-background);
    --jump-ui-callout-ink: var(--jump-ui-callout-info-ink);
    --jump-ui-callout-mark: var(--jump-ui-callout-info-mark);
    display: flex;
    align-items: flex-start;
    gap: var(--jump-ui-callout-gap);
    box-sizing: border-box;
    min-width: 0;
    padding: var(--jump-ui-callout-padding);
    border: 1px solid var(--jump-ui-callout-border);
    border-radius: var(--jump-ui-callout-radius);
    background: var(--jump-ui-callout-background);
    color: var(--jump-ui-callout-ink);
    font-size: var(--jump-ui-callout-font-size);
    line-height: 1.35;
}

.jump-ui-callout--positive {
    --jump-ui-callout-border: var(--jump-ui-callout-positive-border);
    --jump-ui-callout-background: var(--jump-ui-callout-positive-background);
    --jump-ui-callout-ink: var(--jump-ui-callout-positive-ink);
    --jump-ui-callout-mark: var(--jump-ui-callout-positive-mark);
}

.jump-ui-callout--warning {
    --jump-ui-callout-border: var(--jump-ui-callout-warning-border);
    --jump-ui-callout-background: var(--jump-ui-callout-warning-background);
    --jump-ui-callout-ink: var(--jump-ui-callout-warning-ink);
    --jump-ui-callout-mark: var(--jump-ui-callout-warning-mark);
}

.jump-ui-callout--critical {
    --jump-ui-callout-border: var(--jump-ui-callout-critical-border);
    --jump-ui-callout-background: var(--jump-ui-callout-critical-background);
    --jump-ui-callout-ink: var(--jump-ui-callout-critical-ink);
    --jump-ui-callout-mark: var(--jump-ui-callout-critical-mark);
}

.jump-ui-callout--neutral {
    --jump-ui-callout-border: var(--jump-ui-callout-neutral-border);
    --jump-ui-callout-background: var(--jump-ui-callout-neutral-background);
    --jump-ui-callout-ink: var(--jump-ui-callout-neutral-ink);
    --jump-ui-callout-mark: var(--jump-ui-callout-neutral-mark);
}

.jump-ui-callout--compact {
    padding: var(--jump-ui-callout-compact-padding);
    font-size: var(--jump-ui-callout-compact-font-size);
}

.jump-ui-callout-mark {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: var(--jump-ui-callout-mark-size);
    height: var(--jump-ui-callout-mark-size);
    margin-top: 0;
    border-radius: 50%;
    background: var(--jump-ui-callout-mark);
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
}

.jump-ui-callout--info .jump-ui-callout-mark::before {
    content: "i";
    font-family: Georgia, 'Times New Roman', serif;
    font-style: italic;
}

.jump-ui-callout--positive .jump-ui-callout-mark::before {
    content: "\2713";
}

.jump-ui-callout--warning .jump-ui-callout-mark::before,
.jump-ui-callout--critical .jump-ui-callout-mark::before {
    content: "!";
}

/* Two classes: Open Iconic nudges every .oi 1px down; here the icon lines up with the first line. */
.jump-ui-callout .jump-ui-callout-icon {
    top: 0;
    flex: 0 0 auto;
    margin-top: 2px;
    color: var(--jump-ui-callout-mark);
}

.jump-ui-callout-body {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.jump-ui-callout-title {
    font-weight: 800;
}

.jump-ui-callout-text {
    min-width: 0;
    overflow-wrap: anywhere;
}

.jump-ui-callout-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

/* KPI ----------------------------------------------------------------------------------------
 * JumpKpi and JumpKpiGroup. A state sets --jump-ui-kpi-bar: the bar is an inset shadow, so the
 * text stays where a tile without a state has it and the bar follows the rounded corners. */

.jump-ui-kpi-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(var(--jump-ui-kpi-min-width), 1fr));
    gap: var(--jump-ui-kpi-group-gap);
    min-width: 0;
}

.jump-ui-kpi-group[style*="--jump-ui-kpi-columns"] {
    grid-template-columns: repeat(var(--jump-ui-kpi-columns), minmax(0, 1fr));
}

.jump-ui-kpi {
    --jump-ui-kpi-bar: transparent;
    display: grid;
    align-content: start;
    gap: var(--jump-ui-kpi-gap);
    box-sizing: border-box;
    min-width: 0;
    padding: var(--jump-ui-kpi-padding);
    border: 1px solid var(--jump-ui-kpi-border);
    border-radius: var(--jump-ui-kpi-radius);
    background: var(--jump-ui-kpi-background);
    box-shadow: inset var(--jump-ui-kpi-bar-width) 0 0 var(--jump-ui-kpi-bar), var(--jump-ui-kpi-shadow);
}

/* Label and figure wrap rather than cut: a tile never hides part of what it shows. */
.jump-ui-kpi-label {
    color: var(--jump-ui-kpi-label-ink);
    font-size: var(--jump-ui-kpi-label-font-size);
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    overflow-wrap: anywhere;
}

.jump-ui-kpi-value {
    color: var(--jump-ui-kpi-value-ink);
    font-size: var(--jump-ui-kpi-value-font-size);
    font-weight: 900;
    line-height: 1.05;
    overflow-wrap: anywhere;
}

.jump-ui-kpi-note {
    color: var(--jump-ui-kpi-note-ink);
    font-size: var(--jump-ui-kpi-note-font-size);
    line-height: 1.2;
}

.jump-ui-kpi--accent {
    --jump-ui-kpi-bar: var(--jump-ui-kpi-accent);
}

.jump-ui-kpi--positive {
    --jump-ui-kpi-bar: var(--jump-ui-kpi-positive);
}

.jump-ui-kpi--warning {
    --jump-ui-kpi-bar: var(--jump-ui-kpi-warning);
}

.jump-ui-kpi--critical {
    --jump-ui-kpi-bar: var(--jump-ui-kpi-critical);
}

.jump-ui-kpi--positive .jump-ui-kpi-note,
.jump-ui-kpi--warning .jump-ui-kpi-note,
.jump-ui-kpi--critical .jump-ui-kpi-note {
    color: var(--jump-ui-kpi-bar);
    font-weight: 700;
}
