/* M3.2 个股浮窗（drawer）— [B]/[C]/[D] + M4/M6 共用 */

.btmp-drawer {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: none;
}
.btmp-drawer.is-open {
  display: block;
}

.btmp-drawer-mask {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.32);
  animation: btmp-drawer-fade 160ms ease;
}

.btmp-drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 480px;
  max-width: 92vw;
  background: #fff;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  animation: btmp-drawer-slide-in 220ms cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes btmp-drawer-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes btmp-drawer-slide-in {
  from { transform: translateX(20px); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

.btmp-drawer-header {
  flex: 0 0 auto;
  padding: 16px 20px;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.btmp-drawer-title-wrap {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}
.btmp-drawer-title {
  font-size: 18px;
  font-weight: 600;
  color: #1d1d1f;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.btmp-drawer-code {
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-size: 12px;
  color: #86868b;
}
.btmp-drawer-close {
  background: transparent;
  border: none;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  color: #86868b;
  padding: 0 4px;
}
.btmp-drawer-close:hover { color: #1d1d1f; }

.btmp-drawer-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 8px 20px 16px;
}

.btmp-drawer-section {
  padding: 12px 0;
  border-bottom: 1px dashed #f0f0f0;
}
.btmp-drawer-section:last-child {
  border-bottom: none;
}
.btmp-drawer-sect-title {
  font-size: 12px;
  font-weight: 500;
  color: #86868b;
  margin: 0 0 6px 0;
  letter-spacing: 0.4px;
}
.btmp-drawer-sect-content {
  font-size: 13px;
  color: #1d1d1f;
  line-height: 1.55;
}
.btmp-drawer-loading {
  color: #aaa;
  font-style: italic;
}
.btmp-drawer-empty {
  color: #aaa;
}

/* 字段细排布 */
.btmp-drawer-kv {
  display: inline-block;
  margin-right: 14px;
}
.btmp-drawer-kv-label {
  color: #86868b;
  margin-right: 4px;
}
.btmp-drawer-kv-value {
  color: #1d1d1f;
  font-weight: 500;
}
.btmp-drawer-tag {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 11px;
  margin-right: 4px;
  background: #f5f5f7;
  color: #1d1d1f;
}
.btmp-drawer-tag.is-main {
  background: #fff1f0;
  color: #cf1322;
  font-weight: 500;
}
.btmp-drawer-net-pos { color: #cf1322; font-weight: 600; }
.btmp-drawer-net-neg { color: #389e0d; font-weight: 600; }

/* path mini polyline */
.btmp-drawer-path-svg {
  display: block;
  width: 100%;
  max-width: 360px;
  height: 60px;
  background: #fafafa;
  border-radius: 4px;
}

/* footer 按钮 */
.btmp-drawer-footer {
  flex: 0 0 auto;
  padding: 12px 20px;
  border-top: 1px solid #f0f0f0;
  display: flex;
  gap: 10px;
}
.btmp-drawer-action {
  flex: 1 1 0;
  padding: 8px 12px;
  font-size: 13px;
  border-radius: 6px;
  border: 1px solid #d2d2d7;
  background: #fff;
  color: #1d1d1f;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btmp-drawer-action:hover:not(:disabled) {
  background: #f5f5f7;
}
.btmp-drawer-action:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.btmp-drawer-action-primary {
  background: #0071e3;
  color: #fff;
  border-color: #0071e3;
}
.btmp-drawer-action-primary:hover:not(:disabled) {
  background: #005bb5;
}
.btmp-drawer-action-primary[data-state="done"] {
  background: #34c759;
  border-color: #34c759;
}
