/* XSeller V3.6.4-R3.1 — Definitive Wide Sidebar Fix */

/* Higher specificity than old R4/R4.3 rules */
html body.dash #sidebar,
html body.voiceStudioPage #sidebar,
html body #sidebar{
  width:260px !important;
  min-width:260px !important;
  max-width:260px !important;
}

/* Keep workspace aligned with the wider navigation */
html body.dash .workspace,
html body.voiceStudioPage .workspace,
html body.dash main.workspace{
  margin-left:260px !important;
}

/* Make every tool/navigation tab actually fill the wider sidebar */
html body #sidebar .tool,
html body #sidebar .sideLink,
html body #sidebar .adminlink,
html body #sidebar a.sideLink,
html body #sidebar button.tool{
  width:calc(100% - 24px) !important;
  max-width:none !important;
  min-width:0 !important;
  min-height:44px !important;
  margin:3px 12px !important;
  padding:10px 13px !important;
  font-size:14.5px !important;
  line-height:1.3 !important;
  justify-content:flex-start !important;
}

/* Allow Vietnamese labels to use the available width naturally */
html body #sidebar .tool > span:not(.xs-r42-icon):not(.xs-v364-voice-icon):not(.voiceNavIcon),
html body #sidebar .sideLink > span:not(.xs-r42-icon):not(.xs-v364-voice-icon):not(.voiceNavIcon),
html body #sidebar .xs-r42-label{
  min-width:0 !important;
  white-space:normal !important;
  overflow:visible !important;
  text-overflow:clip !important;
}

/* Push credit/badges to the far right */
html body #sidebar .tool small,
html body #sidebar .sideLink small,
html body #sidebar .adminlink small{
  margin-left:auto !important;
  flex:0 0 auto !important;
  font-size:11.5px !important;
}

/* Larger section labels and icon breathing room */
html body #sidebar .sectionTitle,
html body #sidebar .groupTitle,
html body #sidebar > p.muted{
  margin-left:18px !important;
  margin-right:14px !important;
}

html body #sidebar .xs-r42-icon,
html body #sidebar .xs-v364-voice-icon,
html body #sidebar .voiceNavIcon{
  width:18px !important;
  height:18px !important;
  min-width:18px !important;
  flex:0 0 18px !important;
}

/* Keep admin buttons aligned with the tool widths */
html body #sidebar .adminlink{
  box-sizing:border-box !important;
}

/* Desktop layout */
@media (min-width:901px){
  html body.dash #sidebar,
  html body.voiceStudioPage #sidebar{
    transform:none !important;
    left:0 !important;
  }
}

/* Mobile keeps drawer behavior and does not reserve 260px */
@media (max-width:900px){
  html body.dash #sidebar,
  html body.voiceStudioPage #sidebar,
  html body #sidebar{
    width:min(300px,88vw) !important;
    min-width:0 !important;
    max-width:min(300px,88vw) !important;
  }

  html body.dash .workspace,
  html body.voiceStudioPage .workspace,
  html body.dash main.workspace{
    margin-left:0 !important;
  }

  html body #sidebar .tool,
  html body #sidebar .sideLink,
  html body #sidebar .adminlink,
  html body #sidebar a.sideLink,
  html body #sidebar button.tool{
    width:calc(100% - 24px) !important;
  }
}
