/* ═══════════════════════════════════════════════════════════════════════════════
   PARTNERS AND FUNDING. PROPOSED, 20 Nov 2026, brief 8 and its follow-on (canvas page 12). NOT APPROVED AND NOT BUILT.
   An illustration for Nicole to read. It is not a change to merge unread, and nothing here has a tracker row or an approval yet.

   What it adds, for a partner (clientTypeId 'agency') only:
     PartnerFundingOnlyDoor        the funding-only way in on the first screen: a slim bar (recommended) or a fourth answer
     PartnerWhiteLabelFundingLine  one line at the foot of Managed services on the white-label route, which opens the referral view
     PartnerFundingTag             one small tag beside each Funding card's name: Refer and earn, or White label
     PartnerFinancePanel           "What you keep": three cells, the choice of who fills in the enquiry, one line and the action
     PartnerOwnBusinessLine        the line for a partner borrowing for their own company

   House parts only: the info bar (.alert), the answer card and its pill (.agency-intent-card), the margin panel (.svc-margin and its
   cells and operators), the add-on box and chips, the stat tiles, the ghost button (.btn--ghost). No new stylesheet: the few inline
   styles here stand in for classes a real build would add, with hover states.
   Every loan figure comes from GG_BIZ_FINANCE.partnerRates in src/data.jsx. Every new string a partner reads is in PF_COPY below.

   PREVIEW SWITCHES, for the boards only, never to ship: ?bfrates=two (data.jsx), ?pfdoor=card|none, ?pfpanel=0, ?pfwho=1, ?pfin=1,
   ?pfpaid=money.
   23 Nov 2026, FUNDING J7: the five switches in this file are gone, because canvas page 12's checks board says they must not ship.
   Each helper now returns the agreed answer: the bar (section 1, agreed), the panel on, Who are you referring? off on the Funding step
   (decision 21, agreed 20 Nov), the signed-in words when the portal hint cookie is set or the calculator is embedded (the same test
   page 4's grant card uses), and as credit (D31). ?bfrates=two lives in src/data.jsx, which is J1's file, and is raised there.
   RE-BASED 20 Nov 2026 onto the merged base (pages 3, 4 and 5 on 36740cc). The stand-in Grant Funding card is gone: page 4's real
   card is in the base.
   If this file ever ships: tools/gen_embed_manifest.py has to LIST it, because partners meet the calculator inside the portal (Grow).
   ═══════════════════════════════════════════════════════════════════════════════ */

function pfQ(name) { try { return new URLSearchParams(window.location.search).get(name); } catch (e) { return null; } }
function pfGBP(n) { return window.ggBizGBP(n); }
/* 23 Nov 2026, FUNDING J7: no preview switch reaches a visitor.
   WAS: function pfDoor() { const v = pfQ('pfdoor'); return v === 'card' ? 'card' : (v === 'none' ? 'none' : 'bar'); }
   WAS: function pfPanelOn() { return pfQ('pfpanel') !== '0'; }
   WAS: function pfWhoOn() { return pfQ('pfwho') === '1'; }
   WAS: function pfSignedIn() { return pfQ('pfin') === '1'; }
   WAS: function pfPaidWords() { return pfQ('pfpaid') === 'money' ? 'paid to you' : 'as credit'; } */
function pfDoor() { return 'bar'; }
function pfPanelOn() { return true; }
function pfWhoOn() { return false; }
function pfSignedIn() { try { return !!((window.ggSignedInHint && window.ggSignedInHint()) || window.GG_EMBED); } catch (e) { return false; } }
function pfPaidWords() { return 'as credit'; }
/* 24 Nov 2026, FUNDING J7, candidate BF-ACT. Where the loan panel's action goes: the partner's Business Finance tab (D26, page 8's
   address, page 12's copy deck line 18), with the estimate in the field names the card already uses. EMPTY means not live: no button. */
const PF_BF_TAB_PATH = '/partners/funding/business-finance';
function pfBfTabHref(fig) {
  if (!PF_BF_TAB_PATH || !fig) return '';
  return String(window.PLATFORM_API_BASE || 'https://portal.gogorilla.com').replace(/\/+$/, '') + PF_BF_TAB_PATH + '?' + ['loan=' + fig.type, 'amount=' + fig.amount, 'months=' + fig.months, 'profile=' + fig.profile, 'monthly=' + fig.monthly, 'from=calculator'].join('&');
}
function pfOwnStartHref(fig) {
  try { return (window.ggBizFinanceStartUrl && window.ggBizFinanceStartUrl(fig || null)) || ''; } catch (e) { return ''; }
}
/* The press sends page 8's calc.card.start_pressed through J1's one sender, as the grant card's partner button does (route referral). */
function pfStarted(buyer, route) {
  return (e) => { e.stopPropagation(); try { if (window.ggCardEvent) window.ggCardEvent('calc.card.start_pressed', 'business-finance', buyer === 'partner', route || undefined); } catch (x) {} };
}
/* The link look: the panel action keeps the ghost button's look as a link (as a.fin-cta__btn and the grant card's a.btn do), and
   Check my eligibility reads as a link in the line.
   24 Nov 2026, FUNDING J7, candidate BF-BTN (the 13:28 rule of thumb: a button usually sits at the right): margin-left auto keeps the
   action at the right of its panel at every width. On a phone the row wraps and the button used to fall to the left.
   WAS: '.gg-scope a.btn[data-pf-action]{text-decoration:none}' */
(function pfOwnLinkStyle() {
  try {
    if (typeof document === 'undefined' || document.getElementById('pf-own-link')) return;
    const st = document.createElement('style');
    st.id = 'pf-own-link';
    st.textContent = '.gg-scope a.btn[data-pf-action]{text-decoration:none;margin-left:auto}.gg-scope .pf-own__link{font:inherit;font-weight:700;white-space:nowrap;color:var(--gg-blue,#002ABF);text-decoration:underline;cursor:pointer}.gg-scope .pf-own__link:hover{text-decoration-thickness:2px}';
    document.head.appendChild(st);
  } catch (e) {}
})();
function pfReferral() { return window.GG_PARTNER_FUNDING.referralCreditPct + '% recurring credit'; }
/* "0.5%" whilst every loan type has one rate, "up to 1%" once any type has two. */
function pfTopWords() { const t = window.ggBizPartnerTop(); return (t.two ? 'up to ' : '') + t.rate + '%'; }
/* Which way a partner can take a Funding card on this route: 'whitelabel' or 'refer'. */
function pfCardMode(service, pf) { return (service && service.partner === 'whitelabel' && pf && pf.mode === 'whitelabel') ? 'whitelabel' : 'refer'; }
/* The route a partner is on. mode: 'refer' (the referral view), 'whitelabel' (the white-label quote), 'own' (Talent Solutions). */
function pfContext(state, intentId) {
  const refer = !!(state && state.referMode);
  const mode = refer ? 'refer' : (intentId === 'agency-whitelabel' ? 'whitelabel' : 'own');
  let discount = 0;
  try { if (mode === 'whitelabel') discount = 1 - window.getAgencyMultiplier({ ...state, referMode: false }); } catch (e) {}
  return { mode, discount: Math.round(discount * 100) / 100 };
}

const PF_COPY = {
  door: {
    lead: 'Only here to refer a business for funding?',
    body: ' See what you would keep on a loan, then get your referral link.',
    action: 'See what you would keep', /* 22 Nov 2026, D31, change 4: the words the white-label line uses for the same step. WAS: Skip the plans */
    cardTitle: 'Referring a business for funding only',
    cardPill: () => 'Keep ' + pfTopWords() + ' of a completed loan',
    cardDesc: 'See what you would keep on a loan, then get your referral link.', /* 22 Nov 2026, D31, change 4. WAS: Skip the plans. See what ... */
  },
  wlLine: {
    lead: 'Funding for your clients.',
    body: () => ' Refer a business for finance and keep ' + pfTopWords() + ' of the completed loan, ' + pfPaidWords() + '. It is a referral, so it stays off this white-label quote.',
    action: 'See what you would keep',
  },
  banner: {
    lead: 'You are referring a business for funding.',
    body: ' See what you would keep, then send the business your link or fill in the enquiry with them.',
    back: 'See all partner options',
  },
  summary: {
    note: 'This is what a business you refer could borrow. You do not pay it. You keep your share when its loan completes.',
    button: 'Get my referral link',
    chip: () => pfTopWords() + ' of the loan',
  },
  tag: {
    refer: { label: 'Refer and earn', tip: (s) => (s && s.bizFinance)
      ? ('You introduce the business. It deals with GoGorilla.com and one finance partner at a time, and you keep ' + pfTopWords() + ' of the loan, ' + pfPaidWords() + ', when it completes.')
      : ('You introduce the business and it buys from GoGorilla.com. You earn ' + window.GG_PARTNER_FUNDING.referralCreditPct + '% of what it pays us, as credit, for its agreed term (up to 24 months where there is no fixed term).') }, /* 22 Nov 2026, D31: the referral view's own words. WAS: You earn 10% recurring credit on what it pays. */
    whitelabel: { label: 'White label', tip: () => 'Sell it under your own name, at your own price. We do the work unbranded, and you keep the difference.' },
  },
  bf: {
    desc: (base) => window.ggBizPartnerTop().two ? String(base).replace('you keep 0.5% of the loan', 'you keep up to ' + window.ggBizPartnerTop().rate + '% of the loan') : base,
    keepSub: (rate) => rate + '% of the loan, ' + pfPaidWords(),
    keepTipTwo: (both) => 'When a business you refer completes a loan, you keep ' + both.partner.rate + '% of it if you or the business filled in the enquiry, or ' + both.us.rate + '% if we filled it in for you. The most for one loan is ' + pfGBP(window.GG_BIZ_FINANCE.partnerCreditCap) + '. Some lenders pay a lower commission. When that happens your share is lower too, and your statement shows the exact figure before it is added. It is added once, as credit on your GoGorilla.com account.',
    own: 'Borrowing for your own business? There is no commission on your own company. You get 1% of your loan as money off our services instead.',
    ownAction: 'Check my eligibility',
  },
  panel: {
    title: 'What you keep',
    hint: 'You refer the business. GoGorilla.com and a finance partner do the rest.',
    loan: 'The loan', loanUnit: 'from the card above', loanTip: 'The amount on the card above. Change it there.',
    share: 'Your share', shareUnit: 'of the loan', shareTip: 'Your share of a loan that completes. It is the same on every route, and a white-label plan does not change it.',
    shareTipInvestor: 'Your share of a loan that completes. It is the same on every route.', /* CQ-234, 2 Dec 2026: the same words for a referring investor, without the white-label clause. */
    keep: 'You keep', keepUnit: () => pfPaidWords() + ', on completion', atCap: 'the most for one loan',
    keepTip: 'An estimate. Your statement shows the exact figure once the loan completes.',
    choice: 'Who fills in the enquiry?',
    choiceTip: 'A forecast only. What you keep depends on what happened, which is recorded on the enquiry.',
    byPartner: { title: 'You or the business', sub: 'Your link, or filled in together' },
    byUs: { title: 'GoGorilla.com, by phone', sub: 'You pass us their details' },
    line: (cap) => 'Added to your statement once the loan completes and the lender has paid us. The most for one loan is ' + cap + '.',
    actionIn: 'Refer this business', actionOut: 'Get my referral link',
  },
};

function PfTip({ body, label }) {
  return (
    <HoverPortalTip wrapClassName="svc-margin__cell-lbl-tip-wrap" tipClassName="dis-tip dis-tip--above" placement="above" tip={<span className="dis-tip__body">{body}</span>}>
      <window.InfoIcon className="svc-margin__cell-lbl-info" title={label} />
    </HoverPortalTip>
  );
}
const PF_OP = {
  times: <svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" strokeWidth="2.4" strokeLinecap="round" strokeLinejoin="round"><path d="M6 6l12 12" /><path d="M18 6L6 18" /></svg>,
  equals: <svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" strokeWidth="2.4" strokeLinecap="round" strokeLinejoin="round"><path d="M5 9h14" /><path d="M5 15h14" /></svg>,
  minus: <svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" strokeWidth="2.4" strokeLinecap="round" strokeLinejoin="round"><path d="M5 12h14" /></svg>,
  arrow: <svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" strokeWidth="2.4" strokeLinecap="round" strokeLinejoin="round"><path d="M5 12h14" /><path d="M13 6l6 6-6 6" /></svg>,
};
function PfOp({ k }) { return <div className="svc-margin__op" aria-hidden="true">{PF_OP[k]}</div>; }
function PfCell({ kind, label, tip, children }) {
  return (
    <div className={'svc-margin__cell svc-margin__cell--' + kind + ' thin-glass-frame'}>
      <div className="svc-margin__cell-lbl"><span className="svc-margin__cell-lbl-text">{label}{tip && <PfTip body={tip} label={label} />}</span></div>
      {children}
    </div>
  );
}

/* One tag beside a Funding card's name. The pill is the one on the partner answers ("Earn 10% recurring credit"). */
/* 22 Nov 2026, D31: the tag takes the calculator's light blue chip, not the amber partner pill, because amber already means a state on these cards (Waiting list,
   Popular). The values are the 12-month commitment chip's default (.svc__commit-bar--corner .svc__commit-bar-save in app.v2.css), whose own comment says it was made
   to mirror the partner badge. The shape and size follow the partner pill. WAS: className agency-intent-card__discount (amber). */
const PF_TAG_STYLE = { margin: 0, cursor: 'help', whiteSpace: 'nowrap', display: 'inline-block', padding: '0.2rem 0.6rem', borderRadius: '999px', fontSize: '0.72rem', fontWeight: 700, letterSpacing: '0.03em',
  background: 'linear-gradient(135deg, rgba(0,42,191,0.12) 0%, rgba(0,42,191,0.07) 100%)', color: 'var(--gg-blue, #002ABF)', border: '1px solid rgba(0,42,191,0.30)' };
function PartnerFundingTag({ service, pf, mode }) {
  if (!pf || !service) return null;
  const m = mode || pfCardMode(service, pf);
  const C = PF_COPY.tag[m];
  return (
    <HoverPortalTip as="span" wrapClassName="pf-tag-wrap" wrapStyle={{ display: 'inline-flex', verticalAlign: 'middle', marginLeft: '10px' }} tipClassName="dis-tip dis-tip--above" placement="above" tip={<span className="dis-tip__body">{C.tip(service)}</span>}>
      <span className="pf-tag" data-pf-tag={m} tabIndex={0} style={PF_TAG_STYLE}>{C.label}</span>
    </HoverPortalTip>
  );
}

/* "What you keep" on a loan a partner refers. Modelled on WhiteLabelMarginCalculator and MarginRow (src/sections.v2.jsx), from the same
   classes. Three cells in the margin row's own grid, the choice only where the loan type has two rates, one line and the action. No
   retail price (a partner does not price a loan) and no forecast for several loans (multiplying an estimate makes an earnings claim). */
function PartnerFinancePanel({ fig, onEnquiryBy, investor }) { /* investor: a referring investor (CQ-234), who reads the share tip without the white-label clause. WAS: ({ fig, onEnquiryBy }) */
  const P = PF_COPY.panel;
  if (!fig || !fig.partnerBoth) return null;
  const both = fig.partnerBoth, by = fig.enquiryBy, cur = both[by];
  const stop = (e) => e.stopPropagation();
  /* The estimate travels in the field names the Business Finance card already uses, so nothing is typed twice. The address is page 8's: the partner's Business Finance tab (supervisor, 22 Nov 2026). */
  /* 24 Nov 2026, FUNDING J7, candidate BF-ACT (the second reader's finding of 09:17, the supervisor's note of 09:20): the action
     was a button whose onClick only stopped the click, so it went nowhere. It is now a link to the address D26 fixed, built only
     when PF_BF_TAB_PATH is filled: an empty address draws no button, never a dead one (J1's patch 13 rule).
     WAS: const href = String(window.PLATFORM_API_BASE || 'https://portal.gogorilla.com').replace(/\/+$/, '') + '/partners/funding/business-finance?' + [...].join('&'); */
  const href = pfBfTabHref(fig);
  return (
    <div className="svc-margin svc-margin--gold svc-margin--metal svc-margin--neutral" role="region" aria-label="What you keep on a loan you refer" data-pf-panel="finance" style={{ marginTop: '14px' }} onClick={stop}>
      <div className="svc-margin__head">
        <div className="svc-margin__head-icon svc-margin__head-icon--img" aria-hidden="true"><img src="assets/icons/economies%20of%20scale.webp" alt="" className="svc-margin__head-img" loading="lazy" /></div>
        <div className="svc-margin__head-text">
          <div className="svc-margin__title-row"><div className="svc-margin__title">{P.title}</div></div>
          <div className="svc-margin__hint"><span className="svc-margin__hint-text">{P.hint}</span></div>
        </div>
      </div>
      <div className="svc-margin__calc">
        <PfCell kind="result" label={P.loan} tip={P.loanTip}>
          <div className="svc-margin__cell-num">{pfGBP(fig.amount)}</div>
          <div className="svc-margin__cell-unit">{P.loanUnit}</div>
        </PfCell>
        <PfOp k="times" />
        <PfCell kind="result" label={P.share} tip={investor ? P.shareTipInvestor : P.shareTip}>
          <div className="svc-margin__cell-num">{cur.rate}%</div>
          <div className="svc-margin__cell-unit">{P.shareUnit}</div>
        </PfCell>
        <PfOp k="equals" />
        {/* The kept figure is green, as on the card's tile and the forecast row. The wrapper lends the panel's own "good" colour to this cell alone. */}
        <div className="svc-margin--good" style={{ display: 'contents' }}>
          <PfCell kind="result" label={P.keep} tip={P.keepTip}>
            <div className="svc-margin__cell-num">{pfGBP(cur.keep)}</div>
            {cur.atCap ? <span className="svc-margin__pct svc-margin__pct--good">{P.atCap}</span> : <div className="svc-margin__cell-unit">{P.keepUnit()}</div>}
          </PfCell>
        </div>
      </div>
      {both.differ && (
        <div className="svc-margin__cpm-section" data-pf-choice>
          <div className="svc-margin__section-head">{P.choice}<PfTip body={P.choiceTip} label={P.choice} /></div>
          <div role="radiogroup" aria-label={P.choice} style={{ display: 'grid', gridTemplateColumns: 'repeat(auto-fit, minmax(230px, 1fr))', gap: '10px' }}>
            {['partner', 'us'].map((k) => {
              const b = both[k]; const on = by === k; const C = k === 'partner' ? P.byPartner : P.byUs;
              return (
                <button type="button" key={k} role="radio" aria-checked={on} data-pf-by={k} onClick={(e) => { e.stopPropagation(); if (onEnquiryBy) onEnquiryBy(k); }}
                  className={'svc-margin__cell thin-glass-frame svc-margin__cell--' + (on ? 'meetings' : 'cost')} style={{ textAlign: 'left', cursor: 'pointer', font: 'inherit', width: '100%', position: 'relative' }}>
                  <span className={'agency-intent-card__radio ' + (on ? 'is-on' : '')} aria-hidden="true" style={{ position: 'absolute', top: '10px', right: '10px', left: 'auto' }}>{on && <window.Check size={14} />}</span>
                  <div className="svc-margin__cell-lbl"><span className="svc-margin__cell-lbl-text">{C.title}</span></div>
                  <div className="svc-margin__cell-num" style={{ color: '#002ABF' }}>{pfGBP(b.keep)}</div>
                  <div className="svc-margin__cell-unit" style={{ display: 'block' }}>{b.atCap ? P.atCap : (b.rate + '% of the loan')}</div>
                  <div className="svc-margin__cell-unit" style={{ display: 'block' }}>{C.sub}</div>
                </button>
              );
            })}
          </div>
        </div>
      )}
      <div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', gap: '12px', flexWrap: 'wrap', marginTop: '12px' }}>
        <div className="svc-margin__hint" style={{ flex: '1 1 260px', margin: 0 }}><span className="svc-margin__hint-text">{P.line(pfGBP(window.GG_BIZ_FINANCE.partnerCreditCap))}</span></div>
        {/* 24 Nov 2026, FUNDING J7, candidate BF-ACT. WAS: <button type="button" className="btn btn--ghost" data-pf-action data-pf-href={href} onClick={stop}>, which went nowhere. */}
        {!!href && <a className="btn btn--ghost" data-pf-action href={href} target="_top" onClick={pfStarted('partner', 'referral')}>{pfSignedIn() ? P.actionIn : P.actionOut}</a>}
      </div>
    </div>
  );
}

/* A partner borrowing for their own company is a client. One line, no switch: the enquiry form detects the company. */
/* 24 Nov 2026, FUNDING J7, candidate BF-ACT: Check my eligibility goes where the Business Finance card's own Check my eligibility goes,
   the client start (window.ggBizFinanceStartUrl, page 3), because a partner's own company is a client (D13) and the enquiry detects the
   company (page 12's copy deck). It carries the card's estimate when the card passes fig; without it, the start opens with no figures.
   An empty address draws no link. The look is the class pf-own__link (below), not an inline style with a raw colour.
   WAS: <button type="button" onClick={(e) => e.stopPropagation()} style={{ background: 'none', border: 0, padding: 0, font: 'inherit',
   fontWeight: 700, color: '#002ABF', textDecoration: 'underline', cursor: 'pointer' }}>{C.ownAction}</button>, which went nowhere. */
function PartnerOwnBusinessLine({ fig } = {}) {
  const C = PF_COPY.bf;
  const href = pfOwnStartHref(fig);
  return (
    <p className="lead-vol__hint fin-small" data-pf-own style={{ marginTop: '10px' }}>
      {C.own} {!!href && <a className="pf-own__link" href={href} target="_top" onClick={pfStarted('client', null)}>{C.ownAction}</a>}
    </p>
  );
}

/* The funding-only way in, on the partner's first screen. variant 'bar' (recommended) sits under the three answers; 'card' is a fourth answer. */
function PartnerFundingOnlyDoor({ variant, onGo }) {
  const C = PF_COPY.door;
  if (variant === 'card') {
    return (
      <div className="agency-intent-card" role="button" tabIndex={0} data-pf-door="card" onClick={onGo} onKeyDown={(e) => { if (e.key === 'Enter' || e.key === ' ') { e.preventDefault(); onGo(); } }}>
        <span className="agency-intent-card__radio" aria-hidden="true" />
        <div className="agency-intent-card__body">
          <div className="agency-intent-card__title">{C.cardTitle}</div>
          <div className="agency-intent-card__discount">{C.cardPill()}</div>
          <div className="agency-intent-card__desc">{C.cardDesc}</div>
        </div>
      </div>
    );
  }
  return (
    <div className="alert alert--info gg-frame-card" data-pf-door="bar" style={{ marginTop: '16px', display: 'flex', alignItems: 'center', justifyContent: 'space-between', gap: '12px', flexWrap: 'wrap' }}>
      <div style={{ flex: '1 1 320px' }}><strong>{C.lead}</strong>{C.body}</div>
      <button type="button" className="btn btn--ghost" onClick={onGo}>{C.action}</button>
    </div>
  );
}

/* The door from the white-label route: Funding is a referral, so it stays off the white-label quote and opens in the referral view. */
function PartnerWhiteLabelFundingLine({ onGo }) {
  const C = PF_COPY.wlLine;
  return (
    <div className="alert alert--info gg-frame-card" data-pf-wl-line style={{ marginTop: '18px', display: 'flex', alignItems: 'center', justifyContent: 'space-between', gap: '12px', flexWrap: 'wrap' }}>
      <div style={{ flex: '1 1 320px' }}><strong>{C.lead}</strong>{C.body()}</div>
      <button type="button" className="btn btn--ghost" onClick={onGo}>{C.action}</button>
    </div>
  );
}

/* PROPOSED, brief 8 (Partners and Funding), 22 Nov 2026. Not approved. ONE BLUE ACTION FOR A PARTNER (D31 changes 2 and 3, D44, D50).
   The glass values are page 2's, copied from .btn--ghost. Only the look changes: every button still works.
   1. PF_GLASS_CSS is drawn by BuildPage's refer-mode style for an agency partner, so it applies on every step BuildPage draws (the plan,
      services and Funding steps) and never on the last step, which is YoureSetPage: there "Submit a referral" stays blue (D44).
      On those steps "Switch to white-labelling" is the way back and the summary's "Submit a referral" is a way out of the forecast,
      so both are glass and the step's own button is the one blue action.
   2. The funding-only rule is injected once and keys on html[data-gg-funding-only], which app.v2.jsx sets on every render. On that
      route the summary's button reads "Get my referral link" and goes where the step's own button goes, so it is glass on every step,
      the last one included, where the submit "Get my referral link" is the blue one.
   Kept here, not in src/sections.v2.jsx, so that file names the summary button's class in one place only: the button itself. */
const PF_GLASS_DECL = 'background:linear-gradient(109deg,rgb(230,230,230) 13%,rgb(230,230,230) 100%) !important;color:#111111 !important;border:1px solid transparent !important;box-shadow:rgba(255,255,255,0.36) -2px -2px 2px -1px,rgba(255,255,255,0.60) 1px 1.5px 2px 0px inset,rgba(140,139,137,0.29) -2px -2px 2px 0px inset,rgba(224,223,222,0.50) -2px -2px 8px 0px,rgba(84,84,84,0.14) 2px 2px 8px 0px,rgba(179,179,179,0.36) -1px -4px 20px 0px inset !important';
const PF_GLASS_HOVER = 'background:linear-gradient(109deg,rgb(242,242,242) 0%,rgb(230,230,230) 121%) !important';
const PF_SUMMARY_BTN = '.gg-scope .summary__refer-submit-btn.btn--primary';
const PF_GLASS_CSS = PF_SUMMARY_BTN + ',.gg-scope .svc__upfront-toggle.is-on.fl-refer-toggle{' + PF_GLASS_DECL + '}'
  + PF_SUMMARY_BTN + ':hover,.gg-scope .svc__upfront-toggle.is-on.fl-refer-toggle:hover{' + PF_GLASS_HOVER + '}'
  + '.gg-scope .svc__upfront-toggle.is-on.fl-refer-toggle .svc__upfront-knob{background:linear-gradient(180deg,#DDE0E8 0%,#C9CDD7 100%);box-shadow:inset 0 1px 2px rgba(20,28,60,0.18),inset 0 -1px 0 rgba(255,255,255,0.4)}';
(function pfFundingOnlyGlass() {
  try {
    if (typeof document === 'undefined' || document.getElementById('pf-funding-only-glass')) return;
    const st = document.createElement('style');
    st.id = 'pf-funding-only-glass';
    st.textContent = 'html[data-gg-funding-only] ' + PF_SUMMARY_BTN + '{' + PF_GLASS_DECL + '}html[data-gg-funding-only] ' + PF_SUMMARY_BTN + ':hover{' + PF_GLASS_HOVER + '}';
    document.head.appendChild(st);
  } catch (e) {}
})();

Object.assign(window, { PF_COPY, PF_GLASS_CSS, pfDoor, pfPanelOn, pfWhoOn, pfCardMode, pfContext,
  PartnerFundingOnlyDoor, PartnerWhiteLabelFundingLine, PartnerFundingTag, PartnerFinancePanel, PartnerOwnBusinessLine });
