// (C) 2026 GoodData Corporation

// the large star fills the box, the two small stars are a quarter of it, centred at 80 % / 20 %
.gd-ui-kit-ai-thinking-icon {
    position: relative;
    display: inline-block;
    flex: 0 0 auto;
    color: var(--gd-palette-primary-base);

    &__flip {
        display: block;
        width: 100%;
        height: 100%;
        transform-origin: center center;
        backface-visibility: visible;
        animation: gd-ui-kit-ai-thinking-icon-flip 4s linear infinite;

        @media (prefers-reduced-motion: reduce) {
            animation: none;
        }
    }

    &__star {
        display: block;
    }

    &__spark {
        position: absolute;
        width: 25%;
        height: 25%;
        transform: translate(-50%, -50%);
        transform-origin: center center;

        &--upper {
            top: 20%;
            left: 80%;
        }

        &--lower {
            top: 80%;
            left: 20%;
        }
    }
}

@keyframes gd-ui-kit-ai-thinking-icon-flip {
    0% {
        transform: rotateY(0deg);
        animation-timing-function: cubic-bezier(0.55, 0, 0.2, 1);
    }

    14% {
        transform: rotateY(180deg);
    }

    100% {
        transform: rotateY(180deg);
    }
}
