/* =========================================================
   TCG — HEADER ON PHONES AND TABLETS
   Styles for includes/mobile-nav.php.
   Below 1025px the desktop header and its ticker are hidden
   (they are built for hover and have no small-screen form) and
   this bar with its full-screen menu takes their place.
========================================================= */

.tcg-mnav {
    display: none;
}

@media (max-width: 1024px) {

    .tcg-home-header,
    .tcg-top-ticker {
        display: none !important;
    }

    .tcg-mnav {
        --tcg-ink: #111111;
        --tcg-paper: #f6f4ef;
        --tcg-line: rgba(17, 17, 17, .13);
        --tcg-muted: #6f6d66;

        display: block;
        color: var(--tcg-ink);
        font-family: "Lato", "Helvetica Neue", Arial, sans-serif;
        font-size: 14px;
        line-height: 1.4;
        -webkit-font-smoothing: antialiased;
    }

    .tcg-mnav *,
    .tcg-mnav *::before,
    .tcg-mnav *::after {
        box-sizing: border-box;
    }


    /* -----------------------------------------------------
       BAR
    ----------------------------------------------------- */

    .tcg-mnav__bar {
        position: fixed;
        top: 0;
        right: 0;
        left: 0;
        z-index: 99990;
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        align-items: center;
        height: 56px;
        padding: 0 6px;
        border-bottom: 1px solid rgba(17, 17, 17, .09);
        background: rgba(246, 244, 239, .9);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
    }

    /* signed-in site staff: below WordPress's own bar */
    body.admin-bar .tcg-mnav__bar,
    body.admin-bar .tcg-mnav__panel {
        top: var(--wp-admin--admin-bar--height, 46px);
    }

    .tcg-mnav .tcg-mnav__burger,
    .tcg-mnav .tcg-mnav__icon,
    .tcg-mnav .tcg-mnav__close {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        min-height: 0;
        margin: 0;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        color: var(--tcg-ink);
        box-shadow: none;
        cursor: pointer;
    }

    .tcg-mnav .tcg-mnav__burger {
        flex-direction: column;
        gap: 6px;
    }

    .tcg-mnav__burger span {
        display: block;
        width: 22px;
        height: 1.6px;
        background: currentColor;
    }

    .tcg-mnav__logo {
        display: block;
        justify-self: center;
        line-height: 0;
    }

    /* the mark is drawn in a light tone for the dark desktop hero */
    .tcg-mnav .tcg-mnav__logo img {
        display: block;
        width: auto;
        height: 17px;
        max-width: none;
        filter: brightness(0);
    }

    .tcg-mnav__actions {
        display: flex;
        justify-self: end;
    }

    .tcg-mnav__icon svg {
        width: 22px;
        height: 22px;
    }

    .tcg-mnav__count {
        position: absolute;
        top: 6px;
        right: 2px;
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: 16px;
        height: 16px;
        padding: 0 4px;
        border-radius: 999px;
        background: var(--tcg-ink);
        color: #ffffff;
        font-size: 9.5px;
        font-weight: 700;
        line-height: 1;
    }

    .tcg-mnav__count.is-empty {
        display: none;
    }


    /* -----------------------------------------------------
       MENU
    ----------------------------------------------------- */

    .tcg-mnav__panel {
        position: fixed;
        inset: 0;
        z-index: 100001;
        display: flex;
        flex-direction: column;
        background: var(--tcg-paper);
        visibility: hidden;
        transform: translateX(-100%);
        transition: transform .42s cubic-bezier(.16, .8, .24, 1), visibility 0s linear .42s;
    }

    .tcg-mnav.is-open .tcg-mnav__panel {
        visibility: visible;
        transform: none;
        transition-delay: 0s;
    }

    .tcg-mnav__head {
        display: flex;
        flex: none;
        align-items: center;
        justify-content: space-between;
        height: 56px;
        padding: 0 6px 0 20px;
        border-bottom: 1px solid var(--tcg-line);
        font-size: 11px;
        font-weight: 900;
        line-height: 1;
        letter-spacing: .16em;
        text-transform: uppercase;
    }

    .tcg-mnav .tcg-mnav__close {
        font-family: inherit;
        font-size: 28px;
        font-weight: 400;
        line-height: 1;
        letter-spacing: 0;
    }

    .tcg-mnav__menu {
        flex: 1 1 auto;
        min-height: 0;
        padding: 4px 20px 24px;
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }

    .tcg-mnav .tcg-mnav__top {
        display: flex;
        align-items: center;
        gap: 12px;
        margin: 0;
        padding: 19px 0 17px;
        border-bottom: 1px solid var(--tcg-line);
        color: var(--tcg-ink);
        font-family: "Arial Narrow", "Helvetica Neue Condensed", Arial, sans-serif;
        font-size: 36px;
        font-weight: 700;
        line-height: .9;
        letter-spacing: -.045em;
        text-transform: uppercase;
        text-decoration: none;
        list-style: none;
        cursor: pointer;
    }

    .tcg-mnav__top::-webkit-details-marker {
        display: none;
    }

    .tcg-mnav__top span {
        flex: 1 1 auto;
    }

    /* each section keeps its colour from the desktop menu */
    .tcg-mnav__top::before {
        content: "";
        flex: none;
        width: 9px;
        height: 9px;
        border-radius: 50%;
        background: #c8bca8;
    }

    .tcg-mnav__top--shop::before {
        background: #32ce57;
    }

    .tcg-mnav__top--basement::before {
        background: #ff5700;
    }

    .tcg-mnav__top--universe::before {
        background: #a3caff;
    }

    .tcg-mnav__top svg {
        flex: none;
        width: 13px;
        height: 8px;
        transition: transform .28s ease;
    }

    .tcg-mnav__group[open] > .tcg-mnav__top svg {
        transform: rotate(180deg);
    }

    .tcg-mnav__group[open] > .tcg-mnav__top {
        border-bottom-color: transparent;
    }

    .tcg-mnav__links {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0 18px;
        padding: 0 0 22px 21px;
        border-bottom: 1px solid var(--tcg-line);
    }

    .tcg-mnav .tcg-mnav__links a {
        padding: 9px 0;
        color: var(--tcg-ink);
        font-size: 15px;
        line-height: 1.3;
        text-decoration: none;
    }

    .tcg-mnav .tcg-mnav__links a.is-head {
        grid-column: 1 / -1;
        margin-top: 10px;
        padding: 9px 0 7px;
        font-size: 11px;
        font-weight: 900;
        letter-spacing: .15em;
        text-transform: uppercase;
    }

    .tcg-mnav .tcg-mnav__links a.is-head:first-child {
        margin-top: 0;
    }

    .tcg-mnav__foot {
        display: flex;
        flex: none;
        flex-wrap: wrap;
        gap: 10px 22px;
        padding: 18px 20px calc(18px + env(safe-area-inset-bottom, 0px));
        border-top: 1px solid var(--tcg-line);
    }

    .tcg-mnav .tcg-mnav__foot a {
        color: var(--tcg-ink);
        font-size: 11px;
        font-weight: 900;
        line-height: 1;
        letter-spacing: .14em;
        text-transform: uppercase;
        text-decoration: none;
    }

    .tcg-mnav .tcg-mnav__foot p {
        flex: 1 1 100%;
        margin: 4px 0 0;
        color: var(--tcg-muted);
        font-size: 11px;
        line-height: 1.4;
    }

    /* page behind the open menu does not scroll */
    html.tcg-mnav-lock,
    html.tcg-mnav-lock body {
        overflow: hidden !important;
    }

    /* the search panel opened from the bar: clear of the bar's height */
    .tcg-search-overlay {
        z-index: 100002;
    }
}

@media (max-width: 1024px) and (prefers-reduced-motion: reduce) {

    .tcg-mnav__panel {
        transition: none;
    }
}
