/* =============================================================================
   fragchat.css — FRAGZ live-chat POPUP (numbers.html / the /888 page ONLY).

   A Fiverr-style minimizable chat widget bottom-right, on-brand with the rest
   of gifts.wtf: every colour is drawn from the shared theme.css palette
   (--void/--panel/--raised/--hairline/--ink-*/--p*/--gain), so it re-themes for
   free across dark / light / hashtag. The only motion is transform/opacity
   (compositor-friendly) and it is disabled wholesale under reduced-motion.

   NAMING. Everything is scoped under .fc-* / #fc* so nothing here can collide
   with numbers.css.
   ========================================================================== */

/* the fixed anchor bottom-right; children (bubble + panel) position off it.
   Keyed on the #fcRoot ID as well as the class: on the live page the class-only
   rule was computing `static` (the launcher fell into normal flow at the page
   bottom), so the id pins it for certain. */
#fcRoot, .fc-root{
  position:fixed !important; right:20px; bottom:20px; z-index:120;
  font-family:var(--font-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif);
}

/* ---------------------------------------------------------------------------
   LAUNCHER BUBBLE — the always-there "Chat with @frag" pill.
   ------------------------------------------------------------------------ */
.fc-launcher{
  display:inline-flex; align-items:center; gap:11px;
  padding:9px 18px 9px 9px;
  border-radius:999px;
  background:linear-gradient(140deg, var(--p300), var(--p400) 60%, var(--p500));
  border:1px solid var(--p600);
  color:var(--on-accent);
  box-shadow:0 12px 30px rgba(46,134,200,.45),
             0 0 0 1px rgba(255,255,255,.08) inset;
  transform-origin:bottom right;
  animation:fcLaunchIn .4s cubic-bezier(.2,.85,.3,1) both;
  transition:transform .16s ease, box-shadow .16s ease, filter .16s ease;
}
.fc-launcher:hover{
  transform:translateY(-2px);
  box-shadow:0 16px 40px rgba(77,169,238,.6), 0 0 0 1px rgba(255,255,255,.14) inset;
  filter:brightness(1.04);
}
.fc-launcher:active{ transform:translateY(0); }
.fc-launcher.is-hidden{ display:none; }

.fc-launcher-ic{
  position:relative; flex:0 0 auto;
  width:38px; height:38px; border-radius:50%;
  display:inline-flex; align-items:center; justify-content:center;
  background:radial-gradient(120% 120% at 50% 20%, var(--raised), var(--void));
  border:2px solid rgba(255,255,255,.55); overflow:visible;
}
.fc-launcher-pfp{
  width:30px; height:30px; border-radius:50%; object-fit:cover; display:block;
}
.fc-launcher-online{
  position:absolute; right:-1px; bottom:-1px;
  width:11px; height:11px; border-radius:50%;
  background:var(--gain); border:2px solid var(--p400);
  box-shadow:0 0 8px var(--gain);
  animation:fcBlip 2.2s ease-in-out infinite;
}
.fc-launcher-txt{ display:flex; flex-direction:column; line-height:1.15; text-align:left; }
.fc-launcher-txt b{ font-size:14px; font-weight:800; letter-spacing:.01em; }
.fc-launcher-sub{ font-size:10.5px; opacity:.86; letter-spacing:.02em; }

/* the attention "ping" ring around the bubble */
.fc-launcher::after{
  content:""; position:absolute; inset:0; border-radius:999px;
  border:1.5px solid var(--p500); opacity:0; pointer-events:none;
  animation:fcPing 3.4s ease-out infinite;
}

/* ---------------------------------------------------------------------------
   PANEL — the chat window itself.
   ------------------------------------------------------------------------ */
/* Panel is FIXED to the viewport (top-right third), NOT nested in the launcher
   anchor — that keeps its hit-testing clean (buttons/input work) and lets it be
   dragged anywhere. Keyed on the id too so the position can't be overridden. */
/* POSITIONING — id-forced so it can't be overridden. NOTE: keep opacity/
   transform OFF this id rule — an id (1,0,0) would beat the class-only
   `.fc-panel.is-in` (0,2,0) and pin the panel at opacity:0 (open but invisible,
   the "buttons don't work" bug). The show/hide animation lives on the class. */
#fcPanel, .fc-panel{
  position:fixed !important; top:74px; right:20px; left:auto; bottom:auto;
  width:clamp(360px, 33vw, 480px);
  height:min(620px, calc(100vh - 110px));
  display:flex; flex-direction:column; overflow:hidden;
  background:var(--panel);
  border:1px solid var(--hairline-2);
  border-radius:18px;
  box-shadow:0 30px 80px rgba(0,0,0,.6), 0 0 0 1px rgba(77,169,238,.08);
  transform-origin:top right;
  z-index:130;
}
/* entry animation on the CLASS only, so .is-in cleanly overrides it */
.fc-panel{
  transform:translateY(-10px) scale(.96); opacity:0;
  transition:transform .22s cubic-bezier(.2,.85,.3,1), opacity .18s ease;
}
.fc-panel.is-in{ transform:none; opacity:1; }
.fc-panel[hidden]{ display:none !important; }
/* header is the drag handle */
.fc-head{ cursor:move; user-select:none; -webkit-user-select:none; }
.fc-head .fc-icobtn{ cursor:pointer; }

/* ---- header ------------------------------------------------------------- */
.fc-head{
  display:flex; align-items:center; gap:10px;
  padding:11px 12px;
  background:
    radial-gradient(120% 160% at 0% 0%, rgba(77,169,238,.18), transparent 60%),
    var(--raised);
  border-bottom:1px solid var(--hairline-2);
}
.fc-head-pfp{ position:relative; flex:0 0 auto; width:38px; height:38px; }
.fc-head-pfp img{
  width:38px; height:38px; border-radius:50%; object-fit:cover; display:block;
  border:2px solid var(--p400);
}
.fc-head-online{
  position:absolute; right:-1px; bottom:-1px;
  width:10px; height:10px; border-radius:50%;
  background:var(--gain); border:2px solid var(--raised);
  box-shadow:0 0 7px var(--gain);
  animation:fcBlip 2.2s ease-in-out infinite;
}
.fc-head-meta{ flex:1 1 auto; min-width:0; display:flex; flex-direction:column; gap:1px; }
.fc-head-id{ color:var(--ink-hi); font-weight:800; font-size:15px; letter-spacing:.01em; }
.fc-head-badge{
  display:inline-block; margin-left:2px; padding:1px 7px;
  font-size:9px; font-weight:900; letter-spacing:.12em; vertical-align:middle;
  color:var(--on-accent); background:var(--p400); border-radius:999px;
}
.fc-head-sub{
  color:var(--gain); font-size:10.5px; letter-spacing:.02em;
  display:inline-flex; align-items:center; gap:6px;
}
.fc-head-btns{ flex:0 0 auto; display:inline-flex; gap:2px; }
.fc-icobtn{
  width:30px; height:30px; border-radius:8px;
  display:inline-flex; align-items:center; justify-content:center;
  color:var(--ink-lo); font-size:20px; line-height:1;
  transition:background .14s ease, color .14s ease;
}
.fc-icobtn:hover{ background:var(--hover); color:var(--ink-hi); }

/* ---- message body ------------------------------------------------------- */
.fc-body{ flex:1 1 auto; min-height:0; display:flex; position:relative; }
.fc-list{
  flex:1 1 auto; min-height:0; overflow-y:auto; overflow-x:hidden;
  padding:14px 12px 6px;
  display:flex; flex-direction:column; gap:9px;
  scrollbar-width:thin;
  background:
    radial-gradient(140% 60% at 90% 0%, rgba(77,169,238,.05), transparent 60%),
    var(--void);
}
.fc-list::-webkit-scrollbar{ width:8px; }
.fc-list::-webkit-scrollbar-thumb{ background:var(--hairline-2); border-radius:8px; }

/* one message row */
.fc-msg{
  display:flex; align-items:flex-end; gap:8px; max-width:100%;
  animation:fcMsgIn .26s cubic-bezier(.2,.85,.3,1) both;
}
.fc-from-customer{ flex-direction:row-reverse; }
.fc-col{ min-width:0; max-width:80%; display:flex; flex-direction:column; }

/* left-side avatars */
.fc-avatar{
  flex:0 0 auto; width:28px; height:28px; border-radius:50%;
  display:inline-flex; align-items:center; justify-content:center;
  overflow:hidden;
}
.fc-avatar-frag{ border:1.5px solid var(--p400); box-shadow:0 0 0 1px var(--void); }
.fc-avatar-frag img{ width:100%; height:100%; object-fit:cover; display:block; }
.fc-avatar-ai{
  background:var(--raised); border:1px solid var(--hairline-2);
  color:var(--p400);
}

/* the bubble */
.fc-bubble{
  position:relative;
  padding:8px 12px 6px;
  border-radius:14px;
  font-size:13.5px; line-height:19px;
  color:var(--ink-mid);
  word-wrap:break-word; overflow-wrap:anywhere;
}
.fc-b-name{
  font-size:10px; font-weight:800; letter-spacing:.06em; text-transform:lowercase;
  margin-bottom:2px; opacity:.85;
}
.fc-time{
  margin-top:3px; font-size:9.5px; letter-spacing:.02em;
  color:var(--ink-faint); text-align:right;
}

/* AI (bot) — neutral raised, left */
.fc-from-ai .fc-bubble{
  background:var(--raised); border:1px solid var(--hairline);
  border-bottom-left-radius:5px;
}
.fc-from-ai .fc-b-name{ color:var(--p500); }

/* @frag (the human seller) — sky-blue tinted, left, emphasized */
.fc-from-frag .fc-bubble{
  background:linear-gradient(180deg, rgba(77,169,238,.16), rgba(77,169,238,.09));
  border:1px solid rgba(77,169,238,.42);
  border-bottom-left-radius:5px;
  color:var(--ink-hi);
  box-shadow:0 2px 10px rgba(46,134,200,.14);
}
.fc-from-frag .fc-b-name{ color:var(--p500); text-transform:none; }

/* customer — solid accent, right */
.fc-from-customer .fc-col{ align-items:flex-end; }
.fc-from-customer .fc-bubble{
  background:linear-gradient(160deg, var(--p400), var(--p300));
  border:1px solid var(--p500);
  color:var(--on-accent);
  border-bottom-right-radius:5px;
  box-shadow:0 4px 14px rgba(46,134,200,.34);
}
.fc-from-customer .fc-time{ color:rgba(255,255,255,.7); }

/* system / status line — subtle, centered */
.fc-sys{
  align-self:center; text-align:center; max-width:90%;
  animation:fcMsgIn .26s ease both;
}
.fc-sys-txt{
  display:inline-block; padding:4px 12px;
  font-size:10.5px; letter-spacing:.03em;
  color:var(--ink-faint);
  background:var(--panel); border:1px solid var(--hairline);
  border-radius:999px;
}

/* ---- number-picker chips ------------------------------------------------ */
.fc-chips{ display:flex; flex-wrap:wrap; gap:7px; margin-top:9px; }
.fc-chips.is-spent{ opacity:.55; }
.fc-chip{
  display:inline-flex; align-items:center; gap:6px;
  padding:7px 13px; border-radius:999px;
  font-family:var(--font-num,ui-monospace,monospace);
  font-size:13px; font-weight:700; letter-spacing:.01em;
  color:var(--ink-hi);
  background:var(--void);
  border:1px solid var(--p500);
  box-shadow:0 0 0 0 rgba(77,169,238,.5);
  transition:transform .12s ease, box-shadow .16s ease, background .16s ease;
  animation:fcChipIn .3s cubic-bezier(.2,.85,.3,1) both;
}
.fc-chip .fc-chip-tel{ color:var(--gain); font-size:12px; }
.fc-chip:hover:not([disabled]){
  background:var(--p400); color:var(--on-accent);
  transform:translateY(-1px);
  box-shadow:0 8px 20px rgba(77,169,238,.5);
}
.fc-chip:hover:not([disabled]) .fc-chip-tel{ color:var(--on-accent); }
.fc-chip[disabled]{ cursor:default; opacity:.6; }
.fc-nochip{ font-size:12px; color:var(--ink-faint); }

/* ---- typing indicator --------------------------------------------------- */
.fc-typing{ display:inline-flex; align-items:center; gap:4px; padding:11px 13px; }
.fc-typing-dot{
  width:6px; height:6px; border-radius:50%; background:var(--p500);
  animation:fcType 1.2s ease-in-out infinite;
}
.fc-typing-dot:nth-child(2){ animation-delay:.16s; }
.fc-typing-dot:nth-child(3){ animation-delay:.32s; }

/* ---------------------------------------------------------------------------
   GATE — the honest login/telegram prompt inside the panel.
   ------------------------------------------------------------------------ */
.fc-gate{
  flex:1 1 auto; min-height:0; overflow-y:auto;
  display:flex; flex-direction:column; align-items:center; text-align:center;
  gap:11px; padding:26px 22px;
  background:
    radial-gradient(120% 70% at 50% 0%, rgba(77,169,238,.10), transparent 60%),
    var(--void);
  animation:fcMsgIn .26s ease both;
}
.fc-gate-pfp{
  width:54px; height:54px; border-radius:50%; object-fit:cover;
  border:2px solid var(--p400);
  box-shadow:0 6px 18px rgba(0,0,0,.5);
}
.fc-gate-title{ margin:2px 0 0; color:var(--ink-hi); font-size:17px; font-weight:800; }
.fc-gate-msg{ margin:0; color:var(--ink-mid); font-size:13px; line-height:20px; max-width:280px; }
.fc-gate-btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  margin-top:4px; padding:11px 22px; border-radius:12px;
  text-decoration:none;
  color:var(--on-accent); font-weight:800; font-size:14px;
  background:linear-gradient(140deg, var(--p300), var(--p400));
  border:1px solid var(--p500);
  box-shadow:0 8px 22px rgba(46,134,200,.4);
  transition:transform .12s ease, box-shadow .16s ease, filter .16s ease;
}
.fc-gate-btn:hover{ transform:translateY(-1px); filter:brightness(1.05);
  box-shadow:0 12px 28px rgba(77,169,238,.55); }
.fc-gate-fine{ margin:2px 0 0; color:var(--ink-faint); font-size:10.5px; line-height:16px; max-width:260px; }

/* ---------------------------------------------------------------------------
   COMPOSER — text input + send.
   ------------------------------------------------------------------------ */
.fc-compose{
  flex:0 0 auto; display:flex; align-items:center; gap:8px;
  padding:10px 11px;
  background:var(--raised);
  border-top:1px solid var(--hairline-2);
}
.fc-input{
  flex:1 1 auto; min-width:0;
  padding:10px 14px; border-radius:999px;
  background:var(--void);
  border:1px solid var(--hairline-2);
  color:var(--ink-hi); font-size:13.5px;
  transition:border-color .14s ease, box-shadow .14s ease;
}
.fc-input::placeholder{ color:var(--ink-faint); }
.fc-input:focus{ border-color:var(--p400); box-shadow:0 0 0 3px rgba(77,169,238,.18); }
.fc-input:disabled{ opacity:.6; }
.fc-send{
  flex:0 0 auto; width:40px; height:40px; border-radius:50%;
  display:inline-flex; align-items:center; justify-content:center;
  color:var(--on-accent);
  background:linear-gradient(140deg, var(--p400), var(--p300));
  border:1px solid var(--p500);
  box-shadow:0 4px 14px rgba(46,134,200,.4);
  transition:transform .12s ease, filter .16s ease;
}
.fc-send:hover:not(:disabled){ transform:translateY(-1px) scale(1.04); filter:brightness(1.06); }
.fc-send:active:not(:disabled){ transform:none; }
.fc-send:disabled{ opacity:.45; filter:grayscale(.3); }
.fc-send svg{ margin-left:-1px; }

/* ---------------------------------------------------------------------------
   AGREE / DENY — the decision row dropped under @frag's quote (listing flow).
   ------------------------------------------------------------------------ */
.fc-decide{
  align-self:center; display:inline-flex; gap:10px; margin:4px 0 2px;
  animation:fcMsgIn .26s cubic-bezier(.2,.85,.3,1) both;
}
.fc-decide-btn{
  display:inline-flex; align-items:center; gap:7px;
  padding:9px 18px; border-radius:999px;
  font-size:13px; font-weight:800; letter-spacing:.01em;
  transition:transform .12s ease, box-shadow .16s ease, filter .16s ease;
}
.fc-decide-btn .fc-decide-ic{ font-size:12px; line-height:1; }
.fc-decide-yes{
  color:var(--on-accent);
  background:linear-gradient(150deg, var(--gain), color-mix(in srgb, var(--gain) 72%, #0a3a22));
  border:1px solid color-mix(in srgb, var(--gain) 60%, #063a20);
  box-shadow:0 6px 18px color-mix(in srgb, var(--gain) 38%, transparent);
}
.fc-decide-no{
  color:var(--ink-hi);
  background:var(--raised);
  border:1px solid var(--hairline-2);
}
.fc-decide-yes:hover{ transform:translateY(-1px); filter:brightness(1.06);
  box-shadow:0 10px 24px color-mix(in srgb, var(--gain) 50%, transparent); }
.fc-decide-no:hover{ transform:translateY(-1px); border-color:var(--p500); color:var(--ink-hi); }
.fc-decide-btn:active{ transform:none; }

/* ---------------------------------------------------------------------------
   LIST-YOUR-NUMBER CTA — the seller front door under the REGULAR rack.
   ------------------------------------------------------------------------ */
.fc-list-cta-wrap{
  display:flex; flex-direction:column; align-items:center; gap:5px;
  margin:2px auto 16px; text-align:center;
}
.fc-list-cta{
  display:inline-flex; align-items:center; gap:9px;
  padding:11px 22px; border-radius:12px;
  color:var(--on-accent); font-weight:800; font-size:14px; letter-spacing:.01em;
  background:linear-gradient(140deg, var(--p300), var(--p400) 60%, var(--p500));
  border:1px solid var(--p600);
  box-shadow:0 10px 26px color-mix(in srgb, var(--p400) 42%, transparent),
             0 0 0 1px rgba(255,255,255,.08) inset;
  transition:transform .14s ease, box-shadow .16s ease, filter .16s ease;
}
.fc-list-cta b{ font-weight:900; }
.fc-list-cta-ic{ font-size:16px; line-height:1; }
.fc-list-cta:hover{ transform:translateY(-2px); filter:brightness(1.05);
  box-shadow:0 16px 36px color-mix(in srgb, var(--p400) 56%, transparent), 0 0 0 1px rgba(255,255,255,.14) inset; }
.fc-list-cta:active{ transform:translateY(0); }
.fc-list-cta-sub{ color:var(--ink-faint); font-size:11.5px; letter-spacing:.02em; }

/* ---------------------------------------------------------------------------
   LIST-YOUR-NUMBER MODAL — centered dialog, mirrors the username lister.
   ------------------------------------------------------------------------ */
#fcListModal{
  position:fixed; inset:0; z-index:140;
  display:flex; align-items:center; justify-content:center; padding:20px;
}
#fcListModal[hidden]{ display:none !important; }
.fcl-backdrop{ position:absolute; inset:0; background:rgba(3,2,8,.72); }
.fcl-card{
  position:relative; z-index:1; width:min(440px,96vw); max-height:92vh; overflow:auto;
  background:var(--panel); border:1px solid var(--hairline-2); border-radius:16px;
  padding:24px; box-shadow:0 30px 80px rgba(0,0,0,.7);
  animation:fcMsgIn .22s cubic-bezier(.2,.85,.3,1) both;
}
.fcl-x{
  position:absolute; top:12px; right:14px;
  width:34px; height:34px; border-radius:8px;
  font-size:22px; line-height:1; color:var(--ink-lo);
  display:inline-flex; align-items:center; justify-content:center;
  transition:background .14s ease, color .14s ease;
}
.fcl-x:hover{ background:var(--hover); color:var(--ink-hi); }
.fcl-card h3{ margin:0 0 4px; color:var(--ink-hi); font-size:21px; }
.fcl-sub{ margin:0 0 16px; color:var(--ink-lo); font-size:13px; line-height:19px; }
.fcl-sub b{ color:var(--p600); }
.fcl-lab{
  display:block; margin:12px 0 6px;
  color:var(--ink-mid); font-size:12px; font-weight:700;
  letter-spacing:.04em; text-transform:uppercase;
}
.fcl-input{
  width:100%; padding:11px 13px; border-radius:9px;
  background:var(--void); border:1px solid var(--hairline-2);
  color:var(--ink-hi); font-size:15px;
  transition:border-color .14s ease, box-shadow .14s ease;
}
.fcl-input:focus{ border-color:var(--p400); box-shadow:0 0 0 3px rgba(77,169,238,.18); }
.fcl-input::placeholder{ color:var(--ink-faint); }
.fcl-select{ cursor:pointer; }
.fcl-status{ margin:14px 0 0; min-height:18px; color:var(--ink-lo); font-size:13px; }
.fcl-status.is-ok{ color:var(--gain); }
.fcl-login{
  display:inline-block; margin:8px 0 0;
  color:var(--p600); font-weight:700; font-size:13px; text-decoration:none;
}
.fcl-login:hover{ color:var(--p700); text-decoration:underline; }
.fcl-actions{ display:flex; gap:12px; align-items:center; margin-top:16px; flex-wrap:wrap; }
.fcl-ghost{
  background:var(--raised); border:1px solid var(--hairline-2); border-radius:10px;
  padding:11px 20px; color:var(--ink-hi); font-weight:700; font-size:14px;
  transition:border-color .14s ease;
}
.fcl-ghost:hover{ border-color:var(--p500); }
.fcl-go{
  margin-left:auto;
  background:var(--p400); border:1px solid var(--p500); border-radius:10px;
  padding:11px 22px; color:var(--on-accent); font-weight:800; font-size:14px;
  box-shadow:0 6px 18px color-mix(in srgb, var(--p400) 40%, transparent);
  transition:filter .16s ease, transform .12s ease;
}
.fcl-go:hover{ filter:brightness(1.08); transform:translateY(-1px); }
.fcl-go:active{ transform:none; }

/* ---------------------------------------------------------------------------
   KEYFRAMES
   ------------------------------------------------------------------------ */
@keyframes fcLaunchIn{ from{ transform:translateY(18px) scale(.8); opacity:0; } to{ transform:none; opacity:1; } }
@keyframes fcMsgIn{ from{ transform:translateY(8px); opacity:0; } to{ transform:none; opacity:1; } }
@keyframes fcChipIn{ from{ transform:translateY(6px) scale(.94); opacity:0; } to{ transform:none; opacity:1; } }
@keyframes fcBlip{ 0%,100%{ opacity:1; } 50%{ opacity:.35; } }
@keyframes fcPing{ 0%{ transform:scale(1); opacity:.5; } 70%,100%{ transform:scale(1.16); opacity:0; } }
@keyframes fcType{ 0%,60%,100%{ transform:translateY(0); opacity:.5; } 30%{ transform:translateY(-4px); opacity:1; } }

/* ---------------------------------------------------------------------------
   RESPONSIVE — hug the screen on small widths.
   ------------------------------------------------------------------------ */
@media (max-width:480px){
  .fc-root{ right:12px; bottom:12px; }
  .fc-panel{
    width:calc(100vw - 24px);
    height:min(72vh, calc(100vh - 96px));
  }
  .fc-launcher-sub{ display:none; }
}

/* ---------------------------------------------------------------------------
   REDUCED MOTION — freeze all decoration; the widget stays fully usable.
   ------------------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce){
  .fc-launcher, .fc-panel, .fc-msg, .fc-sys, .fc-chip, .fc-gate,
  .fc-launcher-online, .fc-head-online, .fc-typing-dot, .fc-launcher::after,
  .fc-decide, .fc-list-cta, .fcl-card{
    animation:none !important;
    transition:none !important;
  }
  .fc-panel{ transform:none; opacity:1; }
  .fc-launcher-online, .fc-head-online{ opacity:1; }
}
