/**
 * Shared Manyflights paper-plane + cloud decorative art.
 * Canonical source for homepage closing CTA, Plans final CTA, and Premium promo popup.
 * Markup: templates/main/partials/_plans_plane_cloud_art.html.twig
 *
 * First-paint: plane/sparkle initial transforms match animation 0% keyframes
 * so nothing flashes before CSS animations start (no JS required).
 */

.mf-plans-art {
    position: relative;
    width: 72px;
    height: 64px;
    margin: 0 auto 14px;
}

/* Scale the whole unit for compact contexts (e.g. promo popup). */
.mf-plans-art--compact {
    transform: scale(0.78);
    transform-origin: center top;
    margin-bottom: 6px;
}

.mf-plans-art__plane {
    display: block;
    margin: 0 auto;
    /* Match keyframe 0% — avoids first-paint flash at rotate(0). */
    transform: translate(0, 0) rotate(-6deg);
    animation: mfPlaneCloudArtPlane 2.8s ease-in-out infinite;
}

.mf-plans-art__cloud {
    position: absolute;
    left: 50%;
    bottom: 1px;
    width: 42px;
    height: 18px;
    transform: translateX(-52%);
    pointer-events: none;
}

.mf-plans-art__cloud-bump,
.mf-plans-art__cloud-base {
    position: absolute;
    background: #d7e6ff;
    border: 0;
    box-shadow: none;
}

.mf-plans-art__cloud-bump {
    border-radius: 50%;
}

.mf-plans-art__cloud-bump--a {
    left: 11px;
    bottom: 3px;
    width: 17px;
    height: 15px;
}

.mf-plans-art__cloud-bump--b {
    left: 0;
    bottom: 2px;
    width: 12px;
    height: 10px;
}

.mf-plans-art__cloud-bump--c {
    left: 22px;
    bottom: 4px;
    width: 14px;
    height: 13px;
}

.mf-plans-art__cloud-bump--d {
    left: 7px;
    bottom: 5px;
    width: 10px;
    height: 9px;
}

.mf-plans-art__cloud-bump--e {
    right: 0;
    bottom: 1px;
    width: 11px;
    height: 9px;
}

.mf-plans-art__cloud-base {
    left: 2px;
    bottom: 0;
    width: 36px;
    height: 8px;
    border-radius: 10px 12px 9px 11px / 8px 7px 8px 9px;
}

.mf-plans-art__sparkle {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #005fff;
    /* Match keyframe 0%. */
    opacity: 0.35;
    transform: scale(0.85);
    animation: mfPlaneCloudArtSparkle 1.8s ease-in-out infinite;
}

.mf-plans-art__sparkle--1 {
    top: 4px;
    right: 8px;
}

.mf-plans-art__sparkle--2 {
    top: 22px;
    left: 2px;
    width: 4px;
    height: 4px;
    animation-delay: 0.4s;
}

.mf-plans-art__sparkle--3 {
    bottom: 10px;
    right: 0;
    width: 5px;
    height: 5px;
    background: #005fff;
    animation-delay: 0.9s;
}

@keyframes mfPlaneCloudArtPlane {
    0%,
    100% {
        transform: translate(0, 0) rotate(-6deg);
    }
    50% {
        transform: translate(3px, -3px) rotate(-2deg);
    }
}

@keyframes mfPlaneCloudArtSparkle {
    0%,
    100% {
        opacity: 0.35;
        transform: scale(0.85);
    }
    50% {
        opacity: 0.85;
        transform: scale(1.1);
    }
}

@media (prefers-reduced-motion: reduce) {
    .mf-plans-art__plane,
    .mf-plans-art__sparkle {
        animation: none;
    }

    .mf-plans-art__plane {
        transform: translate(0, 0) rotate(-6deg);
    }

    .mf-plans-art__sparkle {
        opacity: 0.55;
        transform: none;
    }
}
