/* r25 — panel collapse affordance + left-edge resonance bubble (preview / hot-update) */

/* ========== 1) Split: open = thin down-chevron; closed = 打开面板 CTA ========== */

/* Hard ban: never show CTA text while panel is open */
.phone .split:not(.collapsed)::after,
.phone button.split:not(.collapsed)::after,
.split:not(.collapsed)::after {
  content: none !important;
}

/* OPEN — thin grabber (≤20px visual), ≥44pt hit via ::before */
.phone .split:not(.collapsed),
.phone button.split:not(.collapsed) {
  height: 20px !important;
  min-height: 20px !important;
  max-height: 20px !important;
  padding: 0 !important;
  margin: 0 !important;
  display: block !important;
  position: relative !important;
  flex-shrink: 0 !important;
  background: #0f1318 !important;
  border: 0 !important;
  border-top: 1px solid #2a2f36 !important;
  color: transparent !important;
  font-size: 0 !important;
  overflow: visible !important;
}

/* Expand hit target without stealing chart layout space */
.phone .split:not(.collapsed)::before,
.phone button.split:not(.collapsed)::before {
  content: "" !important;
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  top: -12px !important;
  bottom: -12px !important;
  /* 20 + 12 + 12 = 44 */
  z-index: 1 !important;
}

.phone .split:not(.collapsed) .knob,
.phone button.split:not(.collapsed) .knob {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  width: 56px !important;
  height: 22px !important;
  border-radius: 12px !important;
  background: #1a1f27 !important;
  border: 1px solid rgba(240, 185, 11, 0.45) !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35) !important;
  z-index: 2 !important;
  pointer-events: none !important;
}

.phone .split:not(.collapsed) .knob i,
.phone button.split:not(.collapsed) .knob i {
  display: block !important;
  width: 11px !important;
  height: 11px !important;
  margin: 0 !important;
  margin-top: -5px !important;
  border: 0 !important;
  border-bottom: 2.5px solid #f0b90b !important;
  border-right: 2.5px solid #f0b90b !important;
  transform: rotate(45deg) !important; /* ∨ down = collapse */
  background: transparent !important;
}

.phone .split:not(.collapsed):active .knob,
.phone button.split:not(.collapsed):active .knob {
  background: #2a2416 !important;
  border-color: #f0b90b !important;
}

/* CLOSED — CTA row (previous r19b copy) */
.phone .split.collapsed,
.phone button.split.collapsed {
  height: 44px !important;
  min-height: 44px !important;
  max-height: 44px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: var(--yellow, #f0b90b) !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  letter-spacing: 0.04em !important;
  padding-bottom: 0 !important;
  border-top: 1px solid #2a2f36 !important;
  background: #0f1318 !important;
}

.phone .split.collapsed .knob,
.phone button.split.collapsed .knob {
  display: none !important;
}

.phone .split.collapsed::after,
.phone button.split.collapsed::after {
  content: "打开交易面板" !important;
}

.phone.ia-ready .split.collapsed {
  padding-bottom: 0 !important;
  height: 44px !important;
  min-height: 44px !important;
}

/* ========== 2) Resonance — 金山毒霸-style left-edge bubble ========== */

#hj-res-rail,
#hj-res-rail.hj-res-bubble {
  position: absolute !important;
  left: 0 !important;
  right: auto !important;
  z-index: 14 !important;
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  min-height: 44px !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  background: transparent !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  -webkit-tap-highlight-color: transparent !important;
  touch-action: none !important; /* vertical drag; block chart pan */
  user-select: none !important;
  -webkit-user-select: none !important;
}

#hj-res-rail .pill,
#hj-res-rail.hj-res-bubble .pill {
  width: 38px !important;
  height: 38px !important;
  border-radius: 19px !important;
  margin-left: -6px !important; /* tuck into left edge like 毒霸 */
  background: #1a1f27 !important;
  border: 1.5px solid #3a4450 !important;
  box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.55) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #e8c07a !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  letter-spacing: 0 !important;
  writing-mode: horizontal-tb !important;
  text-orientation: mixed !important;
  line-height: 1.05 !important;
  text-align: center !important;
  pointer-events: none !important;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.12s ease !important;
}

#hj-res-rail:active .pill,
#hj-res-rail.pressed .pill,
#hj-res-rail.dragging .pill {
  background: #2a2416 !important;
  border-color: #f0b90b !important;
  color: #f0b90b !important;
  transform: scale(1.04) !important;
}

#hj-res-rail.open .pill {
  background: #2a2416 !important;
  border-color: #f0b90b !important;
  color: #f0b90b !important;
  width: 38px !important;
}

/* drop the old "收" suffix from thin rail */
#hj-res-rail.open .pill::after {
  content: none !important;
}

#hj-res-rail.dragging {
  opacity: 0.95;
}

.phone.ia-tab-quotes #hj-res-rail,
.phone.ia-tab-positions #hj-res-rail,
.phone.ia-tab-history #hj-res-rail,
.phone.ia-tab-me #hj-res-rail {
  display: none !important;
}
