/* Baskibu Designer 0.23.11 — Same-side desktop tool panel
 * Desktop correction over 0.23.9/0.23.10:
 * - the primary tool rail and its content panel live together on the LEFT
 * - the canvas follows immediately to the right
 * - mobile/tablet inspector behavior from 0.23.10 is intentionally preserved
 *
 * Rationale: a tool selected on the left should not make the user's eyes travel
 * across the entire canvas to find its content on the opposite edge.
 */

.bbd-app.bbd-release-02311{
  --bbd-02311-desktop-panel-width:clamp(336px,23vw,380px);
}

@media (min-width:1101px){
  /* Canonical desktop flow: [tool rail] [tool content] [canvas]. */
  .bbd-app.bbd-release-02311.bbd-shell-v0161 .bbd-workspace,
  .bbd-app.bbd-release-02311.bbd-shell-v0161:not(.is-panel-collapsed).is-inspector-collapsed .bbd-workspace{
    grid-template-columns:var(--bbd-rail-width) var(--bbd-02311-desktop-panel-width) minmax(0,1fr)!important;
  }

  .bbd-app.bbd-release-02311.bbd-shell-v0161.is-panel-collapsed .bbd-workspace,
  .bbd-app.bbd-release-02311.bbd-shell-v0161.is-panel-collapsed.is-inspector-collapsed .bbd-workspace{
    grid-template-columns:var(--bbd-rail-width) 0 minmax(0,1fr)!important;
  }

  .bbd-app.bbd-release-02311.bbd-shell-v0161 .bbd-sidebar{
    grid-column:1!important;
  }

  .bbd-app.bbd-release-02311.bbd-shell-v0161 .bbd-panel{
    grid-column:2!important;
    grid-row:1!important;
    width:var(--bbd-02311-desktop-panel-width)!important;
    min-width:0!important;
    max-width:none!important;
    height:100%!important;
    border-left:0!important;
    border-right:1px solid var(--bbd-border-subtle)!important;
    background:#fff!important;
  }

  .bbd-app.bbd-release-02311.bbd-shell-v0161.is-panel-collapsed .bbd-panel{
    width:0!important;
    min-width:0!important;
    overflow:hidden!important;
  }

  .bbd-app.bbd-release-02311.bbd-shell-v0161 .bbd-stage-area{
    grid-column:3!important;
    grid-row:1!important;
    min-width:0!important;
  }

  /* The collapse handle belongs to the outside edge of the LEFT panel. */
  .bbd-app.bbd-release-02311.bbd-shell-v0161 .bbd-panel-edge-toggle{
    right:-40px!important;
    left:auto!important;
    border-right:1px solid var(--bbd-border-subtle)!important;
    border-left:0!important;
    border-radius:0 8px 8px 0!important;
    box-shadow:8px 4px 18px rgba(15,23,42,.10)!important;
  }

  .bbd-app.bbd-release-02311.bbd-shell-v0161 .bbd-panel-edge-toggle > span:first-child{
    transform:none!important;
  }

  /* Keep the content visually attached to the selected tool instead of reading
     like an independent right-side inspector. */
  .bbd-app.bbd-release-02311 .bbd-panel-section:not([hidden]){
    scrollbar-gutter:stable!important;
  }
}
