/* 目录搜索入口：贴左右边；样式对齐 VR 白图标 + 灰色立体阴影 */

/* 默认隐藏，避免「加载中…」阶段先创建再被 JS 关掉造成闪一下 */
#directorySearchFab {
  --ds-fab-glyph: 24px;
  --ds-fab-edge: 10px;
  position: fixed;
  right: var(--ds-fab-edge);
  left: auto;
  bottom: calc(112px + var(--vr-vv-bottom-inset, 0px));
  z-index: 920;
  width: auto;
  min-width: 40px;
  height: auto;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  cursor: grab;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  outline: none;
  background: transparent;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  transition: transform 0.18s ease, opacity 0.2s ease, left 0.18s ease;
}

#directorySearchFab:not(.is-hidden) {
  display: flex;
  animation: dsFabEnter 0.45s cubic-bezier(0.22, 1.1, 0.36, 1) both;
}

#directorySearchFab:active,
#directorySearchFab.is-dragging {
  cursor: grabbing;
  transform: scale(1.06);
  transition: transform 0.12s ease, opacity 0.2s ease;
}

#directorySearchFab.is-hidden {
  display: none !important;
}

#directorySearchFab .ds-fab-icon-wrap {
  width: 40px;
  height: 40px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 0;
  padding: 0;
}

#directorySearchFab .ds-fab-icon {
  width: var(--ds-fab-glyph);
  height: var(--ds-fab-glyph);
  display: block;
  color: #fff;
  -webkit-filter: var(--vr-ui-icon-shadow,
    drop-shadow(0 1px 0.6px rgba(0, 0, 0, 0.95))
    drop-shadow(0 2px 1px rgba(0, 0, 0, 0.7))
    drop-shadow(0 3px 1.5px rgba(0, 0, 0, 0.45)));
  filter: var(--vr-ui-icon-shadow,
    drop-shadow(0 1px 0.6px rgba(0, 0, 0, 0.95))
    drop-shadow(0 2px 1px rgba(0, 0, 0, 0.7))
    drop-shadow(0 3px 1.5px rgba(0, 0, 0, 0.45)));
}

@keyframes dsFabEnter {
  0% {
    opacity: 0;
    transform: scale(0.7) translateY(12px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@media (max-width: 600px) {
  #directorySearchFab {
    --ds-fab-glyph: 22px;
    right: 10px;
    left: auto;
    bottom: calc(96px + var(--vr-vv-bottom-inset, 0px));
  }

  #directorySearchFab .ds-fab-icon-wrap {
    width: 36px;
    height: 36px;
  }
}
