/* build.css —— 自由组合悬浮面板(桌面悬浮在左侧栏右侧空白处,窄屏贴边) */
.build-panel {
  position: fixed; left: auto; top: auto; z-index: 45;
  width: 400px; max-height: calc(100vh - 140px);
  display: flex; flex-direction: column;
  background: rgba(21,23,41,.94); backdrop-filter: blur(8px);
  border: 1px solid var(--border); border-radius: 14px;
  box-shadow: 0 18px 50px rgba(0,0,0,.55);
  padding: 12px 14px; overflow: hidden;
}
.bp-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; cursor: move; user-select: none; }
.bp-head button, .bp-head select { cursor: pointer; }
.bp-title { font-size: 14px; font-weight: 700; color: var(--accent); white-space: nowrap; }
.bp-select {
  flex: 0 1 auto; max-width: 130px; min-width: 0; background: var(--bg2); color: var(--text);
  border: 1px solid var(--border); border-radius: 8px; padding: 5px 8px; font-size: 12.5px; outline: none;
}
.bp-drag-area { flex: 1; height: 22px; cursor: move; }
.bp-btn {
  background: var(--bg2); color: var(--text-dim); border: 1px solid var(--border);
  border-radius: 8px; width: 28px; height: 28px; font-size: 13px; cursor: pointer; flex: none;
}
.bp-btn:hover { color: var(--text); border-color: var(--accent); }
.bp-name {
  width: 100%; background: var(--bg2); color: var(--text);
  border: 1px solid var(--border); border-radius: 8px; padding: 7px 10px;
  font-size: 13px; outline: none; margin-bottom: 8px;
}
.bp-name:focus { border-color: var(--accent); }
.bp-add { position: relative; margin-bottom: 8px; }
.bp-add input {
  width: 100%; background: var(--bg2); color: var(--text);
  border: 1px solid var(--border); border-radius: 8px; padding: 7px 10px;
  font-size: 12.5px; outline: none;
}
.bp-add input:focus { border-color: var(--accent); }
.bp-results {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 5;
  background: var(--bg2); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 14px 40px rgba(0,0,0,.5); padding: 5px; max-height: 260px; overflow-y: auto;
}
.bp-hit {
  display: flex; align-items: center; gap: 8px; width: 100%;
  background: none; border: none; border-radius: 7px; color: var(--text);
  padding: 5px 7px; font-size: 12.5px; cursor: pointer; text-align: left;
}
.bp-hit:hover { background: var(--card-hover); }
.bp-hit img.it-icon, .bp-hit .icon-ph { width: 26px; height: 26px; font-size: 11px; }
.bp-hit i { margin-left: auto; font-style: normal; font-size: 10.5px; color: var(--text-dim); }

.bp-items {
  flex: 1; overflow-y: auto; display: flex; flex-wrap: wrap; gap: 8px;
  align-content: flex-start; padding: 2px; min-height: 60px;
}
.bp-item {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: var(--card); border: 1px solid var(--border); border-radius: 10px;
  padding: 7px 6px 5px; width: 74px; cursor: pointer;
}
.bp-item:hover { border-color: var(--accent); }
.bp-item img.it-icon, .bp-item .icon-ph { width: 36px; height: 36px; font-size: 14px; }
.bp-item .bp-nm {
  font-size: 11px; text-align: center; line-height: 1.15; max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.bp-x {
  position: absolute; top: -6px; right: -6px; width: 18px; height: 18px;
  background: var(--accent); color: #1a1200; border: none; border-radius: 50%;
  font-size: 12px; line-height: 1; cursor: pointer; display: none;
}
.bp-item:hover .bp-x { display: block; }
.bp-empty { color: var(--text-dim); font-size: 12px; padding: 8px 4px; }
.bp-sec {
  flex-basis: 100%; font-size: 11px; font-weight: 700; color: var(--accent);
  letter-spacing: 1px; padding: 4px 2px 2px; margin-top: 2px;
}
.bp-row { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 8px; }
.build-panel.drag-over { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(230,180,90,.35), 0 18px 50px rgba(0,0,0,.55); }
.bp-foot { font-size: 11px; color: var(--text-dim); padding-top: 8px; border-top: 1px solid var(--border); margin-top: 6px; }

@media (max-width: 960px) {
  .build-panel { left: 8px !important; right: 8px; width: auto; top: auto !important; bottom: 8px; max-height: 55vh; }
}
