/* ==========================================================================
   TextRotate - Pure Vanilla CSS Implementation with Zero-Jitter Spring Physics
   ========================================================================== */

.text-rotate-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    vertical-align: middle;
    position: relative;
    white-space: nowrap;
    box-sizing: border-box;
    transition: width 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.3s ease, color 0.3s ease;
    will-change: width;
}

/* Badge styling matching demo.tsx (#ff5941 background, white text, rounded corners) */
.text-rotate-badge {
    background: #ff5941;
    color: #ffffff;
    padding: 0 0.55em;
    border-radius: 0.35em;
    font-weight: 400;
    box-shadow: 0 10px 30px -5px rgba(255, 89, 65, 0.45);
    line-height: 1;
    height: 1.4em;
    min-height: 1.4em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    vertical-align: middle;
}

.text-rotate-word {
    display: inline-flex;
    flex-wrap: nowrap;
    white-space: pre;
    align-items: center;
    height: 100%;
}

.text-rotate-char {
    display: inline-block;
    transform: translateY(0);
    opacity: 1;
    will-change: transform, opacity;
    transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.35s ease;
}

/* Animation initial state (entering from bottom) */
.text-rotate-char.enter-start {
    transform: translateY(115%);
    opacity: 0;
}

/* Animation exit state (leaving to top) */
.text-rotate-char.exit-end {
    transform: translateY(-120%);
    opacity: 0;
}

/* Hide asterisk and preceding space on mobile viewports (< 640px) */
@media (max-width: 640px) {
    .mobile-hide {
        display: none !important;
    }
}
