/* Baskibu Designer 0.23.7
 * Mobile Product options stability final.
 * Restores the options-open state owner removed with legacy dev75/dev76 JS,
 * expands the Product sheet correctly, and prevents transient hidden-state blink.
 */

@media (max-width:760px){
  /* Product options are a dedicated editing state. Keep enough canvas context
     above the sheet, but give the choices a real scrolling viewport. */
  .bbd-app.bbd-release-0237.bbd-0237-product-options-open[data-bbd-v92-panel="product"] > #bbd-v60-mobile-sheet-host.is-open > #bbd-panel,
  .bbd-app.bbd-release-0237.bbd-0237-product-options-open[data-bbd-v92-panel="product"] > #bbd-v60-mobile-sheet-host.is-open > #bbd-panel[hidden]{
    height:min(76dvh,700px)!important;
    max-height:min(76dvh,700px)!important;
    min-height:0!important;
    overflow:hidden!important;
  }

  /* The sheet content is the sole vertical scroller. This avoids a clipped
     lower half and removes the nested-scroll fight from older mobile layers. */
  .bbd-app.bbd-release-0237.bbd-0237-product-options-open[data-bbd-v92-panel="product"] > #bbd-v60-mobile-sheet-host.is-open > #bbd-panel > .bbd-panel-section:not([hidden]){
    flex:1 1 auto!important;
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
    overscroll-behavior-y:contain!important;
    -webkit-overflow-scrolling:touch!important;
    scroll-behavior:auto!important;
    overflow-anchor:none!important;
    padding-bottom:28px!important;
  }

  /* While editing options the preview/change-actions above and below the option
     card duplicate the same route and steal almost 100 px of useful height. */
  .bbd-app.bbd-release-0237.bbd-0237-product-options-open #bbd-panel .bbd-commerce-summary__actions,
  .bbd-app.bbd-release-0237.bbd-0237-product-options-open #bbd-panel .bbd-commerce-summary__hint{
    display:none!important;
  }
  .bbd-app.bbd-release-0237.bbd-0237-product-options-open #bbd-panel .bbd-commerce-summary{
    min-height:0!important;
    margin-bottom:8px!important;
  }

  /* The Product Engine may toggle hidden for a few frames while committing a
     choice. In the open editing state, never unmount the visible options UI. */
  .bbd-app.bbd-release-0237.bbd-0237-product-options-open #bbd-panel [data-bbd-v53-options],
  .bbd-app.bbd-release-0237.bbd-0237-product-options-open #bbd-panel [data-bbd-v53-options][hidden],
  .bbd-app.bbd-release-0237.bbd-0237-option-transaction #bbd-panel [data-bbd-v53-options],
  .bbd-app.bbd-release-0237.bbd-0237-option-transaction #bbd-panel [data-bbd-v53-options][hidden]{
    display:block!important;
    visibility:visible!important;
    opacity:1!important;
    width:100%!important;
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    overflow:visible!important;
    overflow-x:visible!important;
    overflow-y:visible!important;
    animation:none!important;
    transition:none!important;
    contain:none!important;
    content-visibility:visible!important;
  }

  .bbd-app.bbd-release-0237.bbd-0237-product-options-open #bbd-panel [data-bbd-v53-options-body],
  .bbd-app.bbd-release-0237.bbd-0237-product-options-open #bbd-panel .bbd-v81-options-shell,
  .bbd-app.bbd-release-0237.bbd-0237-product-options-open #bbd-panel .bbd-v81-group,
  .bbd-app.bbd-release-0237.bbd-0237-product-options-open #bbd-panel .bbd-v81-group__grid{
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    overflow:visible!important;
    overflow-anchor:none!important;
    animation:none!important;
  }

  /* Selection state may change, geometry may not. The user should see a calm
     selected pill instead of buttons blinking out during quote/config sync. */
  .bbd-app.bbd-release-0237.bbd-0237-product-options-open #bbd-panel .bbd-v81-option,
  .bbd-app.bbd-release-0237.bbd-0237-option-transaction #bbd-panel .bbd-v81-option{
    display:flex!important;
    visibility:visible!important;
    opacity:1!important;
    transform:none!important;
    animation:none!important;
    transition:border-color .12s ease,background-color .12s ease,color .12s ease,box-shadow .12s ease!important;
    backface-visibility:hidden!important;
  }
  .bbd-app.bbd-release-0237.bbd-0237-option-transaction #bbd-panel .bbd-v81-option{
    transition:none!important;
  }
}

@media (max-width:390px) and (max-height:760px){
  .bbd-app.bbd-release-0237.bbd-0237-product-options-open[data-bbd-v92-panel="product"] > #bbd-v60-mobile-sheet-host.is-open > #bbd-panel,
  .bbd-app.bbd-release-0237.bbd-0237-product-options-open[data-bbd-v92-panel="product"] > #bbd-v60-mobile-sheet-host.is-open > #bbd-panel[hidden]{
    height:min(74dvh,555px)!important;
    max-height:min(74dvh,555px)!important;
  }
}
