/* Baskibu Designer 0.23.10 — Inspector consistency + option transaction calm
 * Final correction over 0.23.9:
 * - all compact bottom inspectors share the exact same outer geometry
 * - portrait/narrow tablets use the bottom inspector; only wide landscape tablets use right inspector
 * - Product option transactions never change outer sheet height
 * - transient disabled state may not visually blink the option buttons
 */

.bbd-app.bbd-release-02310{
  --bbd-02310-sheet-height:min(72dvh,680px);
  --bbd-02310-sheet-expanded-height:min(91dvh,820px);
}

/* Phones + narrow tablets + portrait tablets: one canonical sheet height. */
@media (max-width:899px), (min-width:900px) and (max-width:1100px) and (orientation:portrait){
  .bbd-app.bbd-release-02310 > #bbd-v60-mobile-sheet-host.is-open > #bbd-panel,
  .bbd-app.bbd-release-02310 > #bbd-v60-mobile-sheet-host.is-open > #bbd-panel[hidden],
  .bbd-app.bbd-release-02310.bbd-0237-product-options-open[data-bbd-v92-panel="product"] > #bbd-v60-mobile-sheet-host.is-open > #bbd-panel,
  .bbd-app.bbd-release-02310.bbd-0237-product-options-open[data-bbd-v92-panel="product"] > #bbd-v60-mobile-sheet-host.is-open > #bbd-panel[hidden],
  .bbd-app.bbd-release-02310.bbd-0238-product-options-open[data-bbd-v92-panel="product"] > #bbd-v60-mobile-sheet-host.is-open > #bbd-panel,
  .bbd-app.bbd-release-02310.bbd-0238-product-options-open[data-bbd-v92-panel="product"] > #bbd-v60-mobile-sheet-host.is-open > #bbd-panel[hidden],
  .bbd-app.bbd-release-02310.bbd-release-0238.bbd-0238-product-options-open[data-bbd-v92-panel="product"] > #bbd-v60-mobile-sheet-host.is-open > #bbd-panel,
  .bbd-app.bbd-release-02310.bbd-release-0238.bbd-0238-product-options-open[data-bbd-v92-panel="product"] > #bbd-v60-mobile-sheet-host.is-open > #bbd-panel[hidden]{
    top:auto!important;
    right:8px!important;
    bottom:calc(var(--bbd-0239-dock-height,64px) + 8px)!important;
    left:8px!important;
    width:auto!important;
    height:var(--bbd-0239-active-sheet-height,var(--bbd-02310-sheet-height))!important;
    min-height:0!important;
    max-height:calc(100dvh - 92px)!important;
    overflow:hidden!important;
  }

  .bbd-app.bbd-release-02310.bbd-0239-sheet-expanded > #bbd-v60-mobile-sheet-host.is-open > #bbd-panel,
  .bbd-app.bbd-release-02310.bbd-0239-sheet-expanded > #bbd-v60-mobile-sheet-host.is-open > #bbd-panel[hidden],
  .bbd-app.bbd-release-02310.bbd-0239-sheet-expanded.bbd-0238-product-options-open[data-bbd-v92-panel="product"] > #bbd-v60-mobile-sheet-host.is-open > #bbd-panel,
  .bbd-app.bbd-release-02310.bbd-0239-sheet-expanded.bbd-0238-product-options-open[data-bbd-v92-panel="product"] > #bbd-v60-mobile-sheet-host.is-open > #bbd-panel[hidden]{
    height:var(--bbd-0239-active-sheet-height,var(--bbd-02310-sheet-expanded-height))!important;
    max-height:calc(100dvh - 92px)!important;
  }

  /* Product mode uses the same sheet; only the inner option body scrolls. */
  .bbd-app.bbd-release-02310.bbd-0238-product-options-open #bbd-panel > .bbd-panel-section:not([hidden]){
    min-height:0!important;
    height:auto!important;
    max-height:none!important;
    overflow:hidden!important;
  }
  .bbd-app.bbd-release-02310.bbd-0238-product-options-open #bbd-panel [data-bbd-v53-options]{
    display:flex!important;
    flex:1 1 auto!important;
    flex-direction:column!important;
    min-height:0!important;
    max-height:none!important;
    overflow:hidden!important;
  }
  .bbd-app.bbd-release-02310.bbd-0238-product-options-open #bbd-panel [data-bbd-v53-options-body]{
    flex:1 1 auto!important;
    min-height:0!important;
    height:auto!important;
    max-height:none!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
    overscroll-behavior-y:contain!important;
    -webkit-overflow-scrolling:touch!important;
    padding-bottom:36px!important;
  }
}

/* Wide landscape tablets retain the iPad-style side inspector. Its top/bottom
   anchors are fixed, therefore every tool has exactly the same panel height. */
@media (min-width:900px) and (max-width:1100px) and (orientation:landscape){
  .bbd-app.bbd-release-02310 > #bbd-v60-mobile-sheet-host.is-open > #bbd-panel,
  .bbd-app.bbd-release-02310 > #bbd-v60-mobile-sheet-host.is-open > #bbd-panel[hidden]{
    top:72px!important;
    right:12px!important;
    bottom:12px!important;
    left:auto!important;
    width:min(380px,42vw)!important;
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
  }
}

/* The Product Engine briefly disables controls while dependent values settle.
   That is processing state, not a reason for the visible proxy pills to flash.
   Keep their opacity/geometry calm during the dev92 transaction. */
.bbd-app.bbd-release-02310.bbd-v92-option-transaction .bbd-v81-option,
.bbd-app.bbd-release-02310.bbd-v92-option-transaction .bbd-v81-option:disabled,
.bbd-app.bbd-release-02310.bbd-0237-option-transaction .bbd-v81-option,
.bbd-app.bbd-release-02310.bbd-0237-option-transaction .bbd-v81-option:disabled{
  opacity:1!important;
  visibility:visible!important;
  transform:none!important;
  animation:none!important;
  transition:none!important;
}

/* Reserve the current option grid geometry while a choice commits. */
.bbd-app.bbd-release-02310.bbd-v92-option-transaction .bbd-v81-options-shell,
.bbd-app.bbd-release-02310.bbd-v92-option-transaction .bbd-v81-group,
.bbd-app.bbd-release-02310.bbd-v92-option-transaction .bbd-v81-group__grid{
  opacity:1!important;
  visibility:visible!important;
  animation:none!important;
  transition:none!important;
  overflow-anchor:none!important;
}
