/* JustiX 0.8.5.6 — Courtroom Space Distribution
   Redistributes the 3D courtroom so actors, evidence and HUD use the full stage
   without stacking, clipping or competing for the same vertical band. */

/* Desktop / notebook baseline: give the scene enough vertical breathing room. */
.court-stage.mode-3d{
  min-height:760px!important;
  --jx-stage-gutter:24px;
  --jx-stage-footer-zone:92px;
}

/* Keep the transformed world above the persistent control band. */
.court-stage.mode-3d .courtroom-3d-shell{
  inset:0 0 var(--jx-stage-footer-zone) 0!important;
  transform-origin:50% 58%!important;
}

/* Upper row: evidence / judge / witness. */
.court-stage.mode-3d .judge3d{
  top:15.5%!important;
  left:calc(50% - 46px)!important;
}
.court-stage.mode-3d .evidence-screen3d{
  left:4.2%!important;
  top:20%!important;
  width:22.5%!important;
  height:27%!important;
  max-width:275px!important;
}
.court-stage.mode-3d .witness3d{
  right:5.5%!important;
  top:24%!important;
}
.court-stage.mode-3d .witness-stand3d{
  right:3.2%!important;
  top:31.5%!important;
  width:18%!important;
  height:18%!important;
}

/* Lower row: user and AI counterpart sit farther apart and higher than the HUD. */
.court-stage.mode-3d .defence3d{
  left:13.5%!important;
  bottom:18.5%!important;
}
.court-stage.mode-3d .prosecution3d{
  right:13.5%!important;
  bottom:18.5%!important;
}
.court-stage.mode-3d .defence-desk{
  left:4.5%!important;
  bottom:11.5%!important;
  width:31.5%!important;
}
.court-stage.mode-3d .prosecution-desk{
  right:4.5%!important;
  bottom:11.5%!important;
  width:31.5%!important;
}

/* Make labels compact enough to read but never collide with the next zone. */
.court-stage.mode-3d .actor3d > .actor-name{
  min-width:128px!important;
  max-width:172px!important;
  padding:8px 10px!important;
}

/* Fixed bottom control zone: left status / centered mic / right camera status. */
.court-stage.mode-3d .scene-speaker,
.court-stage.mode-3d .camera-status{
  bottom:22px!important;
  min-height:56px!important;
  max-width:245px!important;
  padding:10px 12px!important;
  z-index:94!important;
}
.court-stage.mode-3d .scene-speaker{left:var(--jx-stage-gutter)!important}
.court-stage.mode-3d .camera-status{right:var(--jx-stage-gutter)!important}
.court-stage.mode-3d .mic-panel{
  bottom:20px!important;
  z-index:96!important;
}

/* Reserve space around the center mic dock instead of letting status cards intrude. */
.court-stage.mode-3d .scene-speaker{margin-right:210px}
.court-stage.mode-3d .camera-status{margin-left:210px}

/* Camera bar remains at the top and does not consume actor space. */
.court-stage.mode-3d .court-3d-hud{
  top:58px!important;
}

/* Wide camera: slightly smaller world to expose all three horizontal zones. */
.court-stage.mode-3d[data-camera="wide"] .courtroom-3d-shell{
  transform:perspective(1200px) rotateX(calc(3.5deg + var(--scene-rx))) rotateY(var(--scene-ry)) scale(.89)!important;
}

/* Gallery silhouettes are decorative; keep them behind the control band. */
.court-stage.mode-3d .gallery3d{
  bottom:3.5%!important;
  height:12%!important;
  opacity:.22!important;
}

/* Medium desktops / notebooks. */
@media(max-width:1200px){
  .court-stage.mode-3d{min-height:720px!important;--jx-stage-gutter:18px;--jx-stage-footer-zone:88px}
  .court-stage.mode-3d .evidence-screen3d{left:3.5%!important;width:23%!important;max-width:240px!important}
  .court-stage.mode-3d .witness3d{right:4.5%!important;top:25%!important}
  .court-stage.mode-3d .defence3d{left:12%!important;bottom:19%!important}
  .court-stage.mode-3d .prosecution3d{right:12%!important;bottom:19%!important}
  .court-stage.mode-3d .actor3d > .actor-name{min-width:118px!important;max-width:154px!important}
  .court-stage.mode-3d .scene-speaker,.court-stage.mode-3d .camera-status{max-width:220px!important}
}

/* Tablet: retain three visual bands, reduce decorative content before text. */
@media(max-width:900px){
  .court-stage.mode-3d{min-height:720px!important;--jx-stage-gutter:14px;--jx-stage-footer-zone:96px}
  .court-stage.mode-3d .courtroom-3d-shell{inset:5% 0 var(--jx-stage-footer-zone) 0!important}
  .court-stage.mode-3d .judge3d{top:18%!important}
  .court-stage.mode-3d .evidence-screen3d{left:2.5%!important;top:26%!important;width:23%!important;height:23%!important;min-width:112px!important}
  .court-stage.mode-3d .witness3d{right:3%!important;top:29%!important;transform:translateZ(95px) scale(.72) rotateY(-7deg)!important}
  .court-stage.mode-3d .witness-stand3d{right:1.5%!important;top:35%!important;width:19%!important;height:16%!important}
  .court-stage.mode-3d .defence3d{left:9.5%!important;bottom:20%!important;transform:translateZ(150px) scale(.90) rotateY(4deg)!important}
  .court-stage.mode-3d .prosecution3d{right:9.5%!important;bottom:20%!important;transform:translateZ(150px) scale(.90) rotateY(-4deg)!important}
  .court-stage.mode-3d .defence-desk{left:2%!important;width:34%!important;bottom:13%!important}
  .court-stage.mode-3d .prosecution-desk{right:2%!important;width:34%!important;bottom:13%!important}
  .court-stage.mode-3d .scene-speaker,.court-stage.mode-3d .camera-status{max-width:31%!important;bottom:18px!important}
  .court-stage.mode-3d .mic-panel{bottom:18px!important}
}

/* Phone landscape / narrow tablet: simplify the bottom HUD and keep actors legible. */
@media(max-width:650px){
  .court-stage.mode-3d{min-height:670px!important;--jx-stage-footer-zone:104px}
  .court-stage.mode-3d .courtroom-3d-shell{inset:8% 0 var(--jx-stage-footer-zone) 0!important}
  .court-stage.mode-3d .judge3d{top:20%!important;transform:translateZ(70px) scale(.78)!important}
  .court-stage.mode-3d .evidence-screen3d{left:1.5%!important;top:28%!important;width:24%!important;height:20%!important;min-width:96px!important}
  .court-stage.mode-3d .witness3d{right:1.5%!important;top:31%!important;transform:translateZ(95px) scale(.62) rotateY(-6deg)!important}
  .court-stage.mode-3d .defence3d{left:7%!important;bottom:21%!important;transform:translateZ(150px) scale(.80) rotateY(4deg)!important}
  .court-stage.mode-3d .prosecution3d{right:7%!important;bottom:21%!important;transform:translateZ(150px) scale(.80) rotateY(-4deg)!important}
  .court-stage.mode-3d .actor3d > .actor-name{min-width:92px!important;max-width:118px!important;padding:6px!important}
  .court-stage.mode-3d .scene-speaker,.court-stage.mode-3d .camera-status{bottom:14px!important;max-width:28%!important;padding:8px!important}
  .court-stage.mode-3d .scene-speaker small,.court-stage.mode-3d .camera-status small{display:none!important}
  .court-stage.mode-3d .mic-panel{bottom:12px!important}
}

/* Phone portrait: use the complete width, but keep every control in its own lane. */
@media(max-width:430px){
  .court-stage.mode-3d{min-height:625px!important;--jx-stage-footer-zone:98px}
  .court-stage.mode-3d .courtroom-3d-shell{inset:10% 0 var(--jx-stage-footer-zone) 0!important}
  .court-stage.mode-3d .judge3d{top:21%!important}
  .court-stage.mode-3d .evidence-screen3d{top:31%!important;width:23%!important;min-width:82px!important}
  .court-stage.mode-3d .witness3d{top:33%!important;right:.5%!important}
  .court-stage.mode-3d .defence3d{left:5%!important;bottom:22%!important}
  .court-stage.mode-3d .prosecution3d{right:5%!important;bottom:22%!important}
  .court-stage.mode-3d .scene-speaker,.court-stage.mode-3d .camera-status{max-width:27%!important;padding:7px!important}
  .court-stage.mode-3d .scene-speaker b,.court-stage.mode-3d .camera-status b{font-size:10px!important}
  .court-stage.mode-3d .scene-speaker .spatial-mini{display:none!important}
}
