/* The right HUD column is a bounded dock. Its children may scroll internally,
   but the dock itself must never grow or expose a scrollbar. */
.right-sidebar{
  min-width:0;
  min-height:0;
  max-width:100%;
  overflow:hidden!important;
  overscroll-behavior:none;
  scrollbar-width:none;
}
.right-sidebar::-webkit-scrollbar{display:none}
.right-sidebar>.panel{
  min-width:0;
  max-width:100%;
  overflow:hidden!important;
  resize:none!important;
}
.sidebar-window-floating{
  position:fixed!important;
  display:block;
  box-sizing:border-box;
  min-width:240px!important;
  min-height:90px!important;
  max-width:calc(100vw - 8px)!important;
  max-height:calc(100vh - 8px)!important;
  margin:0!important;
  overflow:auto!important;
  resize:both!important;
  border-color:#9c8546!important;
  box-shadow:0 12px 38px #000d,0 0 0 1px #15130c;
}
.sidebar-window-floating>.sidebar-window-title{position:sticky!important;top:0;z-index:4;cursor:move!important}
.sidebar-window-floating.sidebar-window-positioning{user-select:none;opacity:.94}
.sidebar-window-floating.party-panel{display:grid;grid-template-rows:auto minmax(0,1fr);min-width:320px!important;min-height:210px!important}
.sidebar-window-floating.party-panel #party-members{max-height:none;height:100%;overflow-y:auto}
.right-sidebar .container-panel{
  display:grid;
  grid-template-rows:auto auto minmax(0,1fr) auto;
  min-height:112px;
}
.right-sidebar .container-panel .container-grid{
  min-width:0;
  min-height:0;
  max-height:none;
  align-content:start;
  overflow-x:hidden!important;
  overflow-y:auto!important;
  overscroll-behavior:contain;
  scrollbar-gutter:stable;
}
.right-sidebar #battle-list,
.right-sidebar #party-members,
.right-sidebar #combat-stats-content,
.right-sidebar .reward-inventory,
.right-sidebar .skill-list{
  min-height:0;
  max-height:100%;
  overflow-x:hidden;
  overflow-y:auto;
  overscroll-behavior:contain;
}

@media(min-width:1051px){
  .client-grid{min-height:0;height:calc(100% - 48px)}
  .right-sidebar{
    display:flex;
    flex-direction:column;
    align-self:stretch;
    height:100%;
    max-height:100%;
  }
  .right-sidebar>.panel{flex:0 1 auto;margin-bottom:1px}
  .right-sidebar>.panel:last-child{margin-bottom:0}
  .right-sidebar>.inventory-panel{flex:0 0 218px}
  .right-sidebar>.combat-stats-panel{flex:0 1 118px}
  .right-sidebar>.party-panel:not(.minimized){
    display:grid;
    grid-template-rows:auto minmax(0,1fr);
    flex:0 0 auto;
    width:100%;
    height:clamp(132px,22vh,220px);
    min-height:92px;
    max-height:min(42vh,360px);
    overflow:hidden!important;
    resize:vertical!important;
  }
  .right-sidebar>.party-panel:not(.minimized) #party-members{height:100%;max-height:none;overflow-y:auto}
  .right-sidebar>.party-panel.minimized{
    flex:0 0 22px!important;
    height:22px!important;
    min-height:22px!important;
    max-height:22px!important;
    margin-bottom:1px;
    padding-top:1px;
    padding-bottom:1px;
  }
  .right-sidebar>.party-panel.minimized>.sidebar-window-title{
    height:18px!important;
    min-height:18px!important;
    margin-bottom:0!important;
  }
  .right-sidebar>#reward-backpack-panel{flex:0 1 96px}
  .right-sidebar>.tibia-skills-panel{display:flex;flex:0 1 118px;flex-direction:column}
  .right-sidebar>.container-panel{flex:1 1 190px}
  .right-sidebar #battle-list{height:auto!important;max-height:100%!important;resize:none!important}
}

/* Keep the complete HUD height for panels. Transient information is already
   delivered through the game notices, chat and dialogs, so the old text-only
   instruction strip must not reserve space at the bottom of the screen. */
.client-shell>footer{display:none!important}

@media(max-width:1050px){
  .right-sidebar{height:auto;max-height:none}
  .right-sidebar>.panel{max-height:260px}
  .right-sidebar>.container-panel{height:min(260px,42vh)}
}
