/* =========================================================
   V117 - UI ONLY
   原功能节点不替换、不克隆、不覆盖点击
   ========================================================= */

html{
  --d117-bg:#000;
  --d117-panel:#0b0c0e;
  --d117-panel2:#14161a;
  --d117-panel3:#1c1f24;
  --d117-border:#2a2e34;
  --d117-title:#fff;
  --d117-body:#f1f2f3;
  --d117-small:#a7abb2;
  --d117-muted:#72777f;
  --d117-green:#18c98b;
  --d117-red:#ff4d63;
  --d117-purple:#6d63ff;
}

html.cx-theme-light,
html[data-theme="light"],
html[data-cx-theme="light"]{
  --d117-bg:#fff;
  --d117-panel:#fff;
  --d117-panel2:#f4f5f7;
  --d117-panel3:#eceef1;
  --d117-border:#dfe2e6;
  --d117-title:#121418;
  --d117-body:#30343a;
  --d117-small:#737981;
  --d117-muted:#9aa0a8;
  --d117-green:#0ea772;
  --d117-red:#df4155;
  --d117-purple:#6258e8;
}

body:has(.deliveryContract),
.deliveryContract,
.deliveryContract .contract-header,
.deliveryContract .Full-warehouse,
.deliveryContract .position{
  background:var(--d117-bg)!important;
  color:var(--d117-body)!important;
}

/* Header */
.deliveryContract .contract-header{
  border-bottom:1px solid var(--d117-border)!important;
}
.deliveryContract .contract-header .pl-30.pr-30{
  padding-left:15px!important;
  padding-right:15px!important;
}
.deliveryContract .contract-header .pt-45{
  padding-top:15px!important;
  padding-bottom:12px!important;
  min-height:66px!important;
}
.deliveryContract .contract-header .font-35{
  color:var(--d117-title)!important;
  font-size:19px!important;
  font-weight:800!important;
}
.deliveryContract .contract-header .ml-15,
.deliveryContract .contract-header .pl-30.w-160{
  color:var(--d117-small)!important;
  font-size:11px!important;
}

/* V116 chart stays visual only */
.cx116-chart{
  margin:10px 14px 12px!important;
  border:1px solid var(--d117-border)!important;
  border-radius:11px!important;
  background:var(--d117-bg)!important;
}
.cx116-chart-tools{
  color:var(--d117-small)!important;
  gap:16px!important;
}
.cx116-chart-tools .active{
  background:var(--d117-panel2)!important;
  color:var(--d117-title)!important;
}
.cx116-chart-canvas{
  background:var(--d117-bg)!important;
}
.cx116-live{
  border-color:var(--d117-border)!important;
}
.cx116-live strong{color:var(--d117-title)!important}
.cx116-live span{color:var(--d117-small)!important}

/* Main */
.deliveryContract .Full-warehouse{
  padding:0 14px 18px!important;
}
.deliveryContract .Full-warehouse-bottom-flex{
  margin-bottom:9px!important;
}
.deliveryContract .Full-warehouse-bottom{
  min-width:58px!important;
  height:30px!important;
  padding:0 10px!important;
  border:1px solid var(--d117-border)!important;
  border-radius:8px!important;
  background:var(--d117-panel2)!important;
  color:var(--d117-title)!important;
  font-size:11px!important;
}

/* 原 
.deliveryContract .Full-warehouse-list{
  display:grid!important;
 
  gap:11px!important;
  align-items:start!important;
}

/* 原交割时间按钮：全部保留原点击事件，仅布局 */
.deliveryContract .Delivery-time-title{
  color:var(--d117-small)!important;
  font-size:11px!important;
  margin-bottom:8px!important;
}
.deliveryContract .Delivery-time-list{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:6px!important;
  margin-bottom:11px!important;
  overflow:visible!
}

/* 页面要求四格；其余原节点
.deliveryContract .Delivery-time-item{
  display:none!important;
}
.deliveryContract .Delivery-time-item:nth-child(-n+4){
  display:block!important;
  min-width:0!important;
  border:1px solid var(--d117-border)!important;
  border-radius:9px!important;
  overflow:hidden!important;
  background:var(--d117-panel2)!important;
  cursor:pointer!important;
}
.deliveryContract .Delivery-time-item-time{
  min-height:30px!important;
  display:flex!i
  align-items:center!importan
  justify-content:center!important;
  background:transparent!important;
  color:var(--d117-title)!important;
  font-size:11.5px!important;
  font-weight:750!important;
}
.deliveryC
  min-height:22px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  background:transparent!important;
  color:var(--d117-small)!important;
  font-size:8.8px!important;
}

/* 不强行指定第一个 active；保留 Vue 原 inline 状态 */
.deliveryContract .Delivery-time-item:has(.Delivery-time-item-time[style*="127, 129, 253"]),
.deliveryContract .Delivery-time-item:has(.Delivery-time-item-time[style*="127,129,253"]){
  border-color:var(--d117-purple)!important;
  background:color-mix(in srgb,var(--d117-purple) 22%,var(--d117-panel2))!important;
}

/* 金额输入：原 van-field */
.deliveryContract .Delivery-time-input{
  margin-bottom:9px!important;
}
.deliveryContract .Delivery-time-input .van-cell{
  min-height:48px!important;
  padding:0 11px!important;
  border:1px solid var(--d117-border)!important;
  border-radius:9px!important;
  background:var(--d117-panel2)!important;
}
.deliveryContract .Delivery-time-input input{
  color:var(--d117-title)!important;
  font-size:14px!important;
}
.deliveryContract .Delivery-time-input input::placeholder{
  color:var(--d117-muted)!important;
}
.deliveryContract .Delivery-time-input-text{
  color:var(--d117-small)!important;
  font-size:12px!important;
}

/* 看涨/看跌：原节点原事件 */
.cx116-direction{
  display:grid!important;
  grid-template-columns:1fr 1fr!important;
  gap:8px!important;
  margin-bottom:9px!important;
}
.deliveryContract .Delivery-time-open-more{
  min-height:48px!important;
  margin:0!important;
  border:0!important;
  border-radius:9px!important;
  background:var(--d117-green)!important;
  color:#fff!important;
  cursor:pointer!important;
}
.deliveryContract .Delivery-time-open-more-red{
  background:var(--d117-red)!important;
}
.deliveryContract .Delivery-time-open-more-text{
  color:#fff!important;
  font-size:14px!important;
  font-weight:800!important;
}
.deliveryContract .Delivery-time-open-more-text2{
  color:rgba(255,255,255,.84)!important;
  font-size:9px!important;
}

/*
  V116 新增的“立即购买”不是原后端功能节点。
  UI-only 模式隐藏它，避免产生重复/错误下单。
  下单继续使用原 看涨/看跌 按钮。
*/
.cx116-buy-now{
  display:none!important;
}

.deliveryContract .handling-fee{
  margin-top:9px!important;
  color:var(--d117-small)!important;
  font-size:10.5px!important;
}

/* 原盘口 */
.deliveryContract .price{
  padding-left:9px!important;
  border-left:1px solid var(--d117-border)!important;
}
.deliveryContract .price-text,
.deliveryContract .quantity,
.deliveryContract .unit-text,
.deliveryContract .unit-text2{
  color:var(--d117-muted)!important;
  font-size:9.5px!important;
}
.deliveryContract .price-item{
  min-height:23px!important;
}
.deliveryContract .price-item-text{
  color:var(--d117-green)!important;
  font-size:11px!important;
}
.deliveryContract .price-item-text-red{
  color:var(--d117-red)!important;
}
.deliveryContract .price-item-text2{
  color:var(--d117-small)!important;
  font-size:9.5px!important;
}
.deliveryContract .price-content-title{
  color:var(--d117-green)!important;
  font-size:17px!important;
  font-weight:850!important;
}

/* 原仓位区域 */
.deliveryContract .position{
  border-top:1px solid var(--d117-border)!important;
  background:var(--d117-bg)!important;
}

/* 防止 UI 修改拦截功能 */
.deliveryContract .Delivery-time-item,
.deliveryContract .Delivery-time-open-more,
.deliveryContract .Delivery-time-input input,
.deliveryContract .contract-header img{
  pointer-events:auto!important;
}

/* theme */
.deliveryContract,
.deliveryContract .Delivery-time-item,
.deliveryContract .Delivery-time-input .van-cell,
.deliveryContract .Delivery-time-open-more,
.cx116-chart{
  transition:background-color .14s ease,color .14s ease,border-color .14s ease!important;
}

@media(max-width:390px){
  .deliveryContract .Full-warehouse-list{
    grid-template-columns:minmax(0,1.44fr) minmax(106px,.86fr)!important;
    gap:9px!important;
  }
  .deliveryContract .Delivery-time-list{gap:5px!important}
  .deliveryContract .Delivery-time-item-time{font-size:10.8px!important}
}
