/* ⭐ 2026-08-07 SaaS 购买配置页 /saas/xcx/buy
   ⭐ 2026-08-31 严格对齐 buyDxhosting：dx-* 变量 + host-* 单卡片结构（host-form-group 行 / 95px label / 按钮式选购 / 规格区） */

:root {
    --dx-primary: #4a9ced;
    --dx-primary-hover: #3b8adc;
    --dx-primary-light: #eaf4fe;
    --dx-success: #00B42A;
    --dx-warning: #FF7D00;
    --dx-danger: #F53F3F;
    --dx-bg: #f5f7fa;
    --dx-border: #e5e6eb;
    --dx-text: #1D2129;
    --dx-text-secondary: #4e5969;
    --dx-text-muted: #86909c;
    --dx-radius: 8px;
    --dx-radius-sm: 4px;
    --dx-shadow: 0 1px 3px rgba(0,0,0,.06);
    --dx-transition: 200ms cubic-bezier(0.4,0,0.2,1);
}

/* ===== 页面主体 ===== */
.sb-page {
    font-family: "PingFang SC","Microsoft YaHei","Helvetica Neue",Arial,sans-serif;
    color: var(--dx-text);
    background: var(--dx-bg);
    min-height: 600px;
    padding: 24px 0 80px;
}
.sb-page * { box-sizing: border-box; }

.sb-container {
    max-width: 1190px;
    margin: 0 auto;
    padding: 24px 20px;
    display: flex;
    gap: 24px;
    align-items: flex-start;
}
@media (max-width: 900px) {
    .sb-container { flex-direction: column; }
}

/* ============ 左侧主配置区（对齐 host-main，单卡片） ============ */
.host-main {
    flex: 3;
    min-width: 0;
    background: #fff;
    border-radius: var(--dx-radius);
    box-shadow: var(--dx-shadow);
    padding: 28px 30px;
}
.host-main-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--dx-text);
    margin-bottom: 24px;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--dx-primary);
    letter-spacing: -0.3px;
}
.host-main-title span { color: var(--dx-primary); }

/* ===== 表单配置行（对齐 host-form-group） ===== */
.host-form-group {
    margin-bottom: 24px;
    display: flex;
    align-items: flex-start;
}
/* ⭐ 2026-08-31 修复：删掉 .host-form-group:last-child { margin-bottom: 0 }
   原规则会把 accJkcyGroup/accNormalGroup wrapper 内的最后一项底部 margin 清零，
   导致 wrapper 边界处的相邻行（店铺名称→登录密码 / 登录账号→登录密码）紧贴。
   保留统一 24px 间距，最后一项多余 margin 由 .host-main 的 padding-bottom: 28px 消化 */
.host-label {
    width: 95px;
    font-size: 14px;
    color: var(--dx-text-secondary);
    padding-top: 8px;
    flex-shrink: 0;
    font-weight: 500;
}
.host-control { flex: 1; min-width: 0; }

/* ===== 按钮组（配置选项，对齐 host-btn-group / host-btn） ===== */
.host-btn-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.host-btn {
    position: relative;
    padding: 7px 18px;
    border: 1px solid var(--dx-border);
    background: #fff;
    color: var(--dx-text-secondary);
    border-radius: var(--dx-radius-sm);
    cursor: pointer;
    font-size: 13px;
    transition: all var(--dx-transition);
    line-height: 22px;
    white-space: nowrap;
    user-select: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.host-btn:hover {
    border-color: var(--dx-primary);
    color: var(--dx-primary);
    background: var(--dx-primary-light);
}
.host-btn.is-active {
    background: var(--dx-primary);
    color: #fff;
    border-color: var(--dx-primary);
    font-weight: 500;
    box-shadow: 0 1px 3px rgba(0,82,217,.2);
}
.host-btn.is-active:hover {
    background: var(--dx-primary-hover);
    border-color: var(--dx-primary-hover);
}
.host-btn input { display: none; }

/* 套餐版本（仅名称，价格由开通时长展示——2026-08-31 老板要求） */
.sb-version-name { font-weight: 500; }

/* ===== 开通时长（严格对齐 buyDxhosting 购买时长） ===== */
.buy-years { }
.buy-years-btn {
    flex-direction: column;
    align-items: center;
    padding: 6px 14px;
    line-height: 20px;
    gap: 2px;
    min-width: 76px;
}
.yearsPrice { font-size: 13px; color: var(--dx-text-secondary); white-space: nowrap; }
.yearsPrice .price { font-size: 15px; font-weight: 700; padding-right: 2px; color: inherit; }
.host-btn.is-active .yearsPrice { font-weight: 700; color: #fff; }
.host-btn.is-active .yearsPrice .price { font-size: 16px; }

/* 赠送提示气泡：(2年送1年) —— 1:1 对齐 buyDxhosting .tip（箭头用西数 sprite 图标 0 -1215px，2026-09-02 老板要求统一） */
.buy-years .tip {
    position: absolute;
    width: 90px;
    background-color: #ff6514;
    padding: 2px 5px;
    z-index: 9;
    text-align: center;
    top: 44px;
    left: 0;
    color: #fff;
    line-height: normal;
    border-radius: 2px;
    display: none;
}
.buy-years .tip i {
    position: absolute;
    width: 15px;
    height: 5px;
    left: 14px;
    top: -5px;
    background: url(/images2016/cloudhost/cloudhost-icon_2.jpg) no-repeat 0 -1215px;
}
.buy-years .host-btn:hover .tip,
.buy-years .host-btn.is-active .tip,
.buy-years .host-btn.show-upgrade .tip { display: block; }

/* ===== 功能 tags ===== */
/* ⭐ 2026-09-02 老板拍板：padding-top 4→12px，给 (N年送M年) tip 悬停留出空间不被遮挡 */
.sb-feats { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 12px; }
.sb-feat {
    padding: 5px 14px;
    background: var(--dx-primary-light);
    color: var(--dx-primary);
    border-radius: var(--dx-radius-sm);
    font-size: 13px;
    font-weight: 500;
}

/* ===== 表单输入（对齐 host-input / host-link-btn / host-form-row / host-note） ===== */
.host-form-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    flex-wrap: wrap;
}
.host-form-row:first-child { margin-top: 0; }
.host-input {
    padding: 7px 12px;
    border: 1px solid var(--dx-border);
    border-radius: var(--dx-radius-sm);
    font-size: 13px;
    outline: none;
    transition: border-color var(--dx-transition), box-shadow var(--dx-transition);
    width: 320px;
    height: 36px;
    color: var(--dx-text);
    flex-shrink: 0;   /* ⭐ 2026-08-31 禁止挤压变形 */
}
.host-input:focus {
    border-color: var(--dx-primary);
    box-shadow: 0 0 0 2px rgba(0,82,217,.1);
}
.host-input::placeholder { color: var(--dx-text-muted); }
.host-link-btn {
    font-size: 12px;
    color: var(--dx-primary);
    cursor: pointer;
    padding: 5px 10px;
    border: 1px solid transparent;
    border-radius: var(--dx-radius-sm);
    transition: all .15s;
    line-height: 1;
    user-select: none;
    flex-shrink: 0;
}
.host-link-btn:hover {
    background: var(--dx-primary-light);
    border-color: var(--dx-primary);
}
/* ===== 登录账号可用性检测状态提示（2026-08-31 新增） ===== */
.acc-status {
    display: block;
    font-size: 12px;
    line-height: 1.5;
    margin-top: 4px;
    min-height: 18px;
    color: var(--dx-text-muted);
}
.acc-status.is-valid { color: var(--dx-success); }
.acc-status.is-invalid { color: var(--dx-danger); }
.acc-status.is-checking { color: var(--dx-text-muted); }

/* ===== 必填标注（行业规范：红色*前缀，文字不加粗） ===== */
.host-label.is-required::before {
    content: '*';
    color: var(--dx-danger);
    margin-right: 4px;
    font-weight: 400;
}
.host-note {
    font-size: 12px;
    color: var(--dx-warning);
    margin-top: 8px;
    line-height: 1.6;
    padding: 6px 10px;
    background: #fff8e6;
    border-radius: var(--dx-radius-sm);
    border: 1px solid #ffe8b3;
}

/* ============ 右侧结算面板（对齐 host-sidebar） ============ */
.host-sidebar {
    flex: 1;
    min-width: 260px;
    max-width: 320px;
    background: #fff;
    border-radius: var(--dx-radius);
    box-shadow: var(--dx-shadow);
    padding: 24px;
    position: sticky;
    top: 20px;
}
@media (max-width: 900px) {
    .host-sidebar {
        position: static;
        max-width: 100%;
    }
}
.host-sidebar-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--dx-border);
    color: var(--dx-text);
    display: flex;
    align-items: center;
    gap: 6px;
}
.host-sidebar-title svg { color: var(--dx-primary); }

.host-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    font-size: 13px;
    line-height: 1.5;
}
.host-summary-row + .host-summary-row { border-top: 1px dashed #f0f0f0; }
.host-summary-label { color: var(--dx-text-muted); }
.host-summary-value { color: var(--dx-text); font-weight: 500; text-align: right; }
.host-summary-divider {
    height: 1px;
    background: var(--dx-border);
    margin: 12px 0;
}

/* ===== 价格展示 ===== */
.host-price-box { text-align: center; padding: 16px 0 12px; }
.host-price-amount {
    font-size: 30px;
    font-weight: 700;
    color: var(--dx-danger);
    letter-spacing: -0.5px;
}
.host-price-amount .currency { font-size: 22px; }

/* ===== 协议勾选 ===== */
.host-agree {
    font-size: 12px;
    margin-bottom: 14px;
    line-height: 1.6;
    text-align: center;
    color: var(--dx-text-muted);
}
.host-agree input {
    margin-right: 4px;
    accent-color: var(--dx-primary);
    width: 14px;
    height: 14px;
    vertical-align: middle;
}
.host-agree label { vertical-align: middle; cursor: pointer; }
.host-agree a { color: var(--dx-primary); text-decoration: none; }
.host-agree a:hover { text-decoration: underline; }

/* ===== 按钮 ===== */
.host-actions { display: flex; gap: 10px; }
.host-btn-primary {
    flex: 1;
    background: var(--dx-primary);
    color: #fff;
    border: none;
    padding: 11px 0;
    border-radius: var(--dx-radius-sm);
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all var(--dx-transition);
    box-shadow: 0 2px 6px rgba(0,82,217,.25);
}
.host-btn-primary:hover {
    background: var(--dx-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,82,217,.35);
}
.host-btn-primary:active { transform: translateY(0); }
.host-btn-primary:disabled {
    opacity: .45;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}
.host-btn-primary.is-disabled { opacity: .45; cursor: not-allowed; }
.host-btn-primary.is-loading {
    opacity: .7;
    cursor: wait;
    pointer-events: none;
    transform: none !important;
    box-shadow: none !important;
}

.sb-login {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-top: 12px;
    font-size: 14px;
    color: var(--dx-primary);
    text-decoration: none;
}
.sb-more {
    display: block;
    text-align: center;
    margin-top: 12px;
    font-size: 13px;
    color: var(--dx-text-muted);
    text-decoration: none;
    transition: color var(--dx-transition);
}
.sb-more:hover { color: var(--dx-primary); }

@media (max-width: 900px) {
    .host-input { width: 100%; }
    .host-label { width: 80px; }
    .sb-container { padding: 16px 12px; }
}

/* ===== 占用确认弹窗（⭐ 2026-09-02 项目设计规范，对齐 cloudhost-west.css .cvm-modal） ===== */
.cvm-modal-overlay {
    position: fixed; inset: 0; z-index: 9999;
    background: rgba(0, 0, 0, 0.45);
    display: none; align-items: center; justify-content: center;
    animation: cvm-modal-fade-in 0.2s ease-out;
}
.cvm-modal-overlay.show { display: flex; }
@keyframes cvm-modal-fade-in { from { opacity: 0; } to { opacity: 1; } }

.cvm-modal {
    background: #fff;
    border-radius: 14px;
    max-width: 500px;
    width: 92%;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    animation: cvm-modal-zoom-in 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes cvm-modal-zoom-in { from { transform: scale(0.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.cvm-modal-head {
    padding: 20px 24px 16px;
    display: flex; align-items: center; justify-content: space-between;
    border-bottom: 1px solid #f0f1f5;
}
.cvm-modal-title {
    font-size: 17px; font-weight: 700; color: #1D2129;
    display: flex; align-items: center; gap: 8px;
}
.cvm-modal-title-icon {
    width: 22px; height: 22px; border-radius: 50%;
    background: linear-gradient(135deg, #FF7D00, #FFB84D);
    color: #fff; display: inline-flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 700;
}
.cvm-modal-close {
    width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
    border-radius: 50%; cursor: pointer; color: #86909C; font-size: 16px;
    background: transparent; border: none; transition: all 0.15s;
}
.cvm-modal-close:hover { background: #f5f5f5; color: #1D2129; }

.cvm-modal-body { padding: 20px 24px; }
.cvm-modal-account {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 16px; background: #F0F5FF; border-radius: 8px;
    margin-bottom: 16px; font-size: 14px; color: #1D2129;
}
.cvm-modal-account-label { color: #4E5969; font-size: 13px; }
.cvm-modal-account-value { font-weight: 700; color: #0052D9; font-size: 15px; }
.cvm-modal-msg {
    font-size: 14px; color: #4E5969; line-height: 1.7;
}
.cvm-modal-msg strong { color: #FF7D00; font-weight: 600; }

.cvm-modal-actions {
    display: flex; gap: 10px;
    padding: 14px 24px 20px;
    border-top: 1px solid #f0f1f5;
    justify-content: flex-end;
}
.cvm-modal-btn {
    padding: 10px 24px; font-size: 14px; font-weight: 600;
    border-radius: 8px; cursor: pointer; border: none;
    transition: all 0.15s; min-width: 88px;
}
.cvm-modal-btn-cancel { background: #f5f5f5; color: #4E5969; }
.cvm-modal-btn-cancel:hover { background: #e8e8e8; color: #1D2129; }
.cvm-modal-btn-confirm {
    background: linear-gradient(135deg, #0052D9, #4B8AFF); color: #fff;
    box-shadow: 0 2px 8px rgba(0, 82, 217, 0.25);
}
.cvm-modal-btn-confirm:hover { background: linear-gradient(135deg, #0045C0, #3D7AFF); }
