/* Black Friday countdown (Claude, 21 Nov 2026). Put into the page by inc/v2/v2-bfht.php only while the pill switch is on,
   between the Black Friday dates, with the offer's real end ahead, and only on a page it has something to do on.
   1. the pill: (dot) BLACK FRIDAY | ends in 10d 19:35:50 ↓   2. rolling digits   3. the light and the dot   4. every other
   countdown away (the Black Friday card's boxes, the product page's "Ends in", any .sx-timer): the pill carries the only one
   5. reduced motion, forced colours.
   Motion: transform and opacity only, on the GPU; fixed-width digit slots (the typeface has no tabular figures), so nothing
   around them moves while they count. Phone first; Safari 16.4: -webkit-mask-image next to mask-image. */

/* ---------- 1. the pill ----------
   It keeps bfh's place, height, metal, tone, label and arrow (v2-bfh.css); the offer's words make way for the time. It becomes
   its own layer group (isolation), so the light (3) lies on its metal only, under its words. The time is the pill's hero: the
   digits in the pill's full size and medium weight, "ends in" a step smaller and lighter, the colons and the day's "d" quieter.
   Spacing is set in em of the pill's own size, so every bfh size (36 / 34 / 28 / 26 / 24 px tall) keeps the same rhythm. */
/* the ink is as far from the left edge (the dot) as from the right edge (the arrow's stroke: its box has .23em of air inside) */
.c3-root.hx .bfh-pill.bfht{isolation:isolate;gap:0;padding:0 .62em 0 .84em;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.72),inset 0 -1px 0 rgba(96,66,18,.2),inset 0 0 0 .5px rgba(96,66,18,.16),
    0 0 0 .5px rgba(255,238,204,.12),0 1px 2px rgba(0,0,0,.45),0 10px 26px -14px var(--bfh-glow,rgba(222,193,138,.55))}
/* each part is centred on the pill's middle (bfh's flex row); no half-pixel nudges: browsers snap text to whole pixels in
   different ways (Chrome to CSS pixels, Safari to device pixels), so a nudge right in one is wrong in the other */
.c3-root.hx .bfh-pill.bfht .bfh-pill__bf{margin-left:.6em}
.c3-root.hx .bfh-pill.bfht .bfh-pill__i{margin-left:.5em}

/* the dot: small and round (6 px: whole pixels, and even like every pill height, so it sits exactly on the middle), in the words'
   ink. Out of it, calmly, a thin ring opens and fades (once every 2.8 s, gone by 70 % of it; 16 px at most, clear of the pill's
   edges even at its lowest, 24 px). Paused while the pill is off the screen or the tab is hidden (.is-idle, v2-bfht.js) */
.c3-root.hx .bfh-pill.bfht .bfht-dot{position:relative;display:block;flex:none;width:6px;height:6px;border-radius:50%;
  background:var(--bfh-ink,#2A1F0D);font-style:normal}
.c3-root.hx .bfh-pill.bfht .bfht-dot::after{content:"";position:absolute;left:50%;top:50%;width:16px;height:16px;margin:-8px 0 0 -8px;border-radius:50%;
  box-shadow:inset 0 0 0 1px var(--bfh-ink,#2A1F0D);opacity:0;animation:bfht-ring 2.8s cubic-bezier(.2,.7,.2,1) infinite;will-change:transform,opacity}
.c3-root.hx .bfh-pill.bfht.is-idle .bfht-dot::after{animation:none}
@keyframes bfht-ring{0%{transform:scale(.375);opacity:.6}70%,100%{transform:scale(1);opacity:0}}

/* the time: after a hairline (the one the offer's words had, v2-bfh.css .bfh-pill__o) */
.c3-root.hx .bfh-pill.bfht .bfht-t{position:relative;display:inline-flex;align-items:baseline;flex:none;margin-left:.66em;padding-left:.66em;
  font-weight:500;letter-spacing:0;font-variant-numeric:lining-nums tabular-nums;font-feature-settings:"lnum" 1,"tnum" 1}
/* the hairline: on the pill's middle, its ends fading */
.c3-root.hx .bfh-pill.bfht .bfht-t::before{content:"";position:absolute;left:0;top:50%;width:1px;height:1.1em;margin-top:-.55em;
  background:linear-gradient(180deg,transparent 0,var(--bfh-rule,rgba(42,31,13,.28)) 22%,var(--bfh-rule,rgba(42,31,13,.28)) 78%,transparent 100%)}
/* "ends in" a step back: smaller, regular weight, .72 of the ink (5:1 or more on every stop of each metal) */
.c3-root.hx .bfh-pill.bfht .bfht-e{display:block;flex:none;margin-right:.36em;font-size:.9em;font-weight:400;letter-spacing:.005em;opacity:.72;white-space:nowrap}
/* the digits' window: one line tall (1.2em), the digits roll through it; its top and bottom edges fade (the mask paints only
   inside the window), so a rolling digit comes and goes softly. A digit's ink runs from .26em to .99em of the window (Neue
   Montreal: ascent .97, figures .71 tall), all in the clear band (.22em to 1.03em) */
.c3-root.hx .bfh-pill.bfht .bfht-w{display:inline-flex;align-items:baseline;flex:none;line-height:1.2;
  -webkit-mask-image:linear-gradient(180deg,transparent 0,#000 18%,#000 86%,transparent 100%);
  mask-image:linear-gradient(180deg,transparent 0,#000 18%,#000 86%,transparent 100%)}
.c3-root.hx .bfh-pill.bfht .bfht-g{display:inline-flex;align-items:baseline;flex:none}
.c3-root.hx .bfh-pill.bfht .bfht-gd{margin-right:.32em}
.c3-root.hx .bfh-pill.bfht .bfht-u{display:block;flex:none;margin-left:.04em;font-size:.86em;font-weight:500;opacity:.66}
/* the colon: Neue Montreal sets its dots on the lowercase (centre .1em under the figures' centre, measured): raised onto the
   figures' centre, as a clock face shows it */
.c3-root.hx .bfh-pill.bfht .bfht-c{display:block;flex:none;width:.32em;text-align:center;opacity:.5;transform:translateY(-.13em)}

/* ---------- 2. rolling digits: one slot per digit, all one width (Neue Montreal's "1" is narrow, its "0" wide), the digit centred
   in it; v2-bfht.js gives the leaving digit .bfht-o and the new one .bfht-i (several start right to left, 40 ms apart, the way
   a counter carries over). The old one slides down and out, the new one comes in from above: a countdown's direction. ---------- */
.bfht-n{position:relative;display:block;flex:none;width:.6em;text-align:center;letter-spacing:0}
.bfht-n > span{display:block}
.bfht-n > .bfht-i{animation:bfht-in .38s cubic-bezier(.2,.7,.2,1) both;will-change:transform,opacity}
.bfht-n > .bfht-o{position:absolute;left:0;top:0;width:100%;animation:bfht-out .38s cubic-bezier(.2,.7,.2,1) both;will-change:transform,opacity}
/* the leaving digit is gone (faded) by 55 % of the way, so no ghost of it lingers under the new one; the new one is whole by 70 % */
@keyframes bfht-in{0%{transform:translate3d(0,-82%,0);opacity:0}70%{opacity:1}100%{transform:translate3d(0,0,0);opacity:1}}
@keyframes bfht-out{0%{transform:translate3d(0,0,0);opacity:1}55%{opacity:0}100%{transform:translate3d(0,82%,0);opacity:0}}

/* ---------- 3. the light: now and then (v2-bfht.js, every 6 to 8 s while the pill is on the screen) a soft band of light runs
   over the metal, under the words, as over polished metal ---------- */
.c3-root.hx .bfh-pill.bfht .bfht-sh{position:absolute;z-index:-1;top:0;right:0;bottom:0;left:0;border-radius:inherit;overflow:hidden;
  pointer-events:none}
.c3-root.hx .bfh-pill.bfht .bfht-sh::before{content:"";position:absolute;top:-30%;bottom:-30%;left:0;width:30%;opacity:0;
  background:linear-gradient(100deg,rgba(255,255,255,0) 0%,rgba(255,255,255,.18) 28%,rgba(255,253,246,.78) 50%,rgba(255,255,255,.18) 72%,rgba(255,255,255,0) 100%);
  transform:translate3d(-130%,0,0) skewX(-18deg)}
.c3-root.hx .bfh-pill.bfht .bfht-sh.is-go::before{animation:bfht-sweep 1.5s cubic-bezier(.45,.05,.25,1) both}
@keyframes bfht-sweep{
  0%{transform:translate3d(-130%,0,0) skewX(-18deg);opacity:0}
  14%{opacity:1}
  86%{opacity:1}
  100%{transform:translate3d(360%,0,0) skewX(-18deg);opacity:0}
}

/* ---------- 4. the other countdowns away: the pill carries the only one (Alik, 21 Nov ~05:30, "Gold button only") ----------
   The Black Friday card (v2-bf.css .bf-card__timer, homepage and shop listings): no boxes, and its grid closes up without their
   row (each breakpoint's own areas, less "timer"), so no empty gap is left; its label "Black Friday · until Tue 1 Dec" stays.
   The theme's own "Ends in" (assets/v3/stack/offer.css .sx-timer: product page, cart lines, home offers row): away; the line it
   sat in keeps its words. */
.bf-card .bf-card__timer,.sx-timer{display:none!important}
.bf-card .bf-card__in{grid-template-areas:"eye art acts" "main art acts" "tiers ex acts"}
@media (max-width:1199px){.bf-card .bf-card__in{grid-template-areas:"eye eye" "main art" "tiers ex" "acts acts"}}
@media (max-width:899px){.bf-card .bf-card__in{grid-template-areas:"eye eye" "main art" "ex ex" "tiers tiers" "acts acts"}}

/* ---------- 5. reduced motion: the digits change in place, no light, no breathing dot; forced colours: plain ---------- */
@media (prefers-reduced-motion:reduce){
  .c3-root.hx .bfh-pill.bfht .bfht-sh{display:none}
  .c3-root.hx .bfh-pill.bfht .bfht-dot::after{animation:none}
  .bfht-n > .bfht-i{animation:none}
  .bfht-n > .bfht-o{display:none;animation:none}
}
@media (forced-colors:active){
  .c3-root.hx .bfh-pill.bfht .bfht-sh,.c3-root.hx .bfh-pill.bfht .bfht-dot::after{display:none}
  .c3-root.hx .bfh-pill.bfht .bfht-dot,.c3-root.hx .bfh-pill.bfht .bfht-t::before{background:CanvasText}
  .c3-root.hx .bfh-pill.bfht .bfht-e,.c3-root.hx .bfh-pill.bfht .bfht-u,.c3-root.hx .bfh-pill.bfht .bfht-c{opacity:1}
  .c3-root.hx .bfh-pill.bfht .bfht-w{-webkit-mask-image:none;mask-image:none}
}
