/**
 * Микро-анимации успеха + опция «тихий звук при копировании»
 */

/* ── Заявка создана: блок депозита ─────────────────────────── */
.bystock-order-created {
    animation: bystockDepositReveal 0.85s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes bystockDepositReveal {
    0% {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
        filter: blur(2px);
    }
    55% {
        opacity: 1;
        transform: translateY(0) scale(1.01);
        filter: blur(0);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

.bystock-success-ring {
    position: relative;
}

.bystock-success-ring::after {
    content: "";
    position: absolute;
    inset: -3px;
    border-radius: inherit;
    pointer-events: none;
    opacity: 0;
    box-shadow: 0 0 0 0 rgba(93, 69, 255, 0.35);
    animation: bystockRingPulse 1s ease-out 0.15s both;
}

@keyframes bystockRingPulse {
    0% {
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(93, 69, 255, 0.45);
    }
    100% {
        opacity: 0;
        box-shadow: 0 0 0 22px rgba(93, 69, 255, 0);
    }
}

html:not(.theme-dark) .bystock-success-ring::after {
    animation-name: bystockRingPulseLight;
}

@keyframes bystockRingPulseLight {
    0% {
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.4);
    }
    100% {
        opacity: 0;
        box-shadow: 0 0 0 22px rgba(37, 99, 235, 0);
    }
}

/* ── Страница completed ─────────────────────────────────────── */
.bystock-completed-reveal .success-icon {
    animation: bystockCheckPop 0.7s cubic-bezier(0.34, 1.4, 0.64, 1) both;
}

.bystock-completed-reveal .completed-content > h1 {
    animation: bystockFadeUp 0.55s ease-out 0.12s both;
}

.bystock-completed-reveal .completed-description {
    animation: bystockFadeUp 0.55s ease-out 0.2s both;
}

@keyframes bystockCheckPop {
    0% {
        opacity: 0;
        transform: scale(0.5) rotate(-12deg);
    }
    70% {
        opacity: 1;
        transform: scale(1.08) rotate(4deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

@keyframes bystockFadeUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Чекбокс звука (депозит / completed) ───────────────────── */
.bystock-sound-opt {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-top: 0.85rem;
    font-size: 0.82rem;
    color: var(--text-secondary, rgba(255, 255, 255, 0.65));
    cursor: pointer;
    user-select: none;
}

.bystock-sound-opt input {
    width: 1rem;
    height: 1rem;
    accent-color: var(--primary-color, #5d45ff);
    cursor: pointer;
}

.bystock-sound-opt__txt {
    opacity: 0.92;
}

@media (prefers-reduced-motion: reduce) {
    .bystock-order-created,
    .bystock-success-ring::after,
    .bystock-completed-reveal .success-icon,
    .bystock-completed-reveal .completed-content > h1,
    .bystock-completed-reveal .completed-description {
        animation: none !important;
    }

    .bystock-order-created {
        opacity: 1;
        transform: none;
        filter: none;
    }
}
