.zch-dock { display: none; }

@media (max-width: 767px) {
    .zibll-site-has-dock {
        --zibll-site-dock-overhang: 0px;
        --zibll-site-dock-height: calc(var(--zibll-dock-full-height) + var(--zibll-site-dock-overhang));
        padding-bottom: var(--zibll-site-dock-height);
    }

    .zibll-site-has-dock:has(.zch-dock-item.is-raised) {
        --zibll-site-dock-overhang: 20px;
    }

    .zibll-site-has-dock .float-right:not(.position-top):not(.position-center) {
        bottom: calc(var(--zibll-dock-base-height) + 6px + var(--zibll-site-dock-overhang));
    }

    .zibll-site-has-dock:has(.footer-tabbar) .float-right:not(.position-top):not(.position-center) {
        bottom: calc(var(--zibll-dock-base-height) + 62px + var(--zibll-site-dock-overhang));
    }

    /* Native action bars retain their buttons and sit above the site navigation. */
    .zibll-site-has-dock .footer-tabbar {
        bottom: var(--zibll-site-dock-height);
        padding-bottom: 0;
        z-index: 994;
    }

    .zibll-site-has-dock .footer-tabbar-placeholder { height: 49px; }

    .zibll-site-has-dock > .sign-page ~ .text-center.blur-bg.fixed {
        bottom: var(--zibll-site-dock-height);
    }

    .zch-dock {
        position: fixed;
        display: flex;
        z-index: 995;
        bottom: 0;
        inset-inline: 0;
        height: var(--zibll-dock-full-height);
        padding-inline: env(safe-area-inset-left, 0px) env(safe-area-inset-right, 0px);
        padding-bottom: env(safe-area-inset-bottom, 0px);
        border-top: 1px solid var(--muted-border-color);
        background: var(--main-bg-color);
        box-shadow: 0 -3px 12px var(--main-shadow);
    }

    .zch-dock [hidden] { display: none !important; }
    .zch-dock-item[aria-disabled="true"] { opacity: .65; }
    .zch-dock :is(a, button):focus-visible {
        outline: 2px solid var(--focus-color) !important;
        outline-offset: -2px;
    }

    .zch-dock .zch-dock-item {
        display: flex;
        flex: 1 1 0;
        min-width: 0;
        min-height: 44px;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        gap: var(--zibll-dock-item-gap);
        padding: 2px 4px;
        color: var(--muted-color);
        text-align: center;
        touch-action: manipulation;
    }

    .zch-dock button.zch-dock-item {
        border: 0;
        background: transparent;
        font: inherit;
        cursor: pointer;
    }

    .zch-dock-icon {
        display: grid;
        place-items: center;
        min-width: 34px;
        height: var(--zibll-dock-image-size);
        border-radius: 7px;
        font-size: var(--zibll-dock-icon-size);
        line-height: 1;
    }

    .zch-dock-item.is-raised .zch-dock-icon {
        transform: translateY(var(--zibll-dock-raised-lift)) scale(var(--zibll-dock-raised-scale));
    }

    .zch-dock-icon svg {
        display: block;
        width: var(--zibll-dock-icon-size);
        height: var(--zibll-dock-icon-size);
    }

    .zch-dock-icon img {
        width: var(--zibll-dock-image-size);
        height: var(--zibll-dock-image-size);
        object-fit: contain;
    }

    .zch-dock-label {
        max-width: 100%;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
        color: var(--zch-label, currentColor);
        font-size: var(--zibll-dock-label-size);
        line-height: var(--zibll-dock-label-line);
    }

    .zch-dock .zch-dock-item[aria-current="page"] {
        color: var(--theme-color);
        font-weight: 700;
    }

    .zch-dock-item[aria-current="page"]:not(.is-raised) .zch-dock-icon {
        background: var(--muted-border-color);
        box-shadow: inset 0 -2px currentColor;
    }
}
