/**
 * Websly Text Reveal Block Styles (5.1/5.2)
 *
 * Scoped stylesheet loaded in both editor and frontend.
 */

.websly-text-reveal-container {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

/* Paragraph styling */
.ws-text-reveal-paragraph {
    display: block;
    margin-bottom: clamp(1.5rem, 3vw, 3rem);
    position: relative;
    opacity: 1;
}

.ws-text-reveal-paragraph:last-child {
    margin-bottom: 0;
}

/* line-wrapper acts as a mask hiding the sliding text */
.ws-text-reveal-line-wrapper {
    overflow: hidden;
    display: block;
    line-height: inherit;
    vertical-align: top;
    padding-bottom: 0.1em; /* Prevent descender clipping (g, j, p, q, y) */
    margin-bottom: -0.1em;
}

/* Actual line element that slides up */
.ws-text-reveal-line {
    display: inline-block;
    transform: translate3d(0, 100%, 0);
    will-change: transform;
}

/* Fallback for no-JS environments */
.no-js .ws-text-reveal-line,
body.no-js .ws-text-reveal-line {
    transform: none !important;
}

/* Fallback for users with reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .ws-text-reveal-line {
        transform: none !important;
    }
}
