/*
 * V2 移动端页脚（所有引用 footer_v2 的页面）
 * Figma：2209:87；复用 PC 页脚 HTML，隐藏合并列 big-img，6 个栏目改为手风琴
 * 尺寸单位见 mobile/css/base.css：与头部相同用 var(--mu-ui)，页边距沿用正文 --m-gutter
 */
@media (max-width: 47.99rem), (max-width: 79.99rem) and (hover: none) and (pointer: coarse) {
    html .sep-footer.sep-footer-v2 {
        position: relative;
        z-index: 10;
        background: #131415 !important;
        color: #fff;
    }
    html .sep-footer-v2 *,
    html .sep-footer-v2 *::before,
    html .sep-footer-v2 *::after {
        box-sizing: border-box;
    }
    html .sep-footer-v2 .sep-container {
        width: auto !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 var(--m-gutter) !important;
    }
    html .sep-footer-v2 .footer-lists-boxs {
        padding: calc(37 * var(--mu-ui)) 0 0 !important;
        background: transparent !important;
    }
    html .sep-footer-v2 .footer-lists-boxs .sep-container {
        display: block !important;
    }
    html .sep-footer-v2 .footer-lists-boxs .footer-logo-rights {
        display: block !important;
        position: static !important;
        width: auto !important;
    }

    /* ---------- 栏目手风琴 ---------- */
    html .sep-footer-v2 .footer-logo-rights .ul-boxs {
        display: block !important;
        float: none !important;
        width: auto !important;
        margin: 0 !important;
        padding: 0 !important;
        border-bottom: 1px solid #353a43;
    }
    html .sep-footer-v2 .footer-logo-rights .ul-boxs.big-img {
        display: none !important;
    }
    html .sep-footer-v2 .footer-logo-rights .ul-boxs.is-m-open {
        padding-bottom: calc(20 * var(--mu-ui)) !important;
    }
    html .sep-footer-v2 .footer-logo-rights .ul-boxs .ul-titles {
        position: relative;
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        margin: 0 !important;
        padding: calc(21 * var(--mu-ui)) 0 calc(20 * var(--mu-ui)) !important;
        font-family: 'Gotham-Bold', sans-serif !important;
        /* 验收：页脚导航字相对设计稿 16 累计 +4 → 20 */
        font-size: max(var(--m-fs-ui), calc(20 * var(--mu-ui))) !important;
        line-height: calc(24 / 20) !important;
        letter-spacing: 0 !important;
        text-transform: uppercase;
        text-decoration: none !important;
        color: #fff !important;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }
    /* 箭头：同一图形，收起向右、展开向下；点击交给整行标题 */
    html .sep-footer-v2 .footer-logo-rights .ul-boxs .ul-titles i {
        position: static !important;
        display: block !important;
        flex-shrink: 0;
        width: calc(12 * var(--mu-ui)) !important;
        height: calc(7 * var(--mu-ui)) !important;
        margin: 0 calc(2 * var(--mu-ui)) 0 0 !important;
        background: url(/uploads/image/v2/home-m/m-arrow-white.svg) center / contain no-repeat !important;
        transform: rotate(90deg) !important;
        transition: transform 0.3s ease;
        pointer-events: none;
    }
    html .sep-footer-v2 .footer-logo-rights .ul-boxs .ul-titles i::before,
    html .sep-footer-v2 .footer-logo-rights .ul-boxs .ul-titles i::after {
        display: none !important;
    }
    html .sep-footer-v2 .footer-logo-rights .ul-boxs.is-m-open .ul-titles i {
        transform: rotate(180deg) !important;
    }

    html .sep-footer-v2 .footer-logo-rights .ul-boxs .ul {
        display: none !important;
        float: none !important;
        width: auto !important;
        height: auto !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    html .sep-footer-v2 .footer-logo-rights .ul-boxs.is-m-open .ul {
        display: block !important;
    }
    html .sep-footer-v2 .footer-logo-rights .ul-boxs.is-m-open .ul + .ul {
        margin-top: calc(23 * var(--mu-ui)) !important;
    }
    html .sep-footer-v2 .footer-logo-rights .ul-boxs .ul li {
        display: block;
        float: none !important;
        width: auto !important;
        margin: 0 !important;
        padding: 0 !important;
        line-height: calc(24 / 20) !important;
    }
    html .sep-footer-v2 .footer-logo-rights .ul-boxs .ul li.v2-m-only {
        display: block !important;
    }
    html .sep-footer-v2 .footer-logo-rights .ul-boxs .ul li + li {
        margin-top: calc(10 * var(--mu-ui)) !important;
    }
    html .sep-footer-v2 .footer-logo-rights .ul-boxs .ul li a,
    html .sep-footer-v2 .footer-logo-rights .ul-boxs .ul li .titles-a {
        display: block;
        margin: 0 !important;
        padding: 0 !important;
        font-size: max(var(--m-fs-ui), calc(20 * var(--mu-ui))) !important;
        line-height: calc(24 / 20) !important;
        white-space: normal !important;
        text-decoration: none !important;
    }
    /* 三级链接 */
    html .sep-footer-v2 .footer-logo-rights .ul-boxs .ul li a {
        font-family: 'Gotham-Book', sans-serif !important;
        color: #5e656f !important;
    }
    /* 二级分组标题；只有一级子项的栏目（Partners / Resources / Company）同样用二级样式 */
    html .sep-footer-v2 .footer-logo-rights .ul-boxs .ul li .titles-a,
    html .sep-footer-v2 .footer-logo-rights .ul-boxs.small-img .ul li a {
        font-family: 'Gotham-Medium', sans-serif !important;
        color: #aeb6c0 !important;
    }
    html .sep-footer-v2 .footer-logo-rights .ul-boxs .ul li a:active {
        color: #009cff !important;
    }

    /* ---------- 按钮组 ---------- */
    html .sep-footer-v2 .v2-footer-actions {
        display: flex !important;
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: calc(20 * var(--mu-ui));
        width: auto !important;
        margin: 0 !important;
        padding: calc(30 * var(--mu-ui)) 0 !important;
        border-bottom: 1px solid #353a43;
    }
    html .sep-footer-v2 .v2-footer-actions a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        height: max(var(--m-btn-min-h), calc(36 * var(--mu-ui)));
        padding: 0 calc(20 * var(--mu-ui)) !important;
        border-radius: calc(18 * var(--mu-ui)) !important;
        background: linear-gradient(105deg, #0c88d7 0%, #64d79b 100%) !important;
        box-shadow: calc(2 * var(--mu-ui)) calc(1 * var(--mu-ui)) calc(5 * var(--mu-ui)) rgba(0, 74, 131, 0.3) !important;
        font-family: 'Gotham-Bold', sans-serif !important;
        font-size: max(var(--m-fs-ui), calc(18 * var(--mu-ui))) !important;
        line-height: calc(22 / 18) !important;
        color: #fff !important;
        text-decoration: none !important;
        white-space: nowrap;
    }
    html .sep-footer-v2 .v2-footer-actions a:active {
        background: linear-gradient(139deg, #034ea6 0%, #3bc877 100%) !important;
    }

    /* ---------- Logo / 社交 / Family Site ---------- */
    html .sep-footer-v2 .footer-logo-rights .link-boxs {
        position: static !important;
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: calc(20 * var(--mu-ui)) calc(12 * var(--mu-ui));
        width: auto !important;
        height: auto !important;
        margin: 0 !important;
        padding: calc(40 * var(--mu-ui)) 0 !important;
    }
    html .sep-footer-v2 .link-boxs > a.v2-footer-logo {
        position: relative;
        flex: 0 0 auto;
        display: block !important;
        width: calc(147 * var(--mu-ui)) !important;
        height: calc(40 * var(--mu-ui)) !important;
        opacity: 1;
    }
    html .sep-footer-v2 .link-boxs > a.v2-footer-logo .v2-footer-logo-normal,
    html .sep-footer-v2 .link-boxs > a.v2-footer-logo .v2-footer-logo-hover {
        position: absolute;
        left: 0;
        top: 0;
        display: block;
        width: 100%;
        height: 100%;
        transform: none;
        pointer-events: none;
    }
    html .sep-footer-v2 .link-boxs > a.v2-footer-logo .v2-footer-logo-normal {
        filter: brightness(0) invert(1);
        opacity: 1;
    }
    html .sep-footer-v2 .link-boxs > a.v2-footer-logo .v2-footer-logo-hover {
        opacity: 0;
    }
    html .sep-footer-v2 .link-boxs > a.v2-footer-logo img {
        display: block;
        width: 100% !important;
        max-width: none;
        height: 100% !important;
    }
    /* 社交图标 + Family Site：设计稿占 366 宽；与 Logo 同排放不下（屏宽约 565 以下）时换到下一行并占满 */
    html .sep-footer-v2 .link-boxs .link {
        flex: 0 1 calc(366 * var(--mu-ui));
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        min-width: 0;
        margin: 0 !important;
        float: none !important;
    }
    html .sep-footer-v2 .v2-social-icons {
        display: flex;
        align-items: center;
        gap: calc(8 * var(--mu-ui));
    }
    html .sep-footer-v2 .v2-social-link {
        position: relative;
        display: block !important;
        width: calc(32 * var(--mu-ui));
        height: calc(32 * var(--mu-ui));
    }
    html .sep-footer-v2 .v2-social-link img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: contain;
    }
    html .sep-footer-v2 .v2-social-link .v2-icon-hover {
        display: none;
    }
    html .sep-footer-v2 .sep-share {
        display: none !important;
    }

    html .sep-footer-v2 .v2-family-site {
        position: relative;
        flex: 0 0 auto;
        /* 设计稿框宽 150 = 字号 16 × 150 / 16，字号触底时框宽同比放大 */
        width: max(calc(150 * var(--mu-ui)), calc(var(--m-fs-ui) * 150 / 16));
        height: max(var(--m-btn-min-h), calc(36 * var(--mu-ui)));
    }
    /* 菜单向上展开，避免被底栏遮挡 */
    html .sep-footer-v2 .v2-family-site-box {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 100;
        display: flex;
        flex-direction: column-reverse;
        border: 1px solid #5e656f;
        border-radius: calc(4 * var(--mu-ui));
        background: #131415;
    }
    html .sep-footer-v2 .v2-family-site.open .v2-family-site-box {
        background: #212830;
    }
    html .sep-footer-v2 .v2-family-site-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        /* 外框上下各 1px 边框 */
        height: max(calc(var(--m-btn-min-h) - 2px), calc(36 * var(--mu-ui) - 2px));
        padding: 0 calc(16 * var(--mu-ui)) 0 calc(20 * var(--mu-ui));
        font-family: 'Gotham-Medium', sans-serif;
        font-size: max(var(--m-fs-ui), calc(16 * var(--mu-ui)));
        line-height: calc(19 / 16);
        color: #fff;
        white-space: nowrap;
        cursor: pointer;
    }
    html .sep-footer-v2 .v2-family-site-header i {
        font-size: max(var(--m-fs-ui), calc(16 * var(--mu-ui)));
        color: #fff;
    }
    html .sep-footer-v2 .v2-family-site-menu {
        display: none;
        margin: 0 calc(16 * var(--mu-ui));
        padding: calc(10 * var(--mu-ui)) 0;
        border-bottom: 1px solid #4a4e58;
    }
    html .sep-footer-v2 .v2-family-site.open .v2-family-site-menu {
        display: block;
    }
    html .sep-footer-v2 .v2-family-site-menu a {
        display: block;
        margin: 0 !important;
        padding: calc(6 * var(--mu-ui)) 0;
        font-family: 'Gotham-Book', sans-serif;
        font-size: max(var(--m-fs-ui), calc(16 * var(--mu-ui))) !important;
        line-height: calc(19 / 16) !important;
        color: #aeb6c0 !important;
        text-decoration: none !important;
    }

    /* 旧版移动端底部快捷联系栏，V2 设计稿无此结构；旧站同时给 .sep-footer 留了 50px 下外边距，一并去掉 */
    html #onlineService.sep-onlineservice {
        display: none !important;
    }
    html .sep-footer.sep-footer-v2 {
        margin-bottom: 0 !important;
    }

    /* ---------- 底栏 ---------- */
    html .sep-footer-v2 .footer-footer {
        padding: calc(30 * var(--mu-ui)) 0 calc(40 * var(--mu-ui)) !important;
        border-top: 0;
        background: #1b1c1e !important;
    }
    html .sep-footer-v2 .footer-footer .sep-container {
        display: block !important;
    }
    html .sep-footer-v2 .footer-footer .lefts,
    html .sep-footer-v2 .footer-footer .rights {
        float: none !important;
        width: auto !important;
        margin: 0 !important;
        text-align: left !important;
    }
    html .sep-footer-v2 .footer-footer .lefts,
    html .sep-footer-v2 .footer-footer .lefts > a {
        font-family: 'Gotham-Medium', sans-serif !important;
        font-size: max(var(--m-fs-ui), calc(18 * var(--mu-ui))) !important;
        line-height: calc(22 / 18) !important;
        color: #7b838e !important;
    }
    html .sep-footer-v2 .footer-footer .lefts > a {
        margin: 0 !important;
    }
    html .sep-footer-v2 .footer-footer .lefts > div {
        margin: calc(2 * var(--mu-ui)) 0 0 !important;
        font-family: 'Gotham-Book', sans-serif !important;
        font-size: max(var(--m-fs-small), calc(14 * var(--mu-ui))) !important;
        line-height: calc(17 / 14) !important;
        color: #7b838e !important;
    }
    /* flex：行高只取链接自身 19，不受 PC 父级行框撑高 */
    html .sep-footer-v2 .footer-footer .rights {
        display: flex !important;
        margin-top: calc(28 * var(--mu-ui)) !important;
    }
    html .sep-footer-v2 .footer-footer .rights a {
        padding: 0 !important;
        border: 0 !important;
        font-family: 'Gotham-Medium', sans-serif !important;
        font-size: max(var(--m-fs-ui), calc(16 * var(--mu-ui))) !important;
        line-height: calc(19 / 16) !important;
        color: #aeb6c0 !important;
    }
    /* 首页 llm.txt 链接：设计稿未画，移动端暂时隐藏；恢复时删除 display 并保留下方规格 */
    html .sep-footer-v2 .footer-footer .sep-container + .sep-container {
        display: none !important;
        margin-top: calc(12 * var(--mu-ui)) !important;
    }
    html .sep-footer-v2 .footer-footer .sep-container + .sep-container a {
        font-size: max(var(--m-fs-small), calc(14 * var(--mu-ui))) !important;
        line-height: calc(17 / 14) !important;
    }
}
