/* 隧道购买页仅保留新增控件的位置和模式联动；卡片、边框、字体复用 purchase.css。 */
.v2-tunnel-purchase .v2-purchase-label--daily { top: 328px; }
.v2-tunnel-purchase .v2-purchase-validity { gap: 27px; }
.v2-tunnel-purchase .v2-purchase-validity .v2-purchase-radio:nth-child(2),
.v2-tunnel-purchase .v2-purchase-validity .v2-purchase-radio:nth-child(3) { margin-left: 0; }
.v2-tunnel-purchase .v2-purchase-segmented--daily { top: 322px; left: 144px; width: 545px; }
.v2-tunnel-purchase .v2-purchase-segmented--daily button,
.v2-tunnel-purchase .v2-purchase-segmented--bandwidth button,
.v2-tunnel-purchase .v2-purchase-segmented--flow button,
.v2-tunnel-purchase .v2-purchase-segmented--duration button { width: auto; min-width: 0; flex: 1 1 0; padding: 0 8px; }
.v2-tunnel-purchase .v2-purchase-segmented--bandwidth,
.v2-tunnel-purchase .v2-purchase-segmented--flow { top: 396px; left: 144px; width: 545px; }
/* 默认规格行共用紧凑布局。 */
.v2-tunnel-purchase .v2-purchase-config { height: 569px; }
.v2-tunnel-purchase .v2-purchase-label--duration { top: 403px; }
.v2-tunnel-purchase .v2-purchase-segmented--duration { top: 396px; left: 144px; width: 545px; }
.v2-tunnel-purchase .v2-purchase-expiry { top: 445px; }
.v2-tunnel-purchase .v2-purchase-label--payment { top: 495px; }
.v2-tunnel-purchase .v2-purchase-payments { top: 489px; }
.v2-tunnel-purchase .v2-purchase-summary__specs { height: auto; gap: 7px; }
.v2-tunnel-purchase .v2-purchase-segmented--flow[hidden],
.v2-tunnel-purchase [data-section="duration"][hidden],
.v2-tunnel-purchase .is-traffic-summary[hidden],
.v2-tunnel-purchase .is-duration-summary[hidden] { display: none; }
.v2-tunnel-purchase .v2-purchase-summary__specs > div[hidden] { display: none; }
.v2-tunnel-purchase .v2-purchase-segmented--flow { display: none; }
/* 按流量仅支持每次请求换 IP，隐藏其余周期且避免唯一选项横向撑满。 */
.v2-tunnel-purchase.is-traffic .v2-tunnel-purchase-cycle .v2-purchase-radio:not(:first-child) { display: none; }
.v2-tunnel-purchase.is-traffic .v2-tunnel-purchase-cycle .v2-purchase-radio:first-child { flex: 0 0 auto; }
.v2-tunnel-purchase.is-traffic .v2-purchase-label--daily,
.v2-tunnel-purchase.is-traffic .v2-purchase-label--bandwidth,
.v2-tunnel-purchase.is-traffic .v2-purchase-segmented--daily,
.v2-tunnel-purchase.is-traffic .v2-purchase-segmented--bandwidth { display: none; }
.v2-tunnel-purchase.is-traffic .v2-purchase-segmented--flow { top: 322px; display: flex; }
.v2-tunnel-purchase.is-traffic .v2-tunnel-purchase-hint { display: none; }
.v2-tunnel-purchase.is-traffic .v2-purchase-config { height: 482px; }
.v2-tunnel-purchase.is-traffic .v2-purchase-label--payment { top: 408px; }
.v2-tunnel-purchase.is-traffic .v2-purchase-payments { top: 402px; }

@media (max-width: 767px) {
    html:has(.v2-tunnel-purchase),
    body.site-v2:has(.v2-tunnel-purchase) {
        min-width: 0;
    }
    body.site-v2:has(.v2-tunnel-purchase) .v2-header {
        width: 100%;
        min-width: 0;
    }
    body.site-v2:has(.v2-tunnel-purchase) .v2-header__inner {
        width: auto;
        margin: 0 16px;
    }
    body.site-v2:has(.v2-tunnel-purchase) .v2-nav,
    body.site-v2:has(.v2-tunnel-purchase) .v2-cloud-user,
    body.site-v2:has(.v2-tunnel-purchase) .float-bar-nav-v2 {
        display: none;
    }
    body.site-v2:has(.v2-tunnel-purchase) .v2-header__actions {
        min-width: 0;
    }
    body.site-v2:has(.v2-tunnel-purchase) .v2-header__actions .v2-button {
        width: 92px;
        min-width: 92px;
    }
    .v2-tunnel-purchase {
        height: auto;
        min-height: 100vh;
        padding: 148px 16px 56px;
        overflow: visible;
    }
    .v2-tunnel-purchase .v2-purchase__inner {
        width: 100%;
        height: auto;
    }
    .v2-tunnel-purchase .v2-purchase__heading,
    .v2-tunnel-purchase .v2-purchase-config,
    .v2-tunnel-purchase .v2-purchase-summary {
        position: relative;
        top: auto;
        left: auto;
        width: 100%;
    }
    .v2-tunnel-purchase .v2-purchase__heading {
        margin-bottom: 28px;
    }
    .v2-tunnel-purchase .v2-purchase__heading h1 {
        font-size: 24px;
        font-weight: var(--font-weight-medium);
        line-height: 34px;
    }
    .v2-tunnel-purchase .v2-purchase__heading p {
        margin-top: 10px;
        font-size: 14px;
        line-height: 22px;
    }
    .v2-tunnel-purchase .v2-purchase-config,
    .v2-tunnel-purchase.is-traffic .v2-purchase-config {
        display: flex;
        flex-direction: column;
        height: auto;
        padding: 20px;
        gap: 12px;
    }
    .v2-tunnel-purchase [data-section="duration"]:not([hidden]) {
        display: contents;
    }
    .v2-tunnel-purchase .v2-purchase-label,
    .v2-tunnel-purchase .v2-purchase-products,
    .v2-tunnel-purchase .v2-purchase-billing,
    .v2-tunnel-purchase .v2-purchase-validity,
    .v2-tunnel-purchase .v2-purchase-segmented,
    .v2-tunnel-purchase .v2-purchase-payments,
    .v2-tunnel-purchase .v2-purchase-expiry,
    .v2-tunnel-purchase .v2-purchase-validity__note {
        position: static;
        width: 100%;
        margin: 0;
    }
    .v2-tunnel-purchase .v2-purchase-label:not(.v2-purchase-label--product) {
        margin-top: 10px;
    }
    .v2-tunnel-purchase .v2-purchase-products,
    .v2-tunnel-purchase .v2-purchase-billing,
    .v2-tunnel-purchase .v2-purchase-payments {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }
    .v2-tunnel-purchase .v2-purchase-product,
    .v2-tunnel-purchase .v2-purchase-billing__item,
    .v2-tunnel-purchase .v2-purchase-payment {
        width: 100%;
        min-width: 0;
    }
    .v2-tunnel-purchase .v2-purchase-product {
        height: 64px;
        padding: 14px 12px;
    }
    .v2-tunnel-purchase .v2-purchase-product span {
        font-size: 15px;
    }
    .v2-tunnel-purchase .v2-purchase-billing__item {
        height: 70px;
        padding: 10px;
    }
    .v2-tunnel-purchase .v2-purchase-validity {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px 8px;
    }
    .v2-tunnel-purchase .v2-purchase-validity .v2-purchase-radio {
        margin-left: 0;
    }
    .v2-tunnel-purchase .v2-purchase-segmented {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        height: auto;
    }
    .v2-tunnel-purchase .v2-purchase-segmented button {
        width: 100%;
        padding: 0 4px;
        border-bottom: 1px solid var(--color-border);
    }
    .v2-tunnel-purchase .v2-purchase-summary {
        margin-top: 16px;
        padding: 22px 20px;
    }
    .v2-tunnel-purchase .v2-purchase-summary__note {
        white-space: normal;
    }
}

/* 周期版与每次请求版共用规格行，分钟选项展开时后续行整体下移。 */
.v2-tunnel-purchase [hidden] { display: none !important; }
.v2-tunnel-purchase .v2-purchase-label--bandwidth { top: 328px; }
.v2-tunnel-bandwidth { position: absolute; top: 322px; left: 144px; width: 545px; height: 40px; display: flex; align-items: center; gap: 12px; }
.v2-tunnel-bandwidth input[type="range"] { flex: 1; min-width: 0; accent-color: var(--color-brand); }
.v2-tunnel-bandwidth input[type="number"] { width: 74px; height: 38px; border: 1px solid var(--color-border); border-radius: 4px; padding: 0 8px; }
.v2-tunnel-purchase .v2-tunnel-period { top: 305px; left: 144px; width: 400px; }
.v2-tunnel-period button { flex: 1; }
.v2-tunnel-purchase.is-minutes .v2-purchase-config { height: 629px; }
.v2-tunnel-purchase.is-minutes .v2-purchase-label--bandwidth { top: 388px; }
.v2-tunnel-purchase.is-minutes .v2-tunnel-bandwidth { top: 382px; }
.v2-tunnel-purchase.is-minutes .v2-tunnel-purchase-hint { transform: translateY(60px); }
.v2-tunnel-purchase.is-minutes .v2-purchase-label--duration { top: 463px; }
.v2-tunnel-purchase.is-minutes .v2-purchase-segmented--duration { top: 456px; }
.v2-tunnel-purchase.is-minutes .v2-purchase-expiry { top: 505px; }
.v2-tunnel-purchase.is-minutes .v2-purchase-label--payment { top: 555px; }
.v2-tunnel-purchase.is-minutes .v2-purchase-payments { top: 549px; }
@media (max-width: 767px) {
    .v2-tunnel-purchase .v2-tunnel-bandwidth,
    .v2-tunnel-purchase .v2-tunnel-period { position: static; width: 100%; }
    .v2-tunnel-purchase.is-minutes .v2-purchase-config { height: auto; }
    .v2-tunnel-purchase.is-minutes .v2-tunnel-purchase-hint { transform: none; }
}

.v2-tunnel-purchase .v2-tunnel-purchase-segmented--reqrate { width: 450px; }
.v2-tunnel-reqrate-toggle { position: absolute; top: 322px; left: 604px; height: 37px; padding: 0 10px; border: 0; background: transparent; color: var(--color-brand); cursor: pointer; }
.v2-tunnel-reqrate-custom { position: absolute; top: 322px; left: 144px; width: 450px; height: 37px; display: flex; align-items: center; gap: 12px; }
.v2-tunnel-reqrate-custom input { width: 150px; height: 37px; padding: 0 12px; border: 1px solid var(--color-border); border-radius: 6px; }
.v2-tunnel-bandwidth input[type="range"] { appearance: none; -webkit-appearance: none; height: 6px; border: 0; border-radius: 6px; background: linear-gradient(to right, #72c94c var(--range-progress, 0%), #e8ebef var(--range-progress, 0%)); cursor: pointer; }
.v2-tunnel-bandwidth input[type="range"]::-webkit-slider-runnable-track { height: 6px; background: transparent; border-radius: 6px; }
.v2-tunnel-bandwidth input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; margin-top: -6px; border-radius: 50%; background: #72c94c; border: 3px solid #fff; box-shadow: 0 0 0 1px #72c94c; }
.v2-tunnel-bandwidth input[type="range"]::-moz-range-track { height: 6px; background: transparent; }
.v2-tunnel-bandwidth input[type="range"]::-moz-range-thumb { width: 12px; height: 12px; border: 3px solid #fff; border-radius: 50%; background: #72c94c; box-shadow: 0 0 0 1px #72c94c; }
.v2-tunnel-bandwidth input:focus-visible, .v2-tunnel-reqrate-custom input:focus-visible { outline: 2px solid #72c94c; outline-offset: 3px; }
@media (max-width: 767px) {
    .v2-tunnel-purchase .v2-tunnel-purchase-segmented--reqrate { width: 100%; }
    .v2-tunnel-reqrate-toggle, .v2-tunnel-reqrate-custom { position: static; width: auto; align-self: flex-start; }
}

/* 与动态代理自定义一致：保留预设，向下展开滑块和数字输入。 */
.v2-tunnel-purchase .v2-purchase-manual-trigger { top: 322px; left: 604px; width: 85px; height: 37px; justify-content: center; border: 1px solid var(--color-border); border-radius: 6px; padding: 0 8px; color: #626b78; }
.v2-tunnel-purchase .v2-tunnel-reqrate-custom { top: 373px; left: 144px; width: 545px; height: auto; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 24px; padding: 16px 0 0; border: 0; border-top: 1px solid #edf0f3; background: transparent; border-radius: 0; }
.v2-tunnel-reqrate-custom .v2-purchase-manual-slider { width: auto; min-width: 0; }
.v2-tunnel-reqrate-custom .v2-purchase-manual-input input { width: 90px; height: 40px; }
.v2-tunnel-reqrate-custom .v2-purchase-manual-error { position: static; grid-column: 1 / -1; text-align: right; }
.v2-tunnel-purchase.has-custom-reqrate .v2-purchase-config { height: 679px; }
.v2-tunnel-purchase.has-custom-reqrate .v2-purchase-label--duration { top: 513px; }
.v2-tunnel-purchase.has-custom-reqrate .v2-purchase-segmented--duration { top: 506px; }
.v2-tunnel-purchase.has-custom-reqrate .v2-purchase-expiry { top: 555px; }
.v2-tunnel-purchase.has-custom-reqrate .v2-purchase-label--payment { top: 605px; }
.v2-tunnel-purchase.has-custom-reqrate .v2-purchase-payments { top: 599px; }
@media (max-width: 767px) {
    .v2-tunnel-purchase .v2-tunnel-reqrate-custom { position: static; width: 100%; grid-template-columns: 1fr; }
    .v2-tunnel-purchase .v2-purchase-manual-trigger { position: static; }
    .v2-tunnel-purchase.has-custom-reqrate .v2-purchase-config { height: auto; }
}

@media (min-width: 768px) {
    .v2-tunnel-purchase .v2-purchase__inner {
        display: grid;
        grid-template-columns: minmax(0, 793px) minmax(0, 387px);
        align-items: stretch;
        gap: 20px;
        height: auto;
        padding: 276px 0 100px;
    }
    .v2-tunnel-purchase .v2-purchase-config,
    .v2-tunnel-purchase .v2-purchase-summary {
        position: relative;
        top: auto;
        left: auto;
        width: 100%;
    }
    .v2-tunnel-purchase button.v2-purchase-summary__pay { margin-top: auto; }
}
