﻿/* ==========================================================================
   Topic Mobile CSS - 移动端主题样式表
   ==========================================================================
   
   目录：
   1. 基础设置 - 字体、隐藏PC端元素
   2. 面包屑导航 - 移动端面包屑样式
   3. 主题内容 - 标题、章节、内容区域样式
   4. 轮播图 - 图片轮播移动端样式
   5. WPP功能 - 点赞、浏览量样式
   6. 视频播放器 - 移动端视频控制样式
   7. 标签页 - Tab 切换组件移动端样式
   ========================================================================== */

@media only screen and (max-width: 768px) {
    /* ==========================================================================
       1. 基础设置
      ========================================================================== */
    .body {
        font-size: 14px;
        line-height: 24px;
    }
    
    .wt_pc_only{
        display: none;
    }
    
    ul {
        padding-inline-start: 20px;
    }
    
    /* ==========================================================================
       2. 面包屑导航 (Breadcrumb)
      ========================================================================== */
    .wt_breadcrumb {
        display: block;
        padding: 8px 32px 8px 16px;
        background-color: var(--background-color-breadcrumb);
        width: 100%;
    }
    
    .wt_breadcrumb ol {
        padding: 0px;
        margin:0;
        border-radius: 0;
        font-size: 12px;
        line-height: 8px;  /* 必须小于字号，才不影响 li 的 line-height */
        list-style: none;
        background:none;
    }
    
    .wt_breadcrumb li{
        display:inline-block;
        overflow: auto;
        font-size: 12px;
        line-height: 18px;
    }
    
    .wt_breadcrumb_ellipsis{
        position: absolute;
        float: right;
        top: 8px;
        right: 16px;
        width: 16px;
        height: 16px;
    }
    
    /* ==========================================================================
       3. 主题内容区域
      ========================================================================== */
    .content_box {
        padding: 0px;
        overflow-x: hidden;
    }
    
    .middle_view{
        padding: 0 0 2px 0;
        width: 100%;
    }
    
    .container {
        padding: 0px 16px;
    }
    
    .wt_topic_content .title.topictitle1 {
        width: 100%;
    }
    
    /* 底部导航 */
    .body_footer {
        font-size: 13px;
        line-height: 20px;
        height: 36px;
        width: unset;
        padding: 16px 0px 0px 0px;
        margin: 16px;
    }
    
    /* 提示框 */
    .note{
        padding: 12px;
    }
    
    .note.danger,
    .note.caution,
    .note.warning{
        padding: 12px;
    }
    
    /* 标题样式 - 移动端适配 */
    h1.title{
        font-size: 26px;
        line-height: 34px;
        width: 100%;
    }
    
    h2.title{
        color: #000000;
        font-size: 16px;
        font-weight: bold;
        line-height: 25px; /* 定义行框的高度 */
        border-bottom: 0.5px solid silver;
        margin-bottom: 9px;
        padding-bottom: 15px;
        margin:13px 0;
    }
    
    h3.title{
        color: #333333;
        font-size: 14px;
        font-weight: bold;
        line-height: 20px; /* 定义行框的高度 */
        border-bottom: none;
        margin-bottom: 1px;
    }
    
    /* 2025-08-20 新增 h4 */
    h4.title{
        color: #333333;
        font-size: 12px;
        font-weight: bold;
        line-height: 18px;
        margin-bottom: 1px;
    }
    
    h4.title.sectiontitle{
        color: #333333;
        font-size: 12px;
        font-weight: bold;
        line-height: 18px;
        margin-bottom: 1px;
    }
    
    /* ==========================================================================
       4. 轮播图样式 (Carousel)
      ========================================================================== */
    .carousel-inner > .item > img {
        max-height: 100% !important;
        display:block !important;
    }
    
    .carousel-inner > .item:not(.active) > img {
        display: none;
    }
    
    /* 轮播图文字内容 */
    .wt_fig_carousel_text_content{
        margin-bottom: 10px;
        margin-top: 10px;
        min-height: 100px;
    }
    
    .wt_fig_carousel_title {
        font-size: 14px;
        font-weight: bold;
        line-height: 24px;
        color: var(--font-color-topic-title);
    }
    
    .wt_fig_carousel_para{
        font-size: 13px;
        line-height: 24px;
        color: var(--font-color-topic-content);
        height: auto;
    }
    
    /* ==========================================================================
       5. WPP 功能样式
      ========================================================================== */
    /* .body_wpp{
        display: flex;
        align-items: center;
        justify-content: center;
        height: 26px;
        width: unset;
        padding: 0px 0px 0px 0px;
        margin: 16px;
        text-align: center;
    }
    
    .wt_body_mobile_like{
        display: inline-block;
        width: 30%;
        padding-left: 8px; 
        padding-right: 8px;
    }
    
    .wt_body_mobile_like:before{
        content: "";
        display: inline-block;
        width: 20px;
        height: 20px;
        background-image: url("../images_m/未点赞@2x.png");
        background-size: 20px 20px;
        position: relative;
        top: 4px;
        margin-right: 4px;
    }
    
    .wt_body_mobile_view{
        display: inline-block;
        width: 30%;
        padding-left: 8px; 
        padding-right: 8px;
    }
    
    .wt_body_mobile_view:before {
        content: "";
        display: inline-block;
        width: 20px;
        height: 20px;
        background-image: url("../images_m/查看@2x.png");
        background-size: 20px 20px;
        position: relative;
        top: 4px;
        margin-right: 4px;
    } */
    
/* ==========================================================================
   6. 视频播放器样式 (Video Player)
  ========================================================================== */

    @media screen and (max-width: 768px) and (hover: none) and (pointer: coarse) {

        /* ---------- 章节相关 ---------- */
        .wt_chapters_container,
        .wt_video_chapters_btn_container,
        .wt_chapter_marker,
        .wt_chapter_tooltip,

        /* ---------- 播放浮层 ---------- */
        .wt_video_play_overlay,
        .wt_video_play_icon,

        /* ---------- 整体控制栏 ---------- */
        .wt_video_controls,
        .wt_video_controls_row,
        .wt_video_controls_left,
        .wt_video_controls_right,

        /* ---------- 进度条 ---------- */
        .wt_video_progress,
        .wt_video_progress_buffer,
        .wt_video_progress_played,
        .wt_video_progress_handle,

        /* ---------- 通用按钮/时间 ---------- */
        .wt_video_btn,
        .wt_video_play_pause,
        .wt_video_time,

        /* ---------- 音量 ---------- */
        .wt_video_volume_container,
        .wt_video_volume_btn,
        .wt_video_volume_slider,

        /* ---------- 倍速 ---------- */
        .wt_video_speed_container,
        .wt_video_speed,
        .wt_video_speed_text,
        .wt_video_speed_dropdown,
        .wt_video_speed_option,

        /* ---------- 其他功能按钮 ---------- */
        .wt_video_download,
        .wt_video_pip,
        .wt_video_fullscreen {
            display: none !important;
        }

        /* 容器本身保留，但取消自定义交互光标 */
        .wt_video_container {
            cursor: default;
        }

        /* 视频本体保持显示 */
        .wt_video_container video {
            display: block !important;
            width: 100%;
            height: auto;
        }

        /* 关闭 hover 显示逻辑，防止部分设备残留 */
        .wt_video_container:hover .wt_video_play_overlay,
        .wt_video_container:hover .wt_video_controls,
        .wt_video_container:hover .wt_video_progress,
        .wt_video_container:hover .wt_video_progress_handle {
            opacity: 0 !important;
            visibility: hidden !important;
        }

        /* 播放中状态也不显示自定义浮层 */
        .wt_video_container.playing .wt_video_play_overlay,
        .wt_video_container.playing .wt_video_controls {
            display: none !important;
            opacity: 0 !important;
            visibility: hidden !important;
        }
    }
/* 桌面端窗口缩小时：保留控件，但做紧凑化 */
@media screen and (max-width: 768px) and (pointer: fine) {
    .wt_video_controls {
        padding: 6px 8px;
        gap: 6px;
    }

    .wt_video_controls_left,
    .wt_video_controls_right {
        gap: 6px;
    }

    .wt_video_volume_slider {
        width: 48px;
    }

    .wt_video_speed_text {
        font-size: 12px;
    }

    .wt_video_download,
    .wt_video_pip,
    .wt_video_fullscreen {
        transform: scale(0.9);
        transform-origin: center;
    }

    .wt_chapter_tooltip {
        font-size: 12px;
        max-width: 140px;
    }

    .wt_video_speed_container {
        flex-shrink: 0;
    }

    .wt_video_speed {
        min-width: 34px;
        padding: 2px 6px;
    }

    .wt_video_speed_text {
        font-size: 11px;
    }

    .wt_video_speed_dropdown {
        right: -4px;
        min-width: 76px;
        max-height: min(160px, var(--wt-speed-dropdown-max-height, 160px));
        padding: 6px 0;
        border-radius: 10px;
        margin-bottom: 8px;
        overflow-y: auto;
        overflow-x: hidden;
        transform: translateY(8px) scale(0.96);
    }

    .wt_video_speed_dropdown::before {
        right: 12px;
        width: 12px;
        height: 12px;
        bottom: -6px;
    }

    .wt_video_speed_option {
        padding: 8px 14px;
        font-size: 12px;
        margin: 1px auto;
        letter-spacing: 0.2px;
    }

    .wt_video_speed_option:hover {
        transform: scale(1.02);
        box-shadow: 0 1px 8px rgba(0, 0, 0, 0.18);
    }

    .wt_video_speed_option.active {
        border-left-width: 2px;
    }
}

/* 更窄桌面窗口：倍速弹窗继续压缩 */
@media screen and (max-width: 560px) and (pointer: fine) {
    .wt_video_speed {
        min-width: 30px;
        padding: 2px 4px;
    }

    .wt_video_speed_text {
        font-size: 10px;
    }

    .wt_video_speed_dropdown {
        right: -6px;
        min-width: 68px;
        max-height: min(160px, var(--wt-speed-dropdown-max-height, 160px));
        padding: 4px 0;
    }

    .wt_video_speed_option {
        padding: 7px 10px;
        font-size: 11px;
    }

    .wt_video_speed_option:hover {
        transform: none;
    }
}
/* ==========================================================================
   7. 标签页样式 (Tab) 
  ========================================================================== */

/* Tab 包装容器 */
.wt-tabbed-wrapper {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
    padding: 12px;
    margin: 12px 0;
}

/* Tab 导航栏 - 滚动式设计 */
.tab-header-container {
    display: flex;
    position: relative;
    padding: 0 10px;
    border-bottom: none;
    margin-bottom: 12px;
    padding: 0;
    list-style: none;
    gap: 0;
    position: relative;
    z-index: 1;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
}

.tab-header-container::-webkit-scrollbar {
    display: none;
}

.tab-header-container .tab-btn {
    background: transparent;
    border: none;
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    outline: none;
    white-space: nowrap;
    flex: 0 0 auto;
    z-index: 1;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tab-header-container .tab-btn:hover {
    color: #6366f1;
}

.tab-header-container .tab-btn.active {
    color: #6366f1;
    font-weight: 600;
    background-color: #fff;
    border-radius: 10px 10px 0 0;
}

/* 选中的 Tab 形状设计 - 反向圆角融合效果 */
.tab-header-container .tab-btn.active::before,
.tab-header-container .tab-btn.active::after {
    content: "";
    position: absolute;
    bottom: 0;
    width: 16px;
    height: 16px;
    background-color: transparent;
    pointer-events: none;
}

.tab-header-container .tab-btn.active::before {
    left: -16px;
    border-bottom-right-radius: 10px;
    box-shadow: 8px 0 0 0 #fff;
}

.tab-header-container .tab-btn.active::after {
    right: -16px;
    border-bottom-left-radius: 10px;
    box-shadow: -8px 0 0 0 #fff;
}

/* 弹性短线指示器 */
.tab-indicator {
    position: absolute;
    bottom: 6px;
    height: 3px;
    width: 16px;
    background-color: #6366f1;
    border-radius: 2px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
    pointer-events: none;
}

/* 流体滑块 */
.tab-slider {
    position: absolute;
    height: calc(100% - 4px);
    top: 2px;
    background: linear-gradient(135deg, rgb(225, 238, 255) 0%, rgb(210, 230, 255) 100%);
    border-radius: 50px;
    z-index: 0;
    pointer-events: none;
    transition: 
        left 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
        width 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
        transform 0.25s ease-out,
        filter 0.25s ease-out,
        border-radius 0.25s ease-out;
    box-shadow: 
        0 2px 6px rgba(0, 102, 204, 0.12),
        inset 0 0 0 1px rgba(0, 102, 204, 0.08);
    transform-origin: center center;
    opacity: 0;
}

/* 滑块拉伸状态 - 水滴拉断效果 */
.tab-slider.stretching {
    transform: scaleX(1.15);
    filter: blur(0.5px) brightness(1.05);
    border-radius: 40% 60% 40% 60% / 50% 60% 40% 50%;
}

/* 滑块恢复状态 - 水滴融合效果 */
.tab-slider.restoring {
    transform: scaleX(1);
    filter: blur(0) brightness(1);
    border-radius: 50px;
    transition: 
        left 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
        width 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
        transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
        filter 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
        border-radius 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Tab 内容区域 */
.tab-content-container {
    position: relative;
}

.tab-content-container > .tab-pane {
    display: none;
    animation: tabFadeInMobile 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.tab-content-container > .tab-pane.active {
    display: block;
}

@keyframes tabFadeInMobile {
    0% {
        opacity: 0;
        transform: translateY(15px) scale(0.96) perspective(500px) rotateX(3deg);
        filter: blur(4px);
    }
    50% {
        opacity: 0.7;
        transform: translateY(-3px) scale(1.01) perspective(500px) rotateX(-1deg);
        filter: blur(1px);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1) perspective(500px) rotateX(0);
        filter: blur(0);
    }
}

/* 内容元素交错动画 - 适用于所有直接子元素 */
.tab-pane.active > * {
    animation: childFadeInMobile 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    opacity: 0;
}

.tab-pane.active > *:nth-child(1) { animation-delay: 0.04s; }
.tab-pane.active > *:nth-child(2) { animation-delay: 0.08s; }
.tab-pane.active > *:nth-child(3) { animation-delay: 0.12s; }
.tab-pane.active > *:nth-child(4) { animation-delay: 0.16s; }
.tab-pane.active > *:nth-child(5) { animation-delay: 0.2s; }
.tab-pane.active > *:nth-child(6) { animation-delay: 0.24s; }
.tab-pane.active > *:nth-child(7) { animation-delay: 0.28s; }
.tab-pane.active > *:nth-child(8) { animation-delay: 0.32s; }
.tab-pane.active > *:nth-child(9) { animation-delay: 0.36s; }
.tab-pane.active > *:nth-child(10) { animation-delay: 0.4s; }
.tab-pane.active > *:nth-child(11) { animation-delay: 0.44s; }
.tab-pane.active > *:nth-child(12) { animation-delay: 0.48s; }
.tab-pane.active > *:nth-child(13) { animation-delay: 0.52s; }
.tab-pane.active > *:nth-child(14) { animation-delay: 0.56s; }
.tab-pane.active > *:nth-child(15) { animation-delay: 0.6s; }
.tab-pane.active > *:nth-child(16) { animation-delay: 0.64s; }
.tab-pane.active > *:nth-child(17) { animation-delay: 0.68s; }
.tab-pane.active > *:nth-child(18) { animation-delay: 0.72s; }
.tab-pane.active > *:nth-child(19) { animation-delay: 0.76s; }
.tab-pane.active > *:nth-child(20) { animation-delay: 0.8s; }

@keyframes childFadeInMobile {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 列表内部 li 保持从左到右动画 - 移动端 */
.tab-pane.active .li {
    animation: listItemFadeInMobile 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    opacity: 0;
}

.tab-pane.active .li:nth-child(1) { animation-delay: 0.04s; }
.tab-pane.active .li:nth-child(2) { animation-delay: 0.08s; }
.tab-pane.active .li:nth-child(3) { animation-delay: 0.12s; }
.tab-pane.active .li:nth-child(4) { animation-delay: 0.16s; }
.tab-pane.active .li:nth-child(5) { animation-delay: 0.2s; }
.tab-pane.active .li:nth-child(6) { animation-delay: 0.24s; }
.tab-pane.active .li:nth-child(7) { animation-delay: 0.28s; }
.tab-pane.active .li:nth-child(8) { animation-delay: 0.32s; }
.tab-pane.active .li:nth-child(9) { animation-delay: 0.36s; }
.tab-pane.active .li:nth-child(10) { animation-delay: 0.4s; }
.tab-pane.active .li:nth-child(11) { animation-delay: 0.44s; }
.tab-pane.active .li:nth-child(12) { animation-delay: 0.48s; }
.tab-pane.active .li:nth-child(13) { animation-delay: 0.52s; }
.tab-pane.active .li:nth-child(14) { animation-delay: 0.56s; }
.tab-pane.active .li:nth-child(15) { animation-delay: 0.6s; }
.tab-pane.active .li:nth-child(16) { animation-delay: 0.64s; }
.tab-pane.active .li:nth-child(17) { animation-delay: 0.68s; }
.tab-pane.active .li:nth-child(18) { animation-delay: 0.72s; }
.tab-pane.active .li:nth-child(19) { animation-delay: 0.76s; }
.tab-pane.active .li:nth-child(20) { animation-delay: 0.8s; }

@keyframes listItemFadeInMobile {
    from {
        opacity: 0;
        transform: translateX(-6px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 内容列表样式 */
.tab-pane .ol {
    margin: 0;
    padding-left: 20px;
    color: #333;
    line-height: 1.7;
}

.tab-pane .li {
    margin-bottom: 8px;
    list-style-type: decimal;
    font-size: 13px;
}

.tab-pane .p {
    margin: 0;
    line-height: 1.6;
    font-size: 13px;
}

/* dl.tabbed 样式 */
.wt-tabbed-wrapper dl {
    margin: 0;
}

.wt-tabbed-wrapper dt.dlterm {
    font-weight: 600;
    color: #333;
    font-size: 13px;
    padding: 8px 0;
    margin: 0;
}

.wt-tabbed-wrapper dd {
    margin: 0;
    padding: 8px 0 16px 0;
    font-size: 13px;
    line-height: 1.7;
}

}