/* HumiDesk shared micro-interactions */

.hd-micro-toast {
    position: fixed;
    left: 50%;
    bottom: 28px;
    z-index: 100000;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: calc(100vw - 32px);
    padding: 9px 16px;
    border-radius: 999px;
    background: #0f172a;
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .22);
    opacity: 0;
    pointer-events: none;
    transform: translate3d(-50%, 12px, 0);
}

.hd-micro-toast.is-on {
    animation: hdMicroToastIn .32s cubic-bezier(.2, .9, .3, 1.2) forwards;
}

.hd-micro-toast.is-off {
    animation: hdMicroToastOut .22s ease forwards;
}

.hd-micro-toast__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #C4A35A;
    box-shadow: 0 0 0 4px rgba(196, 163, 90, .18);
    flex-shrink: 0;
}

.hd-micro-target {
    position: relative;
}

.hd-micro-target::after {
    content: "";
    position: absolute;
    inset: -5px;
    border: 2px solid rgba(196, 163, 90, .55);
    border-radius: inherit;
    pointer-events: none;
    opacity: 0;
    animation: hdMicroRing .75s cubic-bezier(.16, .84, .44, 1) forwards;
}

.hd-micro-particle {
    position: fixed;
    z-index: 99999;
    width: var(--hd-size, 7px);
    height: var(--hd-size, 7px);
    border-radius: 50%;
    background: var(--hd-color, #C4A35A);
    pointer-events: none;
    opacity: 0;
    transform: translate3d(0, 0, 0) scale(.35);
    animation: hdMicroParticle var(--hd-dur, .9s) cubic-bezier(.16, .84, .44, 1) var(--hd-delay, 0s) forwards;
}

.hd-micro-plane {
    position: fixed;
    z-index: 99999;
    font-size: 22px;
    line-height: 1;
    pointer-events: none;
    opacity: 0;
    transform: translate3d(-50%, -50%, 0) scale(.55) rotate(-12deg);
    animation: hdMicroPlane .85s cubic-bezier(.2, .85, .35, 1) forwards;
}

.hd-micro-soft {
    animation: hdMicroSoft .18s ease-out;
}

@keyframes hdMicroToastIn {
    to {
        opacity: 1;
        transform: translate3d(-50%, 0, 0);
    }
}

@keyframes hdMicroToastOut {
    from {
        opacity: 1;
        transform: translate3d(-50%, 0, 0);
    }
    to {
        opacity: 0;
        transform: translate3d(-50%, 8px, 0);
    }
}

@keyframes hdMicroRing {
    0% {
        opacity: .8;
        transform: scale(.98);
    }
    100% {
        opacity: 0;
        transform: scale(1.03);
    }
}

@keyframes hdMicroParticle {
    0% {
        opacity: 0;
        transform: translate3d(0, 0, 0) scale(.35);
    }
    18% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translate3d(var(--hd-dx, 0px), var(--hd-dy, -40px), 0) scale(1);
    }
}

@keyframes hdMicroPlane {
    0% {
        opacity: 0;
        transform: translate3d(-50%, -50%, 0) scale(.55) rotate(-12deg);
    }
    15% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translate3d(calc(-50% + 64px), calc(-50% - 72px), 0) scale(1.05) rotate(10deg);
    }
}

@keyframes hdMicroSoft {
    0%,
    100% {
        filter: brightness(1);
    }
    50% {
        filter: brightness(1.04);
    }
}

@media (prefers-reduced-motion: reduce) {
    .hd-micro-particle,
    .hd-micro-plane {
        display: none !important;
    }

    .hd-micro-target::after {
        animation: none !important;
        opacity: 0 !important;
    }

    .hd-micro-toast {
        transition: opacity .15s ease;
    }
}
