@layer com {

label,
legend {
    user-select: text;
    -webkit-user-select: text;
    font-weight: 300;
    line-height: 1;
}

r {
    background-color: var(--bobr-color-red);
    color: white;
    padding: 0 6px 3px;
    font-weight: bolder;
    display: inline;
    border-radius: 6px;
}



/* components */

:is(bo-input, bo-raw, bo-text, bo-div, bo-li, bo-links, bo-header, bo-button, bo-files, bo-slider, bo-tree, bo-setbox, bo-sbox, bo-table, bo-toggle, bo-date, bo-range, bo-checkbox, bo-radio, bo-bbox) .wrap-com {
    display: flex;
    gap: var(--bobr-space-micro);
    align-items: flex-start;
    flex-direction: column;
}

:is(bo-input, bo-raw, bo-text, bo-div, bo-li, bo-links, bo-header, bo-button, bo-files, bo-slider, bo-tree, bo-setbox, bo-sbox, bo-table, bo-toggle, bo-date, bo-range, bo-checkbox, bo-radio, bo-bbox) .desc {
    font-size: min(var(--component-desc-min-font-size), .8em);
    font-weight: 200;
    width: min-content;
    min-width: fit-content;
    padding: 1px;
}

:is(bo-input, bo-raw, bo-text, bo-div, bo-li, bo-links, bo-header, bo-button, bo-files, bo-slider, bo-tree, bo-setbox, bo-sbox, bo-table, bo-toggle, bo-date, bo-range, bo-checkbox, bo-radio, bo-bbox) .wrap-main {
    position: relative;
    display: flex;
    gap: var(--bobr-space-min);
    align-items: center;
    width: fit-content;
}

:is(bo-input, bo-raw, bo-text, bo-div, bo-li, bo-links, bo-header, bo-button, bo-files, bo-slider, bo-tree, bo-setbox, bo-sbox, bo-table, bo-toggle, bo-date, bo-range, bo-checkbox, bo-radio, bo-bbox) .wrap-main.horizontal {
    gap: var(--bobr-space-micro);
    align-items: flex-start;
    flex-direction: column;
    max-width: 750px;
}

/* components */



/* button */

button {
    outline: none;
    border: none;
    height: 41.2px;
    padding-inline: 12px;
    padding-block-end: 1.5px;
    font-weight: 300;
    border-radius: var(--bobr-radius);
    user-select: none;
    cursor: pointer;
    position: relative;
    background: var(--bobr-color-blue);
    color: white;
    box-shadow: none;
    line-height: 1;
    min-width: min-content;
    transition: background-color .15s, color .15s, box-shadow .15s, opacity .15s;
}

button:active {
    transform: translateY(1.5px) scale(0.96) !important;
    transition: transform .05s !important;
}

button:hover {
    background: var(--bobr-color-blue-dark);
}

button::after {
    content: '';
    position: absolute;
    border-radius: var(--bobr-radius-max);
    width: 5px;
    height: 5px;
    background: white;
    left: 7px;
    top: 6px;
    z-index: 1;
    transform: scale(1.5);
    opacity: 0;
    transition: var(--component-button-transition);
    pointer-events: none;
}

button:focus-visible::after {
    transform: none;
    opacity: 1;
}

button:has(.addon) {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--bobr-space-micro);
}

button .addon.before {
    width: fit-content;
    max-width: 18px;
    height: 18.5px;
    pointer-events: none;
    --addon-color: white;

    &[type='dot'] {
        position: relative;
        display: flex;
        align-items: center;

        &:before {
            content: "";
            display: block;
            border-radius: var(--bobr-radius);
            pointer-events: none;
        }
    }

    &[type="img"] {
        display: flex;
        align-items: center;
        margin: auto;

        & img {
            width: 100%;
            aspect-ratio: var(--addon-ratio);
            --addon-ratio: 12 / 9;
        }

        &:before {
            display: none;
        }
    }
}

button .addon.before:before {
    content: '';
    display: inline-block;
    width: 18px;
    min-width: 18px;
    height: 18px;
    background-color: var(--addon-color);
    mask-image: var(--addon-src);
    mask-size: contain;
    -webkit-mask-image: var(--addon-src);
    -webkit-mask-size: contain;
}

button label {
    text-align: left;
    pointer-events: none;
}

bo-button:is([appearance-round], [appearance-icon]) button {
    width: 41.2px;
    min-width: 41.2px;
    padding: 0;
    border-radius: var(--bobr-radius-max);
    aspect-ratio: 1;
}

bo-button:is([appearance-round], [appearance-icon]) button .addon.before {
    margin: auto;
}

bo-button:is([appearance-loading], .loading, [data-loading="true"]) button {
    pointer-events: none;
    cursor: wait;
}

bo-button:is([appearance-loading], .loading, [data-loading="true"]) button :is(label, .addon) {
    opacity: 0;
}

bo-button:is([appearance-loading], .loading, [data-loading="true"]) button::before {
    content: '';
    position: absolute;
    inset: 0;
    width: 18px;
    height: 18px;
    margin: auto;
    border: 2px solid rgb(255 255 255 / 45%);
    border-top-color: white;
    border-radius: var(--bobr-radius-max);
    animation: button-loading-spin .8s linear infinite;
}

@keyframes button-loading-spin {
    to {
        transform: rotate(1turn);
    }
}

/* button */



/* header */

bo-header {
    display: block;
    max-width: 100%;
}

/* header */

/* toggle */

bo-toggle .toggle {
    display: flex;
    gap: calc(var(--bobr-space-min) / 2);
    align-items: center;

    & input {
        width: 100%;
        height: 100%;
        margin: auto;
        position: relative;
        z-index: 1;
        opacity: 0;
        cursor: pointer;
    }
}

bo-toggle:is([readonly], [capability='r']) .toggle {
    cursor: default;
}

bo-toggle:is([readonly], [capability='r']) .toggle input {
    cursor: default;
}

bo-toggle[mode='switch'] {

    & .toggle {
        outline: none;
        margin: 4px auto;
        cursor: pointer;
        box-sizing: border-box;
        position: relative;
        background: #bfbfbf;
        border-radius: var(--bobr-radius-max);
        width: 62px;
        min-width: 62px;
        height: 34px;
        overflow: hidden;
        transition: .3s;

        &::after {
            content: '';
            position: absolute;
            width: 28px;
            height: 28px;
            border-radius: var(--bobr-radius-max);
            background: #ffffff;
            top: calc(50% - 14px);
            right: 4px;
            transition: .3s cubic-bezier(0.25, 0.1, 0, 1.22);
            transform: translateX(-26px);
        }

        &:has(input:checked) {
            background: var(--bobr-color-green-dark);

            &::after {
                transform: none;
            }
        }
    }
}

bo-toggle[mode='toggle'] {

    align-self: anchor-center;

    & .toggle {
        position: relative;
        border-radius: var(--bobr-radius-min);
        cursor: pointer;
        overflow: hidden;
        user-select: none;
        transition: .15s;

        & input {
            position: absolute;
        }

        & .states {
            display: flex;
            font-weight: 300;
            font-size: 13.3px;
            line-height: 1;
            pointer-events: none;
            transition: .15s;
            background-color: var(--bobr-color-blue);
            color: greenyellow;

            &>div {
                box-sizing: border-box;
                transition: .15s;
            }

            &>div:first-child {
                clip-path: polygon(0% 0%, 90% 0, 100% 100%, 100% 99%, 0% 100%);
                padding: 4px 12px 9px;
            }

            &>div:last-child {
                padding: 4px 12px 9px 7px;
            }
        }

        &:has(input:not(:checked)) .states>div:first-child,
        &:has(input:checked) .states {
            background-color: var(--bobr-color-gray);
            color: wheat;
        }

        &:has(input:checked) .states>div:first-child {
            background-color: var(--bobr-color-blue);
            color: greenyellow;
        }

        &:active:not(:has(input:disabled)) {
            transform: translateY(1.5px) scale(0.96) !important;
            transition: .05s !important;
        }

        &:has(input:not(:checked)):hover .states>div:first-child,
        &:has(input:checked):hover .states>div:last-child {
            color: white;
        }
    }
}

/* toggle */



/* setbox */

bo-setbox:not([mode="single"]) .wrap-boxes {
    display: grid;
    grid-template-rows: minmax(88.66px, .4fr);
    transition: grid-template-rows .35s;
    overflow: hidden scroll;
    max-height: 20vh;
}

bo-setbox:focus-within .wrap-boxes:has(.add:not(:focus)) {
    grid-template-rows: minmax(88.66px, 1fr);
}

bo-setbox .wrap-boxes:not(.many) {
    grid-template-rows: minmax(auto, .4fr) !important;
}

bo-setbox .wrap-boxes.many {
    min-height: 130px;
}

bo-setbox .boxes {
    display: flex;
    flex-wrap: wrap;
    gap: var(--bobr-space-micro);
    align-self: flex-start;
    padding-right: var(--bobr-space-micro);
}

bo-setbox .boxes.empty {
    min-height: 38.34px;
}

bo-setbox .boxes.empty:after {
    content: "«ничего не выбрано»";
    font-weight: 200;
    font-size: .9em;
    color: gray;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--component-input-bg);
    padding: 8px 12px;
    border-radius: var(--bobr-radius-min);
}

bo-setbox .wrap-boxes .box {
    position: relative;
    display: flex;
    height: 100%;
    min-height: 38.34px;
    max-height: 52.33px;
    min-width: 40px;
    flex: 1 30%;
    cursor: pointer;
    box-sizing: border-box;
    background-color: var(--component-input-bg);
    border-radius: var(--bobr-radius-min);
    transition: background-color .15s, max-height 0.3s cubic-bezier(0, 1, 0, 1);
    font-size: .86em;
}

bo-setbox .wrap-boxes .box .box-data {
    padding: 8px 12px 11px;
    overflow: hidden;
}

bo-setbox .boxes .add+.box {
    flex: 1 70%;
    max-height: 41.33px;
}

bo-setbox .boxes .add+.box:last-child {
    flex: 1 20%;
}

bo-setbox .boxes:has(.box:focus) .box {
    max-height: 9999px;
    transition: max-height 0.3s cubic-bezier(1, 0, 1, 0);
    transition-delay: 0s;
}

bo-setbox .boxes .box:focus {
    background-color: var(--bobr-color-blue-light-hover);
}

bo-setbox[readonly] .wrap-boxes .box {
    border: 1px dashed var(--bobr-color-gray-middle);
    background-color: white;
}

bo-setbox .boxes .add {
    display: flex;
    background: var(--bobr-color-blue);
    border-radius: var(--bobr-radius-min);
    justify-content: center;
    position: relative;
    width: 45px;
    max-height: 41.33px;
    min-width: 45px;
    height: auto;
    cursor: pointer;
    transition: .15s;
    user-select: none;
}

bo-setbox .boxes .add::before {
    content: '';
    position: absolute;
    inset: 10%;
    background-image: linear-gradient(white, white), linear-gradient(white, white);
    background-repeat: no-repeat;
    background-position: center center;
    background-size: 10.1% 50.1%, 50.1% 10.1%;
    transform: scale(1.001);
}

bo-setbox .boxes .add:hover {
    background: var(--bobr-color-blue-dark);
}

bo-setbox .boxes .add:active {
    transform: scale(.96) translateY(2px);
    transition: transform 0.05s;
}

bo-setbox button.add:focus-visible::after {
    left: 5px;
    top: 4px;
}

bo-setbox label {
    padding-inline-start: 1px;
}

bo-setbox .delete {
    position: absolute;
    inset: 6.5px 6.5px auto auto;
    background-color: white;
    padding: 3px 4px 4px;
    border-radius: 6px;
    pointer-events: none;
    opacity: 0;
    transition: .15s;
}

bo-setbox .delete:before {
    content: "";
    display: block;
    width: 18px;
    height: 18px;
    background-color: var(--bobr-color-red);
    mask-image: url(/_engine/asset/vector/ico/delete.svg);
    mask-size: contain;
    -webkit-mask-image: url(/_engine/asset/vector/ico/delete.svg);
    -webkit-mask-size: contain;
}

bo-setbox .boxes .box:focus .delete {
    opacity: 1;
    pointer-events: auto;
}

bo-setbox .boxes .box:focus .delete:active {
    transform: translateY(2px);
    transition: 0s;
}

bo-setbox:is([capability='r'], [readonly]) .boxes :is(.add, .delete) {
    display: none;
}

/* setbox */


/* checkbox */

:is(bo-checkbox, bo-radio, bo-bbox) fieldset {
    display: contents;
}

:is(bo-checkbox, bo-radio, bo-bbox) fieldset .wrap-fieldset {
    display: flex;
    flex-direction: column;
    gap: var(--bobr-space-micro);
}

:is(bo-checkbox, bo-radio, bo-bbox) legend {
    padding-inline: 1px;
}

:is(bo-checkbox, bo-radio) fieldset .wrap-fields .field {
    display: grid;
    grid-auto-flow: column;
    gap: 6px;
    grid-template-columns: 22px 1fr;
    justify-content: start;
    width: fit-content;
}

bo-radio fieldset .wrap-fields .field {
    grid-template-columns: 23px;
}

:is(bo-checkbox, bo-radio) fieldset .wrap-fields :has(input:not(:disabled)) :is(.field, label, input) {
    cursor: pointer;
}

:is(bo-checkbox, bo-radio) fieldset .wrap-fields .field>input {
    position: relative;
    margin: 3px 3px 0px 4px;
}

:is(bo-checkbox, bo-radio) fieldset .wrap-fields .field>input:checked {
    accent-color: var(--bobr-color-blue);
}

:is(bo-checkbox, bo-radio) input:disabled+label {
    pointer-events: none;
    opacity: .3;
}

:is(bo-checkbox, bo-radio) label {
    display: flex;
    gap: var(--bobr-space-micro);
    line-height: normal;
}

:is(bo-checkbox, bo-radio) fieldset .wrap-fields .field.not label {
    font-weight: 200;
    font-size: .9em;
    color: gray;
}

:is(bo-checkbox, bo-radio) fieldset .wrap-fields .field>input:focus-visible {
    outline: var(--bobr-color-blue) dotted 3px;
}

:is(bo-checkbox, bo-radio)[appearance-position=horizontal] fieldset .wrap-fields {
    display: flex;
    gap: var(--bobr-space-micro) var(--bobr-space-middle);
    flex-wrap: wrap;
}

:is(bo-checkbox, bo-radio, bo-bbox) .addon {
    width: fit-content;
    height: 20px;
    max-width: 18px;
    margin: auto 0;
}

:is(bo-checkbox, bo-radio, bo-bbox) .addon[type="img"] img {
    width: 100%;
    aspect-ratio: var(--addon-ratio);
    --addon-ratio: 12 / 9;
    object-fit: cover;
}

:is(bo-checkbox, bo-radio, bo-bbox) .addon[type='dot']:before {
    content: "";
    display: block;
    width: 10px;
    height: 10px;
    background: var(--addon-color, greenyellow);
    border-radius: var(--bobr-radius);
    pointer-events: none;
}

:is(bo-checkbox, bo-radio, bo-bbox) .addon[type='dot'] {
    position: relative;
    display: flex;
    align-items: center;
    margin-block-end: -.75px;
}

:is(bo-checkbox, bo-radio, bo-bbox) .addon[type="ico"] {
    margin-block-end: -1.75px;
}

:is(bo-checkbox, bo-radio, bo-bbox) .addon[type="ico"]:before {
    content: '';
    display: inline-block;
    width: 18px;
    min-width: 18px;
    height: 18px;
    background-color: var(--addon-color, var(--bobr-color-blue));
    mask-image: var(--addon-src);
    mask-size: contain;
    -webkit-mask-image: var(--addon-src);
    -webkit-mask-size: contain;
}

:is(bo-checkbox, bo-radio, bo-bbox) .addon[type="text"] {
    max-width: fit-content;
}

:is(bo-checkbox, bo-radio) .for-desc {
    display: contents;
    font-size: .8em;
    font-weight: 200;
}

/* checkbox */



/* bbox */

bo-bbox .wrap {
    display: flex;
    flex-direction: column;
    gap: calc(var(--bobr-space-min) / 2);
}

bo-bbox:not(.label-right) :is(legend, .desc) {
    padding: 0 5px;
    margin: auto;
}

bo-bbox .wrap-fields {
    display: flex;
    padding: var(--bobr-space-micro);
    gap: calc(var(--bobr-space-micro) / 2);
    margin: auto;
    border: none;
    border-radius: var(--bobr-radius);
    background-color: var(--component-input-bg);
    box-sizing: border-box;
    flex-wrap: wrap;
    width: fit-content;
    transition: background-color .15s;
}

bo-bbox .field input {
    display: none;
}

bo-bbox .wrap-fields label {
    display: flex;
    align-items: center;
    gap: var(--bobr-space-micro);
    position: relative;
    height: 100%;
    width: 100%;
    padding: 7px 12px 10px;
    box-sizing: border-box;
    border-radius: var(--bobr-radius-min);
    cursor: pointer;
    background: white;
    text-wrap: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    max-width: 360px;
    min-width: auto;
    z-index: 1;
    transition: .05s;
}

bo-bbox .wrap-fields .field.not label {
    font-size: .9em;
    font-weight: 200;
}

bo-bbox .wrap-fields div {
    height: auto;
    margin: 0;
}

bo-bbox .wrap-fields .addon {
    position: relative;
}

bo-bbox .wrap-fields div:has(input:not(:checked, :disabled)):hover label {
    color: white;
}

bo-bbox .wrap-fields input:checked~label,
bo-bbox .wrap-fields input:not(:disabled)~label:hover {
    background: var(--bobr-color-blue);
    color: white;
}

bo-bbox .wrap-fields input:checked~label .addon[type="ico"]::before,
bo-bbox .wrap-fields input:not(:disabled)~label:hover .addon[type="ico"]::before {
    --addon-color: white;
}

bo-bbox .wrap-fields input:checked:disabled~label {
    background: var(--bobr-color-gray);
    color: initial;
}

bo-bbox .wrap-fields input:disabled~label {
    pointer-events: none;
    opacity: .3;
}

bo-bbox .wrap-fields input:checked:hover~label {
    background: var(--bobr-color-blue-dark);
}

bo-bbox .wrap-fields input:not(:checked, :disabled)~label:active {
    transform: scale(.96);
}

bo-bbox .wrap-fields label:after {
    content: "";
    position: absolute;
    width: 5px;
    height: 5px;
    background: white;
    left: 5px;
    top: 4px;
    z-index: 1;
    border-radius: var(--bobr-radius-max);
    transition: var(--component-button-transition);
    transform: scale(1.5);
    opacity: 0;
    pointer-events: none;
}

bo-bbox .wrap-fields>.field:has(input:not(:disabled):focus-visible) label:after {
    transform: none;
    opacity: 1;
}

bo-bbox.label-right {
    flex-direction: row-reverse;
}

bo-bbox[appearance-position=vertical] .wrap-fieldset {
    border-radius: var(--bobr-radius-min);
    background-color: var(--component-input-bg);
}

bo-bbox[appearance-position=vertical] .wrap-fields {
    flex-direction: column;
    background: none;
    border-radius: initial;
    flex-wrap: nowrap;
    width: auto;
}

bo-bbox[appearance-position=vertical] .wrap-fields {
    overflow-y: scroll;
    margin: 6px 6px 6px auto;
    padding: 0 5px 0 6px;
    max-height: 216px;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
}

bo-bbox[appearance-position=vertical] .wrap-fields div {
    scroll-snap-align: end;
}

bo-bbox[appearance-position=vertical] .wrap-fields input:not(:checked, :disabled)~label:active {
    transform: scale(.98);
}

/* bbox */



/* sbox */

bo-sbox {
    --sbox-options-height: 316px;
    --sbox-options-margin: 6px;
    --sbox-min-width: 200px;
    --sbox-max-width: 280px;
}

bo-sbox.auto-width {
    --sbox-min-width: auto;
    --sbox-max-width: auto;
}

bo-sbox:focus-within,
bo-sbox:has(.wrap-option:active) {
    z-index: 10;
    /* высокое из-за таблиц с z-index > 8 */
}

bo-sbox .wrap-select-options {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: var(--sbox-min-width);
    max-width: var(--sbox-max-width);
}

bo-sbox .wrap-select-options::after {
    content: "";
    position: absolute;
    top: calc(100% + var(--bobr-space-micro));
    width: 1px;
    min-height: calc(45vh + var(--sbox-options-offset));
    max-height: calc(var(--sbox-options-height) + var(--sbox-options-offset));
    pointer-events: none;
    user-select: none;
    isolation: isolate;
    --sbox-options-offset: calc(var(--sbox-options-margin) * 2 + 30px);
}


bo-sbox[appearance-size=min] .wrap-select-options {
    min-width: 60px;
}

bo-sbox [contenteditable] {
    position: relative;
    outline: none;
    padding: 8px 32px 12px 12px;
    width: auto;
    height: 100%;
    min-width: 40px;
    min-height: 41.34px;
    max-height: 62px;
    cursor: pointer;
    box-sizing: border-box;
    overflow: hidden;
    background-color: var(--component-input-bg);
    border-radius: var(--bobr-radius-micro);
    transition: background-color .15s, max-height 0.3s cubic-bezier(0, 1, 0, 1);
    --addon-ratio: 12 / 9;
}

bo-sbox .wrap-select .arrow {
    position: absolute;
    top: calc(50% - 1em / 2.2);
    right: 10px;
    width: 1em;
    height: 1em;
    background-image: url(/_engine/asset/vector/ico/chevron-down.svg);
    background-repeat: no-repeat;
    background-size: 1em 1em;
    cursor: default;
    z-index: 2;
    pointer-events: none;
    transition: .25s cubic-bezier(0.25, 0.1, 0.4, 1.7);
}

bo-sbox:focus-within:has(:nth-child(2 of .wrap-option:not(.not))) .wrap-select .arrow {
    background-image: url(/_engine/asset/vector/ico/sort-down.svg);
    transform: rotate(180deg);
    pointer-events: auto;
}

bo-sbox:focus-within:not(:has(:nth-child(2 of .wrap-option:not(.not)))) .wrap-select .arrow,
bo-sbox.order:focus-within .wrap-select .arrow {
    rotate: -180deg;
}

bo-sbox.order .wrap-options .options:has(.wrap-option:nth-child(10)) .wrap-option[selected] {
    order: 1;
}

bo-sbox.order .wrap-options .options {
    flex-direction: column-reverse;
}

bo-sbox.order .wrap-options .options .wrap-option.not {
    order: 2;
}

bo-sbox [contenteditable]:before {
    transition: opacity .15s
}

bo-sbox [contenteditable]:is([data-addon=emoji], [data-addon=text]):before {
    content: attr(data-addon-src);
    margin-right: 6px;
}

bo-sbox [contenteditable][data-addon=dot]:before {
    content: "";
    width: 9px;
    height: 9px;
    display: inline-block;
    background: var(--addon-color);
    border-radius: var(--bobr-radius);
    pointer-events: none;
    margin: 0 6px 1px 0;
    filter: saturate(1.5);
}

bo-sbox [contenteditable][data-addon=ico]:before {
    content: "";
    width: 18px;
    min-width: 18px;
    height: 18px;
    background-color: var(--addon-color, var(--bobr-color-blue));
    mask-image: var(--addon-src);
    mask-size: contain;
    -webkit-mask-image: var(--addon-src);
    -webkit-mask-size: contain;
    display: inline-block;
    margin: 0 6px -4px 0;
}

bo-sbox [contenteditable][data-addon=img]:before {
    content: "";
    display: inline-block;
    width: 18px;
    margin: 0 6px -2px 0;
    background-image: var(--addon-src);
    background-size: cover;
    background-position: center;
    aspect-ratio: var(--addon-ratio);
}

bo-sbox[filter] [contenteditable]:is([data-addon]):is(:empty, :focus):before {
    opacity: .2;
}

bo-sbox .wrap-options .options .wrap-option .data .addon {
    width: fit-content;
    height: 20px;
    max-width: 18px;
    min-width: 12px;
}

bo-sbox .wrap-options .options .wrap-option .data {
    display: flex;
    gap: var(--bobr-space-micro);
    align-items: center;
    pointer-events: none;
    overflow: hidden;
}

bo-sbox .wrap-options .options .wrap-option .data .addon[type="img"] img {
    width: 100%;
    aspect-ratio: var(--addon-ratio);
    --addon-ratio: 12 / 9;
    object-fit: cover;
}

bo-sbox .wrap-options .options .wrap-option .data .addon[type='dot']:before {
    content: "";
    display: block;
    width: 10px;
    height: 10px;
    background: var(--addon-color, greenyellow);
    border-radius: var(--bobr-radius);
    pointer-events: none;
}

bo-sbox .wrap-options .options .wrap-option .data .addon[type='dot'] {
    position: relative;
    display: flex;
    align-items: center;
}

bo-sbox .wrap-options .options .wrap-option .data .addon[type="ico"] {
    height: 18.5px;
}

bo-sbox .wrap-options .options .wrap-option .data .addon[type="ico"]:before {
    content: '';
    display: inline-block;
    width: 18px;
    min-width: 18px;
    height: 18px;
    background-color: var(--addon-color);
    mask-image: var(--addon-src);
    mask-size: contain;
    -webkit-mask-image: var(--addon-src);
    -webkit-mask-size: contain;
    --addon-color: white;
}

bo-sbox .wrap-options .options .wrap-option .data .addon[type="text"] {
    max-width: fit-content;
}

bo-sbox .wrap-options .options .wrap-option .data .addon.sup {
    position: absolute;
    inset: 2px 2px 2px auto;
    display: grid;
    align-items: center;
    max-width: 70%;
    height: fit-content;
    min-height: min(calc(100% - 4px), var(--sbox-addon-sup-min-height));
    max-height: calc(100% - 4px);
    width: auto;
    transition: .15s .25s;
    font-size: max(60%, 9px);
    line-height: 1;
    padding: 4px 9px 7px;
    box-sizing: border-box;
    border-radius: var(--bobr-radius-min);
    background-color: black;
    transform: translateX(98.5%);
    pointer-events: auto;
    --sbox-addon-sup-min-height: 27.5px;
}

bo-sbox .wrap-options .options .wrap-option .data .addon.sup:before {
    content: "";
    position: absolute;
    inset: -5px -5px -5px -20px;
}

bo-sbox .wrap-options .options .wrap-option .data .addon.sup .text {
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

bo-sbox .wrap-options .options .wrap-option .data .addon.sup:hover {
    transform: none;
    transition-delay: 0s;
}

bo-sbox .wrap-options .options .wrap-option .for-desc {
    color: #ffffff85;
    line-height: 1.2;
    font-size: .7em;
    pointer-events: none;
}

bo-sbox [contenteditable]:empty::after {
    color: var(--component-placeholder-text);
    transition: color .15s;
}

bo-sbox [contenteditable][placeholder]:is([title=''], :not([title])):empty::after {
    content: attr(placeholder);
}

bo-sbox[with_not] [contenteditable].not:empty::after {
    /* content: "«Не выбрано»"; */
    content: "«не выбрано»";
}

/* bo-sbox:has(.wrap-option:active) [contenteditable]:is([title=''], :not([title])):not(:focus):empty {
    background-color: var(--bobr-color-blue-light-hover);
} */

bo-sbox[required]:not(:has(.wrap-option:active)) [contenteditable][placeholder]:is([title=''], :not([title])):not(:focus):empty::after {
    color: #ff7e005c;
}

bo-sbox[required]:not(:has(.wrap-option:active)) [contenteditable]:is([title=''], :not([title])):not(:focus):empty {
    background-color: #fff2db;
}

bo-sbox .wrap-options {
    border-radius: var(--bobr-radius-min);
    background-color: black;
    position: absolute;
    top: calc(100% + var(--bobr-space-micro));
    left: 0;
    right: 0;
    transform: translateY(-5px);
    transition-property: transform, opacity, display;
    transition-behavior: allow-discrete;
    transition-duration: .15s;
    opacity: 0;
    display: none;
    pointer-events: none;
    z-index: 1;
}

bo-sbox:focus-within .wrap-options,
bo-sbox .wrap-options:has(.wrap-option:active),
bo-sbox.options-pointer-active .wrap-options {
    display: block;
    transform: none;
    opacity: 1;
    pointer-events: auto;

    @starting-style {
        opacity: 0;
        transform: translateY(-5px);
    }
}

bo-sbox .wrap-options:after {
    content: '';
    position: absolute;
    bottom: -30px;
    width: 1px;
    height: 1px;
    visibility: hidden;
}

bo-sbox .wrap-options .options {
    display: flex;
    flex-direction: column;
    border-radius: var(--bobr-radius);
    flex-wrap: nowrap;
    box-sizing: border-box;
    overflow-y: scroll;
    overflow-x: hidden;
    width: auto;
    max-height: min(45vh, var(--sbox-options-height));
    gap: var(--bobr-space-micro);
    margin: var(--sbox-options-margin);
    margin-left: auto;
    padding: 0 5px 0 6px;
    scroll-snap-type: y mandatory;
}

bo-sbox .wrap-options .options::-webkit-scrollbar {
    background: #ffffff34;
}

bo-sbox .wrap-options .options::-webkit-scrollbar-thumb {
    background: gray;
}

bo-sbox .wrap-options .options::-webkit-scrollbar-thumb:hover {
    background: white;
}

bo-sbox .wrap-options .options .wrap-option {
    position: relative;
    height: 100%;
    width: 100%;
    max-width: 360px;
    min-width: auto;
    min-height: auto;
    display: flex;
    padding: 6px 9px 7px;
    box-sizing: border-box;
    border-radius: calc(var(--bobr-radius-min) / 2);
    cursor: pointer;
    transition: .05s;
    background: var(--bobr-color-black-light);
    color: white;
    z-index: 1;
    scroll-snap-align: end;
    flex-direction: column;
    align-items: flex-start;
}

bo-sbox .wrap-options .options .wrap-option[disabled] {
    opacity: .5;
    pointer-events: none;
}

bo-sbox .wrap-options .options .wrap-option .option {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: var(--sbox-option-lines);
    overflow: hidden;
    pointer-events: none;
    font-size: .95em;
    --sbox-option-lines: 4;
    margin: -3px 0 0 0;
}

bo-sbox .wrap-options .options .wrap-option[selected],
bo-sbox .wrap-options .options .wrap-option:hover {
    background: var(--bobr-color-blue);
    color: white;
}

bo-sbox .wrap-options .options .wrap-option[selected] {
    order: -1;
}

bo-sbox .wrap-options .options .wrap-option.not {
    font-weight: 200;
    background-color: #b0b0b0;
    color: black;
    order: -2;
}

bo-sbox .wrap-options .options .wrap-option.not:hover {
    background-color: #d3d3d3;
}

bo-sbox[filter] [contenteditable]:empty {
    &:focus::after {
        content: "Фильтр";
        color: var(--component-placeholder-text);
        font-weight: 300;
        transition: color .15s;
    }

    &:is([title]):not(:focus)::after {
        content: attr(title);
        color: var(--component-placeholder-text);
        font-weight: 300;
        transition: color .15s;
        font-size: 75%;
    }
}

bo-sbox[filter] .wrap-options:not(:has(.wrap-option:not(.not):not(.hidden))),
bo-sbox[filter] .wrap-options .options .wrap-option.hidden,
bo-sbox[filter] .wrap-options:has(.wrap-option.hidden) .wrap-option.not {
    display: none;
}

bo-sbox[readonly] [contenteditable] {
    border: 1px dashed var(--bobr-color-gray-middle);
    background-color: white !important;
    padding: 7.5px 32px 11px 11.5px;
}

bo-sbox[readonly][required] [contenteditable] {
    border-color: var(--bobr-color-orange);
}

/* bo-sbox[readonly].focus [contenteditable]:not(:focus):empty {
    background-color: var(--bobr-color-gray-light);
} */

bo-sbox[readonly] .wrap-options .options .wrap-option {
    pointer-events: none;
}

/* sbox */



/* date */

bo-date .wrap-com {
    display: flex;
    gap: var(--bobr-space-micro) var(--bobr-space-min);
    /* align-items: center; */
    flex-wrap: wrap;
}

bo-date .wrap-com .desc {
    font-size: .8em;
    font-weight: 200;
    text-wrap: balance;
    flex: 1 1 100%;
    width: min-content;
}

bo-date .wrap-main input:is([type="date"], [type="datetime-local"], [type="month"]) {
    min-height: 35px;
    padding: 7px 10px 8px;
    border-radius: var(--bobr-radius-micro);
    background-color: var(--component-input-bg);
    outline: none;
    border: none;
    cursor: pointer;
    box-sizing: border-box;
    transition: background-color .15s;

    zoom: 1.2;
}

bo-date .wrap-main input:is([type="date"], [type="datetime-local"], [type="month"])[readonly] {
    padding-right: 0;
}

bo-date[readonly] .wrap-main input[readonly]:is([type="date"], [type="datetime-local"], [type="month"]) {
    border: 1px dashed var(--bobr-color-gray-middle);
    background-color: white;
    padding-block: 6.33px 7.3px;
}

bo-date[readonly] .wrap-main input[readonly]:is([type="date"]) {
    max-width: 45%;
}

/* date */



/* range */

bo-range .wrap-com {
    display: flex;
    gap: var(--bobr-space-micro) var(--bobr-space-min);
    align-items: center;
}

bo-range .wrap-com .desc {
    font-size: .8em;
    font-weight: 200;
    text-wrap: balance;
    flex: 1 1 100%;
    width: min-content;
}

bo-range .wrap-main input:is([type="date"], [type="datetime-local"], [type="month"], [type="week"], [type="number"]) {
    min-height: 35px;
    padding: 7px 10px 8px;
    border-radius: var(--bobr-radius-micro);
    background-color: var(--component-input-bg);
    outline: none;
    border: none;
    cursor: pointer;
    box-sizing: border-box;
    transition: background-color .15s;

    zoom: 1.2;
}

bo-range .wrap-main input[type="number"] {
    max-width: 68px;
}

bo-range .wrap-main input:is([type="date"], [type="datetime-local"], [type="month"], [type="week"])[readonly] {
    padding-right: 0;
}

bo-range[readonly] .wrap-main input[readonly]:is([type="date"], [type="datetime-local"], [type="month"], [type="week"]) {
    border: 1px dashed var(--bobr-color-gray-middle);
    background-color: white;
    padding-block: 6.33px 7.3px;
}

bo-range[readonly] .wrap-main input[readonly]:is([type="date"], [type="month"], [type="week"]) {
    max-width: 45%;
}

/* range */



/* slider */

bo-slider .wrap-main {
    align-items: stretch;
    gap: var(--bobr-space-micro);
    height: var(--slider-height);
}

bo-slider datalist {
    display: grid;
    align-content: space-between;
    line-height: .9;
}

bo-slider option {
    padding: 0;
}

bo-slider input {
    writing-mode: vertical-rl;
    direction: rtl;
    margin-left: -4px;
}

bo-slider[appearance-horizontal] .wrap-main {
    height: auto;
    align-items: center;
}

bo-slider[appearance-horizontal] input {
    writing-mode: horizontal-tb;
    direction: ltr;
    margin-left: 0;
}

bo-slider .wrap-main:has([readonly]) {
    pointer-events: none;
}

/* slider */



/* divider */

bo-div {
    width: 100%;
    flex: 1 1 100%;
}

bo-div .wrap-com {
    display: block;
    position: relative;
    width: 100%;
    border-bottom: 2px solid black;
    font-size: 2.8em;
    font-weight: 200;
    line-height: 1.1;
    padding-bottom: 8px;
}

bo-div .wrap-com a {
    display: inline-block;
    padding-right: 10px;
    font-weight: 900;
    text-decoration: none;
    color: var(--bobr-color-blue);
    cursor: pointer;
    user-select: none;
    transition: .15s;
}

bo-div .wrap-com a:active {
    transform: translateY(1.5px) scale(0.96);
    transition: .05s;
}

bo-div .wrap-com a:target {
    background-color: #000;
}

/* divider */



/* table */

bo-table {
    --table-cell-padding: 8px;
    --table-editor-height: 51.33px;
    --table-editor-padding: 8px 12px 12px;
    --table-sticky-offset: 29.1px;
    --table-min-height: 150px;
    --table-min-width: 200px;
    --table-max-height: 75vh;
}

/* table.btn.resize */

bo-table .btn.resize {
    position: absolute;
    inset: 10px 11px auto auto;
    opacity: .35;
    transition: none;
    transform: translateX(7px);

    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    cursor: pointer;
    user-select: none;
    z-index: 2;

    &:before {
        content: '';
        position: absolute;
        z-index: -1;
        inset: 0;
        transition-delay: 0s;
    }

    &:active {
        transition: none;
        transform: translateY(1.5px) scale(0.96);
    }

    & img {
        width: 16px;
        height: 16px;
        pointer-events: none;
    }
}

bo-table.minimal-header .wrap-com .btn.resize {
    inset: -15px 15px auto auto;
}

bo-table.minimal-header.fullscreen .wrap-com .btn.resize {
    inset: 20px 20px auto auto;
}

bo-table.fullscreen .btn.resize {
    position: fixed;
    inset: var(--bobr-space-min) var(--bobr-space-min) auto auto;
}

bo-table.fullscreen .btn.resize,
bo-table .btn.resize:focus-visible,
bo-table:focus-within .btn.resize,
bo-table:hover .btn.resize {
    opacity: 1;

    &:before {
        inset: -15px;
        transition-delay: .15s;
    }
}

bo-table:is(.fullscreen, :focus-within, :hover) .btn.resize:not(:active) {
    transform: none;
}

/* table.btn.resize */

/* table.auto-wide */

bo-table.auto-wide {
    width: calc(100vw - var(--bobr-space));
}

bo-table.auto-wide>.wrap-com {
    flex: 1 1 100%;
}

bo-table.auto-wide>.wrap-com>.wrap-main {
    width: 100%;
}

bo-table.auto-wide>.wrap-com>.wrap-main>.wrap,
bo-table.auto-wide>.wrap-com>.wrap-main>.wrap>table {
    max-width: initial;
    width: 100%;
}

/* table.auto-wide */

bo-table>.wrap-com>.wrap-main {
    display: grid;
    max-width: var(--layout-max-width);

    content-visibility: auto;
    contain-intrinsic-size: auto var(--table-min-height);
}

bo-table>.wrap-com>.wrap-main>.wrap {
    position: relative;
    overflow: scroll;
    padding: 0px 5px 5px 0px;
    max-height: var(--table-max-height);
    min-width: var(--table-min-width);
    max-width: calc(100vw - var(--bobr-space));

    contain: content;
}

bo-table[appearance-scroll=horizontal]:not(.fullscreen) .wrap-main>.wrap {
    max-height: initial;
    overflow: scroll hidden;
    padding-right: 2px;
}

bo-table[appearance-scroll=vertical]:not(.fullscreen) .wrap-main>.wrap {
    overflow: auto scroll;
    max-width: initial;
}

bo-table table {
    min-width: var(--table-min-width);
    border-spacing: 0;
}

bo-table[virtual-scroll]:not(.fullscreen) {
    content-visibility: auto;
    contain-intrinsic-size: auto 640px;
}

bo-table table tbody td:is([data-vcol-detached], [data-vcol-lazy]) {
    overflow: hidden;
}

bo-table table tbody td:is([data-vcol-detached], [data-vcol-lazy])::before {
    content: "";
    display: block;
    position: absolute;
    inset: var(--table-cell-padding);
    min-height: var(--table-vcol-cell-height, 1px);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    align-content: center;
}

bo-table table tbody td[data-vcol-lazy]::before {
    content: attr(data-vcol-text);
}

bo-table table tbody td.editable[data-vcol-lazy]:not([data-vcol-text])::before {
    content: "- - -";
    color: rgb(133 133 133 / 28%);
}

bo-table table tbody tr[data-has-input]>td {
    height: calc(var(--table-editor-height) + 2 * var(--table-cell-padding));
}

bo-table table tbody td[data-cell-editor] {
    overflow: hidden;
    cursor: pointer;
}

bo-table table tbody td[data-cell-editor]:not([data-cell-editing], [data-cell-proxy-dom])::before {
    content: attr(data-vcol-text);
    position: absolute;
    inset: var(--table-cell-padding);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: auto;
    box-sizing: border-box;
    height: var(--table-editor-height);
    padding: var(--table-editor-padding);
    overflow: hidden;
    color: inherit;
    font: inherit;
    line-height: normal;
    white-space: nowrap;
    text-align: start;
    text-overflow: ellipsis;
    border-radius: var(--bobr-radius-micro);
}

bo-table:not([virtual-scroll]) table tbody td.editor-number[data-cell-editor]::before {
    position: relative;
    inset: auto;
    width: max-content;
    min-width: 100%;
}

bo-table:not([virtual-scroll]) table tbody td.editor-number[data-cell-editor][data-cell-editing]::before {
    height: 0;
    padding-block: 0;
    line-height: 0;
    visibility: hidden;
}

bo-table:not([virtual-scroll]) table tbody td.editor-number[data-cell-editor][data-cell-editing][data-vcol-text]::before {
    content: attr(data-vcol-text);
}

bo-table:not([virtual-scroll]) table tbody td.editor-number[data-cell-editor][data-cell-editing]:not([data-vcol-text])::before {
    content: "- - -";
}

bo-table table tbody td.editor-left[data-cell-editor]::before {
    justify-content: flex-start;
    text-align: left;
}

bo-table table tbody td.editor-right[data-cell-editor]::before {
    justify-content: flex-end;
    text-align: right;
}

bo-table table tbody td.editor-number[data-cell-editor]::before {
    display: block;
    justify-content: center;
    padding: 8px 8px 12px;
    margin: auto;
    line-height: calc(var(--table-editor-height) - 20px);
    text-align: center;
    text-overflow: ellipsis;
    font-variant-numeric: tabular-nums;
}

bo-table table tbody td.editor-number[data-editor-size="compact"]::before {
    font-size: .9em;
}

bo-table table tbody td.editor-number[data-editor-size="small"]::before {
    font-size: .78em;
}

bo-table table tbody td.editor-number[data-editor-size="tiny"]::before {
    font-size: .78em;
}

bo-table table tbody td[data-cell-editor]:not([data-vcol-text], [data-cell-editing], [data-cell-proxy-dom])::before {
    content: "- - -";
    color: rgb(133 133 133 / 60%);
}

bo-table table tbody td[data-cell-proxy-dom]:not([data-cell-editing])>.cell .data {
    display: flex;
    align-items: center;
    box-sizing: border-box;
    min-height: var(--table-editor-height);
    padding: var(--table-editor-padding);
    line-height: normal;
}

bo-table table tbody td.editor-number[data-cell-proxy-dom]:not([data-cell-editing])>.cell .data {
    display: block;
    max-width: 100%;
    padding: 8px 4px 12px;
    overflow: hidden;
    line-height: calc(var(--table-editor-height) - 20px);
    text-align: center;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-variant-numeric: tabular-nums;
}

bo-table table tbody td[data-cell-proxy-dom]:not([data-vcol-text], [data-cell-editing])>.cell .data::before {
    content: "- - -";
    color: rgb(133 133 133 / 28%);
}

bo-table:not(.resizing) table tbody tr:not(.editing):hover td[data-cell-editor]:not([data-cell-editing], [data-cell-proxy-dom])::before,
bo-table:not(.resizing) table tbody tr:not(.editing):hover td[data-cell-proxy-dom]:not([data-cell-editing])>.cell .data {
    background-color: #00000010;
}

/* thead */

bo-table.with-groups {
    --table-sticky-offset: 59px;
}

/* bo-table:has(table thead tr:nth-child(3)) {
    --table-sticky-offset: 88px;
} */

bo-table table thead {
    background-color: var(--bobr-color-blue);
    color: white;
    position: sticky;
    top: 0px;
    z-index: 8;
}

bo-table table thead tr:not(.groups) th {
    position: relative;
    padding: 4px 14px 6.5px;
    box-sizing: border-box;
    white-space: nowrap;
    font-size: .9em;
}

bo-table table thead tr:not(.groups) th:nth-last-child(1 of :not(.filtered)) {
    border-top-right-radius: var(--bobr-radius-micro);
}

bo-table table thead tr:not(.groups) th[data-sort] {
    cursor: pointer;
    outline: none;
    overflow: hidden;

    &:not(:first-child) {
        z-index: 1;
    }

    &:hover {
        background-color: var(--bobr-color-blue-dark) !important;

        &:first-child {
            background-color: var(--bobr-color-red-orange) !important;
        }
    }
}

bo-table table thead th[data-sort]:after {
    content: "";
    position: absolute;
    /* right: -8px; оставить так? */
    width: 18px;
    min-width: 18px;
    height: 18px;
    background-color: white;
    mask-image: url(/_engine/asset/vector/ico/sort-down-alt.svg);
    mask-size: contain;
    -webkit-mask-image: url(/_engine/asset/vector/ico/sort-down-alt.svg);
    -webkit-mask-size: contain;
    transition: .15s;
}

bo-table table thead th[data-sort=""]:after {
    transform: translateY(-14px);
}

bo-table table thead tr:not(.groups) th[data-sort]:hover {
    overflow: initial;

    &:after {
        transform: none;
    }
}

bo-table table thead th[data-sort]:has(+ th[data-sort]:hover) {
    z-index: 2;
}

bo-table table thead th[data-sort="desc"]:after {
    content: "";
    mask-image: url(/_engine/asset/vector/ico/sort-down-alt.svg);
    -webkit-mask-image: url(/_engine/asset/vector/ico/sort-down-alt.svg);
}

bo-table table thead th[data-sort="asc"]:after {
    content: "";
    mask-image: url(/_engine/asset/vector/ico/sort-up-alt.svg);
    -webkit-mask-image: url(/_engine/asset/vector/ico/sort-up-alt.svg);
}

/* bo-table table thead th[data-sort]:last-child::after {
    right: 2px;
} */

/* groups */

bo-table.with-groups table thead tr:not(.groups) th:not(:first-child) {
    background-color: var(--bobr-color-blue);
}

bo-table.with-groups table thead {
    background-color: white;
}

bo-table table thead tr.groups th {
    background-color: transparent;
    border: none;
    padding: 0;
    margin: 0;
    height: 29.83px;
}

bo-table table thead tr.groups th:empty {
    user-select: none;
    pointer-events: none;
}

/* bo-table table thead tr.groups th[colspan="0"] {
    display: none;
} */

bo-table table thead tr.groups th:not(:nth-child(1 of [colspan]))>div {
    border-left: 0;
}

bo-table table thead tr.groups th[colspan]:last-child>div {
    width: auto;
    margin-right: 6px;
}

bo-table table thead tr.groups th[colspan]>div {
    width: 99.8%;
    color: black;
    background-color: white;
    border: 1px solid #b0b0b0;
    border-bottom: none;
    border-radius: var(--bobr-radius-min) var(--bobr-radius-min) 0 0;
    font-weight: 600;
    padding: 4px 14px 6.5px;
    box-sizing: border-box;
    white-space: nowrap;
    font-size: .9em;
    cursor: pointer;
    user-select: none;
    transition: .15s background-color, .15s border-color, .15s transform;
}

bo-table table thead tr.groups th[colspan]>div:active {
    transition: .15s background-color, .15s border-color, .05s transform;
    transform: translateY(5px);
}

bo-table table thead tr.groups th[colspan]>div:hover {
    background-color: aliceblue;
    border-color: var(--bobr-color-blue-light);
}

bo-table table td {
    position: relative;
    padding: var(--table-cell-padding);
    height: 1px;
    box-sizing: border-box;

    &:has(.cell[style="display: none;"]) {
        height: 43.34px;
    }
}

bo-table table tbody td:first-child {
    font-weight: 200;
    font-size: 1.1em;
    /* 1.2em */
}

bo-table table tbody td:not(:first-child) {
    text-align: center;
}

bo-table table :is(th, td):not(:last-child) {
    border-right: 1px solid #72727226;
}

bo-table table tbody tr:last-child td:first-child {
    border-bottom-left-radius: var(--bobr-radius-micro);
}

bo-table table tbody tr:last-child td:last-child {
    border-bottom-right-radius: var(--bobr-radius-micro);
}

bo-table table tr:not(.groups) :where(td, th):first-child {
    position: sticky;
    left: 0px;
    z-index: 6;
    background-color: var(--table-row-current-bg);
    color: var(--table-row-color, initial);
    filter: sepia(.1);
    transition: opacity .15s;
    --table-row-current-bg: var(--table-row-bg, var(--bobr-color-gray-light));
}

bo-table table tr:not(.groups) th:first-child {
    border-top-left-radius: var(--bobr-radius-micro);
    background-color: var(--bobr-color-orange-hover);
    color: white;
    z-index: 3;
    transition: background-color .15s;
    transition-delay: .25s;
}

bo-table table.has-selection tr:not(.groups) th:first-child {
    background-color: var(--bobr-color-green);
    transition-delay: 0s;
}

bo-table table tbody tr {
    background-color: var(--table-row-current-bg, white);
    color: var(--table-row-color);
    transition: transform .15s;

    content-visibility: auto;
    contain-intrinsic-height: 100px;
}

bo-table table tbody tr:nth-child(odd of :not(.closed, .hidden)) {
    --table-row-current-bg: var(--table-row-bg, var(--bobr-color-gray-light));
    color: var(--table-row-color, initial);
}

bo-table table tbody tr:nth-child(even of :not(.closed, .hidden)) {
    background-color: var(--table-row-bg, white);
    color: var(--table-row-color, initial);
}

bo-table table tbody tr[data-level="0"] {
    position: sticky;
    top: var(--table-sticky-offset);
    z-index: 8;
    background-color: var(--table-row-bg, black);
    color: var(--table-row-color, white);
    --table-row-color: white;
    --table-row-bg: black;
}

bo-table table tbody tr[data-level="1"] {
    background-color: var(--table-row-bg, var(--bobr-color-gray-light));
    color: var(--table-row-color, white);
}

bo-table table tbody tr[data-level="1"]:not([is-finally]) {
    --table-row-color: white;
    --table-row-bg: var(--bobr-color-black-light);
}

bo-table table tbody tr:not([data-level="0"], [data-level="1"]:not([is-finally])):nth-child(odd of :not(.closed, .hidden)) td:first-child {
    background-color: var(--table-cell-bg);
    --table-cell-bg: color-mix(in oklab, var(--table-row-bg, var(--bobr-color-gray-light)), #e7e7e7);
}

/* bo-table table tbody tr:not(:has(.focus)):hover,
bo-table table tbody tr.contextmenu {
    filter: invert(0.04) sepia(.1);
} */

/* bo-table table tbody tr:not(:has(.focus)):hover {
    filter: invert(0.04) sepia(.1);
}

bo-table table tbody tr:where([data-level="0"], [data-level="1"]):not(:has(.focus)):hover {
    filter: invert(0.1) saturate(1.5);
} */

bo-table canvas.shadows {
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    image-rendering: pixelated;
    pointer-events: none;
    z-index: 9;
    transition: opacity .15s;
}

bo-table:is(.editing, .resizing) canvas.shadows {
    opacity: 0;
}

bo-table table tbody td[type="date"] {
    font-size: .75em;
    font-weight: bold;
}

bo-table table tbody {
    & td.setbox-cell:first-child {
        min-width: 128px;
    }

    & tr[data-has-setbox]:first-child td {
        height: 74px
    }
}

bo-table table tbody td .cell {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100%;
}

bo-table table tbody td .cell.no-wrap {
    text-wrap: nowrap;
}

bo-table table tbody td .cell.break-wrap {
    text-wrap: wrap;
    word-break: break-all;
    /* не реализовано и не используется */
}

bo-table table tbody td .cell.left {
    justify-content: start;
    text-align: left;
}

bo-table table tbody td .cell.right {
    justify-content: end;
}

bo-table table tbody td .cell .as {
    position: relative;
    font-size: .55em;
    font-weight: normal;
    background: #edf6ff70;
    padding: 2.5px 6px 5px;
    border-radius: var(--bobr-radius-min);
    pointer-events: none;
    transition: .15s;
    margin: auto 0 auto auto;
    line-height: 1;
}

/* table.data-sup */

bo-table table tbody tr td[data-sup]:after {
    content: attr(data-sup);
    position: absolute;
    top: -1px;
    left: 2px;
    right: 2px;
    max-width: calc(100% - 4px);
    box-sizing: border-box;
    width: fit-content;
    font-size: 50%;
    text-wrap: nowrap;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    text-wrap: nowrap;
}

bo-table table tbody tr:hover td[data-sup]:after {
    z-index: 5;
}

bo-table table tbody tr td.editing[data-sup]:after {
    z-index: 9;
}

bo-table table tbody tr td.editable[data-sup]:after {
    transition: top .15s, padding .15s, box-shadow .15s, border-radius .15s, background-color .15s;
}

bo-table table tbody tr td.editing[data-sup]:after {
    top: -12px;
    background-color: #ffffff;
    box-shadow: var(--component-focus-shadow);
    padding: 0 5px 3px;
    border-radius: var(--bobr-radius-min);
}

bo-table table tbody tr td:last-child .cell .input[data-sup]:after {
    left: 50%;
    top: 2px;
}

/* table.data-sup */

bo-table table tbody tr:is([data-level="1"], [data-level="2"]) td:first-child :is(.cell, .desc) {
    padding-left: 10px;
}

bo-table table tbody tr[data-level="3"] td:first-child :is(.cell, .desc) {
    padding-left: 40px;
}

bo-table table tbody tr[data-level="4"] td:first-child :is(.cell, .desc) {
    padding-left: 60px;
}

bo-table table tbody tr[data-level="5"] td:first-child :is(.cell, .desc) {
    padding-left: 80px;
}

bo-table table tbody tr[data-level] td:first-child .cell.no-addon .data:before {
    padding-right: 5px;
    color: var(--bobr-color-black-light);
}

bo-table table tbody tr:is([data-level="2"], [is-finally]) td:first-child .cell.no-addon .data:before {
    content: "•";
}

bo-table table tbody tr[data-level="3"] td:first-child .cell.no-addon .data:before {
    content: "••";
}

bo-table table tbody tr[data-level="4"] td:first-child .cell.no-addon .data:before {
    content: "•••";
}

bo-table table tbody tr td .cell .addon {

    &[type=block] {
        align-self: stretch;
        min-height: 28px;
        min-width: var(--addon-width);
        max-width: var(--addon-width);
        margin-inline-start: 1px;
        background-color: var(--addon-color);
        border-radius: var(--bobr-radius-min);
        --addon-width: 5px;
        --addon-color: greenyellow;
    }

    &[type=dot] {
        position: relative;
        display: flex;
        align-items: center;

        &:before {
            content: "";
            display: block;
            width: 10px;
            height: 10px;
            background: var(--addon-color, greenyellow);
            border-radius: var(--bobr-radius);
            pointer-events: none;
        }
    }

    &[type="img"] {
        margin-inline-start: 5px;

        & img {
            width: 18px;
            object-fit: cover;
            aspect-ratio: var(--addon-ratio);
            --addon-ratio: 12 / 9;
        }
    }

    &[type="ico"] {
        height: 18px;
        margin-block-start: 5px;
        margin-inline-start: 2px;

        &::before {
            content: '';
            display: block;
            width: 18px;
            min-width: 18px;
            height: 18px;
            background-color: var(--addon-color);
            mask-image: var(--addon-src);
            mask-size: contain;
            -webkit-mask-image: var(--addon-src);
            -webkit-mask-size: contain;
            --addon-color: white;
        }
    }
}

bo-table table td:empty {
    text-align: center;
}

bo-table table tbody tr:is(.hidden:not(.search-filter), .closed) {
    display: none;
}

bo-table table tbody tr:is(.hidden:not(.search-filter)) {
    visibility: hidden;
}

bo-table table tbody tr td .data {
    padding-inline: 8px;
    padding-block: 1px 4px;
}

bo-table table tbody tr td .data:focus {
    background-color: var(--bobr-color-blue-light-hover);
    box-shadow: inset var(--component-focus-shadow);
    border-radius: var(--bobr-radius-min);
    color: black;
}

bo-table>.wrap-com>.wrap-main>.wrap.in-drag table {
    user-select: none;
    pointer-events: none;
}

bo-table[appearance-opacityonscroll="1"]>.wrap-com>.wrap-main>.wrap.in-scroll :is(th, td):first-child {
    opacity: .1;
}

/* bo-table table td:after {
    content: attr(data-pk);
    position: absolute;
    inset: 3px 5px auto auto;
    font-size: .6em;
} */

@media (max-width: 600px) {
    bo-table table tbody td:first-child {
        font-weight: initial;
        font-size: initial;
    }
}

/* table::controls */

bo-table .controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    max-width: calc(100% - 2px);
    min-width: 100%;
    gap: var(--bobr-space-min) var(--bobr-space-middle);
    padding: var(--bobr-space-min) 0;

    contain: style paint layout;
    content-visibility: auto;
}

/* table::controls::detail */

bo-table .controls .detail {
    display: flex;
    align-items: center;
    gap: var(--bobr-space-min) var(--bobr-space-middle);
    justify-content: flex-start;
    flex-wrap: wrap;
}

/* table::controls::filter */

bo-table .controls .filter {
    display: flex;
    flex-wrap: wrap;
    gap: var(--bobr-space-micro);
    height: min-content;
    margin-right: auto;
}

bo-table .controls .filter .context {
    display: grid;
    grid-auto-flow: column;
    grid-template-columns: 22px 1fr;
    justify-content: start;
    width: fit-content;
    background-color: aliceblue;
    padding: 7px 8px 9px;
    border-radius: var(--bobr-radius-min);
}

bo-table .controls .filter .context input {
    position: relative;
    margin: 2px 3px 0px 4px;
}

bo-table table :is(col, th, td).filtered {
    display: none;
}

/* table::data-container */

bo-table table .data.with-data-container {
    display: flex;
    gap: var(--bobr-space-micro);
    flex-direction: column;
    font-size: .8em;
    font-weight: 200;
}

bo-table table .data .data-container {
    padding: 5px 10px 8px;
    border-radius: var(--bobr-radius-min);
    background-color: #00000008;
    line-height: 1.1;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: var(--table-data-container-lines);
    --table-data-container-lines: 3;
}

bo-table table .data:hover .data-container {
    --table-data-container-lines: auto;
}

bo-table table .data.multi-data-container {

    & .data-container {
        --table-data-container-lines: 1;
    }

    &:hover .data-container {
        --table-data-container-lines: auto;
    }
}

/* table::resizer */

bo-table table tbody tr.editing,
bo-table table.resizing tbody tr.resizing {
    filter: none;
}

bo-table table thead tr:not(.groups) th .col-resizer {
    content: "";
    display: block;
    position: absolute;
    top: 4px;
    bottom: 4px;
    right: 0;
    width: 3px;
    background-color: var(--table-row-bg, white);
    filter: invert(1);
    user-select: none;
    pointer-events: auto;
    cursor: col-resize;
    opacity: 0;
    transition-behavior: allow-discrete;
    transition: .15s opacity, .15s display;
    z-index: 5;
}

bo-table table thead tr:not(.groups) th .col-resizer:hover {
    transition: .12s opacity, .12s display;
}

bo-table table:not(.resizing) thead tr:not(.groups) th .col-resizer:hover,
bo-table table thead th.resizing .col-resizer {
    display: block;
    opacity: 1;
}

bo-table table.resizing {
    user-select: none;
}

/* table::input */

bo-table table tbody :is(bo-input, bo-setbox)[is-plugin].focus {
    background-color: white;
}

bo-table table tbody tr:not(:hover) td .cell {
    pointer-events: none;
}

bo-table table tbody .cell :is(.data, .input)[attr-type=number] {
    text-wrap: nowrap;
}

bo-table table tbody td.editable:not(.editing) {
    cursor: pointer;
}

bo-table:not(.resizing) table tbody tr:not(.editing):hover td.editable {
    background-color: rgb(0 0 0 / 4%);
}

bo-table table tbody bo-input[is-plugin] {
    content-visibility: auto;
}

bo-table table tbody bo-input[is-plugin] .wrap-input {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
}

bo-table table tbody bo-input[is-plugin] :is(input.input, textarea.input) {
    width: 100%;
    max-inline-size: none;
    padding: var(--table-editor-padding);
    box-sizing: border-box;
    border: none;
    border-radius: var(--bobr-radius-micro);
    font-size: inherit;
    line-height: normal;
    color: inherit;
    cursor: pointer;
}

bo-table table tbody td[data-cell-editing]>.cell,
bo-table table tbody td[data-cell-editing] bo-input[is-plugin],
bo-table table tbody td[data-cell-editing] .wrap-input {
    width: 100%;
    min-width: 0;
    max-width: 100%;
}

bo-table table tbody td[data-cell-editing] {
    overflow: visible;
    z-index: 8;
}

bo-table table tbody td[data-cell-editing]>.cell {
    position: relative;
    box-sizing: border-box;
    overflow: visible;
    z-index: 1;
}

bo-table table tbody td[data-cell-editing] input.input {
    width: 100%;
    min-inline-size: 100%;
    max-inline-size: 100%;
}

bo-table table tbody td.editor-text[data-cell-editing] bo-input[is-plugin],
bo-table table tbody td.editor-text[data-cell-editing] .wrap-input {
    width: max-content;
    min-width: 100%;
    max-width: min(72ch, calc(100vw - 32px));
}

bo-table table tbody td.editor-text[data-cell-editing] textarea.input {
    field-sizing: content;
    width: max-content;
    min-inline-size: 100%;
    max-inline-size: min(72ch, calc(100vw - 32px));
    overflow: auto;
    white-space: pre-wrap;
}

bo-table table tbody td.editor-number[data-cell-editing] input.input[attr-type="number"] {
    text-align: center;
    font-variant-numeric: tabular-nums;
}

bo-table table tbody td.editor-number[data-cell-editing] bo-input[is-plugin] {
    position: absolute;
    top: 50%;
    left: 50%;
    width: max-content;
    min-width: var(--table-editor-min-width);
    max-width: calc(100vw - 32px);
    margin: auto;
    transform: translate(-50%, -50%);
}

bo-table table tbody td.editor-number[data-cell-editing] .wrap-input {
    width: max-content;
    min-width: var(--table-editor-min-width);
    max-width: calc(100vw - 32px);
    margin: auto;
}

bo-table table tbody td.editor-number[data-cell-editing] input.input[attr-type="number"] {
    width: max-content;
    min-inline-size: var(--table-editor-min-width);
    max-inline-size: calc(100vw - 32px);
    margin: auto;
}

bo-table table tbody bo-input[is-plugin] input.input::placeholder {
    color: rgb(133 133 133 / 28%);
}

bo-table:not(.resizing) table tbody tr:not(.editing):hover td.editable .cell bo-input .input,
bo-table bo-input.focus .input {
    background-color: #00000010;
}

/* table::setbox */

bo-table bo-setbox.focus {
    background-color: white;

    & .boxes .box {
        background-color: #00000010;
        transition: none;
    }
}

bo-table bo-setbox .boxes {
    flex-wrap: nowrap;
    padding-right: 0;
    cursor: pointer;
}

bo-table bo-setbox .boxes .box {
    min-width: fit-content;
    max-width: 450px;
    min-height: 41.33px;
    font-size: initial;
    overflow: initial;
    background-color: transparent;
}

bo-table bo-setbox .boxes.empty:after {
    content: "- - -";
    color: rgb(133 133 133 / 28%);
    background-color: transparent;
    transition: background-color .15s;
}

bo-table:not(.resizing) tr:not(.editing):hover td.editable bo-setbox .boxes.empty:after,
bo-table:not(.resizing) table tbody tr:not(.editing):hover td.editable .cell bo-setbox .box {
    background-color: #00000010;
}

bo-table bo-setbox .boxes .add {
    position: absolute;
    left: -10px;
    top: calc(50% - 10px);
    box-shadow: 0 0 0 4px white, 0 0 0 5px var(--bobr-color-blue-light);
    height: 20px;
    width: 20px;
    min-width: auto;
    padding: 0;
    border-radius: var(--bobr-radius-max);
    z-index: 1;
    transform: translateX(7px);
    opacity: 0;
    visibility: hidden;
}

bo-table bo-setbox .boxes .box .delete {
    right: -23px;
    top: calc(50% - 12.5px);
    box-shadow: var(--component-focus-shadow);
    pointer-events: auto;
    transform: translateX(-7px);
    visibility: hidden;
}

bo-table bo-setbox.focus .boxes :is(.add, .box .delete) {
    visibility: visible;
    opacity: 1;

    &:not(:active) {
        transform: none;
    }
}

bo-table tr td:last-child bo-setbox .boxes .box .delete {
    right: 0;
}

bo-table .cell[attr-type="text"] bo-setbox .boxes .box {
    text-align: left;
}

bo-table bo-setbox.focus .boxes .box {
    max-height: 9999px;
    transition: max-height 0.3s cubic-bezier(1, 0, 1, 0);
    transition-delay: 0s;
}

/* row-options */

bo-table tr td row-options {
    position: absolute;
    inset: 0;
    margin: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 20px;
    width: 20px;
    border-radius: var(--bobr-radius);
    user-select: none;
    cursor: pointer;
    background-color: var(--bobr-color-blue);
    --table-row-options-dot-color: var(--bobr-color-blue);
    color: white;
    transition: background-color .15s, background-size .15s, border-radius .15s, transform .15s, opacity .15s;
    transform: scale(.3);
    opacity: 0;

    &:before {
        content: '';
        position: absolute;
        inset: 0;
        width: 40%;
        height: 40%;
        margin: auto;
        border-radius: var(--bobr-radius-max);
        background-color: white;
        pointer-events: none;
        transition: transform .15s .05s;
        transform: scale(.3);
    }

    &:after {
        content: "";
        position: absolute;
        inset: -15px;
    }

    &:active:before {
        transform: scale(1.3);
        transition-delay: 0s;
    }

    &:hover:after {
        inset: -18px;
    }
}

bo-table tr:hover row-options,
bo-table tr:is(.contextmenu, .loading, .open, .selected, .drag) row-options {

    &,
    &::before {
        transform: none;
        opacity: 1;
    }
}

bo-table tr {

    &.contextmenu row-options:before {
        transform: scale(1.3);
    }

    &.loading row-options:before {
        background-color: transparent;
        animation: 1s cubic-bezier(0.06, 0.35, 0.85, 0.38) 0s infinite normal none running loading;
        border-bottom: 1.5px solid white;
    }

    &.selected:not(.loading) td row-options {
        background-color: var(--bobr-color-green);

        &:before {
            clip-path: polygon(45% 64%, 84% 14%, 100% 28%, 47% 100%, 0 49%, 15% 32%);
        }
    }

    &.open:not(.loading) td row-options:not(:hover) {
        background-color: var(--bobr-color-blue);

        &:before {
            clip-path: polygon(30% 25%, 25% 0, 90% 50%, 25% 100%, 30% 76%, 60% 50%);
        }
    }
}

bo-table table tbody tr.drag td row-options {
    background: radial-gradient(var(--table-row-options-dot-color) 50%, transparent 54%) 0 0, radial-gradient(rgba(0, 0, 0, .1) 1%, transparent 1%) 50px 50px;
    background-size: 6.6px 6.6px;
    border-radius: 0;

    &:before {
        transform: scale(0);
    }
}

/* row-options */

bo-table .additional-data {
    display: none;
}

/* th:first hack */

bo-table.with-groups .wrap-main>.wrap thead tr:not(.groups) th:first-child:before {
    content: '';
    position: absolute;
    inset: 0 auto auto 0;
    width: 8px;
    height: 8px;
    background-color: white;
    mix-blend-mode: darken;
}

/* th:last hack */

bo-table.with-groups .wrap-main>.wrap thead tr:not(.groups) th:last-child,
bo-table:not(.with-groups) .wrap-main>.wrap thead tr th:first-child {
    overflow: initial !important;

    &::before {
        content: '';
        position: absolute;
        inset: 0 auto 0 0;
        width: 8px;
        height: 8px;
        background-color: white;
        mix-blend-mode: darken;
    }
}

bo-table:not(.with-groups) .wrap-main>.wrap thead tr th:first-child::before {
    inset: 0 auto 0 0;
}

/* table::readonly */

bo-table[readonly]>.wrap-com>.wrap-main {
    border: 1px dashed #6a6a6a;
    border-radius: var(--bobr-radius);
    padding: calc(var(--bobr-space-min) / 2);

    & table td:not(:last-child) {
        border-right-style: dashed;
    }
}

/* table::column-filter */

.column-filter {
    position: absolute;
    inset: auto 0 calc(100% + 10px) auto;
    border-radius: 12px;
    background-color: #f4f7ff;
    padding: 7px;

    &::before {
        content: "фильтры";
        color: black;
        font-size: .7em;
        font-weight: 200;
        position: absolute;
        inset: -2px 0 0 0;
        transition: visibility .15s;
    }
}

.column-filter:hover {

    &::before {
        visibility: hidden;
        transition: visibility 0s;
    }

    & .column-filter-wrap {
        max-height: 140px;
    }
}

.column-filter-wrap {
    overflow: hidden scroll;
    padding-right: 7px;
    max-height: 0;
    transition: max-height .15s;
}

/* table */



/* tree */

bo-tree {
    max-width: 750px;
    --tree-branch-color: var(--bobr-color-blue);
    --tree-branch-selected-color: var(--bobr-color-green-deep);
}

bo-tree label {
    padding-inline-start: 1px;
}

bo-tree .wrap-main:has(.desc, label) .wrap-tree {
    margin-block-start: 15px;
}

bo-tree .wrap-tree {
    --tree-spacing: 1.5rem;
    --tree-radius: 5px;
    --tree-line-color: #ddd;
    height: 100%;
    margin-left: var(--tree-spacing);
}

bo-tree .wrap-tree .data {
    display: contents;
    pointer-events: none;
}

bo-tree .wrap-tree .data .for-desc {
    display: contents;
    font-size: .8em;
    font-weight: 200;
}

bo-tree .wrap-tree ul {
    margin-left: calc(var(--tree-radius) - var(--tree-spacing));
    padding-left: 0;
    transform: scale(1.000001);
    /* хак для плавной отрисовки */
    transition: padding .15s;
}

bo-tree .wrap-tree li {
    display: block;
    position: relative;
    padding-left: calc(2 * var(--tree-spacing) - var(--tree-radius));
    margin-left: -2px;
    border-left: 1px solid var(--tree-line-color);
    margin-top: 5px;
    scroll-snap-align: end;
}

bo-tree .wrap-tree li .as {
    position: relative;
    color: var(--bobr-color-blue);
    font-size: .55em;
    background: aliceblue;
    padding: 2.5px 4px 5px;
    border-radius: var(--bobr-radius-micro);
    pointer-events: none;
    transition: .15s;
    margin: auto 0 auto auto;
    line-height: 1;
}

bo-tree .wrap-tree .branch {
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: flex-start;
    gap: var(--bobr-space-micro);
}

bo-tree .wrap-tree .branch *::selection {
    background-color: black;
    color: white;
}

bo-tree .wrap-tree .branch:active {
    transition: .05s;
    transform: translateY(-1px) scale(.98);
}

bo-tree .wrap-tree .branch:hover:before {
    opacity: 1;
    visibility: visible;
    transform: none;
}

bo-tree .wrap-tree .branch:before {
    content: "";
    position: absolute;
    inset: -3px -7px -3.5px;
    background-color: var(--bobr-color-blue);
    border-radius: var(--bobr-radius-micro);
    opacity: 0;
    transform: scale(.95);
    visibility: hidden;
    transition: .15s, transform .15s cubic-bezier(0.25, 0.1, 0.48, 2.02);
    z-index: -1;
}

bo-tree .wrap-tree .branch:hover {
    color: white;
    transition: .15s;
    z-index: 2;
}

bo-tree .wrap-tree .branch:not([unselectable]):hover .as {
    background: #ffffff33;
    color: aliceblue;
    transition: 0s .03s;
}

bo-tree .wrap-tree .branch[unselectable] {
    color: initial;
}

bo-tree .wrap-tree .branch[unselectable]::before {
    background-color: transparent;
    border: 1px dashed gray;
}

bo-tree .wrap-tree .branch.selected {
    color: white;
}

bo-tree .wrap-tree .branch.selected::before {
    opacity: 1;
    visibility: visible;
    transform: none;
    background-color: var(--tree-branch-selected-color);
    border-radius: var(--bobr-radius-min);
    inset: -1px -4px -1.5px;
}

bo-tree .wrap-tree li .branch.selected .as {
    background-color: #009806;
    color: white;
}

bo-tree .wrap-tree .branch[data-count]:after {
    content: attr(data-count);
    position: absolute;
    top: 0px;
    left: -50px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 21px;
    border-radius: 20px;
    font-size: .7em;
    padding-bottom: 2px;
    box-sizing: border-box;
    background-color: var(--tree-branch-color);
    color: white;
    pointer-events: none;
    z-index: 1;
    transition: .15s;
    transform: scaleX(.7);
    transform-origin: right;
    opacity: 0;
}

bo-tree .wrap-tree .branch[data-count]:hover:after {
    transform: none;
    opacity: 1;
}

bo-tree .wrap-tree li:not(:has(details)) {
    padding-left: calc(1.8 * var(--tree-spacing) - var(--tree-radius));
}

bo-tree .wrap-tree ul li:last-child {
    border-color: transparent;
}

bo-tree .wrap-tree ul li::before {
    content: '';
    display: block;
    position: absolute;
    top: calc(var(--tree-spacing) / -1.9);
    left: -1px;
    width: calc(var(--tree-spacing));
    height: calc(var(--tree-spacing) + 1px);
    border: solid var(--tree-line-color);
    border-width: 0 0 1px 1px;
    border-bottom-left-radius: 12px;
}

bo-tree .wrap-tree summary {
    display: block;
    cursor: pointer;
    padding-top: 2.5px;
    z-index: 1;
}

bo-tree .wrap-tree summary::marker,
bo-tree .wrap-tree summary::-webkit-details-marker {
    display: none;
}

bo-tree .wrap-tree summary:focus {
    outline: none;
}

bo-tree .wrap-tree summary:focus-visible {
    outline: 1px dotted #000;
}

bo-tree .wrap-tree li::after,
bo-tree .wrap-tree summary::before {
    content: '';
    display: block;
    position: absolute;
    top: calc(var(--tree-spacing) / 1.8 - var(--tree-radius));
    left: calc(var(--tree-spacing) - var(--tree-radius) - 1px);
    width: calc(2 * var(--tree-radius));
    height: calc(2 * var(--tree-radius));
    border-radius: 50%;
    background: var(--tree-line-color);
}

bo-tree .wrap-tree summary::before {
    background: var(--tree-branch-color) url(/_engine/asset/vector/expand-collapse.svg) 0 0;
    z-index: 1;
    --tree-radius: 10px;
}

bo-tree .wrap-tree details:has(.branch.selected)>summary::before,
bo-tree .wrap-tree .branch.selected[data-count]:after {
    background-color: var(--bobr-color-green-deep);
}

bo-tree .wrap-tree details[open]>summary::before {
    background-position: calc(-2 * var(--tree-radius)) 0;
}

bo-tree .wrap-tree ul:has(> li:nth-child(8) > .branch[finally]) {
    max-height: max(230px, 25vh);
    overflow: hidden scroll;
    padding: 4px 10px 4px 2px;
    margin-left: -21px;
    margin-top: 5px;
    scroll-snap-type: y mandatory;
    scroll-padding-block: 10px;
}

bo-tree .addon {
    width: fit-content;
    height: 20px;
    max-width: 18px;
    margin-top: 2px;
    pointer-events: none;
}

bo-tree .addon[type="img"] img {
    width: 100%;
    aspect-ratio: var(--addon-ratio);
    --addon-ratio: 12 / 9;
    object-fit: cover;
}

bo-tree .addon[type='dot']:before {
    content: "";
    display: block;
    width: 10px;
    height: 10px;
    background: var(--addon-color, greenyellow);
    border-radius: var(--tree-radius);
    pointer-events: none;
}

bo-tree .addon[type='dot'] {
    position: relative;
    display: flex;
    align-items: center;
    margin-block-end: -.75px;
}

bo-tree .addon[type="ico"]:before {
    content: '';
    display: inline-block;
    width: 18px;
    min-width: 18px;
    height: 18px;
    background-color: var(--addon-color, var(--bobr-color-blue));
    mask-image: var(--addon-src);
    mask-size: contain;
    -webkit-mask-image: var(--addon-src);
    -webkit-mask-size: contain;
}

bo-tree .branch:is(:hover, .selected) .addon[type="ico"]:before {
    background-color: white;
}

bo-tree .addon[type="text"] {
    max-width: fit-content;
    margin: initial;
}

/* tree */



/* links */

bo-links {

    & ul {
        display: flex;
        flex-direction: column;
        gap: var(--bobr-space-micro);
        padding-inline: 0;
    }

    & li {
        display: flex;
        gap: var(--bobr-space-micro);

        &.active {
            opacity: 0.5
        }

        & a {
            display: flex;
            gap: var(--bobr-space-micro);

            & .addon {
                min-width: 33px;
            }
        }
    }
}

bo-links[appearance-scroll] .wrap-links,
bo-links[appearance-scroll="vertical"] .wrap-links {
    max-height: var(--links-scroll-max-height, 40vh);
    overflow: hidden auto;
    overscroll-behavior: contain;
    padding-inline-end: var(--bobr-space-micro);
    scroll-snap-type: y proximity;
}

bo-links[appearance-scroll="horizontal"] .wrap-links {
    flex-direction: row;
    max-width: 100%;
    overflow: auto hidden;
    overscroll-behavior-inline: contain;
    padding-block-end: var(--bobr-space-micro);
    scroll-snap-type: x proximity;
}

bo-links[appearance-scroll] .wrap-links li,
bo-links[appearance-scroll="vertical"] .wrap-links li,
bo-links[appearance-scroll="horizontal"] .wrap-links li {
    scroll-snap-align: start;
}

bo-li li.with-marker {
    list-style: none;
    display: flex;
    align-items: baseline;
    gap: var(--bobr-space-micro);
}

bo-li li.with-marker .addon.before {
    width: fit-content;
    min-width: var(--li-marker-size, 1em);
    height: var(--li-marker-size, 1em);
    --addon-color: var(--bobr-color-blue);
}

bo-li li.with-marker .addon.before[type="ico"]::before,
bo-li li.with-marker .addon.before[type="dot"]::before,
bo-li li.with-marker .addon.before[type="block"]::before {
    content: '';
    display: block;
    width: var(--li-marker-size, 1em);
    height: var(--li-marker-size, 1em);
    background-color: var(--addon-color, var(--bobr-color-blue));
    mask-image: var(--addon-src);
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
    -webkit-mask-image: var(--addon-src);
    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
}

bo-li li.with-marker .addon.before[type="dot"]::before {
    border-radius: var(--bobr-radius-max);
    mask-image: none;
    -webkit-mask-image: none;
}

bo-li li.with-marker .addon.before[type="block"]::before {
    mask-image: none;
    -webkit-mask-image: none;
}

bo-li li.with-marker .addon.before[type="img"] img {
    display: block;
    height: var(--li-marker-size, 1em);
    aspect-ratio: var(--addon-ratio, 1);
}

/* links */

/* table dark mode */

@media (prefers-color-scheme: dark) {
    bo-table[appearance-scroll=vertical] .wrap-main>.wrap thead tr:not(.groups) th:is(:first-child, :last-child):before {
        mix-blend-mode: lighten;
    }
}

/* table dark mode */

/* components, controls */

:is(bo-input, bo-raw, bo-text, bo-div, bo-li, bo-links, bo-header, bo-button, bo-files, bo-slider, bo-tree, bo-setbox, bo-sbox, bo-table, bo-toggle, bo-date, bo-range, bo-checkbox, bo-radio, bo-bbox) {
    position: relative;
    width: fit-content;
    height: fit-content;
    display: flex;
    gap: var(--bobr-space-min);
    align-items: center;
    padding: 10px;
    margin: -10px;
    color: black;
    border-radius: var(--bobr-radius);
    user-select: text;
    isolation: isolate;
    transition: box-shadow .15s, background-color .15s, scale cubic-bezier(0.53, 0.04, 0.24, 1.04) .25s, opacity .25s;
}

bo-header {
    margin-block-end: var(--bobr-space-micro);
}

bo-header:has(h2, h3, h4) {
    margin-block-start: var(--bobr-space-micro);
    margin-block-end: calc(var(--bobr-space-micro) * -1);
}

:is(bo-input, bo-raw, bo-text, bo-div, bo-li, bo-links, bo-header, bo-button, bo-files, bo-slider, bo-tree, bo-setbox, bo-sbox, bo-table, bo-toggle, bo-date, bo-range, bo-checkbox, bo-radio, bo-bbox).focus {
    box-shadow: var(--component-focus-shadow);
    pointer-events: all !important;
    z-index: 2;
}

:is(bo-input, bo-raw, bo-text, bo-div, bo-li, bo-links, bo-header, bo-button, bo-files, bo-slider, bo-tree, bo-setbox, bo-sbox, bo-table, bo-toggle, bo-date, bo-range, bo-checkbox, bo-radio, bo-bbox):not(.focus)>.wrap-com>.wrap-main>input[type="number"] {

    &::-webkit-inner-spin-button,
    &::-webkit-outer-spin-button {
        -webkit-appearance: none;
    }
}

bo-table.focus td:has(.cell.focus) {
    pointer-events: all !important;
    z-index: 3;
}

bo-text {
    flex-direction: column;
    display: flex;
    align-items: baseline;
    gap: 0;
}

:is(bo-input, bo-raw, bo-text, bo-div, bo-li, bo-links, bo-header, bo-button, bo-files, bo-slider, bo-tree, bo-setbox, bo-sbox, bo-table, bo-toggle, bo-date, bo-range, bo-checkbox, bo-radio, bo-bbox)[required]>.wrap-com:after {
    content: "*";
    position: absolute;
    top: -2px;
    left: 6px;
    color: var(--bobr-color-orange);
    font-size: 1.2em;
}

:is(bo-input, bo-raw, bo-text, bo-div, bo-li, bo-links, bo-header, bo-button, bo-files, bo-slider, bo-tree, bo-setbox, bo-sbox, bo-table, bo-toggle, bo-date, bo-range, bo-checkbox, bo-radio, bo-bbox).focus.modified {
    box-shadow: 0 0 0 1px var(--bobr-color-green), -2px 2px 0 1px var(--bobr-color-blue-light);
}

:is(bo-input, bo-raw, bo-text, bo-div, bo-li, bo-links, bo-header, bo-button, bo-files, bo-slider, bo-tree, bo-setbox, bo-sbox, bo-table, bo-toggle, bo-date, bo-range, bo-checkbox, bo-radio, bo-bbox).focus.attr-check-failed {
    box-shadow: 0 0 0 1px var(--bobr-color-red), -2px 2px 0 1px var(--bobr-color-red);
}

:is(bo-date, bo-range, bo-sbox) :is([type=input], input, select):focus,
:is(bo-date, bo-range, bo-sbox).focus :is([type=input], input, select) {
    background-color: var(--bobr-color-blue-light-hover);
}

bo-sbox[filter=true]:not([readonly]) :is([type=input], input, select):focus {
    cursor: text;
}

:is(bo-input, bo-raw, bo-text, bo-div, bo-li, bo-links, bo-header, bo-button, bo-files, bo-slider, bo-tree, bo-setbox, bo-sbox, bo-table, bo-toggle, bo-date, bo-range, bo-checkbox, bo-radio, bo-bbox) info {
    position: absolute;
    bottom: calc(100% + 4px);
    left: 0;
    visibility: hidden;
    opacity: 0;
    transition: .15s;
}

:is(bo-input, bo-raw, bo-text, bo-div, bo-li, bo-links, bo-header, bo-button, bo-files, bo-slider, bo-tree, bo-setbox, bo-sbox, bo-table, bo-toggle, bo-date, bo-range, bo-checkbox, bo-radio, bo-bbox) info .wrap {
    border-radius: var(--bobr-radius);
    background: white;
    display: flex;
    box-shadow: var(--component-focus-shadow);
}

:is(bo-input, bo-raw, bo-text, bo-div, bo-li, bo-links, bo-header, bo-button, bo-files, bo-slider, bo-tree, bo-setbox, bo-sbox, bo-table, bo-toggle, bo-date, bo-range, bo-checkbox, bo-radio, bo-bbox) info .wrap .info-wrap {
    display: flex;
    padding: 10px;
    gap: 10px;
    width: min-content;
    --com-info-bg: black;
    --com-info-color: gold;
}

:is(bo-input, bo-raw, bo-text, bo-div, bo-li, bo-links, bo-header, bo-button, bo-files, bo-slider, bo-tree, bo-setbox, bo-sbox, bo-table, bo-toggle, bo-date, bo-range, bo-checkbox, bo-radio, bo-bbox):is([capability="r"], [readonly], [access]:not([access="2"], [integrity="2"]), [error]):is(:focus-within, :has(label:active), .focus) info {
    visibility: visible;
    opacity: 1;
}

:is(bo-input, bo-raw, bo-text, bo-div, bo-li, bo-links, bo-header, bo-button, bo-files, bo-slider, bo-tree, bo-setbox, bo-sbox, bo-table, bo-toggle, bo-date, bo-range, bo-checkbox, bo-radio, bo-bbox)[on-event=''] info {
    display: none;
}

:is(bo-input, bo-raw, bo-text, bo-div, bo-li, bo-links, bo-header, bo-button, bo-files, bo-slider, bo-tree, bo-setbox, bo-sbox, bo-table, bo-toggle, bo-date, bo-range, bo-checkbox, bo-radio, bo-bbox) info .wrap .info-wrap>div {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 3px;
    background: var(--com-info-bg);
    color: var(--com-info-color);
    padding: 5px 8px 6px 5px;
    border-radius: var(--bobr-radius-min);
    corner-shape: squircle;
    display: none;
}

:is(bo-input, bo-raw, bo-text, bo-div, bo-li, bo-links, bo-header, bo-button, bo-files, bo-slider, bo-tree, bo-setbox, bo-sbox, bo-table, bo-toggle, bo-date, bo-range, bo-checkbox, bo-radio, bo-bbox) info .wrap .info-wrap>div:before {
    content: "";
    width: 19px;
    min-width: 19px;
    height: 19px;
    background-color: var(--com-info-color);
}

:is(bo-input, bo-raw, bo-text, bo-div, bo-li, bo-links, bo-header, bo-button, bo-files, bo-slider, bo-tree, bo-setbox, bo-sbox, bo-table, bo-toggle, bo-date, bo-range, bo-checkbox, bo-radio, bo-bbox) info .wrap .info-wrap>div:after {
    font-size: .62em;
    font-weight: 500;
    line-height: .87;
}

:is(bo-input, bo-raw, bo-text, bo-div, bo-li, bo-links, bo-header, bo-button, bo-files, bo-slider, bo-tree, bo-setbox, bo-sbox, bo-table, bo-toggle, bo-date, bo-range, bo-checkbox, bo-radio, bo-bbox):is([capability="r"], [readonly]) info .wrap .info-wrap .onlyread {
    display: inherit;
}

:is(bo-input, bo-raw, bo-text, bo-div, bo-li, bo-links, bo-header, bo-button, bo-files, bo-slider, bo-tree, bo-setbox, bo-sbox, bo-table, bo-toggle, bo-date, bo-range, bo-checkbox, bo-radio, bo-bbox):is([capability="r"], [readonly]) info .wrap .info-wrap .onlyread:before {
    mask-image: url(/_engine/asset/vector/ico/pencil-square.svg);
    mask-size: contain;
    -webkit-mask-image: url(/_engine/asset/vector/ico/pencil-square.svg);
    -webkit-mask-size: contain;
}

:is(bo-input, bo-raw, bo-text, bo-div, bo-li, bo-links, bo-header, bo-button, bo-files, bo-slider, bo-tree, bo-setbox, bo-sbox, bo-table, bo-toggle, bo-date, bo-range, bo-checkbox, bo-radio, bo-bbox):is([capability="r"], [readonly]) info .wrap .info-wrap .onlyread:after {
    content: "только чтение";
}

:is(bo-input, bo-raw, bo-text, bo-div, bo-li, bo-links, bo-header, bo-button, bo-files, bo-slider, bo-tree, bo-setbox, bo-sbox, bo-table, bo-toggle, bo-date, bo-range, bo-checkbox, bo-radio, bo-bbox)[access]:not([access="2"], [integrity="2"]) info .wrap .info-wrap .access {
    display: inherit;
    --com-info-color: aquamarine;
}

:is(bo-input, bo-raw, bo-text, bo-div, bo-li, bo-links, bo-header, bo-button, bo-files, bo-slider, bo-tree, bo-setbox, bo-sbox, bo-table, bo-toggle, bo-date, bo-range, bo-checkbox, bo-radio, bo-bbox)[access]:not([access="2"], [integrity="2"]) info .wrap .info-wrap .access:before {
    mask-image: url(/_engine/asset/vector/ico/puzzle-w.svg);
    mask-size: contain;
    -webkit-mask-image: url(/_engine/asset/vector/ico/puzzle-w.svg);
    -webkit-mask-size: contain;
}

:is(bo-input, bo-raw, bo-text, bo-div, bo-li, bo-links, bo-header, bo-button, bo-files, bo-slider, bo-tree, bo-setbox, bo-sbox, bo-table, bo-toggle, bo-date, bo-range, bo-checkbox, bo-radio, bo-bbox)[access][access="1"]:not([integrity="2"]) info .wrap .info-wrap .access:after {
    content: "часть данных";
}

:is(bo-input, bo-raw, bo-text, bo-div, bo-li, bo-links, bo-header, bo-button, bo-files, bo-slider, bo-tree, bo-setbox, bo-sbox, bo-table, bo-toggle, bo-date, bo-range, bo-checkbox, bo-radio, bo-bbox)[access][access="0"] info .wrap .info-wrap .access:before {
    mask-image: url(/_engine/asset/vector/ico/ban.svg);
    mask-size: contain;
    -webkit-mask-image: url(/_engine/asset/vector/ico/ban.svg);
    -webkit-mask-size: contain;
}

:is(bo-input, bo-raw, bo-text, bo-div, bo-li, bo-links, bo-header, bo-button, bo-files, bo-slider, bo-tree, bo-setbox, bo-sbox, bo-table, bo-toggle, bo-date, bo-range, bo-checkbox, bo-radio, bo-bbox)[access][access="0"] info .wrap .info-wrap .access {
    --com-info-color: var(--bobr-color-red);
}

:is(bo-input, bo-raw, bo-text, bo-div, bo-li, bo-links, bo-header, bo-button, bo-files, bo-slider, bo-tree, bo-setbox, bo-sbox, bo-table, bo-toggle, bo-date, bo-range, bo-checkbox, bo-radio, bo-bbox)[access][access="0"] info .wrap .info-wrap .access:after {
    font-weight: 700;
    content: "недостаточно прав";
}

:is(bo-input, bo-raw, bo-text, bo-div, bo-li, bo-links, bo-header, bo-button, bo-files, bo-slider, bo-tree, bo-setbox, bo-sbox, bo-table, bo-toggle, bo-date, bo-range, bo-checkbox, bo-radio, bo-bbox)[error] info .wrap .info-wrap .error:before {
    mask-image: url(/_engine/asset/vector/ico/x-octagon-fill.svg);
    mask-size: contain;
    -webkit-mask-image: url(/_engine/asset/vector/ico/x-octagon-fill.svg);
    -webkit-mask-size: contain;
}

:is(bo-input, bo-raw, bo-text, bo-div, bo-li, bo-links, bo-header, bo-button, bo-files, bo-slider, bo-tree, bo-setbox, bo-sbox, bo-table, bo-toggle, bo-date, bo-range, bo-checkbox, bo-radio, bo-bbox)[error] info .wrap .info-wrap .error {
    display: inherit;
    --com-info-color: var(--bobr-color-red);
}

:is(bo-input, bo-raw, bo-text, bo-div, bo-li, bo-links, bo-header, bo-button, bo-files, bo-slider, bo-tree, bo-setbox, bo-sbox, bo-table, bo-toggle, bo-date, bo-range, bo-checkbox, bo-radio, bo-bbox)[error] info .wrap .info-wrap .error:after {
    font-weight: 700;
    content: "ошибка загрузки";
}

bo-header[error] :is(h1, h2, h3, h4, h5):after {
    content: 'заголовок → ошибка загрузки';
    color: var(--bobr-color-gray-middle);
}

bo-header:is([access="0"], [capability="0"]) :is(h1, h2, h3, h4, h5):after {
    content: 'заголовок → нет прав';
    color: var(--bobr-color-gray-middle);
}

:is(bo-input, bo-raw, bo-text, bo-div, bo-li, bo-links, bo-header, bo-button, bo-files, bo-slider, bo-tree, bo-setbox, bo-sbox, bo-table, bo-toggle, bo-date, bo-range, bo-checkbox, bo-radio, bo-bbox) control {
    position: absolute;
    inset: calc(100% + 10px) auto auto 0;
    visibility: hidden;
    opacity: 0;
    transition: .15s;
}

:is(bo-input, bo-raw, bo-text, bo-div, bo-li, bo-links, bo-header, bo-button, bo-files, bo-slider, bo-tree, bo-setbox, bo-sbox, bo-table, bo-toggle, bo-date, bo-range, bo-checkbox, bo-radio, bo-bbox) control .wrap {
    border-radius: var(--bobr-radius);
    background: white;
    box-shadow: var(--component-focus-shadow);
}

:is(bo-input, bo-raw, bo-text, bo-div, bo-li, bo-links, bo-header, bo-button, bo-files, bo-slider, bo-tree, bo-setbox, bo-sbox, bo-table, bo-toggle, bo-date, bo-range, bo-checkbox, bo-radio, bo-bbox).focus:is([data-rollbacks]):not([access="0"], [error]) control {
    visibility: visible;
    opacity: 1;
}

:is(bo-input, bo-raw, bo-text, bo-div, bo-li, bo-links, bo-header, bo-button, bo-files, bo-slider, bo-tree, bo-setbox, bo-sbox, bo-table, bo-toggle, bo-date, bo-range, bo-checkbox, bo-radio, bo-bbox) control .control-wrap {
    display: flex;
    padding: 10px;
    gap: 10px;
    width: min-content;
}

:is(bo-input, bo-raw, bo-text, bo-div, bo-li, bo-links, bo-header, bo-button, bo-files, bo-slider, bo-tree, bo-setbox, bo-sbox, bo-table, bo-toggle, bo-date, bo-range, bo-checkbox, bo-radio, bo-bbox) control .control-wrap .rollback {
    line-height: 1;
    background-color: var(--bobr-color-green);
    color: white;
    padding: 2px 5px 5px;
    border-radius: var(--bobr-radius-min);
    cursor: pointer;
    user-select: none;
}

:is(bo-input, bo-raw, bo-text, bo-div, bo-li, bo-links, bo-header, bo-button, bo-files, bo-slider, bo-tree, bo-setbox, bo-sbox, bo-table, bo-toggle, bo-date, bo-range, bo-checkbox, bo-radio, bo-bbox) control .control-wrap .rollback:before {
    content: "⮌";
    display: block;
    pointer-events: none;
    transition: .1s transform;
}

:is(bo-input, bo-raw, bo-text, bo-div, bo-li, bo-links, bo-header, bo-button, bo-files, bo-slider, bo-tree, bo-setbox, bo-sbox, bo-table, bo-toggle, bo-date, bo-range, bo-checkbox, bo-radio, bo-bbox) control .control-wrap .rollback:active:before {
    transform: rotate(-24deg);
}

/* controls */

/* component reload */

:is(bo-input, bo-raw, bo-text, bo-div, bo-li, bo-links, bo-header, bo-button, bo-files, bo-slider, bo-tree, bo-setbox, bo-sbox, bo-table, bo-toggle, bo-date, bo-range, bo-checkbox, bo-radio, bo-bbox).reload {
    opacity: .4;
    scale: .95;
    animation: node-reload-pulse 360ms ease-in-out infinite alternate;
    will-change: opacity, scale;
}

@keyframes node-reload-pulse {
    from {
        opacity: .72;
        scale: .98;
    }

    to {
        opacity: .35;
        scale: .95;
    }
}

/* component reload */

/* component fullscreen */

html.component-fullscreen {
    overflow: hidden;

    & :is(bo-table, mod, app):not(.fullscreen):not(:is(.fullscreen, grid[name="header"], flex[name="apps"], modal) :is(bo-table, mod, app)) {
        display: none;
    }
}

body.component-fullscreen {
    & grid[name="header"] {
        transform: translateY(-85px);
        transition: .2s;

        &::before {
            border: 1px solid #b0b0b0;
            border-top: none;
        }
    }

    & grid[name="header"]:is(:hover, :focus-within) {
        transform: none;
    }

    & grid[name="header"]:not(:hover, :focus-within):has(.input[contenteditable]:not(:empty)) {
        transform: translateY(-65px);

        & bo-button {
            transform: translateY(-8px);
            transition: box-shadow .15s, background-color .15s, transform .15s;
        }

        & .wrap-search {
            background-color: transparent;

            & .input {
                transform: translateY(29px);
                overflow: initial;

                &::before {
                    content: 'фильтр →';
                    position: absolute;
                    inset: auto 0 18px -77px;
                    font-size: .55em;
                    color: var(--bobr-color-gray);
                }
            }
        }
    }
}

bo-table.fullscreen {
    position: fixed;
    inset: var(--bobr-space-min);
    z-index: 664;
    display: block;
    margin: auto;
    padding: 0;
    background-color: white;
    width: calc(100% - var(--bobr-space-min) * 2);
    height: calc(100vh - var(--bobr-space-min) * 2);

    /* table fullscreen */

    --layout-max-width: initial;
    --table-max-height: initial;

    & .wrap-com {
        height: 100%;

        &:not(:has(label, .controls .filter)) {
            padding-top: var(--bobr-space-min);
        }

        & .wrap-main {
            min-height: 0;
            width: 100%;
        }

        & .wrap-main>.wrap {
            height: 100%;
            width: 100%;
            max-width: none;
        }

        & table {
            width: 100%;
        }
    }
}

/* component fullscreen */



/* modules */

/* stages */

module[name=stages] {
    --stages-max-size: clamp(40px, 80vw, calc(var(--layout-max-width) / 3));
    z-index: 2;
}

module[name=stages] .wrap-stages {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px var(--bobr-space-min);
    margin: auto;
}

module[name=stages] .stage {
    display: flex;
    align-items: center;
    padding: 10px;
    gap: 8px;
    box-sizing: border-box;
    justify-content: flex-start;
    background: var(--bobr-color-black-light);
    color: white;
    border-radius: var(--bobr-radius-max);
    position: relative;
    max-width: var(--stages-max-size);
    max-height: 33.34px;
    cursor: pointer;
}

module[name=stages] .stage:not(:last-child)::before {
    content: "";
    border: var(--stage-arrow-size) solid transparent;
    border-left-color: var(--stage-arrow-color);
    margin-top: var(--stage-arrow-offset-block-start);
    right: var(--stage-arrow-offset-inline-end);
    top: 50%;
    border-right: 0;
    position: absolute;
    z-index: -1;
    --stage-arrow-size: 8px;
    --stage-arrow-offset-block-start: calc(var(--stage-arrow-size) * -1);
    --stage-arrow-offset-inline-end: calc((var(--stage-arrow-offset-block-start) + 2px));
    --stage-arrow-color: var(--bobr-color-black-light)
}

module[name=stages] .stage[data-status="Активный"]::before {
    --stage-arrow-color: var(--bobr-color-blue);
}

module[name=stages] .stage[data-status="Пройден"]::before {
    --stage-arrow-color: var(--bobr-color-green);
}

module[name=stages] .stage[data-status="Активный"] {
    background: var(--bobr-color-blue);
}

module[name=stages] .stage[data-status="Пройден"] {
    background: var(--bobr-color-green);
}

module[name=stages] .stage .text {
    overflow: hidden;
    padding-bottom: 2px;
    box-sizing: border-box;
    text-overflow: ellipsis;
    text-wrap: nowrap;
}

module[name=stages] .stage[data-type="Веха"] .ico {
    width: 16px;
    min-width: 16px;
    height: 16px;
    background: white;
    border-radius: 16px;
}

module[name=stages] .stage[data-type="Фаза"] .ico {
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 16px solid white;
    margin-top: -4px;
}

module[name=stages] .stage[data-type="Этап"] .ico {
    width: 11.5px;
    min-width: 11.5px;
    height: 11.5px;
    background: white;
    transform: rotate(45deg);
}

module[name=stages] .stage .ico.semicircle {
    position: relative;
    width: 20px;
    min-width: 16px;
    height: 12px;
    background: white;
    clip-path: polygon(70% 0%, 100% 50%, 70% 100%, 0% 100%, 30% 50%, 0% 0%);
}

/* stages */

/* modules */

/* input */

bo-input {
    position: relative;
    width: fit-content;
    height: fit-content;
    display: flex;
    gap: var(--bobr-space-min);
    align-items: center;
    padding: 10px;
    margin: -10px;
    color: black;
    border-radius: var(--bobr-radius);
    user-select: text;
    isolation: isolate;
    transition: box-shadow .15s, background-color .15s, scale cubic-bezier(0.53, 0.04, 0.24, 1.04) .25s, opacity .25s;
}

bo-input[hidden],
bo-input.hidden {
    display: none;
}

bo-input .wrap-com {
    display: flex;
    gap: var(--bobr-space-micro);
    align-items: flex-start;
    flex-direction: column;
}

bo-input[required]>.wrap-com:after {
    content: "*";
    position: absolute;
    top: -2px;
    left: 6px;
    color: var(--bobr-color-orange);
    font-size: 1.2em;
}

bo-input .wrap {
    display: flex;
    gap: var(--bobr-space-micro) var(--bobr-space-min);
    align-items: center;
    flex-wrap: wrap;
}

bo-input .wrap-main {
    position: relative;
    display: flex;
    gap: var(--bobr-space-min);
    align-items: center;
    width: fit-content;
}

bo-input .wrap-main.horizontal {
    gap: var(--bobr-space-micro);
    align-items: flex-start;
    flex-direction: column;
    max-width: 750px;
}

bo-input .wrap-input {
    display: flex;
    position: relative;
    gap: 5px;
    align-items: center;
}

bo-input .desc,
bo-input .wrap .desc {
    font-size: min(var(--component-desc-min-font-size), .8em);
    font-weight: 200;
    text-wrap: balance;
    flex: 1 1 100%;
    width: min-content;
    min-width: fit-content;
    padding: 1px;
}

bo-input textarea.input,
bo-input input.input {
    position: relative;
    outline: none;
    padding: 8px 12px 12px;
    min-inline-size: 31.34px;
    min-block-size: 41.34px;
    field-sizing: content;
    resize: none;
    overflow: clip;
    white-space: pre-wrap;
    cursor: pointer;
    box-sizing: border-box;
    background-color: var(--component-input-bg);
    border-radius: var(--bobr-radius-micro);
    border: none;
    color: inherit;
    font-family: inherit;
    font-size: 16px;
    font-weight: inherit;
    line-height: normal;
    user-select: text;
    -webkit-user-select: text;
    transition: background-color .15s;

    &[type="number"] {
        min-inline-size: calc(100% + 10px);
    }
}

bo-input[autosize="false"] textarea.input {
    field-sizing: fixed;
    resize: none;
    overflow: auto;
}

bo-input textarea.input::placeholder,
bo-input input.input::placeholder {
    color: var(--component-placeholder-text);
}

bo-input:not([readonly]) textarea.input:focus::placeholder,
bo-input:not([readonly]) input.input:focus::placeholder {
    color: var(--component-placeholder-hover-text);
}

bo-input textarea.input:focus,
bo-input input.input:focus,
bo-input.focus textarea.input,
bo-input.focus input.input {
    background-color: var(--bobr-color-blue-light-hover);
}

bo-input[required] textarea.input:not(:focus):placeholder-shown,
bo-input[required] input.input:not(:focus):placeholder-shown {
    background-color: #fff2db;
}

bo-input[required] textarea.input:not(:focus):placeholder-shown::placeholder,
bo-input[required] input.input:not(:focus):placeholder-shown::placeholder {
    color: #ff7e005c;
}

bo-input[readonly] textarea.input,
bo-input[readonly] input.input,
bo-input textarea.input[readonly],
bo-input input.input[readonly] {
    border: 1px dashed var(--bobr-color-gray-middle);
    background-color: white;
    padding: 7.5px 11px 11.5px;
}

bo-input[readonly][required] textarea.input,
bo-input[readonly][required] input.input {
    border-color: var(--bobr-color-orange);
}

bo-input label {
    line-height: 1;
}

bo-input .addon {
    width: fit-content;
    max-width: 18px;
    min-width: 12px;
    height: 20px;
    color: var(--bobr-color-black-light);
    pointer-events: none;
    flex: 0 0 auto;
}

bo-input .addon[type="text"],
bo-input .addon[type="emoji"] {
    max-width: fit-content;
    display: flex;
    align-items: center;
    line-height: 1;
}

bo-input .addon[type="img"] {
    display: flex;
    align-items: center;
}

bo-input .addon[type="img"] img {
    width: 100%;
    aspect-ratio: var(--addon-ratio);
    --addon-ratio: 12 / 9;
    object-fit: cover;
}

bo-input .addon[type="ico"] {
    height: 18.5px;
}

bo-input .addon[type="ico"]:before,
bo-input .addon[type="dot"]:before,
bo-input .addon[type="block"]:before {
    content: "";
    display: block;
    background-color: var(--addon-color, currentColor);
    pointer-events: none;
}

bo-input .addon[type="ico"]:before {
    width: 18px;
    min-width: 18px;
    height: 18px;
    mask-image: var(--addon-src);
    mask-size: contain;
    -webkit-mask-image: var(--addon-src);
    -webkit-mask-size: contain;
}

bo-input .addon[type="dot"],
bo-input .addon[type="block"] {
    display: flex;
    align-items: center;
}

bo-input .addon[type="dot"]:before {
    width: var(--addon-width, 10px);
    height: var(--addon-width, 10px);
    border-radius: var(--bobr-radius);
}

bo-input .addon[type="block"]:before {
    width: var(--addon-width, 18px);
    height: 18px;
    border-radius: var(--bobr-radius-micro);
}

bo-input .addon.sup {
    position: absolute;
    inset: 2px 2px 2px auto;
    display: grid;
    align-items: center;
    max-width: 70%;
    height: fit-content;
    min-height: min(calc(100% - 4px), 27.5px);
    max-height: calc(100% - 4px);
    width: auto;
    font-size: max(60%, 9px);
    line-height: 1;
    padding: 4px 9px 7px;
    box-sizing: border-box;
    border-radius: var(--bobr-radius-min);
    background-color: black;
    color: white;
    transform: translateX(98.5%);
    pointer-events: auto;
    transition: .15s .25s;
}

bo-input .addon.sup:before {
    content: "";
    position: absolute;
    inset: -5px -5px -5px -20px;
}

bo-input .addon.sup .text {
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

bo-input .addon.sup:hover {
    transform: none;
    transition-delay: 0s;
}

bo-input.focus {
    box-shadow: var(--component-focus-shadow);
    pointer-events: all;
    z-index: 2;
}

bo-input.focus.modified {
    box-shadow: 0 0 0 1px var(--bobr-color-green), -2px 2px 0 1px var(--bobr-color-blue-light);
}

bo-input.focus.attr-check-failed {
    box-shadow: 0 0 0 1px var(--bobr-color-red), -2px 2px 0 1px var(--bobr-color-red);
}

bo-input info,
bo-input control {
    position: absolute;
    visibility: hidden;
    opacity: 0;
    transition: .15s;
}

bo-input info {
    bottom: calc(100% + 10px);
    left: 0;
}

bo-input control {
    inset: calc(100% + 10px) auto auto 0;
}

bo-input:is([capability="r"], [readonly], [access]:not([access="2"], [integrity="2"]), [error]):is(:focus-within, .focus) info,
bo-input.focus:is([data-rollbacks]):not([access="0"], [error]) control {
    visibility: visible;
    opacity: 1;
}

bo-input[on-event=''] info {
    display: none;
}

bo-input info .wrap,
bo-input control .wrap {
    border-radius: var(--bobr-radius);
    background: white;
    box-shadow: var(--component-focus-shadow);
}

bo-input info .info-wrap,
bo-input control .control-wrap {
    display: flex;
    padding: 10px;
    gap: 10px;
    width: min-content;
}

bo-input info .info-wrap {
    --com-info-bg: black;
    --com-info-color: gold;
}

bo-input info .info-wrap>div {
    align-items: stretch;
    justify-content: center;
    gap: 3px;
    background: var(--com-info-bg);
    color: var(--com-info-color);
    padding: 5px 8px 6px 5px;
    border-radius: var(--bobr-radius-min);
    display: none;
}

bo-input info .info-wrap>div:before {
    content: "";
    width: 19px;
    min-width: 19px;
    height: 19px;
    background-color: var(--com-info-color);
}

bo-input info .info-wrap>div:after {
    font-size: .62em;
    font-weight: 500;
    line-height: .87;
}

bo-input:is([capability="r"], [readonly]) info .onlyread {
    display: inherit;
}

bo-input:is([capability="r"], [readonly]) info .onlyread:before {
    mask-image: url(/_engine/asset/vector/ico/pencil-square.svg);
    mask-size: contain;
    -webkit-mask-image: url(/_engine/asset/vector/ico/pencil-square.svg);
    -webkit-mask-size: contain;
}

bo-input:is([capability="r"], [readonly]) info .onlyread:after {
    content: "только чтение";
}

bo-input[access]:not([access="2"], [integrity="2"]) info .access {
    display: inherit;
    --com-info-color: aquamarine;
}

bo-input[access]:not([access="2"], [integrity="2"]) info .access:before {
    mask-image: url(/_engine/asset/vector/ico/puzzle-w.svg);
    mask-size: contain;
    -webkit-mask-image: url(/_engine/asset/vector/ico/puzzle-w.svg);
    -webkit-mask-size: contain;
}

bo-input[access][access="1"]:not([integrity="2"]) info .access:after {
    content: "часть данных";
}

bo-input[access][access="0"] info .access {
    --com-info-color: var(--bobr-color-red);
}

bo-input[access][access="0"] info .access:before {
    mask-image: url(/_engine/asset/vector/ico/ban.svg);
    mask-size: contain;
    -webkit-mask-image: url(/_engine/asset/vector/ico/ban.svg);
    -webkit-mask-size: contain;
}

bo-input[access][access="0"] info .access:after {
    font-weight: 700;
    content: "недостаточно прав";
}

bo-input[error] info .error {
    display: inherit;
    --com-info-color: var(--bobr-color-red);
}

bo-input[error] info .error:before {
    mask-image: url(/_engine/asset/vector/ico/x-octagon-fill.svg);
    mask-size: contain;
    -webkit-mask-image: url(/_engine/asset/vector/ico/x-octagon-fill.svg);
    -webkit-mask-size: contain;
}

bo-input[error] info .error:after {
    font-weight: 700;
    content: "ошибка загрузки";
}

bo-input control .rollback {
    line-height: 1;
    background-color: var(--bobr-color-green);
    color: white;
    padding: 2px 5px 5px;
    border-radius: var(--bobr-radius-min);
    cursor: pointer;
    user-select: none;
}

bo-input control .rollback:before {
    content: "⮌";
    display: block;
    pointer-events: none;
    transition: .1s transform;
}

bo-input control .rollback:active:before {
    transform: rotate(-24deg);
}

/* input */

/* DRAG */

html.drag-list bo-tree ul li.selected {
    border-radius: var(--bobr-radius-min);
    box-shadow: inset var(--component-focus-shadow);
}

html.drag-list bo-tree .wrap-tree li.selected summary::before {
    background-color: var(--bobr-color-blue-light);
}

html.drag-list bo-tree .wrap-tree li.selected::after {
    background-color: var(--bobr-color-blue-light);
}

html.drag-list bo-tree .wrap-tree li.selected::before {
    border-bottom: none;
    border-bottom-left-radius: 0;
}

html.drag-list bo-tree .wrap-tree ul:empty:after {
    content: '';
    height: 4px;
    position: absolute;
    width: 90%;
    z-index: 1;
}

/* DRAG */

}
