hey i have this firefox code, but after update it broke my css, my sidebar is not appearing anymore unless i remove this bit of the code:

#sidebar-box {
	--uc-sidebar-width: 4px; 
	--uc-sidebar-hover-width: 460px;
	--uc-autohide-sidebar-delay: 1ms; /* Waiting time before hiding sidebar */
	position: relative;
	min-width: var(--uc-sidebar-width) !important;
	width: var(--uc-sidebar-width) !important;
	max-width: var(--uc-sidebar-width) !important;
	z-index: 100;
}

but then it gets out of proportion and i want the autohide feature
i found this code that is working:

:where(#main-window) #browser{
  --uc-sidebar-width: 40px;
  --uc-sidebar-hover-width: 210px;
}
#main-window[sizemode="fullscreen"] #browser{
  --uc-sidebar-width: 1px;
}
#sidebar-box{
  --uc-autohide-sidebar-delay: 600ms; /* Wait 0.6s before hiding sidebar */
  --uc-autohide-transition-duration: 115ms;
  --uc-autohide-transition-type: linear;
  --browser-area-z-index-sidebar: 3;
  position: relative;
  min-width: var(--uc-sidebar-width) !important;
  width: var(--uc-sidebar-width) !important;
  max-width: var(--uc-sidebar-width) !important;
  z-index: var(--browser-area-z-index-sidebar,3);
  background-color: inherit;
  /* This directionality flipper is played so that sidebar "grows" into the right direction */
  direction: ltr;
  &:is([positionend],[sidebar-positionend]):not(:-moz-locale-dir(rtl)){
    direction: rtl;
  }
}
.sidebar-browser-stack{
  background: inherit;
}
#main-window[sizemode="fullscreen"] #browser{ --uc-sidebar-width: 1px; }

#sidebar-splitter{ display: none }

#sidebar-header{
  overflow: hidden;
  color: var(--chrome-color, inherit) !important;
  padding-inline: 0 !important;
}

#sidebar-header::before,
#sidebar-header::after{
  content: "";
  display: flex;
  padding-left: 8px;
}

#sidebar-header,
#sidebar{
  transition: min-width var(--uc-autohide-transition-duration) var(--uc-autohide-transition-type) var(--uc-autohide-sidebar-delay) !important;
  min-width: var(--uc-sidebar-width) !important;
  will-change: min-width;
  direction: ltr;
  &:-moz-locale-dir(rtl){
    direction: rtl;
  }
}
#sidebar-box:hover > #sidebar-header,
#sidebar-box:hover > #sidebar,
#sidebar-box:hover > .sidebar-browser-stack > #sidebar{
  min-width: var(--uc-sidebar-hover-width) !important;
  transition-delay: 0ms !important;
}

.sidebar-panel{
  background-color: transparent !important;
  color: var(--newtab-text-primary-color) !important;
}

.sidebar-panel #search-box{
  -moz-appearance: none !important;
  background-color: rgba(249,249,250,0.1) !important; 
  color: inherit !important;
}

/* Add sidebar divider and give it background */

#sidebar,
#sidebar-header{
  background-color: inherit !important;
  border-inline: 1px solid rgb(80,80,80);
  border-inline-width: 0px 1px;
}

#sidebar-box:not([positionend],[sidebar-positionend]) > :-moz-locale-dir(rtl),
#sidebar-box:is([positionend],[sidebar-positionend]) > *{
  border-inline-width: 1px 0px;
}
@media -moz-pref("sidebar.revamp") {
  #sidebar, #sidebar-header{ border-style: none }
  #sidebar-box{ padding: 0 !important; }
}
/* Move statuspanel to the other side when sidebar is hovered so it doesn't get covered by sidebar */

#sidebar-box:not([positionend],[sidebar-positionend]):hover ~ #appcontent #statuspanel{
  inset-inline: auto 0px !important;
}
#sidebar-box:not([positionend],[sidebar-positionend]):hover ~ #appcontent #statuspanel-label{
  margin-inline: 0px !important;
  border-left-style: solid !important; 
}
@media -moz-pref("userchrome.autohide-sidebar.static-layout.enabled"){
  #sidebar-box{
    min-width: var(--uc-sidebar-width) !important;
    contain: size;
    box-shadow: var(--content-area-shadow);
  }
  #sidebar{
    min-width: var(--uc-sidebar-hover-width) !important;
  }
  .sidebar-browser-stack{
    overflow: hidden;
    width: 100%;
    transition: width var(--uc-autohide-transition-duration) var(--uc-autohide-transition-type) var(--uc-autohide-sidebar-delay);
    direction: ltr;
    &:hover{
      transition-delay: 0ms;
      width: var(--uc-sidebar-hover-width);
    }
    &:-moz-locale-dir(rtl){
      transition-property: transform,width !important;
    }
  }
  #sidebar-box[sidebar-positionend]:hover :is(#sidebar-header,#sidebar):-moz-locale-dir(ltr){
    transform: translateX(0);
    transition-delay: 0ms !important;
  }
  #sidebar-box:not([sidebar-positionend]):hover .sidebar-browser-stack:-moz-locale-dir(rtl){
    transform: translateX(calc(-1 * var(--uc-sidebar-hover-width) + var(--uc-sidebar-width)));
  }
  #sidebar-box[sidebar-positionend]:hover > .sidebar-browser-stack:-moz-locale-dir(rtl){
    transform: translateX(calc(var(--uc-sidebar-hover-width) - var(--uc-sidebar-width)));
    transition-delay: 0ms !important;
  }
}

but it doesnt have my own configurations
can u adjust my code (1st code) to make it work like the second one is working, but keeping my style configurations?