/*
 * [B2CHILD] 2026-07-03 热门文章/话题轮播样式
 * 配合 diy/modules/carousel/carousel.js 使用
 * 
 * 粘贴 HTML+PHP 到目标页面前，修改以下参数即可：
 *   首页：post_type=post, taxonomy=category, category__in=分类ID
 *   圈子：post_type=circle, taxonomy=circle_tags, cat=圈子ID
 */

/* ============== 铃铛图标摇晃动画 ============== */
.ld-ico {
    font-size: 17px;
    margin-right: 5px;
    color: #f39c12;
    display: inline-block;
    will-change: transform;
    animation: ringBell 4s cubic-bezier(0.25, 0.1, 0.25, 1) infinite;
}

@keyframes ringBell {
    0%   { transform: rotate(0deg); }
    10%  { transform: rotate(-15deg); }
    20%  { transform: rotate(15deg); }
    30%  { transform: rotate(-10deg); }
    40%  { transform: rotate(10deg); }
    50%  { transform: rotate(0deg); }
    100% { transform: rotate(0deg); }
}

/* ============== 轮播容器 ============== */
.qz-lunbo {
    width: 100%;
    height: 40px;
    position: relative;
    overflow: hidden;
    text-align: left;
    box-sizing: border-box;
    background-color: #e0edeb;
    box-shadow: inset -13px -48px 80px -35px rgb(17 58 93 / 5%);
    border-radius: var(--b2radius);
    margin-top: 8px;
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 5px 10px;
    gap: 8px;
    color: #009966;
    font-size: 15px;
}

/* 左侧标题区（不压缩） */
.qz-lunbo-left {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    font-weight: 600;
    white-space: nowrap;
}

/* 轮播内容容器（占满剩余空间） */
.slides-wrapper {
    flex: 1;
    min-width: 0;
    position: relative;
    height: 40px;
    overflow: hidden;
}

/* 轮播内容标题（单行省略截断） */
.qz-lunbo-content-title {
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 右侧按钮（不压缩） */
.qz-lunbo-right {
    padding: 3px 7px;
    background-color: #00996626;
    transition: var(--diyhover);
    border-radius: var(--b2radius);
    flex-shrink: 0;
    white-space: nowrap;
}

.qz-lunbo-right a {
    color: inherit;
    text-decoration: none;
}

.qz-lunbo-right:hover {
    color: #fff;
    background-color: #009966;
}

/* ============== 幻灯片项 ============== */
.slide {
    height: 40px;
    line-height: 40px;
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide.active {
    opacity: 1;
    pointer-events: auto;
}

.slide a {
    text-decoration: none;
    white-space: nowrap;
    display: block;
    color: #009966;
    text-align: center;
    font-weight: 600;
    box-sizing: border-box;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 4px;
    line-height: 40px;
    transition: color 0.2s ease;
}

.slide a:hover {
    color: #007a52;
}

/* ============== 移动端适配（只收窄间距，文字大小不变） ============== */
@media screen and (max-width: 768px) {
    .qz-lunbo {
        padding: 5px 8px;
        gap: 6px;
    }

    .slide a {
        padding: 0 2px;
    }

    .qz-lunbo-right {
        padding: 2px 5px;
    }
}

@media screen and (max-width: 480px) {
    .qz-lunbo {
        padding: 4px 6px;
        gap: 4px;
    }

    .qz-lunbo-right {
        padding: 2px 4px;
    }
}
