/* J Golf Fitness: the Black Friday price block (Nov 24 2026). ONE self-contained component.
   Used twice on the Black Friday page (hero and final section) and meant to be copied as it is into the checkout's
   offer header: this file, the .bfp markup and bf-price.js. It needs nothing from the page's other stylesheets
   (its own colours, type and resets; Inter if the host page loads it).

   Parts, top to bottom:
     .bfp__flag    the gold "Black Friday offer" tab on the top edge
     .bfp__head    regular price crossed out, the saving, "$99 for your first year", $8.25 a month, the monthly comparison
     .bfp__slot    OPTIONAL: whatever the host puts under the price (the page: the trial button, "$0 today", the
                   member link). The checkout leaves it out.
     .bfp__steps   what is paid and when: today $0, day 7 $99, a year later $178.99
     .bfp__clock   "Ends Monday, Nov 30 at 11:59 PM Pacific" and the countdown
     .bfp__over    shown in place of all of the above once the offer has ended

   Layout follows the block's OWN width (a container query), not the window: under 820px one column, from 820px the
   price on the left and the steps and countdown on the right. So it drops into a narrow checkout column unchanged.

   State: bf-price.js sets <html data-bfp="live"> while the offer runs and <html data-bfp="ended"> once it is over
   (the inline script in the page head sets "ended" before first paint, so the offer never flashes). "ended" hides
   every [data-bfp-live] and shows every [data-bfp-over], anywhere on the page.

   Colour: gold is a solid fill with dark green text, or text on the block's own near-black green. Never on white. */

html:not([data-bfp="ended"]) [data-bfp-over] { display: none !important; }
html:not([data-bfp]) .bfp__timer { display: none; }      /* no script, no clock: the deadline in words stays, a row of zeros would look expired */
html[data-bfp="ended"] [data-bfp-live] { display: none !important; }

.bfp, .bfp *, .bfp *::before, .bfp *::after { box-sizing: border-box; }
.bfp {
  --bfp-gold: #f4c430;
  --bfp-gold-hover: #e4b41f;
  --bfp-on-gold: #0a2e1a;
  --bfp-ink: #ffffff;
  --bfp-dim: #c8d2cb;
  --bfp-hair: rgba(255, 255, 255, .14);
  --bfp-edge: rgba(244, 196, 48, .55);
  container-type: inline-size; container-name: bfp;
  position: relative; display: block; width: 100%; margin: 0; padding: 0;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-size: 16px; line-height: 1.4;
  color: var(--bfp-ink); text-align: left; -webkit-font-smoothing: antialiased;
}
:where(.bfp) :where(p, ol, li, h2, h3) { margin: 0; padding: 0; list-style: none; }      /* no specificity, so every part below can set its own padding */
.bfp s { text-decoration-thickness: .09em; white-space: nowrap; }
.bfp__sr { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.bfp__in {
  position: relative; padding: 30px 18px 18px;
  background:
    radial-gradient(110% 62% at 100% 0%, rgba(244, 196, 48, .15) 0%, rgba(244, 196, 48, 0) 62%),
    linear-gradient(168deg, #0b2114 0%, #050d08 72%, #030805 100%);
  border: 1px solid var(--bfp-edge); border-radius: 22px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 22px 54px rgba(0, 0, 0, .38);
}
.bfp__flag {
  position: absolute; z-index: 1; top: -14px; left: 18px;
  padding: 0 13px; background: var(--bfp-gold); color: var(--bfp-on-gold); border-radius: 7px;
  font-size: 12.5px; font-weight: 800; line-height: 28px; letter-spacing: .12em; text-transform: uppercase; white-space: nowrap;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .3);
}

/* ---- the price ---- */
.bfp__live { display: grid; gap: 20px; }
.bfp__head { display: grid; gap: 0; min-width: 0; }
.bfp__was { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: 19px; font-weight: 600; color: var(--bfp-dim); line-height: 1.2; }
.bfp__save { padding: 3px 10px; border: 1px solid var(--bfp-edge); border-radius: 999px; color: var(--bfp-gold); font-size: 12.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.bfp__now { display: flex; align-items: flex-end; gap: 14px; margin-top: 12px; }
.bfp__amt { display: flex; align-items: flex-start; flex: none; color: var(--bfp-gold); font-size: 84px; font-size: clamp(76px, 25cqi, 100px); font-weight: 800; line-height: .76; letter-spacing: -.055em; padding-top: .06em; }
.bfp__cur { margin: .04em .04em 0 0; font-size: .46em; line-height: 1; letter-spacing: 0; }
.bfp__for { padding-bottom: 0; margin-bottom: -2px; white-space: nowrap; font-size: 21px; font-weight: 700; line-height: 1.12; letter-spacing: -.015em; }
.bfp__per { margin-top: 16px; font-size: 17px; line-height: 1.4; color: var(--bfp-dim); }
.bfp__per span { display: block; }
.bfp__per span + span { margin-top: 2px; font-size: 15px; }
.bfp__per strong { color: var(--bfp-ink); font-weight: 700; }

/* ---- the host's slot (page: button, "$0 today", member link) ---- */
.bfp__slot { display: grid; gap: 10px; margin-top: 16px; text-align: center; }
.bfp__cta {
  display: flex; align-items: center; justify-content: center; width: 100%; min-height: 58px; padding: 12px 18px;
  background: var(--bfp-gold); color: var(--bfp-on-gold); border: 0; border-radius: 999px;
  font: inherit; font-size: 17px; font-weight: 700; line-height: 1.2; letter-spacing: .03em; text-transform: uppercase; text-decoration: none; text-align: center;
  cursor: pointer; transition: background-color .15s ease, transform .05s ease;
}
.bfp__cta:active { background: #d6a716; transform: translateY(1px); }
@media (hover: hover) { .bfp__cta:hover { background: var(--bfp-gold-hover); } }
.bfp__cta:focus-visible, .bfp__member a:focus-visible, .bfp__over-btn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.bfp__fine { font-size: 15px; color: var(--bfp-dim); }
.bfp__member { font-size: 14.5px; color: var(--bfp-dim); }
.bfp__member a { display: inline-block; white-space: nowrap; padding-block: 12px; margin-block: -12px; color: var(--bfp-ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* ---- what is paid and when ---- */
.bfp__side { display: grid; gap: 18px; min-width: 0; padding-top: 20px; border-top: 1px dashed rgba(244, 196, 48, .4); }
.bfp__steps { display: grid; }
.bfp__step { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; row-gap: 1px; align-items: baseline; padding: 0 0 16px 28px; }
.bfp__step:last-child { padding-bottom: 0; }
.bfp__step::before {                               /* the dot */
  content: ""; position: absolute; left: 0; top: 4px; width: 14px; height: 14px; border-radius: 50%;
  background: #050d08; border: 2px solid var(--bfp-dim);
}
.bfp__step::after {                                /* the line down to the next dot */
  content: ""; position: absolute; left: 6px; top: 22px; bottom: -1px; width: 2px; border-radius: 2px; background: var(--bfp-hair);
}
.bfp__step:last-child::after { content: none; }
.bfp__step--now::before { border-color: var(--bfp-gold); }
.bfp__step--deal::before { background: var(--bfp-gold); border-color: var(--bfp-gold); box-shadow: 0 0 0 4px rgba(244, 196, 48, .2); }
.bfp__when { font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--bfp-dim); line-height: 1.6; }
.bfp__when b { font-weight: inherit; white-space: nowrap; }
.bfp__when span { font-weight: 500; letter-spacing: .02em; text-transform: none; white-space: nowrap; }
.bfp__when span:not(:empty)::before { content: " · "; white-space: pre; }
.bfp__pay { font-size: 20px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; font-variant-numeric: tabular-nums; }
.bfp__step--deal .bfp__pay { color: var(--bfp-gold); }
.bfp__what { grid-column: 1 / -1; font-size: 15px; line-height: 1.4; color: var(--bfp-dim); text-wrap: pretty; }

/* ---- the deadline and the countdown ---- */
.bfp__clock { display: grid; gap: 10px; padding: 14px 12px 12px; background: rgba(255, 255, 255, .055); border: 1px solid var(--bfp-hair); border-radius: 16px; text-align: center; }
.bfp__ends { font-size: 15px; font-weight: 600; line-height: 1.3; }
.bfp__ends span { display: inline-block; white-space: nowrap; }
.bfp__timer { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.bfp__unit { display: grid; justify-items: center; gap: 5px; padding: 11px 0 9px; background: rgba(0, 0, 0, .5); border: 1px solid rgba(255, 255, 255, .08); border-radius: 12px; }
.bfp__unit b { font-size: 30px; font-weight: 800; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.bfp__unit i { font-size: 11.5px; font-style: normal; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--bfp-dim); line-height: 1; }

/* ---- after the deadline ---- */
.bfp__over { display: grid; justify-items: center; gap: 12px; padding: 6px 4px 8px; text-align: center; }
.bfp__over-t { font-size: 26px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.bfp__over-d { max-width: 30em; font-size: 16px; color: var(--bfp-dim); text-wrap: pretty; }
.bfp__over-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 54px; margin-top: 6px; padding: 12px 28px; background: var(--bfp-gold); color: var(--bfp-on-gold); border-radius: 999px; font-size: 16px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; text-decoration: none; }
@media (hover: hover) { .bfp__over-btn:hover { background: var(--bfp-gold-hover); } }
html[data-bfp="ended"] .bfp__flag { background: #2c302e; color: #fff; }
html[data-bfp="ended"] .bfp__in { border-color: var(--bfp-hair); background: linear-gradient(168deg, #101311 0%, #060807 100%); }

/* ---- narrow blocks (a 320px phone, or a tight checkout column) ---- */
@container bfp (max-width: 330px) {
  .bfp__in { padding-inline: 14px; }
  .bfp__flag { left: 14px; }
  .bfp__for { font-size: 18px; }
  .bfp__now { gap: 10px; }
  .bfp__unit b { font-size: 26px; }
  .bfp__per span + span { font-size: 14.5px; }
  .bfp__when span { display: block; }
  .bfp__when span:not(:empty)::before { content: none; }
  .bfp__cta { font-size: 16px; letter-spacing: .02em; padding-inline: 10px; }
}

/* ---- phone widths up to ~420px (Nov 25: at 375px "One year later · Dec 1, 2027" ran into $178.99): the date goes under
   its label so the amount always has room ---- */
@container bfp (max-width: 420px) {
  .bfp__when span { display: block; }
  .bfp__when span:not(:empty)::before { content: none; }
}

/* ---- wide blocks: the price on the left, the steps and the countdown on the right ---- */
@container bfp (min-width: 820px) {
  .bfp__in { padding: 40px 36px 34px; }
  .bfp__member { font-size: 15px; }
  .bfp__flag { left: 36px; }
  .bfp__live { grid-template-columns: minmax(0, 1.04fr) minmax(0, 1fr); gap: 0; align-items: center; }
  .bfp__head { padding-right: 36px; }
  .bfp__was { font-size: 21px; }
  .bfp__amt { font-size: 124px; }
  .bfp__for { font-size: 27px; }
  .bfp__now { gap: 18px; margin-top: 20px; }
  .bfp__per { margin-top: 26px; font-size: 18px; }
  .bfp__per span + span { font-size: 16px; }
  .bfp__slot { margin-top: 24px; justify-items: start; text-align: left; }
  .bfp__cta { width: auto; min-width: 320px; }
  .bfp__side { gap: 20px; padding: 2px 0 2px 36px; border-top: 0; border-left: 1px dashed rgba(244, 196, 48, .4); }
  .bfp__what { font-size: 15.5px; }
  .bfp__unit b { font-size: 34px; }
}
