.wp-block-scroll-text {
    width: 100%;
    height: 3em;
    line-height: 3em;
    margin: 0;
    padding: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    position: relative;
}

.scroll-text-container {
    white-space: nowrap;
    will-change: transform;
    display: inline-flex;
    align-items: center;
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
}

.scroll-text {
    padding: 0 1rem;
    display: inline-block;
}

.scroll-text-container.animate {
    animation: scroll var(--scroll-duration, 20s) linear infinite;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(var(--scroll-width, -100%));
    }
}

/* Stili editor */
.block-editor-block-list__layout .wp-block-scroll-text {
    background: rgba(0, 0, 0, 0.03);
    border: 1px dashed #ccc;
}

.block-editor-block-list__layout .scroll-text-container {
    animation: none;
    justify-content: center;
    width: 100%;
    position: static;
}

.block-editor-block-list__layout .scroll-text {
    text-align: center;
}

/* Reset heading styles */
.wp-block-scroll-text h1,
.wp-block-scroll-text h2,
.wp-block-scroll-text h3 {
    margin: 0;
    height: inherit;
    line-height: inherit;
}