/**
 * Audace — Scroll-jack long text inside a pinned `.is-style-slide`.
 * On wheel, find the slide currently pinned at the top and, if one of
 * its columns overflows, translate that column instead of scrolling.
 */
(function () {
    'use strict';

    const windowW = window.innerWidth;
    var colsToTranslate = [];

    if(windowW >= 782) {
        const cols = document.querySelectorAll('.is-style-slide .wp-block-colums');

        // Compute max height
        const adminBar = document.getElementById('wpadminbar');
        const header = document.querySelector('.wp-block-template-part.site-header, header.wp-block-template-part, #masthead');
        const adminBarH = adminBar ? adminBar.getBoundingClientRect().height : 0;
        const headerH = header ? header.getBoundingClientRect().height : 0;
        const topH = adminBarH + headerH;
        const maxH = window.innerHeight - topH;

        for(let i = 0; i < cols.length; i++) {
            const col = cols[i];


        }

    } 


})();
