.cedrick-ai-widget{
  --cedrick-ai-primary:var(--orange,#ff5a14);
  --cedrick-ai-accent:var(--gold,#c99a5b);
  --cedrick-ai-background:var(--cream,#fffaf4);
  --cedrick-ai-surface:#ffffff;
  --cedrick-ai-text:var(--ink,#151311);
  --cedrick-ai-muted:var(--muted,#746a60);
  --cedrick-ai-border:var(--line,#eaded1);
  position:fixed;
  right:max(22px,env(safe-area-inset-right));
  bottom:max(22px,env(safe-area-inset-bottom));
  z-index:1200;
  font-family:var(--body,Inter,system-ui,sans-serif);
  color:var(--cedrick-ai-text);
}
.cedrick-ai-launcher{
  min-width:64px;
  min-height:58px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  border:1px solid rgba(255,90,20,.38);
  border-radius:999px;
  padding:12px 18px 12px 13px;
  background:linear-gradient(145deg,#fff,#fff3e9);
  color:var(--cedrick-ai-text);
  box-shadow:0 18px 48px rgba(44,32,20,.18);
  cursor:pointer;
  font-weight:900;
}
.cedrick-ai-launcher:focus-visible,.cedrick-ai-icon-btn:focus-visible,.cedrick-ai-form button:focus-visible,.cedrick-ai-message-actions button:focus-visible,.cedrick-ai-permanent-actions button:focus-visible,.cedrick-ai-tooltip button:focus-visible{
  outline:3px solid rgba(255,90,20,.32);
  outline-offset:3px;
}
.cedrick-ai-launcher-icon{
  width:34px;
  height:34px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:linear-gradient(180deg,var(--cedrick-ai-primary),var(--orange-dark,#e54805));
  color:#fff;
}
.cedrick-ai-launcher-icon svg,.cedrick-ai-icon-btn svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.cedrick-ai-launcher-label{font-size:13px;letter-spacing:.02em}
.cedrick-ai-widget.is-first-run .cedrick-ai-launcher{animation:cedrick-ai-pop .7s ease both}
.cedrick-ai-tooltip{
  position:absolute;
  right:0;
  bottom:76px;
  display:flex;
  align-items:center;
  gap:8px;
  width:max-content;
  max-width:min(260px,calc(100vw - 40px));
  padding:11px 12px 11px 14px;
  border:1px solid var(--cedrick-ai-border);
  border-radius:14px;
  background:rgba(255,255,255,.96);
  box-shadow:0 14px 38px rgba(44,32,20,.13);
  font-size:13px;
  font-weight:800;
}
.cedrick-ai-tooltip[hidden]{display:none}
.cedrick-ai-tooltip:after{
  content:"";
  position:absolute;
  right:27px;
  bottom:-7px;
  width:12px;
  height:12px;
  border-right:1px solid var(--cedrick-ai-border);
  border-bottom:1px solid var(--cedrick-ai-border);
  background:#fff;
  transform:rotate(45deg);
}
.cedrick-ai-tooltip button{
  position:relative;
  z-index:2;
  width:26px;
  height:26px;
  border:0;
  border-radius:50%;
  background:#fff2e9;
  color:var(--cedrick-ai-primary);
  font:inherit;
  cursor:pointer;
}
.cedrick-ai-panel{
  position:absolute;
  right:0;
  bottom:74px;
  width:min(420px,calc(100vw - 28px));
  height:min(680px,calc(100vh - 112px - env(safe-area-inset-bottom)));
  min-height:460px;
  display:flex;
  flex-direction:column;
  overflow:hidden;
  border:1px solid rgba(234,222,209,.95);
  border-radius:22px;
  background:linear-gradient(180deg,#fffaf4,#fff);
  box-shadow:0 30px 80px rgba(44,32,20,.22);
}
.cedrick-ai-panel[hidden]{display:none}
.cedrick-ai-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  padding:18px 18px 15px;
  border-bottom:1px solid var(--cedrick-ai-border);
  background:rgba(255,250,244,.92);
}
.cedrick-ai-header h2{
  margin:0;
  font-family:var(--title,Georgia,serif);
  font-size:25px;
  line-height:1;
  letter-spacing:0;
}
.cedrick-ai-header p{
  margin:5px 0 0;
  font-size:13px;
  font-weight:850;
  color:#3a3029;
}
.cedrick-ai-header small{
  display:block;
  margin-top:2px;
  color:var(--cedrick-ai-muted);
  font-size:12px;
}
.cedrick-ai-status{color:#267a3f}
.cedrick-ai-header-actions{display:flex;gap:8px}
.cedrick-ai-icon-btn{
  width:40px;
  height:40px;
  display:grid;
  place-items:center;
  border:1px solid var(--cedrick-ai-border);
  border-radius:50%;
  background:#fff;
  color:#3a3029;
  cursor:pointer;
}
.cedrick-ai-messages{
  flex:1;
  overflow:auto;
  display:grid;
  align-content:start;
  gap:12px;
  padding:17px;
  scroll-behavior:smooth;
}
.cedrick-ai-message{
  display:grid;
  gap:8px;
  max-width:88%;
}
.cedrick-ai-message.user{justify-self:end}
.cedrick-ai-message.assistant,.cedrick-ai-message.system{justify-self:start}
.cedrick-ai-bubble{
  border:1px solid var(--cedrick-ai-border);
  border-radius:18px;
  padding:12px 14px;
  background:#fff;
  box-shadow:0 8px 22px rgba(44,32,20,.055);
  font-size:14px;
  line-height:1.45;
  white-space:pre-wrap;
}
.cedrick-ai-message.assistant .cedrick-ai-bubble,.cedrick-ai-message.system .cedrick-ai-bubble{white-space:normal}
.cedrick-ai-bubble p{margin:0 0 8px}
.cedrick-ai-bubble p:last-child,.cedrick-ai-bubble ul:last-child,.cedrick-ai-bubble ol:last-child{margin-bottom:0}
.cedrick-ai-bubble ul,.cedrick-ai-bubble ol{margin:7px 0 9px;padding-left:18px}
.cedrick-ai-bubble li+li{margin-top:4px}
.cedrick-ai-bubble strong{font-weight:900;color:#2b211b}
.cedrick-ai-message.user .cedrick-ai-bubble{
  border-color:rgba(255,90,20,.28);
  background:linear-gradient(180deg,var(--cedrick-ai-primary),var(--orange-dark,#e54805));
  color:#fff;
  box-shadow:0 12px 28px rgba(255,90,20,.2);
}
.cedrick-ai-message.system .cedrick-ai-bubble{
  background:#fff6ed;
  color:#5d4b3e;
}
.cedrick-ai-message-actions{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.cedrick-ai-message-actions button,.cedrick-ai-permanent-actions button{
  min-height:38px;
  border:1px solid rgba(255,90,20,.28);
  border-radius:999px;
  background:#fff;
  color:var(--cedrick-ai-primary);
  padding:8px 12px;
  font:inherit;
  font-size:12px;
  font-weight:900;
  cursor:pointer;
}
.cedrick-ai-typing{
  display:inline-flex;
  align-items:center;
  gap:5px;
  color:var(--cedrick-ai-muted);
}
.cedrick-ai-typing span{
  width:6px;
  height:6px;
  border-radius:50%;
  background:currentColor;
  animation:cedrick-ai-dot 1s ease-in-out infinite;
}
.cedrick-ai-typing span:nth-child(2){animation-delay:.15s}
.cedrick-ai-typing span:nth-child(3){animation-delay:.3s}
.cedrick-ai-permanent-actions{
  display:flex;
  gap:8px;
  overflow:auto;
  padding:0 17px 13px;
}
.cedrick-ai-permanent-actions button{
  flex:0 0 auto;
  background:#fff8f2;
}
.cedrick-ai-privacy-note{
  margin:0;
  padding:0 18px 12px;
  color:var(--cedrick-ai-muted);
  font-size:11px;
  line-height:1.35;
}
.cedrick-ai-privacy-note a{
  color:var(--cedrick-ai-primary);
  font-weight:850;
  text-decoration:underline;
  text-underline-offset:3px;
}
.cedrick-ai-form{
  display:grid;
  grid-template-columns:1fr auto;
  gap:10px;
  padding:13px 17px calc(15px + env(safe-area-inset-bottom));
  border-top:1px solid var(--cedrick-ai-border);
  background:rgba(255,255,255,.96);
}
.cedrick-ai-form textarea{
  width:100%;
  max-height:120px;
  min-height:48px;
  resize:none;
  border:1px solid var(--cedrick-ai-border);
  border-radius:16px;
  padding:12px 13px;
  font:inherit;
  color:var(--cedrick-ai-text);
  background:#fff;
  outline:none;
}
.cedrick-ai-form textarea:focus{border-color:rgba(255,90,20,.55);box-shadow:0 0 0 4px rgba(255,90,20,.08)}
.cedrick-ai-form button[type="submit"]{
  min-width:92px;
  min-height:48px;
  border:1px solid var(--orange-dark,#e54805);
  border-radius:999px;
  background:linear-gradient(180deg,var(--cedrick-ai-primary),var(--orange-dark,#e54805));
  color:#fff;
  font:inherit;
  font-size:12px;
  font-weight:950;
  text-transform:uppercase;
  letter-spacing:.05em;
  cursor:pointer;
}
.cedrick-ai-form button[disabled]{opacity:.62;cursor:not-allowed}
.cedrick-ai-hp{position:absolute;left:-9999px;width:1px;height:1px;opacity:0}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@keyframes cedrick-ai-pop{
  0%{transform:translateY(12px) scale(.94);opacity:0}
  100%{transform:translateY(0) scale(1);opacity:1}
}
@keyframes cedrick-ai-dot{
  0%,80%,100%{transform:translateY(0);opacity:.45}
  40%{transform:translateY(-4px);opacity:1}
}
@media (prefers-reduced-motion:reduce){
  .cedrick-ai-widget *{scroll-behavior:auto!important;animation:none!important;transition:none!important}
}
@media(max-width:760px){
  .cedrick-ai-widget{
    right:max(12px,env(safe-area-inset-right));
    bottom:max(12px,env(safe-area-inset-bottom));
  }
  .cedrick-ai-launcher-label{display:none}
  .cedrick-ai-launcher{width:62px;height:62px;padding:0}
  .cedrick-ai-panel{
    position:fixed;
    inset:12px 10px calc(12px + env(safe-area-inset-bottom)) 10px;
    width:auto;
    height:auto;
    min-height:0;
    border-radius:20px;
  }
  .cedrick-ai-message{max-width:94%}
  .cedrick-ai-permanent-actions{padding-bottom:10px}
  .cedrick-ai-form{grid-template-columns:1fr}
  .cedrick-ai-form button[type="submit"]{width:100%}
}
