.comp-rbac-graph__column {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex-shrink: 0;
    height: 36.408vh;
    min-height: 0;
}

.comp-rbac-graph__column--category {
    width: 19.092vh;
    align-items: flex-end;
}

.comp-rbac-graph__column--category .comp-rbac-graph__node {
    width: 14.652vh;
}

.comp-rbac-graph__column--group,
.comp-rbac-graph__column--role,
.comp-rbac-graph__column--users {
    width: 26.64vh;
    min-width: 26.64vh;
    max-width: 26.64vh;
}

.comp-rbac-graph__column-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 26.64vh;
    margin-bottom: 0.444vh;
    font-weight: 500;
    font-size: 1.554vh;
    line-height: 2.664vh;
}

.comp-rbac-graph__node-label {
    display: flex;
    flex-direction: row;
    background: none;
    border: none;
    padding: 0;
    margin-bottom: 0;
    font-weight: 500;
    font-size: 1.554vh;
    line-height: 2.664vh;
    color: #7B8087;
    width: 22.644vh;
    height: 2.22vh;
    text-align: left;
    cursor: pointer;
}

.comp-rbac-graph__node-block, .comp-rbac-graph__node-block--active  {
    display: flex;
    flex-direction: column;
    margin-bottom: 1.332vh;
}

.comp-rbac-graph__column--category .comp-rbac-graph__node-block,
.comp-rbac-graph__column--category .comp-rbac-graph__node-block--active {
    margin-bottom: 4.44vh;
    height: 7.104vh;
    gap: 0.444vh;
}

.comp-rbac-graph__column--category .comp-rbac-graph__node-block:last-child {
    margin-bottom: 0;
}

.comp-rbac-graph__column--category .comp-rbac-graph__node-block:not(:first-child) .comp-rbac-graph__node-label {
    visibility: hidden;
}

.comp-rbac-graph__column--category .comp-rbac-graph__node-label {
    width: 14.652vh;
}

.comp-rbac-graph__node-block--allowed .comp-rbac-graph__node {
    color: #2ECC71;
}

.comp-rbac-graph__node-block--limited .comp-rbac-graph__node {
    color: #F2A40E;
}

.comp-rbac-graph__node-block--denied .comp-rbac-graph__node {
    color: #E5524C;
}

.comp-rbac-graph__node-block--empty .comp-rbac-graph__node {
    color: #7B8087;
}

/* пустой плейсхолдер (в т.ч. «БАЗОВЫЙ ДОСТУП») — серый, даже если блок активный */
.comp-rbac-graph--view .comp-rbac-graph__node-block--empty .comp-rbac-graph__node,
.comp-rbac-graph--view .comp-rbac-graph__node-block--empty.comp-rbac-graph__node-block--active .comp-rbac-graph__node {
    color: #7B8087;
}

.comp-rbac-graph--view
.comp-rbac-graph__column--users
.comp-rbac-graph__node {
    color: #D0D0D1;
}

.comp-rbac-graph--view
.comp-rbac-graph__node-block--active 
.comp-rbac-graph__node
{
    color: #6F82BF;
}

.comp-rbac-graph--access
.comp-rbac-graph__column--category
.comp-rbac-graph__node-block--active
.comp-rbac-graph__node,
.comp-rbac-graph--access
.comp-rbac-graph__column--group
.comp-rbac-graph__node-block--active
.comp-rbac-graph__node,
.comp-rbac-graph--access
.comp-rbac-graph__column--role
.comp-rbac-graph__node-block--active
.comp-rbac-graph__node {
    color: #6F82BF;
}
.comp-rbac-graph__node {
    display: block;
    width: 26.64vh;
    height: 4.44vh;
    padding: 0.888vh 1.332vh;
    font-weight: 500;
    font-size: 1.776vh;
    line-height: 2.664vh;
    color: #D0D0D1;
    background: rgba(247, 241, 236, 0.06);
    border: none;
    outline: var(--app-border-width) solid rgba(247, 241, 236, 0.08);
    outline-offset: calc(-1 * var(--app-border-width));
    border-radius: 0.888vh;
    cursor: pointer;
    text-align: left;
    /* Обрезка длинного текста с многоточием */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.comp-rbac-graph__ellipsis {
    background: none;
    border: none;
    padding: 0;
    margin-left: auto;
    color: #D0D0D1;
    width: 2.664vh;
    height: 2.664vh;
    cursor: pointer;
}

.comp-rbac-graph__ellipsis-icon-rbac {
    width: 2.664vh;
    height: 2.664vh;
    display: block;
}

.comp-rbac-graph__column--users {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center; 
    margin-bottom: 0;
}

.comp-rbac-graph__users-fixed {
    flex-shrink: 0;
}

.comp-rbac-graph__users-scrollable {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    max-height: calc(6 * (4.44vh + 1.332vh)); /* 6 пользователей: высота узла + отступ */
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: #313649 transparent;
    width: 100%;
}

.comp-rbac-graph__column--group .comp-rbac-graph__column-inner,
.comp-rbac-graph__column--role .comp-rbac-graph__column-inner {
    max-height: 36.408vh;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: #313649 transparent;
}

.comp-rbac-graph__column--group .comp-rbac-graph__node-block:last-child,
.comp-rbac-graph__column--role .comp-rbac-graph__node-block:last-child {
    margin-bottom: 0;
}

.comp-rbac-graph__node:hover {
    background: rgba(247, 241, 236, 0.1);
}

.comp-rbac-graph__node:focus-visible,
.comp-rbac-graph__ellipsis:focus-visible,
.comp-rbac-graph__node-label:focus-visible {
    outline: var(--app-border-width) solid #6F82BF;
    outline-offset: calc(-1 * var(--app-border-width));
}

@media (max-aspect-ratio: 3/2) {
    .comp-rbac-graph__content {
        gap: 2.22vh;
        justify-content: space-between;
    }
}

/* Tooltip для колонки пользователей (Добавить / удалить пользователя) */
.comp-rbac-graph__column--users .shared-tooltip.shared-tooltip--top.shared-tooltip--arrow-right .shared-tooltip__bubble {
    /* Двигает tooltip влево/вправо */
    transform: translateX(4%) translateY(4px);
}

.comp-rbac-graph__column--users .shared-tooltip.shared-tooltip--top.shared-tooltip--arrow-right:hover .shared-tooltip__bubble,
.comp-rbac-graph__column--users .shared-tooltip.shared-tooltip--top.shared-tooltip--arrow-right:focus-within .shared-tooltip__bubble {
    transform: translateX(4%) translateY(0);
}

.comp-rbac-graph__column .shared-tooltip .shared-tooltip__bubble,
.comp-rbac-graph__team-users .shared-tooltip .shared-tooltip__bubble {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.888vh;
    background: none;
    border: var(--app-border-width) solid transparent;
    border-radius: 0.888vh;
    outline: none;
    isolation: isolate;
    font-family: Inter, sans-serif;
    font-size: 1.554vh;
    font-weight: 500;
    line-height: 1.998vh;
    text-align: center;
    color: #D0D0D1;
}

.comp-rbac-graph__column .shared-tooltip.shared-tooltip--top.shared-tooltip--arrow-right .shared-tooltip__bubble::after {
    content: none;
    display: none;
}
