/* LAVI v1.20 — keep configurator panels inside the wardrobe frame */
@media (min-width:1001px){
  .wardrobe-plan{
    align-items:stretch!important;
    overflow:hidden!important;
    contain:paint;
  }

  .wardrobe-plan > .config-door{
    align-self:stretch!important;
    width:100%!important;
    height:100%!important;
    min-width:0!important;
    min-height:0!important;
    max-height:100%!important;
    overflow:hidden!important;
    contain:layout paint;
  }

  .wardrobe-plan > .config-door > .config-panel{
    width:100%!important;
    height:auto!important;
    min-width:0!important;
    min-height:0!important;
    max-width:100%!important;
    max-height:100%!important;
    overflow:hidden!important;
  }

  /*
   * Previously the door number was positioned below the door and could force
   * an old desktop browser to expand the nested grid. It now sits inside the
   * lower edge of each door without affecting the panel dimensions.
   */
  .wardrobe-plan > .config-door > small{
    right:50%!important;
    left:auto!important;
    bottom:7px!important;
    z-index:6;
    width:max-content;
    max-width:calc(100% - 16px);
    padding:2px 8px;
    overflow:hidden;
    color:#111!important;
    background:rgba(255,255,255,.86);
    border:1px solid rgba(0,0,0,.14);
    transform:translateX(50%);
    text-overflow:ellipsis;
    white-space:nowrap;
    pointer-events:none;
  }

  .wardrobe-plan .config-panel.active{
    outline:0!important;
    box-shadow:
      inset 0 0 0 4px #fff,
      inset 0 0 0 8px #701d20!important;
  }
}

/* Extra compatibility for older desktop Chromium builds. */
@media (min-width:1001px){
  @supports not (contain:paint){
    .wardrobe-plan,
    .wardrobe-plan > .config-door{
      clip-path:inset(0);
    }
  }
}
