/* Задача №14335512. Путь нового исполнителя: карточка прогресса + вау-анимация
   первого скриншота в мини-аппе /mobile. Лёгкий играющий стиль — мягкие тени,
   пружинистые появления, ничего резкого/мигающего. */

.onboarding-widget {
    background: linear-gradient(135deg, #eef6ff 0%, #f5faff 100%);
    border: 1px solid #dbeeff;
    border-radius: 16px;
    padding: 14px 16px 16px;
    margin-bottom: 16px;
    animation: onb-in .4s ease-out;
}

.onboarding-widget-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.onboarding-widget-title {
    font-weight: 700;
    font-size: 15px;
    color: #1a4d8f;
}

.onboarding-widget-count {
    font-size: 12px;
    font-weight: 700;
    color: #4a90e2;
    background: #ffffffb0;
    border-radius: 999px;
    padding: 2px 10px;
}

.onboarding-steps {
    display: flex;
    gap: 8px;
    margin: -6px -2px 6px;
    padding: 6px 2px 2px;
    overflow-x: auto;
    /* Задача №14335512-fix: на узких экранах 4 шага в ряд не влезают и полоса
       прокрутки была видна голым скроллбаром браузера — сама прокрутка (если
       понадобится) остаётся, но полоску прячем во всех движках. */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.onboarding-steps::-webkit-scrollbar {
    display: none;
    height: 0;
}

.onboarding-step {
    flex: 1 1 0;
    min-width: 74px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-align: center;
    opacity: .55;
    animation: onb-step-in .4s ease-out both;
    animation-delay: calc(var(--step-i, 0) * 70ms);
}

.onboarding-step-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffffc0;
    color: #6b93c2;
    font-size: 13px;
    border: 2px solid #cfe3ff;
    transition: transform .25s ease, background-color .25s ease, border-color .25s ease, color .25s ease;
}

.onboarding-step.is-done {
    opacity: 1;
}

.onboarding-step.is-done .onboarding-step-icon {
    background: #22c55e;
    border-color: #22c55e;
    color: #fff;
    transform: scale(1.08);
    animation: onb-pop .35s ease-out;
}

.onboarding-step-label {
    font-size: 11px;
    color: #4a6a8f;
    line-height: 1.15;
}

.onboarding-widget-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

@keyframes onb-in {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes onb-step-in {
    from { opacity: 0; transform: translateY(6px) scale(.9); }
    to { opacity: .55; transform: translateY(0) scale(1); }
}

@keyframes onb-pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1.08); }
}

/* ------------------------------------------------------------------ */
/*  Вау-анимация: первый прикреплённый скриншот                        */
/* ------------------------------------------------------------------ */

.wow-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 30, 55, .45);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
}

.wow-overlay.is-active {
    opacity: 1;
    pointer-events: auto;
}

.wow-card {
    background: #fff;
    border-radius: 20px;
    padding: 28px 24px 24px;
    max-width: 340px;
    width: calc(100% - 40px);
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
    transform: scale(.7) translateY(20px);
    opacity: 0;
    transition: transform .4s cubic-bezier(.34, 1.56, .64, 1), opacity .3s ease;
}

.wow-overlay.is-active .wow-card {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.wow-card-emoji {
    font-size: 48px;
    line-height: 1;
    display: block;
    margin-bottom: 10px;
    animation: wow-bounce 1s ease-in-out infinite;
}

.wow-card-title {
    font-size: 19px;
    font-weight: 800;
    color: #1a4d8f;
    margin-bottom: 8px;
}

.wow-card-text {
    font-size: 14px;
    color: #445;
    line-height: 1.45;
    margin-bottom: 18px;
}

.wow-card-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: #22c55e;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 10px 20px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
}

@keyframes wow-bounce {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-6px) rotate(-6deg); }
    75% { transform: translateY(-6px) rotate(6deg); }
}

.wow-confetti-piece {
    position: fixed;
    top: -10px;
    z-index: 2001;
    pointer-events: none;
    border-radius: 2px;
    will-change: transform, opacity;
    animation-name: wow-confetti-fall;
    animation-timing-function: cubic-bezier(.25, .46, .45, .94);
    animation-fill-mode: forwards;
}

@keyframes wow-confetti-fall {
    0% { transform: translate3d(0, -10px, 0) rotate(0deg); opacity: 1; }
    100% { transform: translate3d(var(--wow-drift, 0px), 100vh, 0) rotate(var(--wow-spin, 360deg)); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .onboarding-widget, .onboarding-step, .onboarding-step.is-done .onboarding-step-icon,
    .wow-card, .wow-card-emoji, .wow-confetti-piece {
        animation: none !important;
        transition: none !important;
    }
}
