/* Codex42 chat widget v1: the launcher (bottom right, every page) and the chat panel with our AI agent.
   Self-contained class names (c42c-*); reuses the --c42-* tokens from shell-v2.css. chat-v1.js builds the markup,
   so nothing here shows without it. Versioned filename: rename (chat-v2.css) when editing after a deploy. */

.c42c-sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}

/* ---------- the launcher: a round accent button, with a label beside it on wider screens ---------- */
.c42c-launch{position:fixed;right:22px;bottom:22px;z-index:90;display:flex;align-items:center;gap:12px;margin:0;padding:0;border:0;background:none;
  cursor:pointer;color:var(--c42-text,#eef0f5);font:600 15px/1 var(--c42-sans,system-ui,sans-serif);-webkit-tap-highlight-color:transparent}
.c42c-launch-label{display:inline-flex;align-items:center;min-height:44px;padding:0 18px;border-radius:999px;white-space:nowrap;
  background:rgba(8,16,13,.88);border:1px solid rgba(67,224,138,.45);-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px);
  box-shadow:0 18px 40px -18px #000;transition:border-color .25s,opacity .25s}
.c42c-launch-icon{display:grid;place-items:center;width:56px;height:56px;border-radius:50%;background:var(--c42-accent,#43e08a);color:#04140b;
  box-shadow:0 16px 34px -14px rgba(67,224,138,.8),0 10px 24px -10px rgba(0,0,0,.85);transition:background .2s,transform .25s var(--c42-ease,ease)}
.c42c-launch-icon svg{display:block;width:26px;height:26px}
.c42c-launch .c42c-i-close{display:none;width:22px;height:22px}
.c42c-launch[aria-expanded="true"] .c42c-i-chat{display:none}
.c42c-launch[aria-expanded="true"] .c42c-i-close{display:block}
.c42c-launch[aria-expanded="true"] .c42c-launch-label{opacity:0;pointer-events:none}
.c42c-launch:hover .c42c-launch-icon{background:var(--c42-accent-hover,#7ef0a8);transform:translateY(-2px)}
.c42c-launch:hover .c42c-launch-label{border-color:var(--c42-accent,#43e08a)}
.c42c-launch:focus{outline:none}
.c42c-launch:focus-visible .c42c-launch-icon{outline:2px solid var(--c42-accent,#43e08a);outline-offset:3px}

/* ---------- the panel: 380 x 560 above the launcher; a full-height sheet on phones ---------- */
.c42c-panel{position:fixed;right:22px;bottom:92px;z-index:95;display:flex;flex-direction:column;width:380px;max-width:calc(100vw - 44px);
  height:560px;max-height:calc(100vh - var(--c42-nav-h,64px) - 112px);border-radius:20px;overflow:hidden;
  background:var(--c42-panel,#0a1114);border:1px solid var(--c42-line-2,rgba(255,255,255,.14));color:var(--c42-text,#eef0f5);
  box-shadow:0 40px 90px -30px rgba(0,0,0,.95),0 0 0 1px rgba(0,0,0,.35);font:400 15.5px/1.5 var(--c42-sans,system-ui,sans-serif);
  opacity:0;transform:translateY(12px) scale(.985);transform-origin:100% 100%;transition:opacity .22s ease,transform .32s var(--c42-ease,ease)}
.c42c-panel[hidden]{display:none}
.c42c-panel.is-in{opacity:1;transform:none}

.c42c-head{flex:0 0 auto;display:grid;grid-template-columns:38px minmax(0,1fr) auto auto;align-items:center;gap:1px 12px;padding:14px 12px 14px 16px;
  border-bottom:1px solid var(--c42-line,rgba(255,255,255,.08));background:linear-gradient(180deg,rgba(67,224,138,.09),rgba(67,224,138,0))}
.c42c-mark{grid-row:1 / span 2;display:flex;align-items:center;justify-content:center;gap:2px;width:38px;height:38px;border-radius:50%;
  background:#06120c;border:1px solid rgba(67,224,138,.45);box-shadow:0 0 18px -6px rgba(67,224,138,.7)}
.c42c-mark b{font:700 17px/1 var(--c42-display,system-ui,sans-serif);color:var(--c42-logo,#4ee79a);transform:translateY(-1px)}
.c42c-mark i{width:5px;height:12px;border-radius:1px;background:var(--c42-logo,#4ee79a)}
.c42c-title{grid-column:2;margin:0;font:700 17px/1.2 var(--c42-display,system-ui,sans-serif);letter-spacing:-.01em;color:var(--c42-text,#eef0f5)}
.c42c-sub{grid-column:2 / -1;grid-row:2;margin:0;font-size:15px;line-height:1.35;color:var(--c42-text-2,#a1a7b8)}
.c42c-new{grid-column:3;grid-row:1;min-height:34px;padding:0 10px;border:0;border-radius:10px;background:none;cursor:pointer;
  color:var(--c42-text-2,#a1a7b8);font:500 15px/1 var(--c42-sans,system-ui,sans-serif);text-decoration:underline;text-decoration-color:rgba(255,255,255,.25);text-underline-offset:4px}
.c42c-new:hover{color:var(--c42-text,#eef0f5);background:rgba(255,255,255,.06)}
.c42c-new[hidden]{display:none}
.c42c-x{grid-column:4;grid-row:1;display:grid;place-items:center;width:40px;height:40px;padding:0;border-radius:12px;cursor:pointer;
  border:1px solid var(--c42-line-2,rgba(255,255,255,.14));background:rgba(255,255,255,.04);color:var(--c42-text,#eef0f5)}
.c42c-x:hover{background:rgba(255,255,255,.1)}
.c42c-x svg{display:block;width:18px;height:18px}

.c42c-log{flex:1 1 auto;min-height:0;display:flex;flex-direction:column;gap:10px;padding:18px 16px 12px;overflow-y:auto;overscroll-behavior:contain;
  scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.18) transparent}
.c42c-msg{max-width:88%;padding:10px 14px;border-radius:16px;font-size:15.5px;line-height:1.5;white-space:pre-wrap;overflow-wrap:break-word;word-wrap:break-word}
.c42c-msg--bot{align-self:flex-start;background:#101b1f;border:1px solid var(--c42-line,rgba(255,255,255,.08));border-bottom-left-radius:6px}
.c42c-msg--me{align-self:flex-end;background:rgba(67,224,138,.15);border:1px solid rgba(67,224,138,.36);border-bottom-right-radius:6px}
.c42c-msg--err{border-style:dashed;border-color:rgba(245,197,99,.45)}
.c42c-msg a{color:var(--c42-accent,#43e08a);text-decoration:underline;text-underline-offset:3px}
.c42c-msg a:hover{color:var(--c42-accent-hover,#7ef0a8)}
.c42c-chips{display:flex;flex-wrap:wrap;gap:8px;padding-top:2px}
.c42c-chip{min-height:40px;padding:8px 14px;border-radius:999px;cursor:pointer;text-align:left;
  border:1px solid rgba(67,224,138,.4);background:rgba(67,224,138,.06);color:var(--c42-text,#eef0f5);font:500 15px/1.25 var(--c42-sans,system-ui,sans-serif);
  transition:background .2s,border-color .2s}
.c42c-chip:hover{background:rgba(67,224,138,.14);border-color:var(--c42-accent,#43e08a)}
.c42c-typing{display:flex;align-items:center;gap:5px;padding:15px 16px}
.c42c-typing i{width:7px;height:7px;border-radius:50%;background:var(--c42-text-2,#a1a7b8);animation:c42c-dot 1.2s ease-in-out infinite}
.c42c-typing i:nth-of-type(2){animation-delay:.15s}
.c42c-typing i:nth-of-type(3){animation-delay:.3s}
@keyframes c42c-dot{0%,60%,100%{opacity:.35;transform:none}30%{opacity:1;transform:translateY(-3px)}}

.c42c-form{flex:0 0 auto;display:flex;align-items:flex-end;gap:8px;margin:0;padding:12px 12px 8px;border-top:1px solid var(--c42-line,rgba(255,255,255,.08))}
.c42c-input{flex:1 1 auto;min-width:0;height:48px;min-height:48px;max-height:150px;margin:0;padding:12px 14px;border-radius:14px;resize:none;overflow-y:auto;
  border:1px solid var(--c42-line-2,rgba(255,255,255,.14));background:#05080a;color:var(--c42-text,#eef0f5);font:400 16px/1.4 var(--c42-sans,system-ui,sans-serif);
  transition:border-color .2s,box-shadow .2s}
.c42c-input::placeholder{color:#7c8296;opacity:1}
.c42c-input:focus{outline:none;border-color:var(--c42-accent,#43e08a);box-shadow:0 0 0 3px rgba(67,224,138,.18)}
.c42c-send{flex:0 0 auto;display:grid;place-items:center;width:48px;height:48px;padding:0;border:0;border-radius:50%;cursor:pointer;
  background:var(--c42-accent,#43e08a);color:#04140b;transition:background .2s}
.c42c-send:hover{background:var(--c42-accent-hover,#7ef0a8)}
.c42c-send:disabled{background:rgba(255,255,255,.08);color:var(--c42-faint,#6b7185);cursor:default}
.c42c-send svg{display:block;width:20px;height:20px}
.c42c-foot{flex:0 0 auto;margin:0;padding:0 16px 12px;font-size:15px;line-height:1.4;text-align:center;color:var(--c42-text-2,#a1a7b8)}
.c42c-foot a{color:var(--c42-text,#eef0f5);text-underline-offset:3px}
.c42c-foot a:hover{color:var(--c42-accent,#43e08a)}

/* phones: the launcher alone (its label stays for screen readers), and the panel is a full-height sheet */
@media (max-width:759.98px){
  .c42c-launch{right:16px;bottom:16px;bottom:calc(16px + env(safe-area-inset-bottom,0px))}
  .c42c-launch-label{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}
  .c42c-panel{top:0;right:0;bottom:0;left:0;z-index:120;width:100%;max-width:none;height:100%;height:100dvh;max-height:none;border:0;border-radius:0;
    transform:translateY(16px)}
  .c42c-head{padding-top:calc(14px + env(safe-area-inset-top,0px))}
  .c42c-foot{padding-bottom:calc(12px + env(safe-area-inset-bottom,0px))}
  /* the last lines of the footer stay clear of the launcher */
  .c42-foot{padding-bottom:96px}
}
html.c42c-lock,html.c42c-lock body{overflow:hidden}

@media (prefers-reduced-motion:reduce){
  .c42c-panel,.c42c-launch-icon,.c42c-launch-label,.c42c-chip,.c42c-input,.c42c-send{transition:none}
  .c42c-panel,.c42c-panel.is-in{transform:none}
  .c42c-launch:hover .c42c-launch-icon{transform:none}
  .c42c-typing i{animation:none;opacity:.7}
}
@media print{.c42c-launch,.c42c-panel{display:none}}
