/* 富文本展开收起组件样式 */
.rich-text-container {
    position: relative;
    line-height: 1.6;
}

.rich-text-content {
    transition: max-height 0.3s ease;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.rich-text-collapsed {
    max-height: 8em; /* 默认5行高度 */
    overflow: hidden;
}

.rich-text-expanded {
    max-height: none;
}

.toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px auto 5px auto;
    width: 132px;
}

.toggle-btn i {
    margin-left: 5px;
    transition: transform 0.3s;
}

.rich-text-expanded + .toggle-btn i {
    transform: rotate(180deg);
}

.fade-mask {
    position: absolute;
    bottom: 25px;
    left: 0;
    right: 0;
    height: 2em;
    background: linear-gradient(transparent, rgba(255,255,255,0.9));
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.3s;
}

.fade-mask.hidden {
    opacity: 0;
}

/* 暗色主题支持 */
.layui-bg-black .fade-mask {
    background: linear-gradient(transparent, rgba(0,0,0,0.9));
}

/* 响应式设计 */
@media (max-width: 768px) {
    .rich-text-collapsed {
        max-height: 6.4em; /* 移动端4行高度 */
    }
    
    .toggle-btn {
        font-size: 12px;
    }
}