/**
 * ST Marquee Widget Styles
 * 
 * @package Songtastisch
 * @since 2.8.3
 */

.st-marquee {
    box-sizing: border-box;
    white-space: nowrap;
    overflow: hidden;
    margin: 0 auto;
    padding: 0;
    display: flex;
    align-items: center;
    position: relative;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    min-height: 1em;
}

.st-marquee a {
    text-decoration: none;
    color: inherit !important;
}

.st-marquee-item a {
    color: inherit !important;
}

/* Container Animation - Perfekte vertikale Zentrierung für alle Child-Elemente */
/* WICHTIG: animation-duration wird NICHT hier gesetzt, sondern von Elementor via Selectors */
/* Das ermöglicht responsive Geschwindigkeiten via Media Queries */
.st-marquee-container {
    display: inline-flex;
    align-items: center;
    gap: 0;
    margin: 0;
    padding: 0;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    -webkit-transform: translateZ(0); /* Hardware-Beschleunigung für iOS */
    transform: translateZ(0);
    line-height: 0;
    /* Anti-Flacker-Optimierungen für Touch-Devices */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Ohne Loop - von außen rein */
.st-marquee-container:not(.st-marquee-loop) {
    padding-left: 100%;
}

/* Mit Loop - nahtlose Wiederholung */
.st-marquee-container.st-marquee-loop {
    width: max-content;
    display: inline-flex;
}

/* Marquee Items - Kein vertikaler Abstand, kein margin (wird durch Separator gesteuert) */
.st-marquee-item {
    white-space: nowrap;
    display: inline-flex !important;
    align-items: center !important;
    flex-shrink: 0;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 0 !important;
}

/* Item Content mit line-height normal für Text */
.st-marquee-item .st-item-content {
    display: inline-flex;
    align-items: center;
    line-height: normal;
}

/* Item Icons - Immer mittig, egal welche Größe */
.st-marquee-item .st-item-icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    line-height: 0 !important;
}

.st-marquee-item .st-item-icon svg {
    display: block !important;
    width: 1em !important;
    height: 1em !important;
    margin: 0 !important;
    padding: 0 !important;
}

.st-marquee-item .st-item-icon i {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding: 0 !important;
    line-height: 0 !important;
}

/* Item Text - Auch mittig */
.st-marquee-item .st-item-text {
    display: inline-flex !important;
    align-items: center !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    line-height: normal !important;
}

/* Text Parts - Einzelne Text-Abschnitte mit eigenem Styling */
.st-marquee-item .st-text-part {
    display: inline !important;
    line-height: inherit !important;
}

.st-marquee-item .st-text-part a {
    color: inherit !important;
    text-decoration: none !important;
}

/* Icon Parts - Einzelne Icon-Abschnitte mit eigenem Styling */
.st-marquee-item .st-icon-part {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    line-height: 0 !important;
}

.st-marquee-item .st-icon-part svg {
    display: block !important;
    width: 1em !important;
    height: 1em !important;
    margin: 0 !important;
    padding: 0 !important;
}

.st-marquee-item .st-icon-part i {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding: 0 !important;
    line-height: 0 !important;
}

/* Separator - Vertikal mittig wie Items */
.st-marquee-separator {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding: 0 !important;
    line-height: 0 !important;
    vertical-align: middle !important;
}

/* SVG in Separator - Wie Item-Icon SVG */
.st-marquee-separator svg {
    display: block !important;
    width: 1em !important;
    height: 1em !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Icon in Separator - FontAwesome */
.st-marquee-separator i {
    display: inline-block !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1 !important;
}

/* Right to Left */
.st-marquee-container.st-marquee-marquee:not(.st-marquee-loop) {
    animation-name: st-marquee-rtl;
}

.st-marquee-container.st-marquee-marquee.st-marquee-loop {
    animation-name: st-marquee-rtl-loop;
}

/* Left to Right */
.st-marquee-container.st-marquee-marquee_flip:not(.st-marquee-loop) {
    animation-name: st-marquee-ltr;
}

.st-marquee-container.st-marquee-marquee_flip.st-marquee-loop {
    animation-name: st-marquee-ltr-loop;
}

/* Pause on Hover - wird von JavaScript gesteuert für smooth transitions */

/* Keyframes - Ohne Loop */
@keyframes st-marquee-rtl {
    0% { 
        transform: translateX(0); 
    }
    100% { 
        transform: translateX(-100%); 
    }
}

@keyframes st-marquee-ltr {
    0% { 
        transform: translateX(-100%); 
    }
    100% { 
        transform: translateX(0); 
    }
}

/* Keyframes - Mit Loop (dynamisch) 
   JavaScript dupliziert Items, Animation bewegt Container um die Hälfte seiner Breite
   Da Items dupliziert werden, erscheint es als endlose Schleife */
@keyframes st-marquee-rtl-loop {
    0% { 
        transform: translateX(0); 
    }
    100% { 
        transform: translateX(-50%); 
    }
}

@keyframes st-marquee-ltr-loop {
    0% { 
        transform: translateX(-50%); 
    }
    100% { 
        transform: translateX(0); 
    }
}

