/* =========================================================
   FitGirl - WordPress-only additions. site.css (the sketch) is never edited;
   everything that exists only because of WordPress lives here.
   Tokens (--ink, --bone, --yellow ...) come from site.css.
   ========================================================= */

/* ---------- Lead form ---------- */
/* Honeypot: off-screen, not display:none (some bots skip hidden fields). */
.fg-hp{position:absolute!important;inset-inline-start:-10000px;top:auto;width:1px;height:1px;overflow:hidden}
.fg-form-err{margin:0 0 14px}

/* ---------- Resolve widgets next to the dock / sheet ---------- */
.ra-toggle{box-shadow:0 0 0 2px rgba(246,239,231,.55),0 10px 26px -8px rgba(0,0,0,.6)}
.ra-widget{transition:transform .5s var(--out,ease),opacity .2s ease}
@media (max-width:899px){
  /* The dock is 62px tall, 12px from the bottom. The button sits 12px above it: bottom edge at 86px,
     the same spot as the sketch (round 4). The sketch gets there by animating `bottom`; here it is a
     transform from the widget's own 16px offset, because moving `bottom` registers as layout shift (CLS).
     So the sketch's `bottom` rule is neutralised (same selector, loaded later) and its transition replaced. */
  body .ra-widget{transition:transform .5s var(--out,ease),opacity .2s ease}
  html:has(.dock.is-visible) body .ra-widget{bottom:var(--ra-offset,16px)}
  html.fg-dock-on .ra-widget{transform:translateY(calc(-70px - env(safe-area-inset-bottom)))}
}
/* Cookie banner/panel open: sit 12px above it (height measured by wp.js). Wins over the dock rule. */
html.fg-rc-on .ra-widget{transform:translateY(calc(4px - var(--fg-rc-h,0px)))}
/* Round 23: on desktop the dock is a capsule in the bottom-left corner (32px). The cookie banner is a full-width
   bar at the bottom, so while it is open the capsule rises by its height, like the a11y button. `translate` composes
   with the dock's own show/hide `transform`, so the sketch's rules stay untouched. Mobile is unchanged. */
@media (min-width:900px){
  html.fg-rc-on .dock{translate:0 calc(-1 * var(--fg-rc-h,0px))}
}
@media (min-width:900px) and (prefers-reduced-motion:no-preference){
  .dock{transition:transform .5s var(--out),translate .5s var(--out)}
}
/* The lead sheet is a modal dialog: nothing else is operable while it is open. */
html.fg-sheet-open .ra-widget{opacity:0;visibility:hidden}
@media (prefers-reduced-motion:reduce){.ra-widget{transition:none}}

/* ---------- WhatsApp: a floating green circle, out of the dock (Guy, 7.10.26) ----------
   The a11y button's twin: same 54px, same shadow, mirrored on the left. It follows the dock through the same
   html classes as the a11y button (fg-dock-on / fg-rc-on, wp.js), with the dock's spring (.5s var(--out)).
   Phone: the a11y button's spot on the left (16px from the edge, translated -70px = 12px above the dock).
   Desktop: above the capsule (32px from the corner, 68px tall), 12px gap, aligned to its left edge.
   Hidden = below the viewport + visibility:hidden (not tabbable, not read). Moves by transform/translate only (CLS 0).
   z-index 50 = the dock's: under the sheet and the offers drawer (100). Markup: template-parts/whatsapp.php. */
.fg-wa{position:fixed;z-index:50;left:16px;bottom:16px;display:grid;place-items:center;width:54px;height:54px;
  border-radius:50%;background:#25D366;color:#fff;text-decoration:none;-webkit-tap-highlight-color:transparent;
  box-shadow:0 0 0 2px rgba(246,239,231,.55),0 10px 26px -8px rgba(0,0,0,.6);
  visibility:hidden;transform:translateY(calc(100% + 24px));
  transition:transform .5s var(--out,ease),translate .5s var(--out,ease),scale .18s ease,visibility 0s linear .5s}
.fg-wa svg{display:block;width:28px;height:28px}
.fg-wa:focus-visible{outline:3px solid var(--yellow);outline-offset:3px;border-radius:50%}
.fg-wa:active{scale:.97}
@media (hover:hover){.fg-wa:hover{scale:1.07}}
html.fg-dock-on .fg-wa{visibility:visible;transition:transform .5s var(--out,ease),translate .5s var(--out,ease),scale .18s ease,visibility 0s}
@media (max-width:899px){
  html.fg-dock-on .fg-wa{transform:translateY(calc(-70px - env(safe-area-inset-bottom)))}
  /* Cookie banner open: 12px above it, the a11y button's rule */
  html.fg-dock-on.fg-rc-on .fg-wa{transform:translateY(calc(4px - var(--fg-rc-h,0px)))}
}
/* The floating "קוד קופון" tab (part-fcoupon, from the sketch) is off on the phone (Guy, 7.10.26): it repeated the dock,
   whose text already says "בקוד קופון" and whose "הרשמה מוקדמת" opens the same drawer. The green circle took its corner.
   Desktop already hides it (site.css, the sticker lives in the capsule). The markup and its JS stay, so a sketch sync
   doesn't bring it back; the hero and closing stickers are untouched. */
@media (max-width:899px){.fcoupon{display:none}}
@media (min-width:900px){
  .fg-wa{left:32px;bottom:112px;transform:translateY(calc(100% + 136px))}
  html.fg-dock-on .fg-wa{transform:none}
  /* Cookie banner open: rises by its height, like the capsule */
  html.fg-rc-on .fg-wa{translate:0 calc(-1 * var(--fg-rc-h,0px))}
}
@media (prefers-reduced-motion:reduce){
  .fg-wa,html.fg-dock-on .fg-wa{transition:none}
  .fg-wa:active,.fg-wa:hover{scale:none}
}

/* ---------- Text pages (terms, privacy, accessibility, cookies, 404) ---------- */
.legal-top{padding:22px 0 0}
.legal-top__inner{display:flex;align-items:center;justify-content:space-between;gap:16px}
.legal-top__logo{display:block;border-radius:10px}
.legal-top__logo img{width:120px;height:auto}
.legal-top__back{display:inline-flex;align-items:center;min-height:44px;font-size:15px;color:var(--bone);text-underline-offset:4px;text-decoration-color:rgba(246,239,231,.35)}

.legal{padding:48px 0 96px}
.legal:focus{outline:none}
.legal__wrap{max-width:760px}
.legal__title{font-size:clamp(52px,11vw,88px);color:var(--bone);margin:0 0 12px}
.legal__updated{font-size:14px;color:var(--mute);margin:0 0 36px}
.legal__lede{font-size:19px;color:var(--mute);margin:18px 0 32px;max-width:36em}

.legal__body{font-size:17px;line-height:1.75;color:var(--bone)}
.legal__body > * + *{margin-top:1em}
.legal__body h2{font:500 22px/1.3 var(--font-text);color:var(--bone);margin-top:2.2em}
.legal__body h3{font:500 18px/1.35 var(--font-text);color:var(--bone);margin-top:1.6em}
.legal__body p,.legal__body li{color:#E9DFE4}
.legal__body ul,.legal__body ol{padding-inline-start:1.3em}
.legal__body ul{list-style:disc}
.legal__body ol{list-style:decimal}
.legal__body li + li{margin-top:.45em}
.legal__body li::marker{color:var(--yellow)}
.legal__body a{color:var(--yellow);text-underline-offset:3px}
.legal__body strong{font-weight:500;color:var(--bone)}
.legal__body hr{border:0;border-top:1px solid rgba(246,239,231,.14);margin:2.4em 0}

/* Placeholders for the client to fill in - visible on purpose until replaced. */
.legal__body mark,.fg-todo{background:rgba(236,190,19,.16);color:var(--yellow);padding:.05em .35em;border-radius:6px;box-shadow:inset 0 0 0 1px rgba(236,190,19,.45)}

.legal-table{overflow-x:auto;margin-top:1.4em;border-radius:var(--r-md);box-shadow:inset 0 0 0 1px rgba(246,239,231,.14)}
.legal-table table{width:100%;border-collapse:collapse;font-size:15px;line-height:1.5;min-width:560px}
.legal-table caption{text-align:start;padding:14px 16px 0;color:var(--mute);font-size:14px}
.legal-table th,.legal-table td{text-align:start;vertical-align:top;padding:12px 16px;border-bottom:1px solid rgba(246,239,231,.1)}
.legal-table th{font-weight:500;color:var(--bone)}
.legal-table tr:last-child td{border-bottom:0}

/* The footer on text pages does not need room for the mobile dock. The landing page is a Page too
   (the static front page that holds the ACF fields), hence :not(.home). */
.page:not(.home) .foot,.error404 .foot{padding-bottom:calc(48px + env(safe-area-inset-bottom))}

@media (min-width:900px){
  .legal-top{padding-top:32px}
  .legal-top__logo img{width:150px}
  .legal{padding:72px 0 128px}
}

/* ---------- Closing coupon: one wiggle on entry, no loop (Guy's rule: no repeating motion, 30.9.26) ----------
   The sketch dances every sticker every 3.4s. Here the dance plays once, when the closing coupon first comes into
   view (wp.js adds .is-seen), the same way the floating coupon does. Reduced motion: no movement at all. */
.js .coupon--final:not(.is-revealed) .coupon__sticker{animation:none}
.js .coupon--final.is-seen:not(.is-revealed) .coupon__sticker{animation:sticker-dance 1.8s .2s ease-in-out 1 both}
@media (prefers-reduced-motion:reduce){
  .js .coupon--final.is-seen:not(.is-revealed) .coupon__sticker{animation:none}
}

/* ---------- The client's hero background (inc/hero-bg.php, Guy 5.10.26) ----------
   Only with a custom image (.hero--custom). The image takes its focus point per breakpoint; a light extra tint on
   top of the design's readability gradients, because a client photo can be much brighter than the dark render. */
.hero--custom .hero-frame img{object-position:var(--fg-pos-m,50% 50%)}
@media (min-width:900px){.hero--custom .hero-frame img{object-position:var(--fg-pos-d,50% 50%)}}
.hero--custom .hero-frame::before{content:"";position:absolute;inset:0;z-index:1;pointer-events:none;background:rgba(18,12,16,.3)}

/* ---------- Price as text (Noam 2.11.26) ---------- */
/* The price field also takes words ("חינם", "שבוע ראשון מתנה"). Words at the number's 112-172px would break the
   row, so a text price is set at a heading size and may wrap; a number keeps the sketch's size and its ₪. */
.offer__price--text{align-items:center}
.offer__price--text .offer__num,
.hero .offer__price--text .offer__num{font-size:clamp(34px,7vw,56px);line-height:1.05;max-inline-size:9em;text-wrap:balance}

/* Price size and weight, from fixed choices (Noam, 2.11.26). zoom scales the box too, so nothing overlaps. */
@font-face{font-family:"FG Hero";font-weight:400;font-style:normal;font-display:swap;src:url(../assets/fonts/fbtypopas-regular.woff2) format("woff2"),url(../assets/fonts/fbtypopas-regular.woff) format("woff")}
.offer__price--medium .offer__num,.offer__price--medium .offer__cur{zoom:.8}
.offer__price--small .offer__num,.offer__price--small .offer__cur{zoom:.62}
.offer__price--regular .offer__num,.hero .offer__price--regular .offer__num,.offer__price--regular .offer__cur,.hero .offer__price--regular .offer__cur{font-weight:400}
