BB2 Coin

Utility for the BuyBy2 Ecosystem

BB2C is the native utility coin of the BuyBy2 ecosystem, designed for wallet-to-wallet transfers, participating merchants, mining, payments and BuyBy2 services.

BB2 Coin
FIND A BB2C MEMBER

Search for a Provider

Search by provider, service, or category. The search can recognize partial words and common spelling mistakes.

Active BB2C Members will appear here.

BROWSE ALL 265 CATEGORIES →
MARKET PRICE RESEARCH

Research Before You Negotiate

Check current market references before agreeing on a price with a BB2C Member. Use official ride estimators for transportation and current web research for other local services.

Examples: Independent driver from Fort Lauderdale to Miami International Airport; plumber in 33301; lawn mowing in Fort Lauderdale.

BB2C MEMBER DIRECTORY

Join the BB2C Directory

List your business or independent service in the BB2C Member Network. Start here without leaving the BB2 Coin site.

265 Categories Choose the category that best matches your business or service.
Local Discovery Members can be found by country, ZIP or postal code, and service area.
Price Transparency Published prices or pricing methods must stay current, with no surcharge solely for using BB2C.
⛏
MINING

BB2C Mining

Monitor Proof of Work mining, block rewards and mining activity across the BB2C network.

Status Testnet
Consensus Proof of Work
Block Reward 50 BB2C
VIEW MINING STATUS →
◫
EXPLORER

Blockchain Explorer

Search BB2C blocks, transactions and transaction IDs recorded on the blockchain.

◉
MERCHANTS

Use BB2C

BB2C connects participating merchants and customers throughout the BuyBy2 ecosystem.

Customer BB2C Wallet
Merchant BB2C Wallet
Transfers Wallet-to-Wallet
VIEW MEMBER DIRECTORY →
◌
NETWORK

BB2C Network

Native blockchain infrastructure supporting signed transactions, balances, blocks and synchronization.

Blockchain Native BB2C
Network Testnet v0.1
Status Development
BB2C MERCHANT NETWORK

Customers and Merchants Connected by BB2C

BB2C is designed to circulate between customers and participating merchants within the BuyBy2 ecosystem.

CUSTOMER BB2C Wallet
⇄
BB2C Native Network
⇄
MERCHANT BB2C Wallet
BB2 COIN

Contact

executive@bb2c.com admin@bb2c.com
BB3C PRESENTS CRYPTO MARKET WATCH
BB3C IS A FUTURE DIGITAL ASSET PROJECT WITHIN THE BUYBY2 ECOSYSTEM.
/* ========================================================= VARIABLES ========================================================= */ :root { --bb2-yellow: #FDE01A; --bb2-blue: #08102e; --bb2-dark: #050918; --bb2-header: 64px; } /* ========================================================= RESET ========================================================= */ html, body { margin: 0 !important; padding: 0 !important; width: 100% !important; max-width: 100% !important; background: #FDE01A !important; overflow-x: hidden !important; } body { font-family: Roboto, Arial, Helvetica, sans-serif; } #page, .site, .site-content, #content, .site-main, .elementor, .elementor-element, .elementor-widget-container, .e-con, .e-con-inner { margin: 0 !important; padding: 0 !important; width: 100% !important; max-width: 100% !important; } .bb2c-page, .bb2c-page * { box-sizing: border-box; } .bb2c-page { width: 100vw; min-height: 100vh; margin: 0; padding: 0; background: var(--bb2-yellow); color: var(--bb2-blue); overflow-x: hidden; } /* ========================================================= HEADER ========================================================= */ .bb2c-header { position: fixed !important; top: 0 !important; left: 0 !important; width: 100vw !important; height: var(--bb2-header); z-index: 9999999; display: block !important; background: var(--bb2-blue) !important; border-bottom: 2px solid var(--bb2-yellow); box-shadow: 0 3px 16px rgba(0,0,0,.25); } /* ========================================================= HAMBURGER ========================================================= */ .bb2c-menu-btn { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; margin: 0; padding: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; background: transparent !important; border: 0 !important; cursor: pointer; } .bb2c-menu-btn span { display: block; width: 25px; height: 2px; background: var(--bb2-yellow); border-radius: 10px; } /* ========================================================= CENTER LOGO ========================================================= */ .bb2c-logo { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); display: block; width: 52px; height: 52px; margin: 0; padding: 0; } .bb2c-logo img { display: block; width: 52px !important; height: 52px !important; max-width: none !important; object-fit: contain; margin: 0 !important; padding: 0 !important; border: 0 !important; box-shadow: none !important; } /* ========================================================= LANGUAGE SELECTOR ========================================================= */ .bb2c-language-menu { position: absolute; right: 28px; top: 50%; transform: translateY(-50%); z-index: 10000000; } .bb2c-language-current { display: flex; align-items: center; gap: 6px; margin: 0; padding: 8px 8px; color: #ffffff !important; background: transparent !important; border: 0 !important; font-family: Roboto, Arial, sans-serif; font-size: 11px; font-weight: 700; line-height: 1; cursor: pointer; white-space: nowrap; } .bb2c-language-arrow { color: var(--bb2-yellow); font-size: 10px; transition: transform .2s ease; } .bb2c-language-menu.open .bb2c-language-arrow { transform: rotate(180deg); } .bb2c-language-dropdown { position: absolute; top: calc(100% + 9px); right: 0; width: 120px; display: none; overflow: hidden; background: var(--bb2-blue); border: 1px solid rgba(253,224,26,.55); border-radius: 7px; box-shadow: 0 10px 26px rgba(0,0,0,.27); } .bb2c-language-menu.open .bb2c-language-dropdown { display: block; } .bb2c-language-dropdown a { display: block; width: 100%; padding: 11px 13px; color: #ffffff !important; background: var(--bb2-blue); font-size: 11px; font-weight: 500; text-decoration: none !important; } .bb2c-language-dropdown a:hover { color: var(--bb2-yellow) !important; background: rgba(255,255,255,.05); } /* ========================================================= SIDE MENU ========================================================= */ .bb2c-menu { position: fixed; top: var(--bb2-header); left: 0; z-index: 9999998; width: 235px; display: flex; flex-direction: column; padding: 12px 0 16px; background: var(--bb2-blue); border-right: 1px solid rgba(253,224,26,.40); border-bottom: 1px solid rgba(253,224,26,.40); box-shadow: 8px 12px 28px rgba(0,0,0,.20); transform: translateX(-105%); transition: transform .2s ease; } .bb2c-menu.open { transform: translateX(0); } .bb2c-menu a { display: block; padding: 12px 22px; color: white !important; font-size: 14px; text-decoration: none !important; } .bb2c-menu a:hover { color: var(--bb2-yellow) !important; } /* ========================================================= MAIN BACKGROUND ========================================================= */ .bb2c-main { min-height: 100vh; padding-top: var(--bb2-header); background-color: var(--bb2-yellow); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='390' height='220'%3E%3Cg font-family='Arial' font-weight='700' fill='%2308102e'%3E%3Ctext x='15' y='45' font-size='24' fill-opacity='.045' transform='rotate(-16 15 45)'%3EBB2C%3C/text%3E%3Ctext x='145' y='50' font-size='20' fill-opacity='.027' transform='rotate(13 145 50)'%3EBB3C%3C/text%3E%3Ctext x='280' y='40' font-size='23' fill-opacity='.043' transform='rotate(-8 280 40)'%3EBB2C%3C/text%3E%3Ctext x='55' y='130' font-size='20' fill-opacity='.027' transform='rotate(18 55 130)'%3EBB3C%3C/text%3E%3Ctext x='205' y='125' font-size='25' fill-opacity='.046' transform='rotate(-12 205 125)'%3EBB2C%3C/text%3E%3Ctext x='305' y='170' font-size='20' fill-opacity='.027' transform='rotate(20 305 170)'%3EBB3C%3C/text%3E%3C/g%3E%3C/svg%3E"); background-repeat: repeat; background-size: 390px 220px; } /* ========================================================= HERO ========================================================= */ .bb2c-hero { width: 100%; display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 12px; padding: 38px max(5vw,25px) 0; } .bb2c-hero-copy { max-width: 650px; } .bb2c-hero h1 { margin: 0; color: var(--bb2-blue); font-size: clamp(52px,7vw,90px); font-weight: 700; line-height: .95; letter-spacing: -3px; } .bb2c-hero h2 { margin: 15px 0 0; color: var(--bb2-blue); font-size: clamp(22px,3vw,33px); font-weight: 500; line-height: 1.2; } .bb2c-hero p { max-width: 610px; margin: 20px 0 0; color: rgba(8,16,46,.82); font-size: 17px; line-height: 1.6; } /* ========================================================= HERO BUTTONS ========================================================= */ .bb2c-hero-buttons { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; } .bb2c-btn { min-width: 150px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 9px 15px; border-radius: 7px; font-size: 11px; font-weight: 700; text-decoration: none !important; white-space: nowrap; } .bb2c-btn-dark { color: var(--bb2-yellow) !important; background: var(--bb2-blue); border: 1px solid var(--bb2-blue); } .bb2c-btn-outline { color: var(--bb2-blue) !important; background: transparent; border: 1px solid rgba(8,16,46,.65); } /* ========================================================= ROTATING COIN — MOVED SLIGHTLY DOWN ========================================================= */ .bb2c-coin-area { width: 100%; height: 285px; display: flex; align-items: center; justify-content: center; margin: 8px 0 -10px; overflow: hidden; } .bb2c-coin { display: block; width: 360px; max-width: none !important; height: auto; transform: translateY(6px) scale(1.11); border: 0 !important; box-shadow: none !important; } /* ========================================================= SECTIONS ========================================================= */ .bb2c-section { width: 100%; padding: 50px max(5vw,22px); } .bb2c-wallet-section { padding-top: 20px !important; } .bb2c-section-head { max-width: 780px; margin: 0 auto 34px; text-align: center; } .bb2c-section-head > span, .bb2c-contact > span { display: inline-block; margin-bottom: 10px; color: var(--bb2-blue); font-size: 11px; font-weight: 800; letter-spacing: 1.5px; } .bb2c-section-head h2, .bb2c-contact h2 { margin: 0; color: var(--bb2-blue); font-size: clamp(30px,5vw,48px); line-height: 1.1; } .bb2c-section-head p { margin: 18px auto 0; color: rgba(8,16,46,.74); font-size: 16px; line-height: 1.6; } /* ========================================================= WALLET ========================================================= */ .bb2c-wallet { max-width: 820px; margin: 0 auto; padding: 32px; color: white; background: linear-gradient( 145deg, #101b48, #08102e ); border-radius: 18px; box-shadow: 0 18px 45px rgba(8,16,46,.18); } .bb2c-wallet-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; } .bb2c-wallet-top small { display: block; color: rgba(255,255,255,.50); font-size: 10px; letter-spacing: 1.2px; } .bb2c-wallet-top strong { display: block; margin-top: 6px; color: white; font-size: clamp(34px,6vw,52px); } .bb2c-network-badge { padding: 7px 10px; color: var(--bb2-yellow); border: 1px solid rgba(253,224,26,.50); border-radius: 999px; font-size: 9px; } .bb2c-wallet-actions { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin-top: 26px; } .bb2c-wallet-actions button { min-height: 44px; color: var(--bb2-blue); background: var(--bb2-yellow); border: 0; border-radius: 7px; font-weight: 700; } .bb2c-wallet-address { margin-top: 20px; padding: 14px 16px; background: rgba(0,0,0,.22); border-radius: 8px; } .bb2c-wallet-address small { display: block; color: rgba(255,255,255,.45); } .bb2c-wallet-address span { display: block; margin-top: 4px; color: rgba(255,255,255,.85); font-size: 13px; } /* ========================================================= CARDS ========================================================= */ .bb2c-grid { width: 100%; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; padding: 15px max(4vw,18px) 70px; } .bb2c-card { padding: 26px 22px; color: white; background: linear-gradient( 145deg, #101b48, #08102e ); border-radius: 16px; } .bb2c-card-icon { width: 42px; height: 42px; display: flex; align-items: center; justify-content: center; margin-bottom: 20px; color: var(--bb2-blue); background: var(--bb2-yellow); border-radius: 50%; } .bb2c-card-label { color: var(--bb2-yellow); font-size: 10px; font-weight: 800; letter-spacing: 1.5px; } .bb2c-card h3 { margin: 6px 0 12px; color: white; font-size: 23px; } .bb2c-card p { margin: 0; color: rgba(255,255,255,.66); font-size: 13px; line-height: 1.55; } .bb2c-card-data { margin-top: 21px; border-top: 1px solid rgba(255,255,255,.10); } .bb2c-card-data div { display: flex; justify-content: space-between; gap: 10px; padding: 11px 0; border-bottom: 1px solid rgba(255,255,255,.08); } .bb2c-card-data span { color: rgba(255,255,255,.48); font-size: 10px; } .bb2c-card-data strong { color: white; font-size: 10px; text-align: right; } .bb2c-card > a { display: inline-block; margin-top: 18px; color: var(--bb2-yellow) !important; font-size: 10px; font-weight: 700; text-decoration: none !important; } /* ========================================================= SEARCH ========================================================= */ .bb2c-search { display: grid; grid-template-columns: 1fr auto; gap: 7px; margin-top: 22px; } .bb2c-search input { min-width: 0; padding: 10px; color: white; background: rgba(0,0,0,.22); border: 1px solid rgba(255,255,255,.13); border-radius: 7px; } .bb2c-search button { padding: 0 14px; color: var(--bb2-blue); background: var(--bb2-yellow); border: 0; border-radius: 7px; font-size: 10px; font-weight: 700; } /* ========================================================= MERCHANT FLOW ========================================================= */ .bb2c-flow { max-width: 950px; margin: 38px auto 0; display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: center; gap: 12px; } .bb2c-flow-card { min-height: 120px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 18px; background: var(--bb2-blue); border: 2px solid transparent; border-radius: 13px; text-align: center; } .bb2c-flow-card strong { color: white; font-size: 17px; } .bb2c-flow-card span { margin-top: 5px; color: rgba(255,255,255,.62); font-size: 11px; } .bb2c-flow-center { border: 2px solid var(--bb2-yellow); box-shadow: 0 0 0 3px rgba(253,224,26,.12); } .bb2c-flow-center strong { color: var(--bb2-yellow); } .bb2c-flow-center span { color: white; } .bb2c-flow-arrow { color: var(--bb2-blue); font-size: 28px; } /* ========================================================= CONTACT ========================================================= */ .bb2c-contact { width: 100%; padding: 50px 20px 65px; text-align: center; border-top: 1px solid rgba(8,16,46,.17); } .bb2c-contact a { display: block; margin-top: 8px; color: var(--bb2-blue) !important; font-size: 15px; font-weight: 600; text-decoration: none !important; } /* ========================================================= FOOTER ========================================================= */ .bb2c-bottom-space { height: 95px; } .bb3c-footer { position: fixed; left: 0; bottom: 0; z-index: 9999999; width: 100vw; min-height: 82px; display: grid; grid-template-columns: 165px 1fr max-content; align-items: center; gap: 15px; padding: 8px 15px; background: var(--bb2-dark); border-top: 2px solid var(--bb2-yellow); } .bb3c-heading { display: flex; flex-direction: column; } .bb3c-heading strong { color: var(--bb2-yellow); font-size: 12px; letter-spacing: 1px; } .bb3c-heading span { margin-top: 3px; color: white; font-size: 10px; } .bb3c-ticker { min-width: 0; overflow: hidden; } .bb3c-note { color: white; font-size: 11px; font-weight: 600; white-space: nowrap; } /* ========================================================= TABLET ========================================================= */ @media (max-width: 1050px) { .bb2c-grid { grid-template-columns: repeat(2,1fr); } .bb3c-footer { grid-template-columns: 150px 1fr; min-height: 105px; } .bb3c-note { grid-column: 1 / -1; text-align: center; } .bb2c-bottom-space { height: 120px; } } /* ========================================================= MOBILE ========================================================= */ @media (max-width: 700px) { :root { --bb2-header: 60px; } .bb2c-header { height: 60px; } /* HAMBURGER */ .bb2c-menu-btn { left: 7px; width: 38px; } .bb2c-menu-btn span { width: 22px; } /* LOGO */ .bb2c-logo { width: 46px; height: 46px; } .bb2c-logo img { width: 46px !important; height: 46px !important; } /* LANGUAGE — MOVED INWARD */ .bb2c-language-menu { right: 18px; } .bb2c-language-current { gap: 4px; padding: 7px 4px; font-size: 10px; } .bb2c-language-arrow { font-size: 9px; } .bb2c-language-dropdown { width: 108px; } .bb2c-language-dropdown a { padding: 10px 11px; font-size: 10px; } .bb2c-menu { width: 215px; } /* HERO */ .bb2c-hero { display: block; padding: 27px 17px 0; text-align: center; } .bb2c-hero h1 { font-size: clamp(48px,15vw,65px); letter-spacing: -2px; } .bb2c-hero h2 { margin-top: 11px; font-size: 20px; } .bb2c-hero p { margin: 15px auto 0; font-size: 14px; line-height: 1.5; } /* HERO BUTTONS */ .bb2c-hero-buttons { width: 100%; display: flex; flex-wrap: nowrap; gap: 7px; margin-top: 18px; } .bb2c-hero-buttons .bb2c-btn { flex: 1 1 50%; min-width: 0; min-height: 41px; padding: 7px 2px; font-size: 9px; } /* COIN — LOWER, NOT CLIPPED */ .bb2c-coin-area { height: 205px; margin: 14px auto -12px; } .bb2c-coin { width: 288px; transform: translateY(-6px) scale(1.14); } /* WALLET CLOSER */ .bb2c-wallet-section { padding-top: 8px !important; } /* SECTIONS */ .bb2c-section { padding: 40px 17px; } .bb2c-section-head { margin-bottom: 27px; } /* WALLET */ .bb2c-wallet { padding: 20px 16px; } .bb2c-wallet-actions { grid-template-columns: 1fr; } /* CARDS */ .bb2c-grid { grid-template-columns: 1fr; padding: 12px 17px 50px; } .bb2c-card { padding: 23px 19px; } .bb2c-card-data div { flex-direction: column; align-items: flex-start; gap: 3px; } .bb2c-card-data strong { text-align: left; } .bb2c-search { grid-template-columns: 1fr; } .bb2c-search button { min-height: 39px; } /* FLOW */ .bb2c-flow { grid-template-columns: 1fr; max-width: 380px; } .bb2c-flow-arrow { transform: rotate(90deg); } /* FOOTER */ .bb3c-footer { display: flex; flex-direction: column; justify-content: center; align-items: stretch; gap: 4px; min-height: 118px; padding: 6px 5px; } .bb3c-heading { flex-direction: row; justify-content: center; gap: 7px; } .bb3c-heading strong, .bb3c-heading span { font-size: 9px; } .bb3c-note { width: 100%; font-size: clamp(7px,2vw,8.5px); white-space: nowrap; text-align: center; } .bb2c-bottom-space { height: 132px; } } /* ========================================================= VERY SMALL MOBILE ========================================================= */ @media (max-width: 380px) { .bb2c-language-menu { right: 14px; } .bb2c-language-current { font-size: 9px; } .bb2c-hero-buttons .bb2c-btn { font-size: 8.5px; } } /* ========================================================= HOME HERO — COMPACTED ========================================================= */ .bb2c-hero { padding-top: 22px; } .bb2c-hero h1 { font-size: clamp(46px,6vw,76px); line-height: .92; } .bb2c-hero h2 { margin-top: 10px; } .bb2c-hero p { margin-top: 14px; } .bb2c-hero-buttons { margin-top: 16px; } .bb2c-coin-area { margin-top: 2px; } /* ========================================================= INLINE DIRECTORY REGISTRATION ========================================================= */ .bb2c-join-section { padding-top: 12px !important; } .bb2c-join-head { margin-bottom: 24px; } .bb2c-join-panel { max-width: 920px; margin: 0 auto; padding: 26px; background: rgba(255,255,255,.22); border: 1px solid rgba(8,16,46,.18); border-radius: 18px; } .bb2c-join-benefits { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; } .bb2c-join-benefits > div { min-height: 118px; padding: 18px; background: var(--bb2-blue); border-radius: 12px; } .bb2c-join-benefits strong { display: block; color: var(--bb2-yellow); font-size: 13px; } .bb2c-join-benefits span { display: block; margin-top: 7px; color: rgba(255,255,255,.74); font-size: 11px; line-height: 1.45; } .bb2c-join-start, .bb2c-join-continue { width: 100%; min-height: 48px; margin-top: 18px; padding: 10px 16px; color: var(--bb2-yellow); background: var(--bb2-blue); border: 0; border-radius: 8px; font-size: 11px; font-weight: 800; letter-spacing: .5px; cursor: pointer; } .bb2c-join-form { margin-top: 18px; padding-top: 18px; border-top: 1px solid rgba(8,16,46,.18); } .bb2c-join-form-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 12px; } .bb2c-join-form label { display: flex; flex-direction: column; gap: 6px; color: var(--bb2-blue); font-size: 10px; font-weight: 800; letter-spacing: .35px; } .bb2c-join-form input, .bb2c-join-form select { width: 100%; min-height: 44px; padding: 0 11px; color: var(--bb2-blue); background: rgba(255,255,255,.88); border: 1px solid rgba(8,16,46,.22); border-radius: 7px; font-size: 13px; } .bb2c-payment-note { margin-top: 14px; padding: 14px 16px; background: rgba(8,16,46,.08); border-left: 4px solid var(--bb2-blue); border-radius: 7px; } .bb2c-payment-note strong { display: block; color: var(--bb2-blue); font-size: 11px; } .bb2c-payment-note span { display: block; margin-top: 4px; color: rgba(8,16,46,.72); font-size: 11px; line-height: 1.45; } .bb2c-payment-actions { display: grid; grid-template-columns: repeat(2,1fr); gap: 10px; margin-top: 18px; } .bb2c-payment-choice { min-height: 48px; padding: 10px 16px; color: var(--bb2-yellow); background: var(--bb2-blue); border: 0; border-radius: 8px; font-size: 11px; font-weight: 800; letter-spacing: .5px; cursor: pointer; } .bb2c-payment-choice-stripe { color: var(--bb2-blue); background: var(--bb2-yellow); border: 1px solid var(--bb2-blue); } .bb2c-payment-choice:disabled { opacity: .55; cursor: wait; } .bb2c-join-status { margin: 12px 0 0; color: rgba(8,16,46,.78); font-size: 11px; line-height: 1.5; text-align: center; } @media (max-width: 700px) { .bb2c-hero { padding: 18px 17px 0; } .bb2c-hero h1 { font-size: clamp(42px,13vw,56px); line-height: .94; letter-spacing: -1.8px; } .bb2c-hero h2 { margin-top: 7px; font-size: 18px; } .bb2c-hero p { margin-top: 10px; font-size: 13px; line-height: 1.45; } .bb2c-hero-buttons { margin-top: 12px; } .bb2c-coin-area { height: 190px; margin: 4px auto -10px; } .bb2c-coin { width: 270px; transform: translateY(-4px) scale(1.10); } .bb2c-join-section { padding-top: 5px !important; } .bb2c-join-head { margin-bottom: 18px; } .bb2c-join-head h2 { font-size: 31px; } .bb2c-join-head p { margin-top: 11px; font-size: 13px; line-height: 1.45; } .bb2c-join-panel { padding: 16px; } .bb2c-join-benefits { grid-template-columns: 1fr; gap: 8px; } .bb2c-join-benefits > div { min-height: 0; padding: 15px; } .bb2c-join-form-grid { grid-template-columns: 1fr; } .bb2c-payment-actions { grid-template-columns: 1fr; } } /* ========================================================= INTELLIGENT PROVIDER SEARCH ========================================================= */ .bb2c-provider-search-section { padding-top: 18px !important; padding-bottom: 30px !important; } .bb2c-provider-search-head { margin-bottom: 22px; } .bb2c-provider-search-panel { max-width: 980px; margin: 0 auto; padding: 22px; background: rgba(255,255,255,.22); border: 1px solid rgba(8,16,46,.18); border-radius: 18px; } .bb2c-provider-search-grid { display: grid; grid-template-columns: 2fr 1fr 1fr auto; gap: 10px; align-items: end; } .bb2c-provider-search-grid label { position: relative; display: flex; flex-direction: column; gap: 6px; color: var(--bb2-blue); font-size: 10px; font-weight: 800; letter-spacing: .35px; } .bb2c-provider-search-grid input { width: 100%; min-height: 46px; padding: 0 11px; color: var(--bb2-blue); background: rgba(255,255,255,.92); border: 1px solid rgba(8,16,46,.22); border-radius: 8px; font-size: 13px; } #bb2cProviderSearchButton { min-height: 46px; padding: 0 20px; color: var(--bb2-yellow); background: var(--bb2-blue); border: 0; border-radius: 8px; font-size: 10px; font-weight: 800; cursor: pointer; } .bb2c-provider-suggestions { position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 50; overflow: hidden; background: #ffffff; border: 1px solid rgba(8,16,46,.18); border-radius: 8px; box-shadow: 0 12px 28px rgba(8,16,46,.18); } .bb2c-provider-suggestions button { width: 100%; padding: 10px 12px; color: var(--bb2-blue); background: #ffffff; border: 0; border-bottom: 1px solid rgba(8,16,46,.08); text-align: left; font-size: 12px; cursor: pointer; } .bb2c-provider-suggestions button:hover { background: rgba(253,224,26,.20); } .bb2c-provider-results { margin-top: 16px; } .bb2c-provider-results > p { margin: 0; color: rgba(8,16,46,.68); font-size: 12px; text-align: center; } .bb2c-provider-result-card { margin-top: 10px; padding: 16px; background: var(--bb2-blue); border-radius: 11px; color: #ffffff; } .bb2c-provider-result-card strong { display: block; color: var(--bb2-yellow); font-size: 15px; } .bb2c-provider-result-card span { display: block; margin-top: 5px; color: rgba(255,255,255,.72); font-size: 11px; line-height: 1.45; } .bb2c-provider-directory-link { display: block; margin-top: 17px; color: var(--bb2-blue) !important; font-size: 10px; font-weight: 800; text-align: center; text-decoration: none !important; } @media (max-width: 700px) { .bb2c-provider-search-section { padding-top: 8px !important; } .bb2c-provider-search-panel { padding: 15px; } .bb2c-provider-search-grid { grid-template-columns: 1fr; } #bb2cProviderSearchButton { width: 100%; } } /* ========================================================= MARKET PRICE RESEARCH ========================================================= */ .bb2c-market-section { padding-top: 12px !important; padding-bottom: 30px !important; } .bb2c-market-head { margin-bottom: 22px; } .bb2c-market-panel { max-width: 980px; margin: 0 auto; padding: 22px; background: rgba(255,255,255,.22); border: 1px solid rgba(8,16,46,.18); border-radius: 18px; } .bb2c-market-grid { display: grid; grid-template-columns: 1.35fr 1.2fr 1.2fr auto; gap: 10px; align-items: end; } .bb2c-market-grid label { display: flex; flex-direction: column; gap: 6px; color: var(--bb2-blue); font-size: 10px; font-weight: 800; letter-spacing: .35px; } .bb2c-market-grid input { width: 100%; min-height: 46px; padding: 0 11px; color: var(--bb2-blue); background: rgba(255,255,255,.92); border: 1px solid rgba(8,16,46,.22); border-radius: 8px; font-size: 13px; } #bb2cMarketResearchButton { min-height: 46px; padding: 0 18px; color: var(--bb2-yellow); background: var(--bb2-blue); border: 0; border-radius: 8px; font-size: 10px; font-weight: 800; cursor: pointer; } .bb2c-market-results { margin-top: 16px; } .bb2c-market-results > p { margin: 0; color: rgba(8,16,46,.70); font-size: 12px; line-height: 1.5; text-align: center; } .bb2c-market-card { margin-top: 10px; padding: 16px; background: var(--bb2-blue); border-radius: 11px; color: #fff; } .bb2c-market-card strong { display: block; color: var(--bb2-yellow); font-size: 14px; } .bb2c-market-card span { display: block; margin-top: 6px; color: rgba(255,255,255,.76); font-size: 11px; line-height: 1.45; } .bb2c-market-links { display: grid; grid-template-columns: repeat(3,1fr); gap: 9px; margin-top: 12px; } .bb2c-market-links a { min-height: 43px; display: flex; align-items: center; justify-content: center; padding: 9px 12px; color: var(--bb2-blue) !important; background: var(--bb2-yellow); border: 1px solid rgba(255,255,255,.15); border-radius: 7px; font-size: 10px; font-weight: 800; text-align: center; text-decoration: none !important; } @media (max-width: 700px) { .bb2c-market-panel { padding: 15px; } .bb2c-market-grid, .bb2c-market-links { grid-template-columns: 1fr; } #bb2cMarketResearchButton { width: 100%; } } .bb2c-field-error { border: 2px solid #b00020 !important; box-shadow: 0 0 0 3px rgba(176,0,32,.12) !important; } .bb2c-required-note { margin-bottom: 14px; padding: 13px 15px; background: rgba(8,16,46,.08); border-radius: 8px; } .bb2c-required-note strong { display: block; color: var(--bb2-blue); font-size: 11px; } .bb2c-required-note span { display: block; margin-top: 4px; color: rgba(8,16,46,.72); font-size: 11px; line-height: 1.45; } .bb2c-field-error { outline: 3px solid #b00020 !important; outline-offset: 2px; } .bb2c-provider-join-cta { width: 100%; min-height: 46px; margin-top: 14px; padding: 10px 14px; color: var(--bb2-blue); background: var(--bb2-yellow); border: 0; border-radius: 8px; font-size: 11px; font-weight: 800; letter-spacing: .4px; cursor: pointer; } (function () { /* ===================================================== HAMBURGER MENU ====================================================== */ var menuButton = document.getElementById( 'bb2cMenuBtn' ); var menu = document.getElementById( 'bb2cMenu' ); if ( menuButton && menu ) { menuButton.addEventListener( 'click', function (event) { event.stopPropagation(); var isOpen = menu.classList.toggle( 'open' ); menuButton.setAttribute( 'aria-expanded', isOpen ? 'true' : 'false' ); } ); menu .querySelectorAll('a') .forEach( function (link) { link.addEventListener( 'click', function () { menu.classList.remove( 'open' ); menuButton.setAttribute( 'aria-expanded', 'false' ); } ); } ); } /* ===================================================== LANGUAGE MENU ====================================================== */ var languageMenu = document.getElementById( 'bb2cLanguageMenu' ); var languageButton = document.getElementById( 'bb2cLanguageBtn' ); if ( languageMenu && languageButton ) { languageButton.addEventListener( 'click', function (event) { event.stopPropagation(); var isOpen = languageMenu.classList.toggle( 'open' ); languageButton.setAttribute( 'aria-expanded', isOpen ? 'true' : 'false' ); } ); } /* ===================================================== CLOSE MENUS WHEN CLICKING OUTSIDE ====================================================== */ document.addEventListener( 'click', function () { if (menu) { menu.classList.remove( 'open' ); } if (menuButton) { menuButton.setAttribute( 'aria-expanded', 'false' ); } if (languageMenu) { languageMenu.classList.remove( 'open' ); } if (languageButton) { languageButton.setAttribute( 'aria-expanded', 'false' ); } } ); })(); /* ===================================================== INLINE DIRECTORY REGISTRATION ====================================================== */ var joinStart = document.getElementById( 'bb2cJoinStart' ); var joinForm = document.getElementById( 'bb2cJoinForm' ); var joinPayZelle = document.getElementById( 'bb2cPayZelle' ); var joinPayStripe = document.getElementById( 'bb2cPayStripe' ); var joinStatus = document.getElementById( 'bb2cJoinStatus' ); if ( joinStart && joinForm ) { joinStart.addEventListener( 'click', function () { var isHidden = joinForm.hasAttribute( 'hidden' ); if (isHidden) { joinForm.removeAttribute( 'hidden' ); joinStart.setAttribute( 'aria-expanded', 'true' ); joinStart.textContent = 'REGISTRATION DETAILS'; joinForm.scrollIntoView({ behavior: 'smooth', block: 'nearest' }); } } ); } function getDirectoryRegistrationData() { var category = document.getElementById( 'bb2cJoinCategory' ); var name = document.getElementById( 'bb2cJoinName' ); var email = document.getElementById( 'bb2cJoinEmail' ); var phone = document.getElementById( 'bb2cJoinPhone' ); var country = document.getElementById( 'bb2cJoinCountry' ); var postal = document.getElementById( 'bb2cJoinPostal' ); var missing = []; var firstMissing = null; if ( !category || !category.value ) { missing.push('category'); firstMissing = firstMissing || category; } if ( !name || !name.value.trim() ) { missing.push('business/provider name'); firstMissing = firstMissing || name; } if ( !email || !email.value.trim() ) { missing.push('email'); firstMissing = firstMissing || email; } if ( email && email.value.trim() && !email.checkValidity() ) { missing.push('a valid email'); firstMissing = firstMissing || email; } if ( missing.length ) { if (joinStatus) { joinStatus.textContent = 'Missing: ' + missing.join(', ') + '. Complete the highlighted field above and try again.'; } if (firstMissing) { firstMissing.classList.add( 'bb2c-field-error' ); firstMissing.scrollIntoView({ behavior: 'smooth', block: 'center' }); setTimeout( function () { firstMissing.focus(); }, 350 ); } return null; } [ category, name, email ] .filter(Boolean) .forEach( function (field) { field.classList.remove( 'bb2c-field-error' ); } ); return { category_id: category.value, provider_name: name.value.trim(), email: email.value.trim(), phone: phone ? phone.value.trim() : '', country: country ? country.value.trim() : '', postal_code: postal ? postal.value.trim() : '', city: document.getElementById('bb2cJoinCity') ? document.getElementById('bb2cJoinCity').value.trim() : '', service_area: document.getElementById('bb2cJoinServiceArea') ? document.getElementById('bb2cJoinServiceArea').value.trim() : '', service_radius: document.getElementById('bb2cJoinServiceRadius') ? parseInt(document.getElementById('bb2cJoinServiceRadius').value,10) : 25 }; } function requireConfiguredDirectoryFee(data) { if (!data) { return false; } if (data.category_id !== '1') { if (joinStatus) { joinStatus.textContent = 'The activation fee for this category has not been configured yet. Independent Drivers is the first category currently enabled for payment.'; } return false; } return true; } if ( joinPayZelle && joinStatus ) { joinPayZelle.addEventListener( 'click', async function () { var data = getDirectoryRegistrationData(); if ( !requireConfiguredDirectoryFee( data ) ) { return; } data.payment_method = 'zelle'; joinPayZelle.disabled = true; joinPayZelle.textContent = 'CREATING APPLICATION...'; joinStatus.textContent = 'Creating your BB2C Directory application.'; try { var response = await fetch( 'https://buyby2-backend.onrender.com/directory/register', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify( data ) } ); var responseText = await response.text(); if (!response.ok) { throw new Error( responseText || 'The application could not be created.' ); } var registration = JSON.parse( responseText ); if ( registration.existing_application && registration.payment_status === 'paid' ) { joinStatus.innerHTML = 'Existing paid application recovered.
' + 'Application ID: ' + bb2cEscapeHtml( registration.application_id ) + '
' + ( registration.status === 'active' ? 'Status: Active Member. No additional payment is required.' : 'Status: Pending Approval. No additional payment is required.' ); joinPayZelle.textContent = 'PAYMENT ALREADY COMPLETE'; return; } joinStatus.innerHTML = 'Independent Drivers — Activation Fee: $1.00
' + 'Application ID: ' + registration.application_id + '
' + 'Send $1.00 by Zelle to admin@buyby2.com. ' + 'Use the same email entered above so BuyBy2 LLC can match the payment to your application.'; joinPayZelle.textContent = 'ZELLE APPLICATION CREATED'; } catch (error) { joinPayZelle.disabled = false; joinPayZelle.textContent = 'PAY WITH ZELLE'; joinStatus.textContent = 'The application could not be created. Please try again.'; console.error( 'BB2C directory Zelle registration error:', error ); } } ); } if ( joinPayStripe && joinStatus ) { joinPayStripe.addEventListener( 'click', async function () { var data = getDirectoryRegistrationData(); if ( !requireConfiguredDirectoryFee( data ) ) { return; } joinPayStripe.disabled = true; joinPayStripe.textContent = 'CONNECTING TO STRIPE...'; joinStatus.textContent = 'Opening secure Stripe checkout through the BuyBy2 LLC Stripe account for the $1.00 Independent Drivers activation fee.'; try { data.payment_method = 'stripe'; var response = await fetch( 'https://buyby2-backend.onrender.com/directory/register', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify( data ) } ); var responseText = await response.text(); if (!response.ok) { throw new Error( responseText || 'Stripe checkout could not be created.' ); } var checkoutData = JSON.parse( responseText ); if ( checkoutData.application_id ) { try { window.sessionStorage.setItem( 'bb2cDirectoryApplicationID', checkoutData.application_id ); } catch (storageError) { console.warn( 'BB2C application ID could not be saved in session storage.', storageError ); } } if ( checkoutData.existing_application && checkoutData.payment_status === 'paid' ) { joinStatus.innerHTML = 'Existing paid application recovered.
' + 'Application ID: ' + bb2cEscapeHtml( checkoutData.application_id ) + '
' + ( checkoutData.status === 'active' ? 'Status: Active Member. No additional payment is required.' : 'Status: Pending Approval. No additional payment is required.' ); joinPayStripe.textContent = 'PAYMENT ALREADY COMPLETE'; return; } if ( !checkoutData.url ) { throw new Error( 'Stripe checkout URL was not returned.' ); } window.location.href = checkoutData.url; } catch (error) { joinPayStripe.disabled = false; joinPayStripe.textContent = 'PAY WITH STRIPE'; joinStatus.textContent = 'Stripe checkout is temporarily unavailable. Please try again or use Zelle.'; console.error( 'BB2C directory Stripe checkout error:', error ); } } ); } var directoryPaymentStatus = window.location.hash === '#directory-payment-success' ? 'success' : ( window.location.hash === '#directory-payment-cancel' ? 'cancel' : '' ); if ( directoryPaymentStatus && joinForm && joinStatus ) { joinForm.removeAttribute( 'hidden' ); if (joinStart) { joinStart.setAttribute( 'aria-expanded', 'true' ); joinStart.textContent = 'REGISTRATION DETAILS'; } if ( directoryPaymentStatus === 'success' ) { joinStatus.textContent = 'Payment completed successfully. Verifying your BB2C Directory application status...'; (async function () { var applicationID = new URLSearchParams( window.location.search ).get( 'bb2c_application_id' ) || ''; try { if (!applicationID) { applicationID = window.sessionStorage.getItem( 'bb2cDirectoryApplicationID' ) || ''; } } catch (storageError) { console.warn( 'BB2C application ID could not be read from session storage.', storageError ); } if (!applicationID) { joinStatus.textContent = 'Payment completed successfully. Your BB2C Directory application is being reviewed. No additional payment is required.'; return; } try { var statusResponse = await fetch( 'https://buyby2-backend.onrender.com/directory/status?application_id=' + encodeURIComponent( applicationID ) ); if (!statusResponse.ok) { throw new Error( 'Directory status could not be verified.' ); } var application = await statusResponse.json(); if ( application.payment_status === 'paid' && application.status === 'active' ) { joinStatus.innerHTML = 'Payment verified — Active Member.
' + 'Application ID: ' + bb2cEscapeHtml( application.application_id ) + '
' + 'Your BB2C Member profile is active and can appear in the Member Directory search.'; try { window.sessionStorage.removeItem( 'bb2cDirectoryApplicationID' ); } catch (storageError) { } return; } if ( application.payment_status === 'paid' && application.status === 'pending_approval' ) { joinStatus.innerHTML = 'Payment verified — Pending Approval.
' + 'Application ID: ' + bb2cEscapeHtml( application.application_id ) + '
' + 'Your payment is complete. No additional payment is required.'; return; } joinStatus.innerHTML = 'Application status verified.
' + 'Application ID: ' + bb2cEscapeHtml( application.application_id ) + '
' + 'Payment: ' + bb2cEscapeHtml( application.payment_status ) + ' · Status: ' + bb2cEscapeHtml( application.status ) + '.'; } catch (statusError) { joinStatus.textContent = 'Payment completed successfully. Your application already exists; no additional payment is required. Status verification is temporarily unavailable.'; console.error( 'BB2C directory status verification error:', statusError ); } })(); } else if ( directoryPaymentStatus === 'cancel' ) { joinStatus.textContent = 'Stripe payment was canceled. No Stripe payment was completed.'; } window.setTimeout( function () { var joinSection = document.getElementById( 'join-directory' ); if (joinSection) { joinSection.scrollIntoView({ behavior: 'smooth', block: 'start' }); } if ( window.history && window.history.replaceState ) { window.history.replaceState( null, '', window.location.pathname + '#join-directory' ); } }, 50 ); } /* ===================================================== INTELLIGENT PROVIDER SEARCH ====================================================== */ var providerQuery = document.getElementById( 'bb2cProviderQuery' ); var providerCountry = document.getElementById( 'bb2cProviderCountry' ); var providerPostal = document.getElementById( 'bb2cProviderPostal' ); var providerSearchButton = document.getElementById( 'bb2cProviderSearchButton' ); var providerSuggestions = document.getElementById( 'bb2cProviderSuggestions' ); var providerResults = document.getElementById( 'bb2cProviderResults' ); function bb2cNormalize(value) { return (value || '') .toLowerCase() .normalize('NFD') .replace(/[\u0300-\u036f]/g, '') .replace(/[^a-z0-9 ]/g, ' ') .replace(/\s+/g, ' ') .trim(); } function bb2cDistance(a, b) { a = bb2cNormalize(a); b = bb2cNormalize(b); var matrix = []; for (var i = 0; i <= b.length; i++) { matrix[i] = [i]; } for (var j = 0; j <= a.length; j++) { matrix[0][j] = j; } for (i = 1; i <= b.length; i++) { for (j = 1; j <= a.length; j++) { if ( b.charAt(i - 1) === a.charAt(j - 1) ) { matrix[i][j] = matrix[i - 1][j - 1]; } else { matrix[i][j] = Math.min( matrix[i - 1][j - 1] + 1, matrix[i][j - 1] + 1, matrix[i - 1][j] + 1 ); } } } return matrix[b.length][a.length]; } function getBB2CCategories() { var select = document.getElementById( 'bb2cJoinCategory' ); if (!select) { return []; } return Array.from( select.options ) .filter( function (option) { return option.value; } ) .map( function (option) { return { id: option.value, label: option.text.replace( /^\d+\s—\s/, '' ) }; } ); } function showCategorySuggestions(value) { if ( !providerSuggestions ) { return; } var query = bb2cNormalize( value ); if ( query.length < 2 ) { providerSuggestions.hidden = true; providerSuggestions.innerHTML = ''; return; } var candidates = getBB2CCategories() .map( function (category) { var normalized = bb2cNormalize( category.label ); var score = 999; if ( normalized.indexOf( query ) === 0 ) { score = 0; } else if ( normalized.indexOf( query ) !== -1 ) { score = 1; } else { normalized .split(' ') .forEach( function (token) { score = Math.min( score, bb2cDistance( query, token ) ); } ); } return { id: category.id, label: category.label, score: score }; } ) .filter( function (category) { var allowed = Math.max( 1, Math.min( 3, Math.floor( query.length / 3 ) ) ); return category.score <= allowed || category.score <= 1; } ) .sort( function (a, b) { return a.score - b.score; } ) .slice( 0, 6 ); if ( !candidates.length ) { providerSuggestions.hidden = true; providerSuggestions.innerHTML = ''; return; } providerSuggestions.innerHTML = candidates .map( function (category) { return ''; } ) .join(''); providerSuggestions.hidden = false; providerSuggestions .querySelectorAll( 'button' ) .forEach( function (button) { button.addEventListener( 'click', function () { providerQuery.value = this.getAttribute( 'data-category-label' ); providerSuggestions.hidden = true; runProviderSearch(); } ); } ); } async function runProviderSearch() { if ( !providerResults ) { return; } var query = providerQuery ? providerQuery.value.trim() : ''; var country = providerCountry ? providerCountry.value.trim() : ''; var postal = providerPostal ? providerPostal.value.trim() : ''; providerResults.innerHTML = '

Searching active BB2C Members...

'; try { var params = new URLSearchParams(); if (query) { params.set( 'q', query ); } if (country) { params.set( 'country', country ); } if (postal) { params.set( 'postal_code', postal ); } params.set( 'limit', '20' ); var response = await fetch( 'https://buyby2-backend.onrender.com/directory/search?' + params.toString() ); if (!response.ok) { throw new Error( 'Search request failed.' ); } var data = await response.json(); var results = Array.isArray( data.results ) ? data.results : []; if ( !results.length ) { var closest = getBB2CCategories() .map( function (category) { var normalized = bb2cNormalize( category.label ); var score = 999; if ( query && normalized.indexOf( bb2cNormalize( query ) ) !== -1 ) { score = 0; } else if (query) { normalized .split(' ') .forEach( function (token) { score = Math.min( score, bb2cDistance( query, token ) ); } ); } return { label: category.label, score: score }; } ) .sort( function (a, b) { return a.score - b.score; } )[0]; var categoryMessage = closest && query ? 'Closest category: ' + bb2cEscapeHtml( closest.label ) + '
' : ''; providerResults.innerHTML = '
' + categoryMessage + 'There are currently no approved Active BB2C Members matching this search.' + '' + '
'; var joinCTA = document.getElementById( 'bb2cProviderJoinCTA' ); if ( joinCTA ) { joinCTA.addEventListener( 'click', function () { var closestOption = null; if ( closest && closest.label ) { closestOption = getBB2CCategories() .find( function (category) { return category.label === closest.label; } ); } var joinCategory = document.getElementById( 'bb2cJoinCategory' ); if ( joinCategory && closestOption ) { joinCategory.value = closestOption.id; } var joinSection = document.getElementById( 'join-directory' ); var joinStartButton = document.getElementById( 'bb2cJoinStart' ); var joinForm = document.getElementById( 'bb2cJoinForm' ); if ( joinForm ) { joinForm.removeAttribute( 'hidden' ); } if ( joinStartButton ) { joinStartButton.setAttribute( 'aria-expanded', 'true' ); joinStartButton.textContent = 'REGISTRATION DETAILS'; } if ( joinSection ) { joinSection.scrollIntoView({ behavior: 'smooth', block: 'start' }); } } ); } return; } providerResults.innerHTML = results .map( function (member) { var location = [ member.city, member.postal_code, member.country ] .filter(Boolean) .join(' · '); var area = member.service_area ? member.service_area : ''; return '
' + '' + member.provider_name + '' + '' + member.category_name + (location ? ' · ' + location : '') + '' + (area ? 'Service area: ' + area + '' : '') + '
'; } ) .join(''); } catch (error) { var fallback = getBB2CCategories() .map( function (category) { return { label: category.label, score: query ? bb2cDistance( query, category.label ) : 999 }; } ) .sort( function (a, b) { return a.score - b.score; } )[0]; providerResults.innerHTML = '
' + (fallback && query ? 'Possible category: ' + bb2cEscapeHtml( fallback.label ) + '' : 'Provider search') + 'The live Member search is temporarily unavailable. The category finder is still working; you can also browse all categories below.' + '
'; console.error( 'BB2C provider search error:', error ); } } if ( providerQuery ) { var providerSuggestionTimer; providerQuery.addEventListener( 'input', function () { clearTimeout( providerSuggestionTimer ); var value = this.value; providerSuggestionTimer = setTimeout( function () { showCategorySuggestions( value ); }, 120 ); } ); providerQuery.addEventListener( 'keydown', function (event) { if ( event.key === 'Enter' ) { event.preventDefault(); if ( providerSuggestions ) { providerSuggestions.hidden = true; } runProviderSearch(); } } ); } if ( providerSearchButton ) { providerSearchButton.addEventListener( 'click', runProviderSearch ); } /* ===================================================== MARKET PRICE RESEARCH ====================================================== */ var marketService = document.getElementById( 'bb2cMarketService' ); var marketLocation = document.getElementById( 'bb2cMarketLocation' ); var marketDestination = document.getElementById( 'bb2cMarketDestination' ); var marketButton = document.getElementById( 'bb2cMarketResearchButton' ); var marketResults = document.getElementById( 'bb2cMarketResults' ); function bb2cEscapeHtml(value) { return String(value || '') .replace(/&/g, '&') .replace(//g, '>') .replace(/"/g, '"') .replace(/'/g, '''); } function bb2cIsRideSearch(value) { var q = (value || '') .toLowerCase(); return [ 'driver', 'ride', 'rideshare', 'uber', 'lyft', 'empower', 'taxi', 'airport', 'chauffeur' ].some( function (word) { return q.indexOf(word) !== -1; } ); } function runMarketResearch() { if ( !marketResults ) { return; } var service = marketService ? marketService.value.trim() : ''; var location = marketLocation ? marketLocation.value.trim() : ''; var destination = marketDestination ? marketDestination.value.trim() : ''; if (!service) { marketResults.innerHTML = '

Please enter a service to research.

'; return; } if ( bb2cIsRideSearch( service ) ) { var rideQuery = [ service, location, destination, 'fare estimate' ] .filter(Boolean) .join(' '); var webRideSearch = 'https://www.google.com/search?q=' + encodeURIComponent( rideQuery ); marketResults.innerHTML = '
' + 'Current ride-price reference' + 'Ride prices can change with time, demand, traffic, route, tolls and airport fees. Check the current fare directly with each provider, then use those figures as a reference when negotiating with an Independent Driver.' + '' + '' + '
'; return; } var query = [ 'average cost', service, location ] .filter(Boolean) .join(' '); var currentPrices = 'https://www.google.com/search?q=' + encodeURIComponent( query ); var localQuotes = 'https://www.google.com/search?q=' + encodeURIComponent( service + ' near ' + location + ' prices' ); marketResults.innerHTML = '
' + 'Market reference for ' + bb2cEscapeHtml(service) + '' + 'Use current public pricing and local quotes as a reference. A market reference is not a guaranteed quote from a BB2C Member.' + '' + '
'; } if ( marketButton ) { marketButton.addEventListener( 'click', runMarketResearch ); } [ marketService, marketLocation, marketDestination ] .filter(Boolean) .forEach( function (input) { input.addEventListener( 'keydown', function (event) { if ( event.key === 'Enter' ) { event.preventDefault(); runMarketResearch(); } } ); } );