/* ==========================================================================
   Black Box Tabs — Tab bar + panel switching for multi-feature How It Works
   ========================================================================== */

/* ---- Tab Bar ---- */
.bb-tabs {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 0 auto 2rem;
    max-width: 800px;
    padding: 0 1rem;
    overflow-x: auto;
    scrollbar-width: none;          /* Firefox */
    -ms-overflow-style: none;       /* IE/Edge */
    scroll-snap-type: x mandatory;
    position: relative;
    z-index: 2;
}

.bb-tabs::-webkit-scrollbar {
    display: none;                  /* Chrome/Safari */
}

/* ---- Individual Tab ---- */
.bb-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
    border-radius: 20px;
    background: transparent;
    color: var(--text-secondary, #8b949e);
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
    font-size: 0.8rem;
    cursor: pointer;
    white-space: nowrap;
    scroll-snap-align: center;
    transition: background 0.25s, color 0.25s, border-color 0.25s;
}

.bb-tab i {
    font-size: 0.75rem;
}

.bb-tab:hover {
    color: var(--text-primary, #e6edf3);
    border-color: var(--cta-primary, #10b981);
}

.bb-tab.active {
    background: var(--cta-primary, #10b981);
    color: #fff;
    border-color: var(--cta-primary, #10b981);
}

/* ---- Panels ---- */
.bb-panel {
    display: none;
}

.bb-panel.active {
    display: block;
    animation: bbFadeIn 0.35s ease-out;
}

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

/* ---- Mobile: smaller tabs, scroll ---- */
@media (max-width: 640px) {
    .bb-tabs {
        justify-content: flex-start;
        gap: 0.4rem;
        padding: 0 0.75rem;
    }

    .bb-tab {
        font-size: 0.7rem;
        padding: 0.4rem 0.75rem;
    }

    .bb-tab span {
        /* Keep label visible but compact */
    }
}

/* ---- Reduced Motion ---- */
@media (prefers-reduced-motion: reduce) {
    .bb-panel.active {
        animation: none;
    }
}
