/* ChatFox sidebar folder row polish – scoped presentation fix.
   Existing React folder selection/edit/delete actions remain untouched. */

/* Folder rows: title and balance get a predictable layout at every saved sidebar width. */
#root .dolphin-sidebar:not(.w-14) .sidebar-nav [data-testid^="folder-"].folder-item{
  position:relative!important;
  box-sizing:border-box!important;
  min-height:53px!important;
  padding:7px 11px!important;
  gap:0!important;
  align-items:center!important;
  border-radius:10px!important;
  box-shadow:none!important;
  max-width:calc(100% - 16px)!important;
}
#root .dolphin-sidebar:not(.w-14) .sidebar-nav [data-testid^="folder-"].folder-item > button:first-child{
  display:flex!important;
  flex:1 1 auto!important;
  width:100%!important;
  min-width:0!important;
  min-height:36px!important;
  align-items:center!important;
  gap:10px!important;
  padding:0 36px 0 0!important;
  margin:0!important;
  text-align:left!important;
  background:transparent!important;
  border:0!important;
}
#root .dolphin-sidebar:not(.w-14) .sidebar-nav [data-testid^="folder-"].folder-item > button:first-child > svg{
  flex:0 0 18px!important;
  width:18px!important;
  height:18px!important;
  align-self:center!important;
  margin:0!important;
}
#root .dolphin-sidebar:not(.w-14) .sidebar-nav [data-testid^="folder-"].folder-item > button:first-child > span:first-of-type{
  flex:1 1 auto!important;
  min-width:0!important;
  max-width:100%!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
  line-height:1.35!important;
  font-weight:500;
}
#root .dolphin-sidebar:not(.w-14) .sidebar-nav [data-testid^="folder-"].folder-item.active > button:first-child > span:first-of-type{
  font-weight:700!important;
}
#root .dolphin-sidebar:not(.w-14) .sidebar-nav [data-testid^="folder-"] > button:first-child [data-fb-badge]{
  display:inline!important;
  margin:0 0 0 5px!important;
  font-size:10px!important;
  line-height:14px!important;
  font-weight:600!important;
  white-space:nowrap!important;
  vertical-align:baseline!important;
  letter-spacing:0!important;
  color:#18a572!important;
}

/* Counter stays on the original common vertical axis (with add-folder icon). */
#root .dolphin-sidebar:not(.w-14) .sidebar-nav [data-testid^="folder-"].folder-item > button:first-child > span:last-child{
  position:absolute!important;
  right:45px!important;
  top:50%!important;
  transform:translateY(-50%)!important;
  min-width:18px!important;
  text-align:center!important;
  margin:0!important;
  line-height:18px!important;
  font-variant-numeric:tabular-nums;
}

/* On hover / keyboard focus, swap the count for two quiet actions.
   The action group overlays the reserved right edge instead of squashing the name. */
#root .dolphin-sidebar:not(.w-14) .sidebar-nav [data-testid^="folder-"].folder-item > div:last-child{
  position:absolute!important;
  top:50%!important;
  right:8px!important;
  transform:translateY(-50%)!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:4px!important;
  width:auto!important;
  margin:0!important;
  z-index:2!important;
}
#root .dolphin-sidebar:not(.w-14) .sidebar-nav [data-testid^="folder-"].folder-item:hover > button:first-child,
#root .dolphin-sidebar:not(.w-14) .sidebar-nav [data-testid^="folder-"].folder-item:focus-within > button:first-child{
  padding-right:77px!important;
}
#root .dolphin-sidebar:not(.w-14) .sidebar-nav [data-testid^="folder-"].folder-item:hover > button:first-child > span:last-child,
#root .dolphin-sidebar:not(.w-14) .sidebar-nav [data-testid^="folder-"].folder-item:focus-within > button:first-child > span:last-child{
  visibility:hidden!important;
}
#root .dolphin-sidebar:not(.w-14) .sidebar-nav [data-testid^="folder-"].folder-item > div:last-child > button{
  display:inline-flex!important;
  width:28px!important;
  height:28px!important;
  min-width:28px!important;
  padding:0!important;
  align-items:center!important;
  justify-content:center!important;
  border-radius:7px!important;
  border:1px solid #d3e1ef!important;
  background:#ffffff!important;
  color:#52779b!important;
  box-shadow:none!important;
  opacity:1!important;
}
#root .dolphin-sidebar:not(.w-14) .sidebar-nav [data-testid^="folder-"].folder-item > div:last-child > button:hover{
  color:#206bb2!important;
  border-color:#93bfea!important;
  background:#ecf6ff!important;
}
#root .dolphin-sidebar:not(.w-14) .sidebar-nav [data-testid^="folder-"].folder-item > div:last-child > button:last-child{
  color:#aa6270!important;
  border-color:#f1dce0!important;
  background:#fffafb!important;
}
#root .dolphin-sidebar:not(.w-14) .sidebar-nav [data-testid^="folder-"].folder-item > div:last-child > button:last-child:hover{
  background:#fff0f1!important;
  border-color:#e5b4bd!important;
  color:#ad3d52!important;
}
#root .dolphin-sidebar:not(.w-14) .sidebar-nav [data-testid^="folder-"].folder-item > div:last-child > button svg{
  width:14px!important;
  height:14px!important;
  flex-shrink:0!important;
}

/* Preserve normal folded-sidebar layout; it contains no individual folder rows. */
