/* ==========================================================================
   Mobile Bottom Navigation
   ========================================================================== */

.gm-bottom-nav {
    display: none;
}

@media (max-width: 767px) {

    /* ---------- Bar ---------- */
    .gm-bottom-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 9997;
        display: flex !important;
        align-items: stretch;
        justify-content: space-around;
        height: calc(64px + env(safe-area-inset-bottom, 0px));
        padding-bottom: env(safe-area-inset-bottom, 0px);
        background: rgba(255, 255, 255, 0.92);
        backdrop-filter: saturate(180%) blur(20px);
        -webkit-backdrop-filter: saturate(180%) blur(20px);
        border-top: 1px solid rgba(0, 0, 0, 0.06);
        box-shadow: 0 -1px 12px rgba(0, 0, 0, 0.04);
    }

    /* ---------- Nav items ---------- */
    .gm-bottom-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        flex: 1;
        padding: 8px 0 6px;
        color: var(--gm-text-muted);
        text-decoration: none;
        background: none;
        border: none;
        cursor: pointer;
        position: relative;
        transition: color 0.2s ease;
        -webkit-tap-highlight-color: transparent;
    }

    .gm-bottom-nav-icon {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 28px;
        height: 28px;
    }

    .gm-bottom-nav-icon svg {
        transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    }

    .gm-bottom-nav-label {
        font-size: 10px;
        font-weight: 600;
        letter-spacing: 0.02em;
        line-height: 1;
    }

    /* Active state */
    .gm-bottom-nav-item.is-active {
        color: var(--gm-primary);
    }

    .gm-bottom-nav-item.is-active .gm-bottom-nav-icon svg {
        transform: scale(1.08);
    }

    .gm-bottom-nav-item:active .gm-bottom-nav-icon svg {
        transform: scale(0.88);
    }

    /* Active dot indicator */
    .gm-bottom-nav-item.is-active::before {
        content: '';
        position: absolute;
        top: 3px;
        left: 50%;
        transform: translateX(-50%);
        width: 4px;
        height: 4px;
        border-radius: 50%;
        background: var(--gm-primary);
    }

    /* ---------- Badge ---------- */
    .gm-bottom-nav-badge {
        position: absolute;
        top: -2px;
        right: -8px;
        min-width: 16px;
        height: 16px;
        padding: 0 4px;
        border-radius: 9999px;
        background: var(--gm-danger);
        color: #fff;
        font-size: 9px;
        font-weight: 700;
        line-height: 16px;
        text-align: center;
        box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.95);
    }

    /* ---------- Center CTA ---------- */
    .gm-bottom-nav-cta {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-end;
        flex: 0 0 72px;
        padding-bottom: 6px;
        text-decoration: none;
        -webkit-tap-highlight-color: transparent;
    }

    .gm-bottom-nav-cta-btn {
        width: 50px;
        height: 50px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        background: linear-gradient(145deg, var(--gm-accent-dark) 0%, #f5a623 100%);
        color: #fff;
        margin-top: -16px;
        box-shadow:
            0 4px 14px rgba(255, 176, 17, 0.4),
            0 0 0 3px rgba(255, 255, 255, 0.95);
        transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
    }

    .gm-bottom-nav-cta:active .gm-bottom-nav-cta-btn {
        transform: scale(0.9);
        box-shadow:
            0 2px 8px rgba(255, 176, 17, 0.3),
            0 0 0 3px rgba(255, 255, 255, 0.95);
    }

    .gm-bottom-nav-cta-label {
        font-size: 10px;
        font-weight: 700;
        color: var(--gm-accent-dark);
        margin-top: 3px;
        letter-spacing: 0.02em;
        line-height: 1;
    }

    /* ---------- Page spacing ---------- */

    /* Push page content above bottom nav */
    body {
        padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
    }

    /* Cookie consent sits above the bottom nav */
    .gm-cookie-consent {
        bottom: calc(64px + env(safe-area-inset-bottom, 0px));
    }

    /* Footer extra bottom padding so it's not hidden */
    .gm-footer {
        padding-bottom: calc(var(--gm-gap-lg, 32px) + 68px + env(safe-area-inset-bottom, 0px)) !important;
    }
}
