/* ===== TimeFace — Gallery + Billing visual redesign (Tuvia msg 15085, 2026-11-13) =====
   Additive layer, loads LAST. Remove the <link> in index.html to revert everything here.
   Gallery (#gallery, markup in auth.js) and the billing page (#tf2bill.tfpage, markup in tf2-billing-real.js). */

/* ---------- GALLERY ---------- */
#gallery .wrap{padding-top:10px}
#gallery .section-head{margin-bottom:10px}
#gallery .section-head h2{font:800 clamp(24px,6vw,32px)/1.15 var(--tf-font-display,Rubik,Heebo,sans-serif);letter-spacing:-.01em}
#gallery .section-head p{font-size:13.5px;opacity:.72;margin-top:4px}

/* filter row: one scrollable line, never wraps into a messy pile */
.tf-gal-bar{display:flex!important;flex-wrap:nowrap!important;justify-content:flex-start!important;gap:8px!important;overflow-x:auto;padding:4px 2px 10px!important;margin:0 0 10px!important;
  scrollbar-width:none;-webkit-overflow-scrolling:touch;scroll-snap-type:x proximity}
.tf-gal-bar::-webkit-scrollbar{display:none}
.tf-gal-tab{flex:0 0 auto;scroll-snap-align:start;min-height:38px;padding:8px 16px!important;font-size:13.5px!important;border-radius:999px!important;
  background:rgba(255,255,255,.05)!important;border:1px solid rgba(255,255,255,.1)!important;color:#d7dcea!important}
.tf-gal-tab.on{background:linear-gradient(135deg,#8B7BFF,#6E5BFF)!important;color:#fff!important;border-color:transparent!important;box-shadow:0 6px 18px rgba(110,91,255,.35)!important}
.tf-gal-count{display:block;text-align:start;margin:0 2px 6px;font:700 12.5px/1 Heebo,system-ui,sans-serif;color:#aab1c7}

/* grid + cards */
.tf-gal-grid{gap:14px!important}
@media (max-width:520px){.tf-gal-grid{grid-template-columns:repeat(2,1fr)!important;gap:10px!important}}
.tf-gal-card{border-radius:18px!important;border:1px solid rgba(255,255,255,.08)!important;background:#12151f!important;box-shadow:0 8px 24px rgba(0,0,0,.35)!important}
.tf-gal-card:hover{transform:translateY(-3px)!important}
.tf-gal-media{aspect-ratio:3/4!important}
.tf-gal-media::after{background:linear-gradient(180deg,rgba(0,0,0,.22) 0%,transparent 26%,transparent 66%,rgba(5,8,18,.6) 100%)!important}
.tf-gal-badge{top:8px!important;inset-inline-start:8px!important;font-size:11px!important;padding:4px 9px!important;background:rgba(8,10,20,.62)!important;color:#e9e5ff!important;border-color:rgba(255,255,255,.14)!important}
.tf-gal-date{bottom:8px!important;inset-inline-end:8px!important;font-size:10.5px!important;background:rgba(8,10,20,.5)!important}
.tf-gal-play{width:50px!important;height:50px!important;font-size:19px!important}

/* ❤ sits on the picture (top-end), not in the button pile */
.tf-gal-fav{position:absolute;top:6px;inset-inline-end:6px;z-index:3;width:36px;height:36px;border-radius:50%;border:1px solid rgba(255,255,255,.16);
  background:rgba(8,10,20,.6);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);color:#fff;font-size:16px;line-height:1;cursor:pointer;display:grid;place-items:center;padding:0;transition:transform .15s}
.tf-gal-fav:active{transform:scale(.9)}
.tf-gal-fav.on{color:#ff5c8a;border-color:rgba(255,92,138,.5);background:rgba(255,92,138,.16)}
.tf-gal-fav svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2.1;stroke-linecap:round;stroke-linejoin:round}
.tf-gal-fav.on svg{fill:currentColor}

/* actions: ONE tidy row of icon buttons with tiny labels (was 5 text buttons wrapping into 3 rows) */
.tf-gal-acts{display:grid!important;grid-auto-flow:column;grid-auto-columns:1fr;gap:4px!important;padding:8px 6px 8px!important;border-top:1px solid rgba(255,255,255,.06)}
.tf-gal-acts .tf-gal-act{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-width:0!important;min-height:48px;padding:6px 2px!important;
  border:0!important;border-radius:12px!important;background:transparent!important;color:#cfd4e6!important;font:600 10.5px/1 Heebo,system-ui,sans-serif!important;transform:none!important}
.tf-gal-acts .tf-gal-act:hover{background:rgba(139,123,255,.14)!important;color:#fff!important}
.tf-gal-acts .tf-gal-act svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.tf-gal-acts .tf-gal-act .tfg-l{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tf-gal-acts .tf-gal-act.danger:hover{background:rgba(239,68,68,.14)!important;color:#fda4af!important}
.tf-gal-acts .tf-gal-act[disabled]{opacity:.5}
/* report button (report-content.js) renders a 🚩 — give it the same shape */
.tf-gal-acts .tf-gal-act.tf-rep > span:first-child{font-size:19px;line-height:21px}
/* "Edit in chat" (images): one full-width primary strip above the icon row */
.tf-gal-edit{display:flex;align-items:center;justify-content:center;gap:6px;margin:8px 8px 0;padding:10px;border:0;border-radius:12px;cursor:pointer;
  background:linear-gradient(135deg,#8B7BFF,#6E5BFF);color:#fff;font:800 13px/1 Heebo,system-ui,sans-serif}
.tf-gal-edit:hover{filter:brightness(1.06)}
.tf-gal-edit svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}

/* empty state */
.tf-gal-empty{padding:48px 16px!important;border:1px dashed rgba(255,255,255,.12);border-radius:20px;background:rgba(255,255,255,.02)}
.tf-gal-skel{border-radius:18px!important;aspect-ratio:3/4!important}

/* ---------- BILLING PAGE (#tf2bill.tfpage) ---------- */
#tf2bill.tfpage .tf2b-scroll{padding:16px 16px 28px}
#tf2bill.tfpage .tfp-head{border-bottom:0;padding-bottom:6px}
#tf2bill.tfpage .tfp-head h2{font-size:20px}

/* wallet list → cards */
.tfh-compact{margin:2px auto 14px!important}
.tfh-compact .tfh-list{border:0!important;background:none!important;overflow:visible!important;gap:10px}
.tfh-row{display:grid!important;grid-template-columns:48px 1fr auto;grid-template-areas:"ic n go" "ic v go";align-items:center;column-gap:12px;row-gap:3px;
  min-height:0!important;padding:14px!important;border:1px solid rgba(255,255,255,.09)!important;border-radius:18px!important;
  background:linear-gradient(180deg,rgba(28,30,48,.92),rgba(17,19,31,.96))!important;box-shadow:0 8px 24px rgba(0,0,0,.28);transition:border-color .15s,transform .12s}
.tfh-row:active{transform:scale(.99)}
.tfh-row.on{border-color:rgba(139,123,255,.7)!important;background:linear-gradient(180deg,rgba(139,123,255,.2),rgba(17,19,31,.96))!important}
.tfh-row .hr-ic{grid-area:ic;width:48px;height:48px;border-radius:14px;display:grid;place-items:center;font-size:24px!important;background:rgba(139,123,255,.16)}
.tfh-row.h-content .hr-ic{background:rgba(56,189,248,.16)}
.tfh-row.h-music .hr-ic{background:rgba(244,114,182,.16)}
.tfh-row.h-clips .hr-ic{background:rgba(251,191,36,.16)}
.tfh-row.h-plan .hr-ic{background:rgba(233,201,139,.16)}
.tfh-row .hr-n{grid-area:n;font:600 13.5px/1.2 Heebo,system-ui,sans-serif;color:#aab1c7;white-space:normal!important}
.tfh-row .hr-v{grid-area:v;flex-direction:row!important;align-items:center!important;gap:10px!important;min-width:0}
.tfh-row .hr-v b{font:800 24px/1 var(--tf-font-display,Rubik,Heebo,sans-serif)!important;color:#fff;font-variant-numeric:tabular-nums}
.tfh-row.h-plan .hr-v b{font-size:16px!important;line-height:1.25!important;white-space:normal;color:#E9C98B}
.tfh-row .hr-bar{width:min(120px,100%)!important;height:6px!important;background:rgba(255,255,255,.1)!important}
.tfh-row .hr-bar i{background:linear-gradient(90deg,#34d399,#22c55e)!important}
.tfh-row .hr-bar.low i{background:linear-gradient(90deg,#fbbf24,#f97316)!important}
.tfh-row .hr-go{grid-area:go;align-self:center;padding:10px 14px!important;border-radius:12px!important;background:linear-gradient(135deg,#8B7BFF,#6E5BFF)!important;color:#fff!important;font:800 13px/1 Heebo,system-ui,sans-serif!important;white-space:nowrap;box-shadow:0 6px 16px rgba(110,91,255,.3)}
.tfh-row.h-plan .hr-go{background:rgba(233,201,139,.14)!important;color:#E9C98B!important;box-shadow:none;border:1px solid rgba(233,201,139,.35)}
.tfh-row.low .hr-go,.tfh-row.out .hr-go{background:linear-gradient(135deg,#f59e0b,#ef4444)!important}
@media (max-width:360px){.tfh-row{grid-template-columns:42px 1fr auto;column-gap:9px;padding:12px!important}.tfh-row .hr-ic{width:42px;height:42px;font-size:21px!important}.tfh-row .hr-v b{font-size:20px!important}}
@media (min-width:640px){.tfh-compact .tfh-list{display:grid;grid-template-columns:1fr 1fr;gap:12px}.tfh-row.h-plan{grid-column:1 / -1}}

/* open panel (buy inside a wallet) */
.tfh-panel{border-radius:20px!important;border:1px solid rgba(139,123,255,.45)!important;background:rgba(17,19,31,.98)!important;padding:16px!important}

/* account section → a card */
.tfp-acc{padding:6px 16px 10px;border-radius:18px;border:1px solid rgba(255,255,255,.08);background:rgba(20,22,36,.8)}
.tfp-acc .tfp-h{font-size:17px;margin:10px 0 2px}
.tfp-acc .tfp-d{border-top:0!important}
.tfp-acc .tfp-d > summary{min-height:50px;font-size:14.5px;border-bottom:1px solid rgba(255,255,255,.06)}
.tfp-acc .tfp-d > summary em{background:rgba(139,123,255,.18);color:#d9d3ff;border-radius:999px;padding:4px 9px;font-weight:800}
.tfp-acc .tf2s-lab{margin-top:12px}
.tfp-acc .tf2s-row{min-height:48px!important;padding:10px 0!important;border-bottom:1px solid rgba(255,255,255,.06)}
.tfp-acc .tf2s-row .r-txt{font-size:14.5px!important;font-weight:600!important}
.tfp-acc .tf2s-row .r-go{opacity:.7}
.tfp-acc .tf2b-mini{font-size:12.5px;color:#8B93A8;padding:8px 0 4px}

/* ---------- SUPPORT ENTRY on every screen (msg 15101 "איפה הצ'אטבוט?") ----------
   tf2-redesign.css hid the floating help button everywhere and left only the 🎧 icon on the home top bar.
   Bring it back on every other view (gallery, create, billing page…); home keeps its top-bar icon. */
html.tf2 .tf-help-fab{display:flex!important;z-index:10090}
/* data-tf-view stays "home" on the create overlay too, so no per-view exception: the button shows on every screen */
html.tf2 body[data-tf-view="pricing"] .tf-help-fab,html.tf2 body[data-tf-view="gallery"] .tf-help-fab{display:flex!important}
html.tf2 body.tf-panel-open .tf-help-fab,html.tf2 body.tf-recording .tf-help-fab{display:none!important}
/* the home composer autofocuses → body.tf-typing is on from load; hide the button for the on-screen keyboard only */
@media (pointer:coarse){ html.tf2 body.tf-typing .tf-help-fab{display:none!important} }
html.tf2 .tf-help-fab{bottom:calc(84px + env(safe-area-inset-bottom,0px))}
@media (min-width:900px){ html.tf2 .tf-help-fab{bottom:24px;right:24px} }

/* ---------- CREATE hero banner: no more stretched 600px portrait (msg 15102) ----------
   The slides are 600×804 portraits; on desktop the banner is ~1300px wide so object-fit:cover blew them up and
   cut the face. Now: the same picture blurred as a backdrop + the sharp picture contained at real size. */
html.tf2 .tf2c-hero .hz-s::before{content:"";position:absolute;inset:-12%;background:var(--hbg) center 30%/cover no-repeat;filter:blur(28px) saturate(1.25) brightness(.72);z-index:0}
html.tf2 .tf2c-hero .hz-s>img,html.tf2 .tf2c-hero .hz-s>video{z-index:1}
html.tf2 .tf2c-hero .hz-fade{z-index:2}
html.tf2 .tf2c-hero .hz-tx{z-index:3}
@media (min-width:900px){
  html.tf2 #tf2create .tf2c-hero .hz-s>img,html.tf2 #tf2create .tf2c-hero .hz-s>video{object-fit:contain!important;object-position:center!important}
  html.tf2 #tf2create .tf2c-hero .hz-s.on>img{transform:scale(1.02)}
  html.tf2 #tf2create .tf2c-wrap>.tf2c-hero{height:min(440px,52dvh)}
  html.tf2 .tf2c-hero .hz-tx{inset-inline:22px;bottom:20px}
}

/* ---------- BILLING: plan showcase in the hub (msg 15101 "אזור מפנק שרואים מה מקבלים") ---------- */
.tfb-plans.tfb-show{padding:18px 16px 14px;border-radius:20px;border:1px solid rgba(255,255,255,.09);background:linear-gradient(180deg,rgba(139,123,255,.10),rgba(17,19,31,.6))}
.tfb-plans.tfb-show h3{margin:0 0 4px;font:800 20px/1.2 var(--tf-font-display,Rubik,Heebo,sans-serif);color:#fff;text-align:center}
.tfb-plans.tfb-show .tfb-sub{text-align:center;margin:0 auto 14px;max-width:420px;font-size:13.5px;line-height:1.5;color:#aab1c7}
.tfb-plans.tfb-show .tf2b-cyc{margin:0 auto 16px;padding:4px;border-radius:14px;background:rgba(255,255,255,.05);border:1px solid rgba(255,255,255,.1);width:max-content;max-width:100%}
.tfb-plans.tfb-show .tf2b-cyc button{padding:9px 22px;border-radius:10px;font:800 14px/1 Heebo,system-ui,sans-serif}
.tfb-plans.tfb-show .tfb-plist{gap:12px}
.tfb-plans.tfb-show .tfb-plan{position:relative;padding:18px 16px 16px;border-radius:18px;background:rgba(17,19,31,.9);border:1px solid rgba(255,255,255,.1);box-shadow:0 10px 26px rgba(0,0,0,.3)}
.tfb-plans.tfb-show .tfb-plan.best{border-color:transparent;background:linear-gradient(rgba(22,20,44,.98),rgba(22,20,44,.98)) padding-box,linear-gradient(135deg,#E9C98B,#8B7BFF) border-box;border:1.5px solid transparent;box-shadow:0 14px 36px rgba(110,91,255,.3)}
.tfb-plans.tfb-show .tfb-plan.cur{border-color:rgba(139,123,255,.6)}
.tfb-best{position:absolute;top:-11px;inset-inline-start:14px;padding:5px 11px;border-radius:999px;background:linear-gradient(135deg,#E9C98B,#d4ab5a);color:#1a1405;font:800 11.5px/1 Heebo,system-ui,sans-serif;box-shadow:0 6px 14px rgba(0,0,0,.35)}
.tfb-plans.tfb-show .tfb-pl-n b{font-size:19px}
.tfb-plans.tfb-show .tfb-price,.tfb-plans.tfb-show .tfb-price .tfm{font-size:28px;letter-spacing:-.01em}
.tfb-plans.tfb-show .tfb-price .per{font-size:12.5px;margin-top:4px}
.tfb-plans.tfb-show .tfb-pl-gl{margin-top:8px;font-size:12.5px;color:#aab1c7;text-transform:none}
.tfb-plans.tfb-show .tfb-pl-g{gap:8px;margin-top:4px}
.tfb-plans.tfb-show .tfb-pl-g li{padding:8px 10px;border-radius:12px;background:rgba(255,255,255,.04);font-size:14px}
.tfb-plans.tfb-show .tfb-pl-g li.no{opacity:.7}
.tfb-plans.tfb-show .tfb-pl-u{margin-top:8px;text-align:center}
.tfb-plans.tfb-show .tfb-pl-u em{display:inline-block;padding:4px 10px;border-radius:999px;background:rgba(74,222,128,.12);color:#86efac}
.tfb-plans.tfb-show .tfb-pbtn{min-height:52px;border-radius:14px;font-size:15.5px;box-shadow:0 8px 20px rgba(110,91,255,.3)}
.tfb-plans.tfb-show .tfb-plan.best .tfb-pbtn{background:linear-gradient(135deg,#E9C98B,#c9a35a);color:#1a1405}
.tfb-incl{list-style:none;margin:14px 0 4px;padding:12px 14px;border-radius:14px;background:rgba(255,255,255,.04);display:flex;flex-direction:column;gap:6px;font:600 13px/1.4 Heebo,system-ui,sans-serif;color:#cfd4e6}
.tfb-plans.tfb-show .tfb-more > summary{color:#aab1c7}
@media (min-width:760px){
  .tfb-plans.tfb-show .tfb-plist{display:grid;grid-template-columns:repeat(3,1fr);align-items:stretch;gap:14px}
  .tfb-plans.tfb-show .tfb-plan{display:flex;flex-direction:column}
  .tfb-plans.tfb-show .tfb-plan.best{transform:translateY(-6px)}
  .tfb-plans.tfb-show .tfb-pl-top{flex-direction:column;gap:6px}
  .tfb-plans.tfb-show .tfb-pl-top .tfb-price{text-align:start}
  .tfb-plans.tfb-show .tfb-pbtn,.tfb-plans.tfb-show .tfb-cur,.tfb-plans.tfb-show .tfb-dim{margin-top:auto}
  .tfb-incl{flex-direction:row;flex-wrap:wrap;justify-content:center;gap:8px 22px}
  #tf2bill.tfpage .tf2b-scroll > .tfb-plans.tfb-show{max-width:900px}
}

/* agents20 #02 — wallet activity list + "balance after" lines (tf2-billing-real.js actHTML / afterTxt, tf-wallet.js) */
#tf2bill .tfr-acts .tfr-act{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:2px}
#tf2bill .tfr-act li{display:grid;grid-template-columns:auto 1fr auto;gap:10px;align-items:center;padding:8px 2px;border-bottom:1px solid rgba(255,255,255,.06);font-size:13.5px}
#tf2bill .tfr-act .ta-d{opacity:.6;font-size:12px;white-space:nowrap}
#tf2bill .tfr-act .ta-a{font-variant-numeric:tabular-nums;white-space:nowrap}
#tf2bill .tfr-act .ta-a.plus{color:#7de08a}
#tf2bill .tfr-after{display:inline-block;margin-top:4px;font-weight:700}
.tfw-prev{font-variant-numeric:tabular-nums}
