/* ============================================================
   OAR 产品配置页 · 全新统一样式（腾讯云 CVM 购买页布局）
   合并：设计稿布局 + 原生表单控件视觉同步
   ============================================================ */

/* ===== 产品配置详情页（严格按腾讯云 CVM 购买页结构，配色沿用极光云设计语言） ===== */
  body { background: #F7F8FA; padding-top: 76px; }
  .nav-toggle, .mob-menu { display: none; }

  .pd-wrap { max-width: 1360px; margin: 0 auto; padding: 22px 48px 60px; }

  .pd-crumb { font-size: 13px; color: var(--text-4); margin-bottom: 14px; }
  .pd-crumb a { color: var(--text-4); }
  .pd-crumb a:hover { color: var(--primary); }
  .pd-crumb b { color: var(--text-1); font-weight: 500; }

  .pd-title { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
  .pd-title h1 { font-size: 26px; font-weight: 700; color: var(--text-1); }

  .pd-grid { display: grid; grid-template-columns: 1fr 360px; gap: 22px; align-items: start; }

  /* ---------- 左侧配置区（腾讯云风格：白底整块 + 分节） ---------- */
  .cfg-wrap { background: #fff; border-radius: 2px; padding: 8px 0; }
  .cfg-section { padding: 22px 30px; border-bottom: 1px solid #F0F2F5; }
  .cfg-section:last-child { border-bottom: none; }
  .cfg-section > h3 {
    font-size: 15px; font-weight: 600; color: var(--text-1); margin-bottom: 16px;
    display: flex; align-items: center; gap: 8px;
  }
  .cfg-section > h3 .sec-tip { font-size: 12px; color: var(--text-4); font-weight: 400; margin-left: auto; }
  .cfg-section > h3 .sec-req { color: var(--danger); font-size: 12px; font-weight: 400; }

  .cfg-row { display: flex; align-items: flex-start; margin-bottom: 18px; }
  .cfg-row:last-child { margin-bottom: 0; }
  .cfg-label { width: 88px; flex: none; font-size: 14px; color: var(--text-2); padding-top: 10px; line-height: 1.5; }
  .cfg-label .req { color: var(--danger); margin-right: 2px; }
  .cfg-options { flex: 1; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

  /* 单选卡（腾讯云风格：白底 + 1px 边框，选中蓝描边 + 浅蓝底） */
  .opt {
    flex: 0 0 auto;
    min-width: 104px; padding: 9px 16px; border: 1px solid #E3E7ED; border-radius: 0;
    background: #fff; font-size: 14px; color: var(--text-1); cursor: pointer;
    text-align: center; transition: all .15s; user-select: none; position: relative;
    line-height: 1.4;
  }
  .opt:hover { border-color: #9CC1F5; }
  .opt.active { border-color: var(--primary); background: #F0F6FF; color: var(--primary); font-weight: 500; }
  .opt.disable { opacity: .45; cursor: not-allowed; }
  .opt .opt-sub { display: block; font-size: 12px; color: var(--text-3); margin-top: 3px; font-weight: 400; }
  .opt.active .opt-sub { color: #6FA3E8; }
  .opt .opt-rec {
    position: absolute; top: -9px; right: 8px; font-size: 11px; color: #fff; background: var(--primary);
    padding: 1px 7px; border-radius: 3px; font-weight: 400;
  }

  /* 地域 Tab（腾讯云：Tab 切换） */
  .cfg-tabs { display: flex; border-bottom: 1px solid #E3E7ED; margin-bottom: 16px; }
  .cfg-tab { padding: 8px 18px; font-size: 14px; color: var(--text-2); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; transition: all .15s; }
  .cfg-tab:hover { color: var(--primary); }
  .cfg-tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 500; }

  /* 实例规格：独立选择核心数量与内存（.opt 单选卡片复用全局 opt 样式） */

  /* 镜像：来源 Tab + 系统图标网格 */
  .os-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; width: 100%; }
  .os-item {
    flex: 0 0 auto;
    border: 1px solid #E6E9EF; border-radius: 2px; padding: 12px 8px; cursor: pointer;
    text-align: center; transition: all .15s; background: #fff;
  }
  .os-item:hover { border-color: #9CC1F5; }
  .os-item.active { border-color: var(--primary); background: #F0F6FF; }
  .os-item .os-ico { width: 30px; height: 30px; margin: 0 auto 6px; display: flex; align-items: center; justify-content: center; border-radius: 2px; color: #fff; font-size: 14px; font-weight: 700; }
  .os-item .os-name { font-size: 13px; color: var(--text-1); }

  /* 存储 */
  .dd-inline { width: 168px; }
  .data-disk { display: flex; gap: 10px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
  .data-disk .dd-rm { width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; font-size: 16px; color: var(--text-4); cursor: pointer; border-radius: 3px; }
  .data-disk .dd-rm:hover { color: var(--danger); background: #FDEFF0; }
  .add-disk-btn { font-size: 13px; color: var(--primary); cursor: pointer; display: inline-flex; align-items: center; gap: 4px; margin-top: 10px; }
  .add-disk-btn:hover { text-decoration: underline; }

  /* 带宽滑块 */
  .bw-slider-wrap { display: flex; align-items: center; gap: 14px; flex: 1; flex-wrap: wrap; }
  .bw-slider { width: 260px; -webkit-appearance: none; appearance: none; height: 4px; background: linear-gradient(to right, var(--primary) 0%, var(--primary) var(--fill,20%), #E3E7ED var(--fill,20%), #E3E7ED 100%); border-radius: 2px; outline: none; }
  .bw-slider::-webkit-slider-thumb {
    -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%;
    background: #fff; border: 2px solid var(--primary); cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,.12);
  }
  .bw-num { font-size: 14px; color: var(--text-1); font-weight: 500; }
  .bw-num small { color: var(--text-3); font-weight: 400; }

  /* 登录方式 */
  .host-row { display: flex; gap: 12px; flex-wrap: wrap; }
  .host-field { flex: 1; min-width: 180px; }
  .host-field label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 6px; }
  .host-field input {
    width: 100%; height: 40px; padding: 0 14px;
    background: #FAFBFC; border: 1px solid var(--border-input); border-radius: 2px; font-size: 14px;
  }
  .host-field input:focus { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px rgba(0,111,255,.08); }
  .pwd-strength { display: inline-flex; align-items: center; padding: 10px 14px; background: #F4F6F9; border-radius: 2px; font-size: 13px; color: var(--text-2); }

  /* 开关（腾讯云风格） */
  .switch { position: relative; width: 44px; height: 24px; border-radius: 12px; background: #D8DCE3; cursor: pointer; transition: background .2s; display: inline-block; vertical-align: middle; flex: none; }
  .switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: left .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
  .switch.on { background: var(--primary); }
  .switch.on::after { left: 23px; }
  .sw-row { display: flex; align-items: center; gap: 10px; }
  .sw-row .sw-text { font-size: 14px; color: var(--text-1); }
  .sw-row .sw-sub { font-size: 12px; color: var(--text-4); }

  /* 数量步进器 */
  .num-stepper { display: inline-flex; align-items: center; border: 1px solid #E3E7ED; border-radius: 0; overflow: hidden; background: #fff; }
  .num-stepper button { width: 36px; height: 40px; font-size: 17px; color: var(--text-2); cursor: pointer; transition: background .15s; }
  .num-stepper button:hover { background: #F4F7FB; color: var(--primary); }
  .num-stepper .num-val { width: 50px; text-align: center; font-size: 14px; color: var(--text-1); border-left: 1px solid #EEF1F5; border-right: 1px solid #EEF1F5; line-height: 40px; }

  /* ---------- 右侧费用预览（腾讯云订单栏，跟随页面滚动） ---------- */
  .order-panel {
    position: sticky; top: 90px;
    background: #fff; border-radius: 2px; padding: 22px 24px;
    box-shadow: 0 2px 10px rgba(15, 60, 120, 0.05);
  }
  .order-panel > h3 { font-size: 16px; font-weight: 600; color: var(--text-1); margin-bottom: 12px; }
  .order-item { display: flex; justify-content: space-between; gap: 16px; font-size: 13px; color: var(--text-2); padding: 8px 0; border-bottom: 1px dashed #EFF1F4; }
  .order-item span:last-child { color: var(--text-1); text-align: right; }

  .fee-box { margin: 12px 0 4px; background: #F7F9FC; border-radius: 2px; padding: 12px 14px; }
  .fee-row { display: flex; justify-content: space-between; font-size: 13px; color: var(--text-2); padding: 5px 0; }
  .fee-row .fee-val { color: var(--text-1); }
  .fee-row.discount .fee-val { color: var(--success); }
  .fee-total { display: flex; align-items: baseline; justify-content: space-between; margin-top: 14px; padding-top: 12px; border-top: 1px dashed #E1E6EC; }
  .fee-total .ft-label { font-size: 14px; color: var(--text-2); }
  .fee-total .ft-price { font-size: 26px; font-weight: 700; color: var(--primary); }
  .fee-total .ft-price .cny { font-size: 16px; }
  .fee-total .ft-price .ft-unit { font-size: 12px; font-weight: 400; color: #101010; margin-left: 4px; }
  .fee-total .ft-origin { font-size: 12px; color: var(--text-4); text-decoration: line-through; margin-left: 8px; font-weight: 400; }

  .order-agree { display: flex; align-items: flex-start; gap: 8px; font-size: 12px; color: var(--text-4); margin: 14px 0; line-height: 1.6; }
  .order-agree input { accent-color: var(--primary); margin-top: 2px; }
  .order-agree a { color: var(--primary); }
  .order-btn { width: 100%; height: 46px; font-size: 16px; }
  .order-note { font-size: 12px; color: var(--text-4); margin-top: 12px; text-align: center; line-height: 1.7; }
  .order-note .trial-link { color: var(--primary); cursor: pointer; }

  /* 移动端 */
  @media (max-width: 900px) {
    .pd-wrap { padding: 16px 14px 44px; }
    .pd-grid { grid-template-columns: 1fr; }
    .order-panel {
    position: sticky; top: 90px; position: static; }
    .os-grid { grid-template-columns: repeat(3, 1fr); }

    .bw-slider { width: 180px; }
  }

  /* 移动端适配 */
  @media (max-width: 720px) {
    body { padding-top: 56px; }
    .site-nav { height: 56px; }
    .site-nav .nav-inner { padding: 0 16px; }
    .nav-menu, .nav-right { display: none; }
    .nav-toggle {
      display: flex; margin-left: auto; width: 40px; height: 40px;
      flex-direction: column; align-items: center; justify-content: center; gap: 5px;
      cursor: pointer;
    }
    .nav-toggle span { display: block; width: 20px; height: 2px; background: #101010; border-radius: 1px; transition: transform .25s, opacity .25s; }
    .nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .nav-toggle.open span:nth-child(2) { opacity: 0; }
    .nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
    .mob-menu {
      position: fixed; top: 56px; left: 0; right: 0; z-index: 130;
      background: #fff; display: none; padding: 6px 16px 16px;
    }
    .mob-menu.show { display: block; animation: dropIn .2s ease both; }
    .mob-menu a { display: block; padding: 12px 4px; font-size: 15px; color: var(--text-1); border-bottom: 1px solid #F2F4F7; }
    .mob-menu a:last-of-type { border-bottom: none; }
    .mob-menu .mob-actions { display: flex; gap: 12px; padding-top: 14px; }
    .mob-menu .mob-actions .btn { flex: 1; height: 42px; text-align: center; line-height: 40px; display: block; }
    .pd-wrap { padding: 10px 14px 36px; }
    .pd-title h1 { font-size: 18px; }
    .pd-crumb { font-size: 12px; flex-wrap: wrap; }

    .bw-slider { width: 100%; }
    .order-panel .op-title { font-size: 15px; }
  }

/* ===== 原生表单控件视觉同步 ===== */
.opt input[type="radio"], .opt input[type="checkbox"] {
  position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none;
}

/* ---- 下拉 dd：隐藏同步用的原生 input/select ---- */
.oar-cfg-input, .oar-hide { display: none !important; }

/* ---- 开关行：原生 checkbox 承载 value ---- */
.sw-row input[type="checkbox"] { position: absolute; opacity: 0; width: 0; height: 0; }
.sw-row { cursor: pointer; }

/* ---- 滑块行：数值输入框（.bw-num 内） ---- */
.bw-num { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; color: var(--text-1); }
.bw-num input {
  width: 64px; height: 38px; border: 1px solid #E3E7ED; background: #fff;
  padding: 0 10px; font-size: 14px; color: var(--text-1); outline: none; border-radius: 0;
}
.bw-num input:focus { border-color: var(--primary); }
.bw-num small { font-size: 12px; color: var(--text-4); }

/* 滑块刻度禁用区（与 default 主题 range_none 行为一致） */
.range_none { position: absolute; height: 12px; background: #EFF2F6; top: 14px; z-index: 1; pointer-events: none; }
.bw-slider-wrap { position: relative; }

/* ---- OS 网格：真实系统 Logo ---- */
.os-item .os-ico img { width: 22px; height: 22px; display: block; }
.os-item .os-ico { background: #F4F6F9 !important; color: transparent; overflow: hidden; }
.os-item .os-name { text-align: center; }

/* OS 版本下拉（复用 dd 样式，非 data-dd 组件，由配置脚本接管） */
.os-ver-dd { position: relative; }
.os-ver-dd .dd-trigger {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 240px; height: 40px; padding: 0 12px; border: 1px solid #E3E7ED; background: #fff;
  font-size: 14px; color: var(--text-1); cursor: pointer; user-select: none;
}
.os-ver-dd .dd-trigger:hover { border-color: #9CC1F5; }
.os-ver-dd .dd-trigger .dd-arrow {
  width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent;
  border-top: 5px solid var(--text-4); transition: transform .15s;
}
.os-ver-dd.open .dd-trigger .dd-arrow { transform: rotate(180deg); }
.os-ver-dd .dd-menu {
  display: none; position: absolute; top: 42px; left: 0; min-width: 240px; max-height: 240px; overflow: auto;
  background: #fff; border: 1px solid #E3E7ED; box-shadow: 0 8px 24px rgba(16,24,40,.08); z-index: 30;
}
.os-ver-dd.open .dd-menu { display: block; }
.os-ver-dd .dd-option { padding: 9px 12px; font-size: 13px; color: var(--text-1); cursor: pointer; }
.os-ver-dd .dd-option:hover { background: #F0F6FF; color: var(--primary); }
.os-ver-dd .dd-option.active { background: #F0F6FF; color: var(--primary); }

/* ---- 自定义字段 / 主机名等文本输入（与 v25 host-field 输入一致） ---- */
.oar-input {
  height: 40px; border: 1px solid #E3E7ED; background: #FAFBFC; padding: 0 12px;
  font-size: 14px; color: var(--text-1); outline: none; border-radius: 0; min-width: 240px;
}
.oar-input:focus { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px rgba(0,111,255,.08); }
textarea.oar-input { height: auto; min-height: 64px; padding: 10px 12px; line-height: 1.6; }
select.oar-input { min-width: 240px; }
.oar-input.is-invalid { border-color: var(--danger); }
select.oar-input option { padding: 6px; }

/* ---- 联动子选项区（default JS 注入 .btn 按钮组 → 重塑为 v25 opt 卡片） ---- */
.lingAge-son-restyled .form-group { display: flex; align-items: flex-start; margin-bottom: 18px; }
.lingAge-son-restyled .form-group > label {
  width: 88px; flex: none; font-size: 14px; color: var(--text-2); padding: 10px 0 0; background: none; border: none;
}
.lingAge-son-restyled .btn-group, .lingAge-son-restyled .btn-group-toggle {
  display: flex !important; flex-wrap: wrap; gap: 10px; background: none !important; border: none !important; box-shadow: none !important;
}
.lingAge-son-restyled .btn-group label.btn, .lingAge-son-restyled .btn-group-toggle label.btn {
  min-width: 96px; padding: 9px 16px !important; border: 1px solid #E3E7ED !important; border-radius: 0 !important;
  background: #fff !important; font-size: 14px !important; color: var(--text-1) !important; cursor: pointer;
  text-align: center; transition: all .15s; user-select: none; line-height: 1.4; margin: 0 !important; font-weight: 400 !important;
}
.lingAge-son-restyled .btn-group label.btn:hover, .lingAge-son-restyled .btn-group-toggle label.btn:hover { border-color: #9CC1F5 !important; }
.lingAge-son-restyled .btn-group label.btn.active, .lingAge-son-restyled .btn-group-toggle label.btn.active {
  border-color: var(--primary) !important; background: #F0F6FF !important; color: var(--primary) !important; font-weight: 500 !important;
  box-shadow: none !important; outline: none;
}
.lingAge-son-restyled .btn-group label.btn input, .lingAge-son-restyled .btn-group-toggle label.btn input {
  position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none;
}
.lingAge-son-restyled .btn-group .active .form-check-input, .lingAge-son-restyled .btn-group-toggle .active .form-check-input { background: none; }

/* ---- 费用预览区：AJAX 注入的订单明细（ordersummary 输出 v25 fee-box 结构） ---- */
.configoption_total .order-item { display: flex; justify-content: space-between; gap: 16px; font-size: 13px; color: var(--text-2); padding: 8px 0; border-bottom: 1px dashed #EFF1F4; }
.configoption_total .order-item span:last-child { color: var(--text-1); text-align: right; word-break: break-all; }
.configoption_total .order-item img { vertical-align: -3px; margin-right: 4px; }
.configoption_total .fee-box { margin: 12px 0 4px; background: #F7F9FC; border-radius: 2px; padding: 12px 14px; }
.configoption_total .fee-row { display: flex; justify-content: space-between; font-size: 13px; color: var(--text-2); padding: 5px 0; }
.configoption_total .fee-row .fee-val { color: var(--text-1); }
.configoption_total .fee-row.discount .fee-val { color: var(--success, #12B76A); }
.configoption_total .fee-total { display: flex; align-items: baseline; justify-content: space-between; margin-top: 14px; padding-top: 12px; border-top: 1px dashed #E1E6EC; }
.configoption_total .fee-total .ft-label { font-size: 14px; color: var(--text-2); }
.configoption_total .fee-total .ft-price { font-size: 26px; font-weight: 700; color: var(--primary); }
.configoption_total .fee-total .ft-price .cny { font-size: 16px; }
.configoption_total .fee-total .ft-price .ft-unit { font-size: 12px; font-weight: 400; color: #101010; margin-left: 4px; }
.configoption_total .fee-total .ft-origin { font-size: 12px; color: var(--text-4); text-decoration: line-through; margin-left: 8px; font-weight: 400; }

/* ---- 提示与校验 ---- */
.oar-tip {
  display: inline-flex; width: 16px; height: 16px; align-items: center; justify-content: center;
  border-radius: 50%; background: #E8EDF3; color: var(--text-3); font-size: 11px; cursor: help; flex: none;
}
.oar-error-tip { display: none; color: var(--danger, #E5484D); font-size: 12px; margin-top: 6px; }


.pd-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.cfg-wrap { background: #fff; border: 1px solid #EEF1F5; }
.order-panel { background: #fff; border: 1px solid #EEF1F5; padding: 22px 20px; position: sticky; top: 84px; }
.order-panel > h3 { font-size: 16px; font-weight: 600; color: var(--text-1); margin-bottom: 12px; }

/* ---- 移动端 ---- */
@media (max-width: 900px) {
  .pd-grid { grid-template-columns: 1fr; }
  .order-panel { position: static; }
  .cfg-label { width: 100%; padding-top: 0; margin-bottom: 8px; }
  .cfg-row { flex-direction: column; }
  .cfg-section { padding: 18px 16px; }
  .bw-slider { width: 100% !important; }
}

/* ---- 选项卡组包装 div（type2/20/12 的 data-opt-group 内层容器）：
       与 .cfg-options 同款换行 flex，防止移动端 nowrap 挤压重叠 ---- */
[data-opt-group] { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; width: 100%; }
