/* ============================================
   ONBOARDING TOUR — Интерактивный тур
   Тёмная тема, акцент #dc2626
   ============================================ */

/* Оверлей-затемнение */
.onboarding-overlay {
    position: fixed;
    inset: 0;
    z-index: 9998;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.onboarding-overlay.active {
    pointer-events: auto;
}

/* SVG-маска для «дырки» вокруг элемента */
.onboarding-overlay svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

/* Подсветка целевого элемента */
.onboarding-highlight {
    position: fixed;
    z-index: 9999;
    border-radius: 12px;
    box-shadow: 0 0 0 4000px rgba(0, 0, 0, 0.7);
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.onboarding-highlight::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 14px;
    border: 2px solid #dc2626;
    animation: onb-pulse 1.5s ease-in-out infinite;
}

@keyframes onb-pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(1.02);
    }
}

/* Тултип */
.onboarding-tooltip {
    position: fixed;
    z-index: 10000;
    width: 300px;
    max-width: calc(100vw - 32px);
    background: #1e1e2e;
    border: 1px solid rgba(220, 38, 38, 0.3);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 30px rgba(220, 38, 38, 0.1);
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: auto;
}

.onboarding-tooltip.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Стрелка тултипа */
.onboarding-tooltip-arrow {
    position: absolute;
    width: 14px;
    height: 14px;
    background: #1e1e2e;
    border: 1px solid rgba(220, 38, 38, 0.3);
    transform: rotate(45deg);
}

.onboarding-tooltip-arrow.top {
    top: -8px;
    left: 24px;
    border-right: none;
    border-bottom: none;
}

.onboarding-tooltip-arrow.bottom {
    bottom: -8px;
    left: 24px;
    border-left: none;
    border-top: none;
}

/* Контент тултипа */
.onboarding-step-counter {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    color: #dc2626;
    background: rgba(220, 38, 38, 0.12);
    padding: 3px 10px;
    border-radius: 20px;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
}

.onboarding-tooltip-title {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 6px;
    line-height: 1.3;
}

.onboarding-tooltip-text {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
    margin-bottom: 16px;
}

/* Кнопки навигации */
.onboarding-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
}

.onboarding-btn {
    border: none;
    border-radius: 10px;
    padding: 9px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.onboarding-btn-next {
    background: #dc2626;
    color: #fff;
    flex: 1;
}

.onboarding-btn-next:active {
    transform: scale(0.96);
    background: #b91c1c;
}

.onboarding-btn-back {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.7);
}

.onboarding-btn-back:active {
    background: rgba(255, 255, 255, 0.14);
}

.onboarding-btn-skip {
    background: transparent;
    color: rgba(255, 255, 255, 0.4);
    font-size: 12px;
    padding: 9px 10px;
}

.onboarding-btn-skip:active {
    color: rgba(255, 255, 255, 0.6);
}

/* Прогресс-бар */
.onboarding-progress {
    display: flex;
    gap: 4px;
    margin-bottom: 14px;
}

.onboarding-progress-dot {
    flex: 1;
    height: 3px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.1);
    transition: background 0.3s ease;
}

.onboarding-progress-dot.active {
    background: #dc2626;
}

.onboarding-progress-dot.done {
    background: rgba(220, 38, 38, 0.4);
}

/* Inline кнопка ? рядом с заголовком */
.onboarding-help-inline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(128, 128, 128, 0.2);
    border: 1px solid rgba(128, 128, 128, 0.3);
    color: rgba(0, 0, 0, 0.4);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    margin-left: 8px;
    vertical-align: middle;
    transition: all 0.2s ease;
    line-height: 1;
    padding: 0;
    flex-shrink: 0;
}

.onboarding-help-inline:active {
    background: rgba(128, 128, 128, 0.35);
    color: rgba(0, 0, 0, 0.6);
    transform: scale(0.9);
}


/* Приветственный экран */
.onboarding-welcome {
    position: fixed;
    inset: 0;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.8);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.onboarding-welcome.active {
    opacity: 1;
    pointer-events: auto;
}

.onboarding-welcome-card {
    background: #1e1e2e;
    border: 1px solid rgba(220, 38, 38, 0.2);
    border-radius: 20px;
    padding: 32px 24px;
    text-align: center;
    max-width: 320px;
    width: calc(100% - 40px);
    transform: scale(0.9);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.onboarding-welcome.active .onboarding-welcome-card {
    transform: scale(1);
}

.onboarding-welcome-emoji {
    font-size: 48px;
    margin-bottom: 12px;
}

.onboarding-welcome-title {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
}

.onboarding-welcome-text {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.5;
    margin-bottom: 24px;
}

.onboarding-welcome-start {
    background: #dc2626;
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 14px 32px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
}

.onboarding-welcome-start:active {
    transform: scale(0.96);
    background: #b91c1c;
}

.onboarding-welcome-dismiss {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    font-size: 13px;
    margin-top: 12px;
    cursor: pointer;
    padding: 8px;
}