/* J Golf Fitness checkout: Black Friday offer mode (bf26, Nov 24 2026). Loaded on every visit, but every rule here
   only acts when <html data-offer> is set (the head script, ?offer=bf26), or on elements that exist only in offer
   markup. Without ?offer=bf26 nothing in this file changes the page. */

html:not([data-offer]) [data-offer-only],
html:not([data-member]) [data-member-only],
html[data-offer] [data-regular-only] { display: none !important; }

/* Past members pay today (Nov 24 evening): <html data-back> (?back=1 first, then the email lookup's answer) swaps the
   trial words for the pay-today ones. data-back is only ever set in offer mode; without it the trial view is unchanged. */
html:not([data-back]) [data-back-only],
html[data-back] [data-trial-only] { display: none !important; }
html:not([data-back]) #pay-wait { display: none !important; }
.pay-wait { font-size: 14px; color: var(--muted); margin-top: 10px; }

/* One card in place of the checkout: the member step, or a state screen (already a member, ended, …). */
html[data-member]:not([data-offer-state]) .co > :not([data-member-only]) { display: none !important; }
html[data-offer-state] .co > :not(#offer-state) { display: none !important; }
html:not([data-offer-state]) #offer-state { display: none !important; }

/* ---------- Layout (desktop): the offer header where the regular header and plans were ---------- */
.bfh { grid-column: 1; grid-row: 1; display: grid; gap: 18px; margin-bottom: 18px; min-width: 0; }
html[data-offer] .card.more { grid-row: 2; border-radius: var(--radius-card); padding-top: 22px; }
.bfh-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas: "logo top";
  column-gap: 20px;
  align-items: center;
}
.bfh-top { grid-area: top; }
.bfh-top { display: grid; gap: 4px; min-width: 0; }
.bfh-eyebrow { font-size: 12.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.bfh .bfp__in { padding-top: 22px; }
.bfh .bfp__ends span { white-space: normal; }
.bfh-cancel { margin-top: -4px; }
.bfh-member { margin-top: 8px; }
.bfh-member .link { font-weight: 600; white-space: normal; }

/* Member step and state screens: one centred card */
.mstep, .ostate {
  grid-column: 1 / -1;
  grid-row: 1;
  justify-self: center;
  width: 100%;
  max-width: 560px;
  display: grid;
  gap: 12px;
  padding: 28px 28px 30px;
}
.mstep .hd-logo, .ostate .hd-logo { height: 44px; margin-bottom: 8px; }
.mstep-sub, .ostate-b { font-size: 16px; line-height: 1.5; color: var(--text); }
.ostate-s { font-size: 14px; color: var(--muted); }
.mstep label { margin-top: 6px; }
.mstep .cta, .ostate-btn { margin-top: 10px; }
.ostate-btn { text-decoration: none; }

@media (max-width: 959px) {
  .bfh { margin-bottom: 0; gap: 14px; }
  html[data-offer] .card.more { padding-top: 22px; }
}
@media (max-width: 600px) {
  .bfh-card { padding: 14px 16px; column-gap: 14px; }
  .bfh-card .hd-logo { height: 36px; }
  .bfh .h-xl { font-size: 21px; }
  .bfh-eyebrow { font-size: 11.5px; letter-spacing: .08em; }
  .mstep, .ostate { padding: 22px 18px 24px; }
  .mstep .hd-logo, .ostate .hd-logo { height: 36px; }
}

/* Thank-you view for a pay-today order (<html data-paid>): one card in place of everything else. */
html:not([data-paid]) #paid-view { display: none !important; }
html[data-paid] .co > :not(#paid-view) { display: none !important; }
/* The same for an offer trial (<html data-trialdone>, segment audit Nov 25). */
html:not([data-trialdone]) #trial-view { display: none !important; }
html[data-trialdone] .co > :not(#trial-view) { display: none !important; }
.nowrap { white-space: nowrap; }

/* Offer trial view: the "how you get in" notice replaces the email reminder (the regular checkout and the pay-today
   view keep it). */
html[data-offer]:not([data-back]) #email-notice { display: none !important; }

/* Member step: the link for people who aren't members (it never moves on by itself). */
.mstep-alt { margin-top: 2px; text-align: center; }

/* Phone context block (#offer-context): phones only. Since Nov 26 it also shows after the Black Friday page: that page's
   first button sits above everything about the app, so a quick tap arrives here without having seen what's included. */
#offer-context { display: none; }
.inc-h-more { display: none; }
@media (max-width: 959px) {
  html[data-offer]:not([data-offer-state]):not([data-member]) #offer-context { display: grid; gap: 14px; }
  /* The lower card repeats the heading, so it says "More on what's included" while the context block shows. */
  html[data-offer]:not([data-offer-state]):not([data-member]) .inc-h { display: none; }
  html[data-offer]:not([data-offer-state]):not([data-member]) .inc-h-more { display: inline; }
}
.ctx-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ctx-list li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 8px; align-items: start; font-size: 15px; line-height: 1.45; color: var(--text); }
.ctx-list .ok { margin-top: 2px; }
.ctx-quote { margin: 0; padding: 12px 14px; background: var(--tint); border-radius: var(--radius-control); }
.ctx-quote blockquote { margin: 0; font-size: 15px; line-height: 1.5; color: var(--text); }
.ctx-quote figcaption { margin-top: 6px; font-size: 13px; color: var(--muted); }
.ctx-coach { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 12px; align-items: center; }
.ctx-coach img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; }
.ctx-coach p { font-size: 14px; line-height: 1.4; color: var(--text); overflow-wrap: break-word; }
.paid .hd-logo { justify-self: start; grid-area: auto; }
.paid h1:focus { outline: none; }
.paid-sub { margin-top: 10px; }
.paid-steps, .paid-help { margin: 0; padding-left: 22px; display: grid; gap: 8px; font-size: 16px; line-height: 1.5; color: var(--text); }

/* The shared logo rule names a grid area (.hd-logo in styles.css); in these single-column cards it is a plain row. */
.mstep .hd-logo, .ostate .hd-logo, .bfh-card .hd-logo { justify-self: start; }
.mstep .hd-logo, .ostate .hd-logo { grid-area: auto; }
.ostate-btn[hidden] { display: none; }
/* Headings get focus when a screen changes (for screen readers); no ring for that programmatic focus. */
.ostate h1:focus, .mstep h1:focus { outline: none; }

/* The pay-today steps' date ("Nov 28, 2027") is wider than the trial's ("Dec 5, 2027"): on a phone-width block it goes
   on its own line under "One year later" so it never runs into the amount. */
@container bfp (max-width: 420px) {
  .bfp__steps[data-back-only] .bfp__when span { display: block; }
  .bfp__steps[data-back-only] .bfp__when span:not(:empty)::before { content: none; }
}
