.menu {
  font-size: var(--font-size-md);

  &Inner {
    list-style: none;
  }

  &Item {
    display: flex;
    align-items: center;
    width: 100%;
    height: 40px;
    color: var(--color-text-1);

    &Icon {
      width: 20px;
      height: 20px;
      margin-right: 8px;
      flex: none;
    }

    &Label {
      text-overflow: ellipsis;
      white-space: nowrap;
      overflow: hidden;
    }

    &Link {
      display: flex;
      align-items: center;
      width: 100%;
      height: 100%;
      padding: 0 16px;
      color: inherit;
      text-decoration: none;

      &:hover,
      &:focus {
        color: inherit;
        background-color: var(--color-tertiary-light-hover);
      }

      &.activated {
        color: var(--color-text-0);
        font-weight: var(--font-weight-semi-bold);
      }
    }
  }
}

.disabled {
  color: var(--color-disabled-text);
  pointer-events: none;
}

.subMenu {
  display: flex;
  flex-direction: column;
  color: var(--color-text-1);
  font-size: var(--font-size-md);

  &Button {
    display: flex;
    align-items: center;
    padding: 0 16px;
    height: 40px;
    width: 100%;
    color: inherit;

    &:hover,
    &:focus {
      background-color: var(--color-tertiary-light-hover);
    }
  }

  &Info {
    display: flex;
    align-items: center;
    height: 100%;
    flex: 1;
    overflow: hidden;
  }

  &Arrow {
    width: 16px;
    height: 16px;
    flex: none;
    transition: transform 0.3s ease-in-out;

    &.expanded {
      transform: rotate(180deg);
    }
  }

  &Icon {
    width: 20px;
    height: 20px;
    margin-right: 8px;
    flex: none;
  }

  &Label {
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
  }

  &List {
    display: grid;
    grid-template-rows: 0fr;
    opacity: 0;
    transition:
      grid-template-rows 0.3s ease-in-out,
      opacity 0.3s ease-in-out;

    &.expanded {
      grid-template-rows: 1fr;
      opacity: 1;
    }

    .menuItemLink {
      padding-left: 44px;
      color: inherit;

      &.activated {
        color: var(--color-text-0);
        font-weight: var(--font-weight-semi-bold);
      }
    }
  }

  &Inner {
    list-style: none;
    overflow: hidden;
  }
}
