/* ============================================
   在线视频频道（PC）- 标签筛选条与"更多"弹层
   仅服务于 tpl/index_channel_videos_pc.html
   ============================================ */

/* 标签条：默认只显示一排，溢出部分隐藏 */
.cv-tagbar {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 10px 0;
}

.cv-tagbar-row {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-height: 30px; /* 一排的高度 */
    overflow: hidden;
}

.cv-tag {
    display: inline-flex;
    align-items: center;
    height: 30px;
    padding: 0 14px;
    border-radius: 15px;
    font-size: 13px;
    line-height: 1;
    text-decoration: none;
    background: rgba(128, 128, 128, .12);
    color: inherit;
    white-space: nowrap;
    transition: background .15s ease, color .15s ease;
}

.cv-tag:hover {
    background: rgba(22, 119, 255, .15);
    color: #1677ff;
}

.cv-tag.active {
    background: #1677ff;
    color: #fff;
}

.cv-tag.active:hover {
    background: #0f66e0;
    color: #fff;
}

/* 更多按钮 */
.cv-tagbar-more {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 30px;
    padding: 0 12px;
    border: 1px solid rgba(128, 128, 128, .25);
    border-radius: 15px;
    background: transparent;
    color: inherit;
    font-size: 13px;
    cursor: pointer;
    transition: border-color .15s ease, color .15s ease;
}

.cv-tagbar-more:hover {
    border-color: #1677ff;
    color: #1677ff;
}

/* 全部标签弹层 */
.cv-tag-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
}

.cv-tag-modal[hidden] {
    display: none;
}

.cv-tag-modal-mask {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .45);
}

.cv-tag-modal-panel {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(620px, calc(100vw - 48px));
    max-height: 70vh;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 18px 50px rgba(16, 24, 40, .25);
    overflow: hidden;
}

.cv-tag-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(128, 128, 128, .15);
}

.cv-tag-modal-title {
    font-size: 15px;
    font-weight: 600;
}

.cv-tag-modal-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: #888;
    font-size: 15px;
    cursor: pointer;
}

.cv-tag-modal-close:hover {
    background: rgba(128, 128, 128, .12);
    color: #333;
}

.cv-tag-modal-body {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 18px;
    overflow-y: auto;
}

/* 深色模式适配 */
html[data-theme="dark"] .cv-tag {
    background: rgba(255, 255, 255, .08);
}

html[data-theme="dark"] .cv-tag.active {
    background: #1677ff;
    color: #fff;
}

html[data-theme="dark"] .cv-tag-modal-panel {
    background: #1e1e1e;
    color: #ddd;
}

html[data-theme="dark"] .cv-tag-modal-close:hover {
    background: rgba(255, 255, 255, .1);
    color: #eee;
}
