/* 云虚拟主机购买页 —— 本功能独立样式（配合框架 server-buy.css 使用，不修改全局文件）
 * 分组结构对齐托管购买页：地域 / 实例 / 套餐
 */
:root {
    --idc-label-w: 96px;
}

/* ---------- 分组容器（与 idc-buy.css 同一套布局规范） ---------- */
.idc-group {
    padding-bottom: 18px;
    margin-bottom: 18px;
    border-bottom: 1px solid #f0f2f5;
}
.idc-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}
.idc-group-title {
    font-size: 15px;
    font-weight: 600;
    color: #1d2129;
    margin: 0 0 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.idc-group-title::before {
    content: '';
    width: 4px;
    height: 15px;
    background-color: #006eff;
    border-radius: 2px;
}

/* ---------- 组内行：左标签列 + 右内容 ---------- */
.idc-row {
    display: grid;
    grid-template-columns: var(--idc-label-w) minmax(0, 1fr);
    gap: 14px;
    padding: 9px 0;
}
.idc-row-label {
    padding-top: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #1d2129;
    line-height: 1.4;
}
.idc-row-label small {
    display: block;
    font-size: 12px;
    font-weight: 400;
    color: #86909c;
    line-height: 1.4;
    margin-top: 2px;
}
.idc-row-main {
    min-width: 0;
}
.idc-row-note {
    margin: 8px 0 0;
    font-size: 12px;
    color: #86909c;
    line-height: 1.5;
}

/* 行内选项：紧凑高度，选中态浅蓝底 + 蓝字（修复副标题白字不可读） */
.idc-row .ecs-config-option {
    min-width: 104px;
    min-height: 38px;
    padding: 7px 14px;
    border-radius: 6px;
}
.idc-row .ecs-option-name {
    font-size: 14px;
    line-height: 1.4;
    white-space: nowrap;
}
.idc-row .ecs-option-sub {
    font-size: 12px;
    color: #86909c;
    line-height: 1.3;
}
.idc-row .ecs-config-option.active .ecs-option-sub {
    color: #0052d9;
}
.idc-row .ecs-config-option:hover {
    color: #006eff;
    background: rgba(0, 110, 255, 0.04);
}

/* ---------- 套餐卡片与详情 ---------- */
.ecs-package-detail {
    margin-top: 16px;
    padding: 16px;
    background: #fafbfc;
    border: 1px solid #e5e6eb;
    border-radius: 8px;
}
.ecs-package-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px 24px;
}
.ecs-package-detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.ecs-package-detail-item span {
    font-size: 12px;
    color: #86909c;
}
.ecs-package-detail-item b {
    font-size: 14px;
    color: #1d2129;
    font-weight: 600;
}
#hostPackageOptions {
    gap: 12px;
}
#hostPackageOptions .ecs-config-option {
    flex: 0 1 auto;
    min-width: 120px;
    max-width: none;
    padding: 9px 18px;
    gap: 3px;
    align-items: flex-start;
    text-align: left;
}
#hostPackageOptions .ecs-option-name {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
}
#hostPackageOptions .ecs-option-sub {
    font-size: 13px;
    color: #86909c;
}
#hostPackageOptions .ecs-config-option.active {
    background-color: rgba(0, 110, 255, 0.08);
    color: #006eff;
    box-shadow: none;
}
#hostPackageOptions .ecs-config-option.active::after {
    display: none;
}
#hostPackageOptions .ecs-config-option.active .ecs-option-sub {
    color: #0052d9;
}

/* ---------- 购买时长下拉：选项行与云服务器购买页一致（名称 + 右侧折扣角标） ---------- */
#hostDurationOptions .ecs-duration-dropdown {
    padding: 6px;
    gap: 2px;
}
#hostDurationOptions .ecs-duration-dropdown .ecs-config-option {
    min-height: 34px;
    padding: 0 10px;
    border-radius: 7px;
}
#hostDurationOptions .ecs-duration-dropdown .ecs-duration-info {
    grid-template-columns: minmax(0, 1fr) 52px;
    column-gap: 8px;
    min-height: 34px;
}
#hostDurationOptions .ecs-duration-dropdown .ecs-duration-tag-slot {
    min-width: 52px;
}
#hostDurationOptions .ecs-duration-dropdown .ecs-config-option.active .ecs-duration-name {
    color: #1664ff;
    font-weight: 600;
}

/* 桌面端底部汇总条：下拉贴右侧展开，避免溢出汇总卡片右边缘 */
@media (min-width: 993px) {
    #hostDurationOptions .ecs-duration-dropdown {
        left: auto;
        right: 0;
        width: 202px;
        min-width: 202px;
        max-width: 202px;
    }
}

/* ---------- 移动端 ---------- */
@media (max-width: 768px) {
    .idc-row {
        grid-template-columns: 1fr;
        gap: 6px;
        padding: 8px 0;
    }
    .idc-row-label {
        padding-top: 0;
    }
    .idc-row-label small {
        display: inline;
        margin-left: 6px;
        margin-top: 0;
    }
}
