﻿/*
 * LLU 5.4.13 – tablet navigation 768..900px
 *
 * Tablet now follows the same REAL INNER page content axis as desktop.
 * It explicitly overrides the old 88px sticky-left padding, 0px right
 * padding and old whole-track offset.
 */

@media (min-width: 768px) and (max-width: 900px) {

    /* Remove the old fixed full-width color strip on tablet too. */
    body.llu-home .llu-scroll-nav--home,
    body > .llu-scroll-nav--home.is-stuck {
        background-image: none !important;
        background: var(--llu-page-bg) !important;
        background-color: var(--llu-page-bg) !important;
        overflow-x: hidden !important;
    }

    /*
     * Real page gutters measured by llu.js.
     * Explicitly cancels old tablet rules:
     *   sticky padding-left: 88px
     *   sticky padding-right: 0
     *   5.4.12 track translateX(10px)
     */
    body.llu-home .llu-scroll-nav--home .llu-nav-track,
    body > .llu-scroll-nav--home.is-stuck .llu-nav-track {
        width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
        padding-left: var(--llu-page-gutter-left, 0px) !important;
        padding-right: var(--llu-page-gutter-right, 0px) !important;
        transform: none !important;
        justify-content: center !important;
        overflow: visible !important;
    }

    /* Move the REAL colored/clickable list, never the track. */
    body.llu-home .llu-scroll-nav--home .llu-nav-list,
    body > .llu-scroll-nav--home.is-stuck .llu-nav-list {
        transform: translate3d(var(--llu-nav-shift-x, 0px), 0, 0) !important;
        transform-origin: center center !important;
        will-change: transform;
        position: relative !important;
        z-index: 2 !important;
        isolation: isolate;
    }

    body.llu-home .llu-scroll-nav--home .llu-nav-item,
    body > .llu-scroll-nav--home.is-stuck .llu-nav-item {
        position: relative !important;
        z-index: 1 !important;
        pointer-events: auto !important;
    }

    /* Preserve accepted real tile geometry where the count is known. */
    body.llu-home .llu-nav-list.llu-nav-count-1,
    body > .llu-scroll-nav--home.is-stuck .llu-nav-list.llu-nav-count-1 {
        flex: 0 0 123px !important;
        width: 123px !important;
        max-width: 123px !important;
        min-width: 123px !important;
        grid-template-columns: repeat(1, 123px) !important;
    }

    body.llu-home .llu-nav-list.llu-nav-count-2,
    body > .llu-scroll-nav--home.is-stuck .llu-nav-list.llu-nav-count-2 {
        flex: 0 0 246px !important;
        width: 246px !important;
        max-width: 246px !important;
        min-width: 246px !important;
        grid-template-columns: repeat(2, 123px) !important;
    }

    body.llu-home .llu-nav-list.llu-nav-count-3,
    body > .llu-scroll-nav--home.is-stuck .llu-nav-list.llu-nav-count-3 {
        flex: 0 0 369px !important;
        width: 369px !important;
        max-width: 369px !important;
        min-width: 369px !important;
        grid-template-columns: repeat(3, 123px) !important;
    }

    body.llu-home .llu-nav-list.llu-nav-count-4,
    body > .llu-scroll-nav--home.is-stuck .llu-nav-list.llu-nav-count-4 {
        flex: 0 0 492px !important;
        width: 492px !important;
        max-width: 492px !important;
        min-width: 492px !important;
        grid-template-columns: repeat(4, 123px) !important;
    }

    body.llu-home .llu-nav-list.llu-nav-count-5,
    body > .llu-scroll-nav--home.is-stuck .llu-nav-list.llu-nav-count-5 {
        flex: 0 1 100% !important;
        width: min(100%, 900px) !important;
        max-width: 900px !important;
        min-width: 0 !important;
        grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    }

    /* Sticky logo shares the exact same measured left content edge. */
    body.llu-home .llu-scroll-nav--home.is-receiving-logo:not(.is-stuck)
        .llu-nav-sticky-tools,
    body > .llu-scroll-nav--home.is-stuck .llu-nav-sticky-tools {
        left: var(--llu-page-gutter-left, 0px) !important;
    }

    /* Restore the two side surfaces on the MOVING real list. */
    body.llu-home .llu-scroll-nav--home .llu-nav-list::before,
    body.llu-home .llu-scroll-nav--home .llu-nav-list::after,
    body > .llu-scroll-nav--home.is-stuck .llu-nav-list::before,
    body > .llu-scroll-nav--home.is-stuck .llu-nav-list::after {
        content: "" !important;
        display: block !important;
        position: absolute !important;
        top: 0 !important;
        height: 100% !important;
        width: 100vw !important;
        pointer-events: none !important;
        z-index: -1 !important;
    }

    body.llu-home .llu-scroll-nav--home .llu-nav-list::before,
    body > .llu-scroll-nav--home.is-stuck .llu-nav-list::before {
        right: 100% !important;
        background: #DEC6A7 !important;
    }

    body.llu-home .llu-scroll-nav--home .llu-nav-list::after,
    body > .llu-scroll-nav--home.is-stuck .llu-nav-list::after {
        left: 100% !important;
        background: #477687 !important;
    }
}
