/*
 * 智能图片布局 - 动态调整大小适配容器
 */

/* 容器设置 - 水平排列 */
.lists-imgs:not(.count-1) {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 4px !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
    transform: none !important;
    margin-bottom: 10px !important;
    --img-count: unset !important;
}

/* Span容器 - 自适应宽度 */
.lists-imgs:not(.count-1) > span {
    flex: 0 0 auto !important;
    height: auto !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    padding-bottom: 0 !important;
    position: static !important;
    border-radius: 8px !important;
    overflow: hidden !important;
}

/* 图片 - 基础样式，由JavaScript动态调整尺寸 */
.lists-imgs:not(.count-1) > span > img {
    position: static !important;
    width: auto !important;
    height: auto !important;
    max-height: 120px !important;
    object-fit: contain !important;
    object-position: center !important;
    border-radius: 8px !important;
    display: block !important;
}

/* 覆盖所有count变体的CSS变量 */
.lists-imgs.count-2,
.lists-imgs.count-3,
.lists-imgs.count-4,
.lists-imgs.count-5 {
    --img-count: unset !important;
}

/* 移动端 - 降低高度 */
@media (max-width: 768px) {
    .lists-imgs:not(.count-1) > span > img {
        height: 80px !important;
        max-height: 80px !important;
    }
}

/* 侧边栏 - 降低高度 */
.sidebar .lists-imgs:not(.count-1) > span > img,
.widget .lists-imgs:not(.count-1) > span > img {
    height: 80px !important;
    max-height: 80px !important;
}