/* ============================================
   视频列表页样式 (videos_list.css)
   @scope 仅 videos.twig 使用
   ============================================ */

/* ---------- 顶部行（面包屑 + 搜索栏，sticky 固定） ---------- */
.videos-top-row {
    padding: 12px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 48px;
    background: #fff;
    z-index: 998;
}

/* ---------- 面包屑 ---------- */
.videos-breadcrumb {
    margin: 0;
    padding: 0;
    line-height: 36px;
    list-style: none;
}

.videos-breadcrumb li {
    display: inline-block;
}

.videos-breadcrumb .breadcrumb-muted {
    color: #999DA8;
}

.videos-breadcrumb .breadcrumb-sep {
    color: #999DA8;
    font-size: 12px;
    margin: 0 4px;
}

.videos-breadcrumb .breadcrumb-current {
    color: #141737;
}

/* @ai L2 搜索下拉列表（与 videos_detail.css 87-116 保持一致） */
.video-search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #E4E7ED;
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 240px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.video-search-dropdown-item {
    display: block;
    padding: 8px 12px;
    font-size: 14px;
    color: #141737;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s;
}

.video-search-dropdown-item:hover {
    background: #F5F7FA;
    text-decoration: none;
    color: #141737;
}

/* ---------- 搜索栏（输入框 + 清除按钮 + 搜索图标） ---------- */
.videos-search-bar form {
    width: 688px;
}

.videos-search-bar .input-group {
    width: 100%;
    position: relative;
}

.videos-search-bar .form-control {
    height: 36px;
    border: 1px solid #E4E7ED;
    border-radius: 4px;
    padding-right: 40px;
    font-size: 14px;
    background: transparent;
    margin: 0;
}

.videos-search-bar #input-search {
    border-top-right-radius: 4px !important;
    border-bottom-right-radius: 4px !important;
}

.videos-search-bar .form-control:focus {
    border-color: #009A9E;
    box-shadow: 0 0 0 2px rgba(0, 154, 158, 0.1);
}

.videos-search-bar .search-clear-btn {
    position: absolute;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #666C7C;
}

.videos-search-bar .search-clear-btn i {
    font-size: 20px;
}

.videos-search-bar .input-group-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.input-group-btn svg:not(:root) {
    width: 20px;
    height: 20px;
    color: #666C7C;
}

/* ---------- Tab 导航（sticky 固定在 top: 108px） ---------- */
.videos-tab-nav {
    margin-bottom: 24px;
    border-bottom: 1px solid #E8EBF0;
    position: sticky;
    top: 108px;
    background: #fff;
    z-index: 997;
}

.videos-tab-nav .nav-tabs {
    border-bottom: none;
}

.videos-tab-nav .nav-tabs>li {
    margin-right: 40px;
}

.videos-tab-nav .nav-tabs>li>a {
    border: none;
    border-bottom: 3px solid transparent;
    color: #141737;
    padding: 10px 16px;
    font-size: 16px;
    line-height: 24px;
    font-weight: 400;
    background: transparent;
}

.videos-tab-nav .nav-tabs>li>a:hover,
.videos-tab-nav .nav-tabs>li>a:focus {
    background: transparent;
    border-color: transparent;
}

.videos-tab-nav .nav-tabs>li.active>a,
.videos-tab-nav .nav-tabs>li.active>a:hover,
.videos-tab-nav .nav-tabs>li.active>a:focus {
    border: none;
    border-bottom: 2px solid #009A9E;
    color: #009A9E;
    background: transparent;
}

/* ---------- 视频区块（section 标题 + More 链接） ---------- */
.videos-section {
    margin-bottom: 54px;
}

.videos-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    /* border-bottom: 1px solid #eee; */
}

.videos-section-header h2 {
    margin: 0;
    font-size: 20px;
    line-height: 28px;
    font-weight: 600;
    color: #333;
}

.videos-section-header .more-link {
    color: #1e91cf;
    text-decoration: none;
    font-size: 14px;
}

.videos-section-header .more-link:hover {
    text-decoration: underline;
}

/* ---------- 视频列表网格（flex 布局，item 宽 324px，gap 18px） ---------- */
.videos-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
}

.videos-grid-item {
    width: 324px;
}

/* ---------- 视频卡片（缩略图 + 标题 + 日期） ---------- */
.video-card {
    margin-bottom: 0;
    cursor: pointer;
}

/* ---------- 视频卡片缩略图（封面图 + hover 视频预览） ---------- */
.video-card-thumb {
    position: relative;
    width: 100%;
    height: 182px;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #E8EBF0;
    transition: border-color 0.2s ease;
}

.video-card-thumb img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.video-card-thumb-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* ---------- hover 视频预览（视频淡入、封面淡出，控制条隐藏） ---------- */
.video-card-thumb .hover-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* 自适应宽/高：保持视频原比例，不裁剪变形；非 16:9 视频会留透明/渐变背景 */
    object-fit: contain;
    background: linear-gradient(180deg, transparent 0%, transparent 60%, rgba(0, 0, 0, 0.15) 100%);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease-in;
    z-index: 2;
    -webkit-appearance: none;
    appearance: none;
}

.video-card-thumb .hover-video::-webkit-media-controls-enclosure,
.video-card-thumb .hover-video::-webkit-media-controls,
.video-card-thumb .hover-video::-webkit-media-controls-overlay-play-button,
.video-card-thumb .hover-video::-webkit-media-controls-panel,
.video-card-thumb .hover-video::-webkit-media-controls-playback-time,
.video-card-thumb .hover-video::-webkit-media-controls-current-time-display,
.video-card-thumb .hover-video::-webkit-media-controls-time-remaining-display,
.video-card-thumb .hover-video::-webkit-media-controls-timeline,
.video-card-thumb .hover-video::-webkit-media-controls-mute-button,
.video-card-thumb .hover-video::-webkit-media-controls-volume-slider,
.video-card-thumb .hover-video::-webkit-media-controls-fullscreen-button,
.video-card-thumb .hover-video::-internal-media-controls-button,
.video-card-thumb .hover-video::-internal-media-controls-overlay-cast-button {
    display: none !important;
}

.video-card-thumb .hover-cover {
    transition: opacity 0.2s ease-in;
    z-index: 1;
}

.video-card-thumb.is-playing .hover-video {
    opacity: 1;
    visibility: visible;
}

.video-card-thumb.is-playing .hover-cover {
    opacity: 0;
    visibility: hidden;
}

.video-card-thumb.is-playing .video-duration {
    display: none;
}

/* ---------- hover 视频控制条（静音按钮 + 时长显示） ---------- */
.video-card-thumb .video-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    display: none;
    z-index: 20;
    color: #fff;
    font-size: 12px;
    background: linear-gradient(360deg, rgba(0, 0, 0, 0.45) 0%, rgba(0, 0, 0, 0) 100%);
    padding-left: 12px;
}

.video-card-thumb .video-controls.show {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
}

.video-card-thumb .mute-btn {
    border: none;
    padding: 5px 12px;
    background: transparent;
    cursor: pointer;
}

.video-card-thumb .video-time {
    padding: 5px 12px;
    border-radius: 4px;
}

.video-card-thumb .sound-icon {
    width: 16px;
    height: 16px;
    display: block;
}

.video-card-thumb .sound-icon.sound-on {
    display: none;
}

.video-card-thumb.is-unmuted .sound-icon.sound-off {
    display: none;
}

.video-card-thumb.is-unmuted .sound-icon.sound-on {
    display: block;
}

/* ---------- Tooltip（Element UI 风格，hover 显示） ---------- */
.video-card-thumb .tooltip-container {
    position: relative;
}

.video-card-thumb .tooltip-container .tooltip-text {
    visibility: hidden;
    background-color: #303133;
    color: #fff;
    text-align: center;
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 12px;
    white-space: nowrap;
    position: absolute;
    z-index: 1000;
    bottom: 100%;
    left: 50%;
    transform: translateX(-30%);
    margin-bottom: 8px;
    opacity: 0;
    transition: opacity 0.3s, visibility 0.3s;
}

.video-card-thumb .tooltip-container .tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 30%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: #303133 transparent transparent transparent;
}

.video-card-thumb .tooltip-container:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* ---------- 视频时长标签（右下角） ---------- */
.video-duration {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0, 0, 0, .2);
    color: #FFFFFF;
    padding: 0 8px;
    border-radius: 12px;
    font-size: 12px;
    line-height: 20px;
    z-index: 3;
}

/* ---------- 视频卡片信息区（标题 + 日期） ---------- */
.video-card-info {
    padding-top: 12px;
}

.video-card-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #141737;
    line-height: 24px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.2s ease;
}

/* ---------- hover 效果（边框 + 标题变色） ---------- */
.video-card:hover .video-card-thumb {
    border-color: #20B1B1;
}

.video-card:hover .video-card-title {
    color: #20B1B1;
}

.video-card-date {
    margin: 0;
    font-size: 14px;
    line-height: 22px;
    color: #999DA8;
}

/* ---------- 空状态（无搜索结果） ---------- */
.videos-empty {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.videos-empty p {
    font-size: 16px;
}

/* ---------- All Videos 模式下隐藏超出 8 条的视频 ---------- */
.all-videos-mode .video-overflow {
    display: none;
}