/* TXL Studio assistant widget. Loaded on every public page except onboarding and 404. */

.txc-launch{
  position:fixed; right:26px; bottom:88px; z-index:80;
  display:inline-flex; align-items:center; gap:9px; padding:12px 18px 12px 14px; border-radius:999px; cursor:pointer;
  background:rgba(19,22,27,.86); color:var(--text,#eef0f2); border:1px solid var(--line,#252a32);
  backdrop-filter:blur(14px) saturate(140%); -webkit-backdrop-filter:blur(14px) saturate(140%);
  font:600 14px Inter,sans-serif; box-shadow:0 18px 44px -16px rgba(0,0,0,.8), inset 0 1px 0 rgba(255,255,255,.06);
  transition:transform .3s cubic-bezier(.16,.7,.1,1), border-color .2s ease, box-shadow .3s ease;
}
.txc-launch:hover{ transform:translateY(-2px); border-color:var(--cloud,#e8582f); box-shadow:0 22px 50px -16px rgba(232,88,47,.45), inset 0 1px 0 rgba(255,255,255,.08); }
.txc-launch svg{ width:20px; height:20px; color:var(--cloud,#e8582f); flex-shrink:0; }
.txc-launch[hidden]{ display:none; }
.txc-dot{ width:8px; height:8px; border-radius:50%; background:var(--gpt,#14b88a); box-shadow:0 0 8px var(--gpt,#14b88a); }

.txc-panel{
  position:fixed; right:24px; bottom:24px; z-index:85; width:392px; height:min(640px, calc(100dvh - 48px));
  display:flex; flex-direction:column; overflow:hidden; border-radius:20px;
  background:#0e1115; border:1px solid var(--line,#252a32);
  box-shadow:0 40px 90px -30px rgba(0,0,0,.95), 0 0 0 1px rgba(255,255,255,.03), inset 0 1px 0 rgba(255,255,255,.06);
  transform-origin:100% 100%; animation:txc-in .28s cubic-bezier(.16,.7,.1,1);
}
.txc-panel[hidden]{ display:none; }
@keyframes txc-in{ from{ opacity:0; transform:translateY(14px) scale(.97); } }

.txc-head{ display:flex; align-items:center; gap:12px; padding:14px 16px; border-bottom:1px solid var(--line,#252a32); background:linear-gradient(180deg, rgba(255,255,255,.03), transparent); }
.txc-head img{ height:26px; width:auto; }
.txc-title{ flex:1; min-width:0; }
.txc-title strong{ display:block; font:600 15px 'Space Grotesk',sans-serif; letter-spacing:-.01em; }
.txc-title small{ display:flex; align-items:center; gap:7px; color:var(--muted,#8b93a1); font-size:12px; margin-top:2px; }
.txc-close{ width:34px; height:34px; border-radius:9px; border:1px solid var(--line,#252a32); background:transparent; color:var(--text,#eef0f2); cursor:pointer; font-size:20px; line-height:1; }
.txc-close:hover{ border-color:var(--muted,#8b93a1); }

.txc-log{ flex:1; overflow-y:auto; padding:16px; display:flex; flex-direction:column; gap:12px; scroll-behavior:smooth; overscroll-behavior:contain; }
.txc-msg{ max-width:88%; padding:11px 14px; border-radius:16px; font-size:14.5px; line-height:1.55; white-space:pre-wrap; overflow-wrap:anywhere; }
.txc-bot{ align-self:flex-start; background:var(--panel-2,#181c22); border:1px solid var(--line,#252a32); border-bottom-left-radius:5px; color:#dfe3e9; }
.txc-user{ align-self:flex-end; background:var(--text,#eef0f2); color:#0a0c0f; border-bottom-right-radius:5px; font-weight:500; }
.txc-typing{ display:inline-flex; gap:5px; align-items:center; padding:14px 16px; }
.txc-typing i{ width:6px; height:6px; border-radius:50%; background:var(--muted,#8b93a1); animation:txc-bounce 1.1s infinite ease-in-out; }
.txc-typing i:nth-child(2){ animation-delay:.15s; } .txc-typing i:nth-child(3){ animation-delay:.3s; }
@keyframes txc-bounce{ 0%,60%,100%{ transform:translateY(0); opacity:.4; } 30%{ transform:translateY(-4px); opacity:1; } }

.txc-card{ align-self:stretch; border:1px solid rgba(232,88,47,.45); background:linear-gradient(180deg, rgba(232,88,47,.09), rgba(232,88,47,.02)); border-radius:14px; padding:16px; }
.txc-card .k{ font:500 11px 'JetBrains Mono',monospace; letter-spacing:.07em; text-transform:uppercase; color:var(--cloud,#e8582f); margin-bottom:8px; }
.txc-card h4{ font:600 17px 'Space Grotesk',sans-serif; letter-spacing:-.02em; margin:0 0 4px; }
.txc-card .p{ font:700 20px 'Space Grotesk',sans-serif; color:var(--cloud,#e8582f); }
.txc-card .p span{ font:500 12px Inter,sans-serif; color:var(--muted,#8b93a1); margin-left:5px; }
.txc-card .p s{ font:500 13px Inter,sans-serif; color:var(--muted,#8b93a1); margin-left:7px; }
.txc-card p{ font-size:13.5px; color:#aab2bf; line-height:1.55; margin:8px 0 12px; }
.txc-actions{ display:flex; gap:8px; flex-wrap:wrap; }
.txc-btn{ display:inline-flex; align-items:center; justify-content:center; gap:6px; padding:10px 14px; border-radius:10px; font:600 13.5px Inter,sans-serif; text-decoration:none; cursor:pointer; border:1px solid var(--line,#252a32); background:transparent; color:var(--text,#eef0f2); min-height:40px; }
.txc-btn:hover{ border-color:var(--muted,#8b93a1); }
.txc-btn.primary{ background:var(--text,#eef0f2); color:#0a0c0f; border-color:transparent; }
.txc-btn.primary:hover{ filter:brightness(1.05); }

.txc-lead{ align-self:stretch; border:1px solid var(--line,#252a32); background:var(--panel,#13161b); border-radius:14px; padding:14px; display:grid; gap:10px; }
.txc-lead label{ display:grid; gap:5px; font:500 11.5px 'JetBrains Mono',monospace; color:var(--muted,#8b93a1); }
.txc-lead input, .txc-lead textarea{ font:400 14px Inter,sans-serif; color:var(--text,#eef0f2); background:var(--bg,#0a0c0f); border:1px solid var(--line,#252a32); border-radius:9px; padding:10px 12px; width:100%; }
.txc-lead textarea{ min-height:78px; resize:vertical; }
.txc-lead input:focus, .txc-lead textarea:focus{ outline:none; border-color:var(--cloud,#e8582f); box-shadow:0 0 0 3px rgba(232,88,47,.16); }
.txc-lead .hp{ position:absolute; left:-9999px; width:1px; height:1px; overflow:hidden; }
.txc-lead .fine{ font-size:12px; color:var(--muted,#8b93a1); line-height:1.5; }
.txc-lead .fine a{ color:var(--text,#eef0f2); }
.txc-err{ color:#ff8a6b; font-size:13px; }

.txc-chips{ display:flex; gap:8px; flex-wrap:wrap; padding:0 16px 12px; }
.txc-chips:empty{ display:none; }
.txc-chip{ padding:8px 13px; border-radius:999px; border:1px solid var(--line,#252a32); background:transparent; color:#cfd5dd; font:500 13px Inter,sans-serif; cursor:pointer; }
.txc-chip:hover{ border-color:var(--cloud,#e8582f); color:var(--text,#eef0f2); }

.txc-form{ display:flex; gap:8px; padding:12px 14px; border-top:1px solid var(--line,#252a32); }
.txc-form input{ flex:1; min-width:0; font:400 15px Inter,sans-serif; color:var(--text,#eef0f2); background:var(--bg,#0a0c0f); border:1px solid var(--line,#252a32); border-radius:12px; padding:12px 14px; }
.txc-form input:focus{ outline:none; border-color:var(--cloud,#e8582f); box-shadow:0 0 0 3px rgba(232,88,47,.16); }
.txc-send{ width:46px; border-radius:12px; border:0; cursor:pointer; background:var(--cloud,#e8582f); color:#0a0c0f; display:flex; align-items:center; justify-content:center; }
.txc-send:disabled{ opacity:.45; cursor:default; }
.txc-send svg{ width:19px; height:19px; }
.txc-foot{ padding:0 16px 12px; font-size:11.5px; color:var(--muted,#8b93a1); line-height:1.5; }
.txc-foot a{ color:inherit; }
.txc-sr{ position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }

/* phones: the launcher sits above the action bar, the panel is a bottom sheet */
@media (max-width:720px){
  .txc-launch{ right:auto; left:14px; bottom:20px; padding:11px 15px 11px 12px; }
  body.has-cta-bar .txc-launch{ bottom:86px; }
  .txc-panel{ left:0; right:0; bottom:0; width:auto; height:min(84dvh, 720px); border-radius:20px 20px 0 0; transform-origin:50% 100%; }
  .txc-msg{ font-size:15px; }
}
@media (prefers-reduced-motion:reduce){
  .txc-panel{ animation:none; } .txc-launch{ transition:none; } .txc-typing i{ animation:none; opacity:.7; } .txc-log{ scroll-behavior:auto; }
}
@media print{ .txc-launch, .txc-panel{ display:none !important; } }
