/*
 * WJ Elements for YOOtheme Pro – Unfold
 * (C) 2026 Webjongens – GNU General Public License version 2 or later
 */

.fs-unfold {
    --wj-unfold-fade: 60px;
    --wj-unfold-duration: 400ms;
    position: relative;
}

.fs-unfold [data-unfold-content] {
    overflow: hidden;
    transition: height var(--wj-unfold-duration) ease;
}

.fs-unfold .fs-unfold-height-xsmall { height: 150px; }
.fs-unfold .fs-unfold-height-small { height: 250px; }
.fs-unfold .fs-unfold-height-medium { height: 400px; }
.fs-unfold .fs-unfold-height-large { height: 600px; }
.fs-unfold .fs-unfold-height-xlarge { height: 800px; }
.fs-unfold .fs-unfold-height-2xlarge { height: 1000px; }

/* Fade out the last lines while collapsed. */
.fs-unfold [class*="fs-unfold-height-"] {
    -webkit-mask-image: linear-gradient(#000 0%, #000 calc(100% - var(--wj-unfold-fade)), transparent 100%);
    mask-image: linear-gradient(#000 0%, #000 calc(100% - var(--wj-unfold-fade)), transparent 100%);
}

/* Content shorter than the collapsed height: show it all, no link. */
.fs-unfold.fs-unfold-fits [data-unfold-content] {
    height: auto;
    -webkit-mask-image: none;
    mask-image: none;
}

.fs-unfold.fs-unfold-fits .el-link-container,
.fs-unfold.fs-unfold-expanded .el-link-container {
    display: none;
}

@media (prefers-reduced-motion: reduce) {
    .fs-unfold [data-unfold-content] { transition: none; }
}
