/* ═══════════════════════════════════════════════
   Flipbook Onboarding Tour — Step-by-Step Guide
   ═══════════════════════════════════════════════ */

/* Overlay backdrop */
.fb-tour-overlay {
    position: fixed;
    inset: 0;
    z-index: 999990;
    pointer-events: none;
    transition: opacity .35s ease;
}

.fb-tour-overlay.fb-tour-hidden {
    opacity: 0;
    pointer-events: none !important;
}

/* Spotlight highlight ring around target element */
.fb-tour-spotlight {
    position: fixed;
    z-index: 999992;
    border-radius: 14px;
    box-shadow:
        0 0 0 4000px rgba(0, 0, 0, 0.82),
        0 0 0 3px rgba(245, 158, 11, 0.8),
        0 0 20px 4px rgba(245, 158, 11, 0.35),
        0 0 40px 8px rgba(245, 158, 11, 0.15);
    pointer-events: none;
    transition: all .35s cubic-bezier(0.16, 1, 0.3, 1);
}

.fb-tour-spotlight::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 18px;
    border: 2px dashed rgba(245, 158, 11, 0.6);
    animation: fbTourPulse 2s ease-in-out infinite;
}

@keyframes fbTourPulse {
    0%, 100% { opacity: .5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.02); }
}

/* Tooltip card */
.fb-tour-tooltip {
    position: fixed;
    z-index: 999995;
    width: min(360px, calc(100vw - 24px));
    padding: 16px 18px;
    background: linear-gradient(145deg, #181d29 0%, #0f141f 100%);
    border: 1px solid rgba(245, 158, 11, 0.4);
    border-radius: 16px;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.8),
        0 0 25px rgba(245, 158, 11, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    color: #f3f0ed;
    font-family: system-ui, -apple-system, sans-serif;
    pointer-events: auto;
    transition: all .35s cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: top center;
}

/* Close button */
.fb-tour-btn-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: transparent;
    border: none;
    color: rgba(243, 240, 237, 0.45);
    font-size: 15px;
    cursor: pointer;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    line-height: 1;
    transition: all .2s ease;
}

.fb-tour-btn-close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
}

/* Arrow pointer */
.fb-tour-arrow {
    position: absolute;
    width: 14px;
    height: 14px;
    background: #181d29;
    border: 1px solid rgba(245, 158, 11, 0.4);
    transform: rotate(45deg);
    z-index: -1;
}

.fb-tour-arrow--top {
    top: -8px;
    border-right: none;
    border-bottom: none;
}

.fb-tour-arrow--bottom {
    bottom: -8px;
    border-left: none;
    border-top: none;
}

/* Step counter / badge */
.fb-tour-step-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 600;
    color: #f59e0b;
    font-family: 'DM Mono', monospace;
    margin-bottom: 8px;
    letter-spacing: 0.03em;
}

.fb-tour-step-dots {
    display: flex;
    gap: 4px;
}

.fb-tour-step-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    transition: all .3s ease;
}

.fb-tour-step-dot.fb-tour-step-dot--active {
    background: #f59e0b;
    box-shadow: 0 0 6px rgba(245, 158, 11, 0.6);
    transform: scale(1.2);
}

.fb-tour-step-dot.fb-tour-step-dot--done {
    background: rgba(245, 158, 11, 0.45);
}

/* Header row (icon + title) */
.fb-tour-header-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    padding-right: 20px;
}

.fb-tour-icon {
    font-size: 20px;
    line-height: 1;
    flex-shrink: 0;
}

.fb-tour-title {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    margin: 0;
    line-height: 1.3;
}

/* Description */
.fb-tour-desc {
    font-size: 12.5px;
    color: rgba(243, 240, 237, 0.78);
    line-height: 1.55;
    margin-bottom: 14px;
}

/* Buttons row */
.fb-tour-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.fb-tour-btn-skip {
    padding: 6px 12px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: rgba(243, 240, 237, 0.5);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all .2s ease;
}

.fb-tour-btn-skip:hover {
    color: rgba(243, 240, 237, 0.9);
    background: rgba(255, 255, 255, 0.08);
}

.fb-tour-btn-next {
    padding: 8px 20px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #0f172a;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all .2s ease;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
    display: flex;
    align-items: center;
    gap: 6px;
}

.fb-tour-btn-next:hover {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.45);
}

.fb-tour-btn-next:active {
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 640px) {
    .fb-tour-tooltip {
        width: calc(100vw - 20px);
        padding: 14px 14px;
    }
    .fb-tour-title { font-size: 14px; }
    .fb-tour-desc { font-size: 12px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .fb-tour-spotlight,
    .fb-tour-tooltip {
        transition: none !important;
    }
    .fb-tour-spotlight::after {
        animation: none !important;
    }
}
