.sidebar {
  position: relative;
  display: grid;
  grid-template: 1fr auto / 1fr;
  width: var(--sidebar-width);
  height: 100vh;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
  align-self: stretch;
  border-right: 1px solid var(--grey-100);
  padding-bottom: var(--gap-small);
  background: var(--dashboard-bg);
  z-index: 996;
  /*  overflow-y: auto;*/

  will-change: width, contents;
   /* transition: 0.3125s ease-out width;  */
}

.nav-tag {
  display: flex;
  height: 16px;
  padding: 0px 4px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: var(--badge-new-badge-new-label-text-color, #fff);
  border-radius: 2px;
  background-color: var(--badge-new-badge-new-label-bg, #4473d4) !important;
}

is-line {
  display: table-row !important;
}

main {
  width: 100%;
  height: 100%;
  overflow-y: auto;
}

.brand {
  --_brand-height: var(--top-nav-height);
  position: relative;
  display: flex;
  height: var(--_brand-height);
  justify-content: space-between;
  align-items: center;
  align-self: stretch;
  padding: 8px;
  border-bottom: 1px solid var(--grey-100);
  padding-left: var(--padding-left);
}

.app:has(.banner-container) .brand {
  --_brand-height: var(--banner-height);
}

.brand+.block-card {
  /*  margin-bottom: 20px;*/
  border-top: none;
}

.brand img {
  width: 150px;
  height: 32px;
  object-fit: contain;
  margin-right: var(--gap-small);
}
#nav-toggler {
  position: absolute;
  right: .5em;
  padding: .25em;
}
.nav-collapsed #nav-toggler .icon {
  --_size: 18px !important;
  /* font-size: 8px !important; */
  padding: 0;
  /* transition: 0.25s ease-out;
  transition-property: transform, background-color;
  will-change: transform, background-color; */
  margin: auto;
  cursor: pointer;
}

.nav-toggle:hover {
  background: var(--navigation-button-bg-hover);
}

.nav-collapsed #nav-toggler {
    padding: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: rotate(-180deg);
    right: 0 !important;

}

.sidebar__item {
  --_pl: 25px;
  position: relative;
  display: flex;
  padding: 8px 16px;
  justify-content: space-between;
  align-items: center;
  align-self: stretch;
  border-radius: var(--border-radius);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.display-contents {
  display: contents;
}

/* [data-parent-sidebar-item] {
  --_pl: 18px;
} */

.sidebar__item:hover {
  background: var(--navigation-button-bg-hover);
}

.sidebar-group {
    /* display: content; */
    width: 100%;
    overflow: hidden;
    border-radius: 4px;
    margin-bottom: 8px;
}
.sidebar-group--active {
  opacity: 1;
}

.sidebar-group--active:has(.group-items) {
  margin-bottom: calc(var(--gap-small) * var(--active-group-margin-bottom));
}

.sidebar-group--active .sidebar__title {
  background: var(--navigation-button-bg-active);
}

.nav-collapsed .sidebar-group--active .sidebar__title {
    background-color: transparent;
}

.sidebar__title .action {
    opacity: 1 !important;
}

p-sidebar-item:not([title]) .sidebar__label {
  font-weight: 500;
}

p-sidebar-item:has(p-sidebar-item) {
  display: flex;
  flex-direction: column;
}

p-sidebar-item>p-sidebar-item {
  display: flex;
  flex-direction: column;
  margin-left: 1em;
}

.sidebar__nested-list {
  position: relative;
  margin: 0;
  margin-left: 1em;
  height: 0;
  overflow: hidden;
  transition: 0.25s ease-out;

  border-color: var(--_border-color);
  border-bottom: 1px solid var(--_border-color);
  border-left: 1px solid var(--_border-color);
  border-bottom-left-radius: 1em;
}

.sidebar__nested-list.expanded {
  --_border-color: var(--grey-100);
  height: max-content;
  overflow: visible;
  padding-bottom: 0.5em;
}

.sidebar__label .icon-expand {
  rotate: 180deg !important;
  opacity: 0.7;
  transition: var(--transition);
}

.sidebar__item > .icon-expand {
    opacity: .76;
}
.sidebar__label .expand-prefix-icon {
    rotate: 180deg !important;
}

.floating-group-items-wrapper .sidebar__label .expand-prefix-icon {
    rotate: unset !important;
}

.expanded > .sidebar__label .expand-prefix-icon {
    rotate: unset !important;
}

.floating-group-items-wrapper .expanded .expand-prefix-icon {
    rotate: 180deg !important;
}
/* TREE LINE */
.sidebar__nested {
    padding-left: 2em;
}

.action {
  padding: 1px;
  display: inline-block;
  box-sizing: content-box;
}

.sidebar__title::before {
  --navigation-button-indicator-active: #5bbd8a;
  content: '';
  position: absolute;
  height: 100%;
  width: 4px;
  left: 0;
  background: var(--navigation-button-indicator-active);
  transform: translateX(-100%);
  transition: transform 0.145s ease-in-out;
}

.sidebar__item.active {
  background: rgba(0 0 0 / 0.054);
}

.sidebar__item.active::before, .sidebar-group--active::before {
  --navigation-button-indicator-active: #5bbd8a;
  content: '';
  position: absolute;
  height: 100%;
  width: 4px;
  left: 0;
  /* background: var(--navigation-button-indicator-active); */
  background: var(--navigation-button-bg-active);
  transition: transform 0.145s ease-in-out;
}

.nav-collapsed .sidebar-group--active {
    position: relative;
    z-index: 1;
}

.nav-collapsed .sidebar-group--active::before {
  width: 8px;
  height: 56px;
  background: var(--navigation-button-indicator-active);
  top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 2px;
}

.nav-collapsed .sidebar-group {
    position: relative;
}

.nav-collapsed .sidebar-group::after {
    --background: transparent;

    content: "";
    position: absolute;
    inset: .5em;
    top: 0;
/*    width: calc(100%);*/
    height: 100%;
    border-radius: 4px;
    background: var(--background);
    z-index: -1;

    transition: 125ms ease-out;
}

.nav-collapsed .sidebar-group--active {
    margin-bottom: .5em !important;
}

.sidebar-group--active + .sidebar-group {
    --background: red !important;
    margin-top: .5em;
}

.nav-collapsed .sidebar-group--active::after {
    /*    --background: var(--color-white, #fff);*/
    --background: var(--navigation-button-bg-hover);
}

.nav-collapsed .sidebar-group--active:hover::after {
    --background: var(--navigation-button-bg-hover);
}

.nav-collapsed .sidebar-group:not(.sidebar-group--active)::after {
    background: var(--background);
    width: calc(100% - 16px);
    left: 50%;
    transform: translate(-50%) 
}

.nav-collapsed .sidebar-group:not(.sidebar-group--active):hover::after {
    --background: var(--navigation-button-bg-hover);
}

.nav-collapsed [group] .sidebar__item:hover {
    background: transparent;
}

.sidebar-group--active .sidebar__title::before {
    transform: translateX(0);
}

.icon-expand::before {
    opacity: 1;
    display: inline-block;
    transition: 0.4s ease-in-out;
    transition-property: rotate, transform;
}


:is(.sidebar-group--active) .icon-expand::before {
    rotate: -180deg;
}

.icon-expand {
    transition-property: rotate, transform;
    transition: 200ms;
}
.sidebar__label {
    display: flex;
    gap: var(--gap-small);
    line-height: 1.5;
    align-items: center;
    font-weight: 600;
}

.sidebar__label span:not(.icon) {
  max-width: 18ch;
  text-overflow: ellipsis;
  overflow: hidden;
  font-size: 12px;
  white-space: nowrap;
}

.group-items {
  display: none;
  margin-top: var(--gap-small);
  animation: fadeIn 0.2s ease-out;
  will-change: opacity, transform, margin-bottom;
}

.group-items.expanded {
  display: block;
}

.sidebar-group--active .group-items {
  display: initial;
}

.group-items .sidebar__item {
  padding-left: var(--_pl);
}

.group-items .sidebar__label {
  gap: var(--gap-small);
}

.sidebar__item:not(:hover) .action {
  pointer-events: none;
}

.dot {
  position: relative;
  --_size: 16px;
  --_color: var(--grey-400, #aaa);
  width: var(--_size);
  height: var(--_size);
}

.dot::before {
  --_size: 10px;
  content: '';
  position: absolute;
  width: var(--_size);
  height: var(--_size);
  border-radius: 50%;
  background: var(--_color);
  display: inline-block;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.sidebar__top,
.sidebar__bottom {
  width: 100%;
  overflow: hidden;
}

.sidebar__top {
  --shadow-height: 6em;
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: start;
}

.sidebar__top {
  position: relative;
  width: 100%;
  height: 100%;
  overflow-y: auto;
}

.user-header {
  display: flex;
  justify-content: center;
  text-align: center;
  flex-direction: column;
}

.product-navigation {
  width: 100%;
}

.product-navigation::before {
  content: '';
  width: 100%;
  height: var(--shadow-height);
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background-image: linear-gradient(180deg,
      rgba(255, 255, 255, 0) 0%,
      var(--dashboard-bg) 100%);
  pointer-events: none;
  z-index: 10;
}

.product-navigation::after {
  content: '';
  display: block;
  height: var(--shadow-height);
}

/* nav-block CARD */
.block-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: calc(var(--gap-small) * 2);
  border-bottom: 1px solid var(--grey-100);
  border-top: 1px solid var(--grey-100);
  cursor: pointer;
}

.block-card:hover {
/*  background: var(--navigation-button-bg-hover);*/
}

.emblem {
  --_size: 44px;
  display: flex;
  width: var(--_size);
  height: var(--_size);
  justify-content: center;
  align-items: center;
  font-size: 24px;
  font-weight: 700;
  color: var(--color-white);
  vertical-align: middle;
  line-height: 1.2;
  padding: calc(var(--gap-small) / 2);
  background: var(--color-white, #fff);
  border-radius: 8px;
  box-shadow: 0 0 16px rgba(0 0 0 / 0);

  margin: auto;

  transition: 200ms ease-out;

}

.emblem:hover {
    transform: scale(1.15);
    box-shadow: 0 0 16px rgba(0 0 0 / .08);
}

.emblem-round {
  --_size: 28px !important;
  border-radius: 50% !important;
  background: var(--prompt-colors-accent-1);
  padding: 0;
}

.emblem img {
  width: 100%;
}

.block-card :is(.left, .right) {
  display: flex;
  gap: var(--gap-small);
  align-items: center;
}

.block-card__content {
  height: 100%;
  padding: 4px;
  border-radius: 4px;
}

.block-card__content:hover {
  background-color: var(--color-white, #fff);
}

.block-card__title {
  color: var(--black);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
  margin: 0;
  padding: 0;
  max-width: 14ch;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.block-card__title:only-child {
  font-weight: 400;
}

.block-card__subtitle {
  color: var(--grey-600);
  font-weight: 400;
  line-height: 1.5;
  font-size: 12px;
  margin: 0;
  padding: 0;

  width: 100%;
  max-width: 17ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings {
  display: grid;
  padding-top: 16px;
  padding-bottom: 20px;
  gap: 2px;
  align-self: stretch;
}

/* nav-block CARD */

.powered-badge {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 116px;
}


.nav-collapsed-only {
  --_size: 32px !important;
  display: none;
  transition: 0.25s ease-out;
  transition-property: opacity, transform;
}

.nav-collapsed .nav-collapsed-only {
  display: block;
  opacity: 1;
  transform: scaleY(1);
}

.nav-collapsed .sidebar :is(.right,
  .sidebar__label + .action,
    .brand-img-link,
  .powered-badge) {
  display: none;
}

.nav-collapsed .nav-collapsed-only :is(img) {
  display: block !important;
}
a:has(.brand-img){
  display: contents;
}
.nav-collapsed .brand-img {
  width: 100%;
  margin: auto;
}

.nav-collapsed :is(.product-navigation, .settings) {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 auto !important;
/*    padding: 8px;
    padding-left: 10px;*/
}

.nav-collapsed .sidebar {
  --sidebar-width: 92px;
  width: var(--sidebar-width, 88px);
}

.nav-collapsed .sidebar__title::before {
  display: none;
}

.nav-collapsed .sidebar .icon {
  --_size: 20px;
}

.nav-collapsed .sidebar .group-items {
  display: none !important;
}

.nav-collapsed .emblem {
  --_size: 48px;
  aspect-ratio: 1 / 1;
}

.nav-collapsed .brand {
  padding: 8px;
}

.nav-collapsed .sidebar .sidebar__item {
  padding: 12px 8px;
  width: 100%;
  overflow: hidden;
  border-radius: 4px;
}

.nav-collapsed .sidebar .block-card {
  padding: 8px;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.nav-collapsed .block-card :is(.left, .right) {
  display: flex;
  align-items: center;
  flex-direction: column;
  font-size: 10px;

  .block-card__content>* {
    font-size: 11px;
    max-width: 12ch;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
  }
}

.nav-collapsed .sidebar .sidebar__label {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: bottom;
  width: 100%;
}

.powered-badge--small {
  display: none;
  width: var(--sidebar-width);
}

.nav-collapsed :is(.powered-badge--small) {
  display: block !important;
}


.floating-group-items-wrapper {
    position: fixed;
    top: var(--y, 200px);
    left: var(--computed-sidebar-width, var(--sidebar-width));
    background-color: #fff;
    border-radius: 6px;
    border: 1px solid var(--grey-100);
    display: none;
    min-width: 212px;
    max-height: 500px;
    overflow-y: auto;
    box-shadow: 4px 0 16px rgba(0 0 0 / .05);
    animation: fadeIn 200ms;
    z-index: calc(var(--z-floating-content) + 999);
    

}

.floating-group-items-wrapper .floating-subgroup-title {
    position: sticky;
    top: 0;
    padding-left: 2em;
    padding-block: 1em;
    background-color: var(--grey-100);
    font-size: 12px;
    line-height: 18px;
    z-index: 2;
}

.floating-group-items-wrapper .group-items {
    display: block !important;
}

.floating-group-items-wrapper p-sidebar-item {
    cursor: pointer;
}

:has(.nav-collapsed) .floating-group-items-wrapper {
    display: block;
}

.nav-collapsed .sidebar-group--active {
    margin-bottom: 0 !important;
}

/* FIXME: Duplicate items  */
.sidebar__item + .sidebar__item {
    display: none;
}

.context-popup .config-modal {
    border-radius: 4px;
    border: 1px solid var(--grey);
}

.context-popup .dynamic-config-modal.config-modal {
    background: var(--grey);
}

.context-popup .minor {
    margin-left: 0;
    font-size: 12px;
}

.strong {
    font-family: Roboto;
    font-size: 14px;
    font-weight: 600;
    line-height: 21px;
    text-align: left;
}

.big-icon {
    --size: 40px;
    width: var(--size);
    height: var(--size);
    background: var(--color-white, #fff);
    font-size: 1.5em;
    border-radius: 8px;
}

:has(p-config-modal.context-popup) .backdrop {
    background-color: rgba(0 0 0 / 0.08);
    animation: fadeIn 200ms;
}

.context-popup .list-item {
    position: relative;
}

.context-popup .list-item::after {
    /*chevron right on hover*/
    position: absolute;
    top: 50%;
    right: 1em;
    content: "\e029";
    font-family: "prompt-icons" !important;
    text-rendering: auto;
    line-height: 1;
    opacity: 0;
    transform: translateX(-4px) translateY(-50%);
    transition: var(--transition);
}

.context-popup .list-item:hover::after {
    opacity: 1;
    transform: translateX(0) translateY(-50%);
}

.context-config-modal .search-wrapper.search-container-form {
    grid-column: -1 / 1;
    width: 100%;
    border-radius: 3em;
    height: 2.5em;
    background-color: var(--grey);

    &:focus-within {
        outline: 1px solid var(--color-green);
    }

    input {
        background: transparent;
        outline: none;
    }
}