/**
 * Stagger Text Widget Styles
 */

.stagger-text-widget {
    position: relative;
    overflow: hidden;
}

.stagger-text-title {
    margin: 0;
    padding: 0;
    line-height: 1.2;
    word-wrap: break-word;
}

/* Split text elements */
.stagger-char,
.stagger-word,
.stagger-line {
    display: inline-block;
    position: relative;
}

.stagger-char {
    transform-origin: center bottom;
}

.stagger-word {
    transform-origin: center bottom;
    margin-right: 0;
}

.stagger-line {
    transform-origin: center bottom;
}

/* Words now have natural spacing without extra margins */

/* Handle line breaks properly */
.stagger-line + .stagger-line {
    display: block;
}

/* Prevent text selection during animation */
.stagger-text-widget.animating {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .stagger-text-title {
        line-height: 1.1;
    }
    
    .stagger-word {
        margin-right: 0;
    }
}

/* Editor specific styles */
.elementor-editor-active .stagger-text-widget {
    overflow: visible;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .stagger-char,
    .stagger-word,
    .stagger-line {
        transform: none !important;
        opacity: 1 !important;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .stagger-text-title {
        color: inherit;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .stagger-text-title {
        text-shadow: none;
    }
}