/* Read more — i2t3 component styles
 * Collapses rich text to a set height with a fade, expands on click.
 * Height via the --i2t3-readmore-height custom property (set per element).
 */

.i2t3-readmore__content {
    position: relative;
    overflow: hidden;
    max-height: var(--i2t3-readmore-height, 8rem);
    transition: max-height .35s ease;
}

.i2t3-readmore__content > :last-child {
    margin-bottom: 0;
}

/* Fade-out overlay while collapsed */
.i2t3-readmore__content::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 4rem;
    background: linear-gradient(rgba(255, 255, 255, 0), var(--i2t3-readmore-fade, #fff));
    pointer-events: none;
    transition: opacity .2s ease;
}

.i2t3-readmore.is-open .i2t3-readmore__content::after {
    opacity: 0;
}

/* Content shorter than the collapsed height: no fade, no button */
.i2t3-readmore--short .i2t3-readmore__content::after {
    display: none;
}

.i2t3-readmore__toggle {
    padding-left: 0;
    padding-right: 0;
}
