/* The inventory inspector is an on-demand floating bottom sheet, not a
   330px layout column. Selection, editing and close actions remain intact. */
body[data-page=warehouse] .layout{position:relative;min-width:0}
body[data-page=warehouse] .layout>#sidebar{
  position:absolute;z-index:15;inset:auto auto 16px 50%;transform:translateX(-50%);
  width:min(830px,calc(100% - 32px));height:min(330px,45dvh);max-height:calc(100% - 82px);
  box-sizing:border-box;border:1px solid var(--line);border-radius:6px;
  background:var(--surface);box-shadow:0 18px 46px #223d4555;
}
body[data-page=warehouse] .layout>#sidebar[hidden]{display:none}
body[data-page=warehouse]:has(.layout>#sidebar:not([hidden])) .scene-footer{display:none}
body[data-page=warehouse] .layout>#sidebar .rack-files-head button{min-width:44px;min-height:44px;cursor:pointer}
@media(max-width:760px){
  body[data-page=warehouse] .layout>#sidebar{inset:auto 8px 8px;transform:none;width:auto;height:min(56dvh,450px);max-height:calc(100% - 65px)}
  body[data-page=warehouse] .layout>#sidebar.expanded{height:min(82dvh,720px)}
}
/* Only in the A project viewer: the outer page owns site switching.
   Inner tools float above the scene without reserving a header row. */
html.field-hub-embedded body[data-page=warehouse]{display:block;height:100dvh;overflow:hidden}
html.field-hub-embedded body[data-page=warehouse]>.workspace-header{display:none}
html.field-hub-embedded body[data-page=warehouse]>.workspace-toolbar{
  position:absolute;top:84px;left:18px;right:18px;z-index:12;
  width:auto;max-width:calc(100% - 36px);min-height:44px;
  padding:6px 10px;background:color-mix(in srgb,var(--surface) 92%,transparent);
  border:1px solid var(--line);border-radius:5px;box-shadow:0 6px 22px #213e4024;
}
html.field-hub-embedded body[data-page=warehouse]>.layout{height:100dvh;min-height:0}
html.field-hub-embedded body[data-page=warehouse] #world{height:100%;min-height:0}
@media(max-width:680px){
  html.field-hub-embedded body[data-page=warehouse]>.workspace-toolbar{top:128px;left:8px;right:8px;max-width:calc(100% - 16px);max-height:112px;overflow:auto}
}
