/**
 * Text Flip Widget Styles
 */

.wml-text-flip {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.wml-tf-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 16px;
    text-align: center;
}

.wml-tf-text {
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.wml-tf-static {
    color: #000000;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.wml-tf-animated {
    position: relative;
    display: inline-block;
    background-color: #ffffff;
    color: #000000;
    padding: 8px 16px;
    border-radius: 6px;
    border: 1px solid transparent;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    min-width: 200px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .wml-tf-static {
        color: #ffffff;
        text-shadow: 0 2px 4px rgba(255, 255, 255, 0.1);
    }

    .wml-tf-animated {
        background-color: #171717;
        color: #ffffff;
        border-color: rgba(255, 255, 255, 0.1);
        box-shadow: 0 1px 2px rgba(255, 255, 255, 0.1);
    }
}

.wml-tf-word {
    display: inline-block;
    white-space: nowrap;
}

/* Animation classes */
.wml-tf-word.wml-entering {
    animation: wml-enter 0.5s ease-out forwards;
}

.wml-tf-word.wml-exiting {
    animation: wml-exit 0.5s ease-out forwards;
}

@keyframes wml-enter {
    0% {
        transform: translateY(-40px);
        filter: blur(10px);
        opacity: 0;
    }

    100% {
        transform: translateY(0);
        filter: blur(0px);
        opacity: 1;
    }
}

@keyframes wml-exit {
    0% {
        transform: translateY(0);
        filter: blur(0px);
        opacity: 1;
    }

    100% {
        transform: translateY(50px);
        filter: blur(10px);
        opacity: 0;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .wml-tf-container {
        gap: 12px;
    }

    .wml-tf-animated {
        min-width: 150px;
        padding: 6px 12px;
    }
}