/* Online3DViewer 移动端 Mesh 列表抽屉：覆盖原有 <=800px 隐藏侧栏的行为 */
.ov-mobile-mesh-button,
.ov-mobile-mesh-mask,
.ov-mobile-mesh-header {
  display: none;
}

@media (max-width: 800px) {
  .ov-mobile-mesh-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    position: fixed;
    z-index: 2100;
    right: 16px;
    bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    min-height: 46px;
    padding: 0 18px;
    border: 0;
    border-radius: 24px;
    background: #1677ff;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 5px 22px rgba(0,0,0,.25);
    touch-action: manipulation;
  }
  .ov-mobile-mesh-mask.ov-mobile-mesh-visible {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 2190;
    background: rgba(0, 0, 0, .4);
  }
  /* 只在打开时覆盖官方对 .only_full_width 的 display:none */
  #main_left_container.ov-mobile-mesh-open {
    display: block !important;
    position: fixed !important;
    top: auto !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    z-index: 2200 !important;
    box-sizing: border-box;
    float: none !important;
    width: 100% !important;
    height: min(74dvh, 600px) !important;
    background: var(--ov_background_color, #fff);
    color: var(--ov_foreground_color, #222);
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -8px 24px rgba(0,0,0,.16);
    overflow: hidden !important;
  }
  #main_left_container.ov-mobile-mesh-open .ov-mobile-mesh-header {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
    height: 52px;
    padding: 0 16px;
    font-size: 16px;
    font-weight: 600;
    border-bottom: 1px solid var(--ov_border_color, #e6e6e6);
  }
  .ov-mobile-mesh-close {
    border: 0;
    background: transparent;
    color: inherit;
    font-size: 27px;
    line-height: 42px;
    width: 44px;
    height: 44px;
    cursor: pointer;
  }
  #main_left_container.ov-mobile-mesh-open #main_navigator {
    display: block !important;
    box-sizing: border-box;
    float: none !important;
    width: 100% !important;
    height: calc(100% - 52px) !important;
    margin: 0 !important;
    overflow: hidden !important;
  }
  #main_left_container.ov-mobile-mesh-open #main_navigator .ov_panel_set_menu,
  #main_left_container.ov-mobile-mesh-open #main_navigator .ov_panel_set_content {
    height: 100% !important;
  }
  #main_left_container.ov-mobile-mesh-open #main_navigator .ov_panel_set_content {
    box-sizing: border-box;
    overflow: auto !important;
  }
  #main_left_container.ov-mobile-mesh-open #main_navigator .ov_navigator_tree_panel {
    overflow: auto !important;
    -webkit-overflow-scrolling: touch;
  }
  #main_left_container.ov-mobile-mesh-open #main_navigator .ov_panel_set_menu_button,
  #main_left_container.ov-mobile-mesh-open #main_navigator .ov_navigator_button {
    min-height: 36px;
    touch-action: manipulation;
  }
  #main_left_container.ov-mobile-mesh-open #main_navigator_splitter {
    display: none !important;
  }
}
