/* =========================================================================
 * 技术服务 · 下载中心（批次四十五）
 *
 * 只在这个页面加载，选择器统一带 .dl- 前缀或 .dl-section 作用域，
 * 不碰站内通用类（.pagination-custom 的居中规则是这一页单独补的，
 * 因为 faq.css 只在常见问题页加载）。
 * ========================================================================= */

.dl-section {
    padding-top: 64px;
}

/* ---------- 左侧分类：滚动到下方自动吸附 ---------- */
.page:has(.dl-aside) {
    overflow: clip;
}

.dl-aside .blog-aside-item + .blog-aside-item {
    margin-top: 34px;
}

.dl-cats {
    list-style: none;
    margin: 0;
    padding: 0;
}

.dl-cats > li {
    margin: 0 0 2px;
}

.dl-cats a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 9px;
    color: #3f3c4d;
    font-size: 15px;
    line-height: 1.5;
    text-decoration: none;
    transition: background .18s ease, color .18s ease;
}

.dl-cats a:hover {
    background: #f5f3fc;
    color: #3d29a4;
}

.dl-cats a.active {
    background: #3d29a4;
    color: #fff;
}

.dl-cats a.active .dl-cat-c {
    background: rgba(255, 255, 255, .22);
    color: #fff;
}

.dl-cats .dl-cat-n {
    flex: 1 1 auto;
    min-width: 0;
    overflow-wrap: break-word;
}

.dl-cats .dl-cat-c {
    flex: 0 0 auto;
    min-width: 24px;
    height: 20px;
    padding: 0 7px;
    border-radius: 10px;
    background: #f1eff9;
    color: #6f6a84;
    font-size: 12px;
    font-style: normal;
    line-height: 20px;
    text-align: center;
}

/* 箭头垂直对齐
   .list-marked>li:before 的 top 是 .21em，那是按「li 无内边距」的普通文字列表算的。
   这里 a 有 9px 上内边距，文字整体被下推，而绝对定位的箭头仍贴 li 顶部，于是箭头比文字高约 6.5px。
   20.25px = 9px(a 的 padding-top) + 22.5px(行高) / 2，即文字行盒中线；
   .494em = 箭头字形墨迹中心到自身盒子顶部的距离（9.65 / 19.52），随字号缩放，
   移动端 aside 字号变小、箭头跟着缩小时仍然对得上。 */
.dl-cats > li:before {
    top: calc(20.25px - .494em);
}

.dl-cats a.zero {
    opacity: .55;
}

/* 空分类不显示说明文字，左栏才不会一屏全是灰字 */
.dl-cats a.zero + .dl-cat-d {
    display: none;
}

.dl-cat-d {
    display: block;
    padding: 2px 12px 8px;
    color: #9490a3;
    font-size: 12.5px;
    line-height: 1.6;
}

/* ---------- 右侧 ---------- */
.dl-head {
    margin-bottom: 22px;
}

.dl-h2 {
    position: relative;
    margin: 0 0 8px;
    padding: 0 0 12px 14px;
    border-bottom: 1px solid #ece9f3;
    color: #1c1c22;
    font-size: 22px;
    font-weight: 600;
    line-height: 1.45;
    text-align: left;
}

.dl-h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 6px;
    width: 3px;
    height: 18px;
    border-radius: 2px;
    background: #3d29a4;
}

.dl-h2 .dl-nick {
    margin-left: 8px;
    color: #8d88a0;
    font-size: 13px;
    font-weight: 400;
    letter-spacing: .3px;
}

.dl-h2 em {
    float: right;
    color: #8d88a0;
    font-size: 13px;
    font-style: normal;
    font-weight: 400;
}

.dl-sub {
    margin: 0 0 6px;
    color: #77728a;
    font-size: 14px;
}

.dl-count {
    margin: 0;
    color: #8d88a0;
    font-size: 13px;
}

.dl-count b {
    color: #3d29a4;
}

.dl-group {
    margin-bottom: 44px;
}

.dl-group:last-child {
    margin-bottom: 0;
}

.dl-group-h {
    margin-bottom: 16px;
}

/* ---------- 资料行 ---------- */
.dl-list {
    border: 1px solid #eeecf4;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}

.dl-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 18px;
    border-bottom: 1px solid #f2f0f7;
}

.dl-item:last-child {
    border-bottom: 0;
}

.dl-item:hover {
    background: #fbfaff;
}

.dl-item:target {
    background: #f6f3ff;
    box-shadow: inset 3px 0 0 #3d29a4;
}

.dl-ico {
    flex: 0 0 auto;
    width: 46px;
    height: 54px;
    border-radius: 8px;
    background: #f1eff9;
    color: #3d29a4;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 8px;
    position: relative;
}

/* 右上的折角，做出「文件」的感觉，不依赖图片 */
.dl-ico::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 0 8px 0 8px;
    box-shadow: -1px 1px 0 #e4e0f0;
}

.dl-ico span {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .4px;
}

.dl-body {
    flex: 1 1 auto;
    min-width: 0;
}

.dl-t {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.5;
    color: #1c1c22;
    text-align: left;
    overflow-wrap: break-word;
}

.dl-t2 {
    margin-left: 8px;
    color: #8d88a0;
    font-size: 12.5px;
    font-weight: 400;
}

.dl-desc {
    margin: 0 0 7px;
    color: #6f6a84;
    font-size: 13.5px;
    line-height: 1.65;
}

.dl-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.dl-meta-i {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 4px;
    background: #f6f5fa;
    color: #7b7790;
    font-size: 12px;
    line-height: 20px;
}

.dl-act {
    flex: 0 0 auto;
}

.dl-btn {
    display: inline-block;
    min-width: 84px;
    padding: 9px 18px;
    border: 1px solid #3d29a4;
    border-radius: 22px;
    background: #3d29a4;
    color: #fff;
    font-size: 14px;
    line-height: 1.2;
    text-align: center;
    cursor: pointer;
    transition: background .18s ease, color .18s ease;
    -webkit-appearance: none;
}

.dl-btn:hover,
.dl-btn:focus {
    background: #2f1f80;
    border-color: #2f1f80;
    color: #fff;
    text-decoration: none;
}

.dl-btn-gate {
    background: #fff;
    color: #3d29a4;
}

.dl-btn-gate:hover,
.dl-btn-gate:focus {
    background: #3d29a4;
    color: #fff;
}

.dl-more {
    margin: 12px 0 0;
    font-size: 14px;
}

.dl-empty {
    padding: 40px 20px;
    border: 1px dashed #ddd9ea;
    border-radius: 12px;
    color: #7b7790;
    font-size: 14.5px;
    text-align: center;
}

/* ---------- 分页（本页单独补，faq.css 不在本页加载） ---------- */
.dl-main .pagination-custom {
    display: block !important;
    margin: 30px 0 0 !important;
    text-align: center;
}

.dl-main .pagination-custom .page-item {
    display: inline-block;
    margin: 0 0 10px 10px !important;
}

.dl-main .pagination-custom .page-item:first-child {
    margin-left: 10px !important;
}

/* ---------- 留资弹窗 ---------- */
.dl-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
}

.dl-modal.is-open {
    display: block;
}

.dl-modal-mask {
    position: absolute;
    inset: 0;
    background: rgba(22, 20, 32, .55);
}

.dl-modal-box {
    position: relative;
    width: 92%;
    max-width: 460px;
    max-height: 88vh;
    overflow-y: auto;
    margin: 6vh auto 0;
    padding: 28px 28px 24px;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 18px 60px rgba(22, 20, 32, .3);
}

.dl-modal-x {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: #f4f3f8;
    color: #6f6a84;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.dl-modal-box h4 {
    margin: 0 0 6px;
    font-size: 20px;
    font-weight: 600;
    text-align: left;
}

.dl-modal-sub {
    margin: 0 0 18px;
    color: #7b7790;
    font-size: 13.5px;
    line-height: 1.6;
}

.dl-field {
    margin-bottom: 13px;
}

.dl-field label {
    display: block;
    margin-bottom: 5px;
    color: #4a4757;
    font-size: 13px;
    font-weight: 500;
    text-align: left;
}

.dl-field label i {
    color: #c0392b;
    font-style: normal;
}

.dl-field input {
    width: 100%;
    height: 42px;
    padding: 0 12px;
    border: 1px solid #dedaea;
    border-radius: 9px;
    background: #fff;
    color: #1c1c22;
    font-size: 14.5px;
    outline: none;
    transition: border-color .16s ease, box-shadow .16s ease;
}

.dl-field input:focus {
    border-color: #3d29a4;
    box-shadow: 0 0 0 3px rgba(61, 41, 164, .12);
}

.dl-tip {
    margin: 4px 0 14px;
    color: #9490a3;
    font-size: 12.5px;
    line-height: 1.6;
}

.dl-submit {
    width: 100%;
    height: 46px;
    border: 0;
    border-radius: 23px;
    background: #3d29a4;
    color: #fff;
    font-size: 15px;
    cursor: pointer;
}

.dl-submit[disabled] {
    opacity: .6;
    cursor: default;
}

.dl-msg {
    margin: 10px 0 0;
    min-height: 18px;
    color: #c0392b;
    font-size: 13px;
    text-align: center;
}

/* ---------- 响应式 ---------- */
@media (max-width: 991px) {
    .dl-section {
        padding-top: 48px;
    }

    .dl-aside {
        margin-bottom: 8px;
    }
}

@media (min-width: 992px) {
    .dl-aside {
        --dl-sticky-top: 88px;
        --dl-sticky-gap: 12px;
        position: sticky;
        top: var(--dl-sticky-top);
        align-self: flex-start;
        /* 主题给这一列加了 translateY(-60px)，不置空的话 sticky 会整体上移 60px
           （实测停在 28 而不是 88）；置空后位置会往下掉 60px，用负 margin 拉回原位。
           这两行和批次三十八在常见问题页的处理完全一致。 */
        transform: none;
        margin-top: -60px;
        max-height: calc(100vh - var(--dl-sticky-top) - var(--dl-sticky-gap));
        display: flex;
        flex-direction: column;
        z-index: 2;
    }

    .dl-aside > .blog-aside-item:first-child {
        display: flex;
        flex-direction: column;
        flex: 0 1 auto;
        min-height: 0;
    }

    .dl-aside .dl-cats {
        overflow-y: auto;
        min-height: 0;
        scrollbar-width: thin;
        scrollbar-color: #d8d4e6 transparent;
    }

    .dl-aside .dl-cats::-webkit-scrollbar {
        width: 5px;
    }

    .dl-aside .dl-cats::-webkit-scrollbar-thumb {
        background: #d8d4e6;
        border-radius: 3px;
    }

    .dl-aside > .blog-aside-item + .blog-aside-item {
        flex: 0 0 auto;
    }
}

@media (max-width: 767px) {
    .dl-section {
        padding-top: 40px;
    }

    .dl-item {
        flex-wrap: wrap;
        gap: 12px;
        padding: 15px 14px;
    }

    .dl-ico {
        width: 40px;
        height: 48px;
    }

    .dl-body {
        flex: 1 1 calc(100% - 52px);
    }

    .dl-act {
        flex: 1 1 100%;
    }

    .dl-btn {
        display: block;
        width: 100%;
    }

    .dl-h2 {
        font-size: 19px;
    }

    .dl-h2 em {
        float: none;
        display: inline-block;
        margin-left: 8px;
    }

    .dl-cat-d {
        display: none;
    }

    .dl-modal-box {
        margin-top: 4vh;
        padding: 24px 20px 20px;
    }
}
