/* Nuage AI Chat v2.1 — isolated UI. All selectors are plugin-specific. */
#nuageai21-root{
  --nuageai21-accent:#f5c400;
  --nuageai21-ink:#171717;
  --nuageai21-border:#e8e8e8;
  --nuageai21-muted:#8d8d8d;
  position:fixed!important;
  z-index:2147483000!important;
  bottom:24px!important;
  font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;
  line-height:1.4!important;
  box-sizing:border-box!important;
}
#nuageai21-root *,#nuageai21-root *::before,#nuageai21-root *::after{box-sizing:border-box!important}
#nuageai21-root.nuageai21-right{right:24px!important}
#nuageai21-root.nuageai21-left{left:24px!important}

/* Reset theme/plugin button rules only inside this widget */
#nuageai21-root button{
  appearance:none!important;-webkit-appearance:none!important;
  font:inherit!important;text-transform:none!important;letter-spacing:normal!important;
  margin:0!important;padding:0!important;min-width:0!important;max-width:none!important;
  line-height:1!important;border-style:solid!important;cursor:pointer!important;
}
#nuageai21-root button::before,#nuageai21-root button::after{content:none!important}
#nuageai21-root svg{display:block!important;pointer-events:none!important}

/* Floating logo launcher */
#nuageai21-root .nuageai21-launcher{
  width:64px!important;height:64px!important;border-radius:20px!important;
  border:1px solid rgba(0,0,0,.08)!important;background:#fff!important;
  display:grid!important;place-items:center!important;padding:10px!important;
  box-shadow:0 12px 35px rgba(0,0,0,.16)!important;
  transition:transform .18s ease,box-shadow .18s ease!important;overflow:hidden!important;
}
#nuageai21-root .nuageai21-launcher:hover{transform:translateY(-3px)!important;box-shadow:0 17px 42px rgba(0,0,0,.20)!important}
#nuageai21-root .nuageai21-launcher:active{transform:scale(.95)!important}
#nuageai21-root .nuageai21-launcher.hidden{display:none!important}
#nuageai21-root .nuageai21-launcher img{width:100%!important;height:100%!important;object-fit:contain!important;margin:0!important;border:0!important}
#nuageai21-root .nuageai21-launcher span{font-size:22px!important;font-weight:800!important;color:var(--nuageai21-ink)!important}

/* Window */
#nuageai21-root .nuageai21-panel{
  display:none!important;width:min(390px,calc(100vw - 32px))!important;
  height:min(610px,calc(100dvh - 48px))!important;background:#fff!important;
  border:1px solid var(--nuageai21-border)!important;border-radius:22px!important;
  overflow:hidden!important;box-shadow:0 24px 70px rgba(0,0,0,.20)!important;
  grid-template-rows:64px minmax(0,1fr) auto auto auto!important;
}
#nuageai21-root .nuageai21-panel.open{display:grid!important}

/* Header */
#nuageai21-root .nuageai21-header{
  height:64px!important;display:flex!important;align-items:center!important;justify-content:space-between!important;
  padding:11px 13px 11px 17px!important;background:#fff!important;border:0!important;
  border-bottom:1px solid var(--nuageai21-border)!important;
}
#nuageai21-root .nuageai21-brand{display:flex!important;align-items:center!important}
#nuageai21-root .nuageai21-header-logo{display:block!important;width:auto!important;height:38px!important;max-width:64px!important;object-fit:contain!important;margin:0!important}
#nuageai21-root .nuageai21-logo-letter{width:38px!important;height:38px!important;border-radius:11px!important;background:var(--nuageai21-ink)!important;color:#fff!important;display:grid!important;place-items:center!important;font-weight:800!important}
#nuageai21-root .nuageai21-header-actions{display:flex!important;align-items:center!important;gap:6px!important}

/* Header controls */
#nuageai21-root .nuageai21-language{
  width:auto!important;height:36px!important;min-width:50px!important;padding:0 9px!important;
  display:flex!important;align-items:center!important;justify-content:center!important;gap:5px!important;
  background:#f7f7f7!important;color:#444!important;border:1px solid #e6e6e6!important;
  border-radius:11px!important;box-shadow:none!important;font-size:11px!important;font-weight:700!important;
}
#nuageai21-root .nuageai21-language svg{width:14px!important;height:14px!important;fill:none!important;stroke:currentColor!important;stroke-width:1.7!important}
#nuageai21-root .nuageai21-close{
  width:36px!important;height:36px!important;display:grid!important;place-items:center!important;
  background:transparent!important;color:#555!important;border:1px solid transparent!important;
  border-radius:11px!important;box-shadow:none!important;
}
#nuageai21-root .nuageai21-close svg{width:18px!important;height:18px!important;fill:none!important;stroke:currentColor!important;stroke-width:2!important;stroke-linecap:round!important}
#nuageai21-root .nuageai21-language:hover,#nuageai21-root .nuageai21-close:hover{background:#efefef!important;color:#111!important}
#nuageai21-root .nuageai21-language:active,#nuageai21-root .nuageai21-close:active{transform:scale(.94)!important}

/* Messages */
#nuageai21-root .nuageai21-messages{padding:18px!important;overflow:auto!important;background:#fafafa!important}
#nuageai21-root .nuageai21-message{
  width:fit-content!important;max-width:82%!important;margin:0 0 10px!important;padding:10px 13px!important;
  border-radius:15px!important;font-size:14px!important;line-height:1.5!important;white-space:pre-wrap!important;overflow-wrap:anywhere!important;
}
#nuageai21-root .nuageai21-message.assistant{background:#fff!important;color:#222!important;border:1px solid #e5e5e5!important;border-bottom-left-radius:5px!important}
#nuageai21-root .nuageai21-message.user{margin-left:auto!important;background:var(--nuageai21-ink)!important;color:#fff!important;border-bottom-right-radius:5px!important}
#nuageai21-root .nuageai21-typing{padding:0 18px 8px!important;background:#fafafa!important}
#nuageai21-root .nuageai21-typing span{display:inline-block!important;width:6px!important;height:6px!important;margin-right:3px!important;border-radius:50%!important;background:#999!important;animation:nuageai21pulse .9s infinite alternate!important}
#nuageai21-root .nuageai21-typing span:nth-child(2){animation-delay:.15s!important}
#nuageai21-root .nuageai21-typing span:nth-child(3){animation-delay:.3s!important}
@keyframes nuageai21pulse{to{opacity:.3;transform:translateY(-2px)}}

/* Composer: input -> clear -> send */
#nuageai21-root .nuageai21-composer{
  display:grid!important;grid-template-columns:minmax(0,1fr) 40px 44px!important;
  align-items:end!important;gap:7px!important;padding:11px 12px 10px!important;
  margin:0!important;background:#fff!important;border:0!important;border-top:1px solid var(--nuageai21-border)!important;
}
#nuageai21-root .nuageai21-input-shell{min-width:0!important;margin:0!important;padding:0!important}
#nuageai21-root .nuageai21-input-shell textarea{
  display:block!important;width:100%!important;min-width:0!important;min-height:44px!important;max-height:120px!important;
  resize:none!important;margin:0!important;padding:11px 13px!important;background:#f7f7f7!important;color:#222!important;
  border:1px solid #e3e3e3!important;border-radius:14px!important;outline:0!important;box-shadow:none!important;
  font:inherit!important;font-size:14px!important;line-height:20px!important;
}
#nuageai21-root .nuageai21-input-shell textarea:focus{background:#fff!important;border-color:#c9c9c9!important;box-shadow:0 0 0 3px rgba(0,0,0,.035)!important}
#nuageai21-root .nuageai21-input-shell textarea::placeholder{color:#9c9c9c!important;opacity:1!important}

/* Clear is a quiet secondary action */
#nuageai21-root .nuageai21-clear{
  width:40px!important;height:44px!important;display:grid!important;place-items:center!important;
  background:#fff!important;color:#666!important;border:1px solid #dedede!important;
  border-radius:13px!important;box-shadow:none!important;
}
#nuageai21-root .nuageai21-clear svg{width:17px!important;height:17px!important;fill:none!important;stroke:currentColor!important;stroke-width:1.9!important;stroke-linecap:round!important}
#nuageai21-root .nuageai21-clear:hover{background:#f3f3f3!important;color:#111!important;border-color:#d2d2d2!important}

/* Send is the only primary action */
#nuageai21-root .nuageai21-send{
  width:44px!important;height:44px!important;display:grid!important;place-items:center!important;
  background:var(--nuageai21-accent)!important;color:#171717!important;border:1px solid var(--nuageai21-accent)!important;
  border-radius:13px!important;box-shadow:0 5px 14px rgba(0,0,0,.12)!important;
}
#nuageai21-root .nuageai21-send svg{width:19px!important;height:19px!important;fill:none!important;stroke:currentColor!important;stroke-width:2.2!important;stroke-linecap:round!important;stroke-linejoin:round!important}
#nuageai21-root .nuageai21-send:hover{filter:brightness(.94)!important;transform:translateY(-1px)!important;box-shadow:0 7px 17px rgba(0,0,0,.15)!important}
#nuageai21-root .nuageai21-clear:active,#nuageai21-root .nuageai21-send:active{transform:scale(.92)!important}
#nuageai21-root .nuageai21-composer button:disabled{opacity:.42!important;cursor:not-allowed!important;transform:none!important}
#nuageai21-root .nuageai21-note{text-align:center!important;color:#aaa!important;font-size:9px!important;line-height:13px!important;padding:0 12px 9px!important;background:#fff!important}

/* RTL */
#nuageai21-root .nuageai21-panel[dir=rtl] .nuageai21-messages,
#nuageai21-root .nuageai21-panel[dir=rtl] textarea{text-align:right!important}
#nuageai21-root .nuageai21-panel[dir=rtl] .nuageai21-message.user{margin-left:0!important;margin-right:auto!important}
#nuageai21-root .nuageai21-panel[dir=rtl] .nuageai21-send svg{transform:scaleX(-1)!important}

/* Focus */
#nuageai21-root button:focus-visible{outline:2px solid var(--nuageai21-accent)!important;outline-offset:2px!important}

.nuageai21-inline-launch{appearance:none;border:0;border-radius:10px;padding:10px 16px;background:#171717;color:#fff;cursor:pointer}

@media(max-width:520px){
  #nuageai21-root.nuageai21-right,#nuageai21-root.nuageai21-left{right:12px!important;left:12px!important;bottom:12px!important}
  #nuageai21-root .nuageai21-panel{width:100%!important;height:calc(100dvh - 24px)!important;border-radius:18px!important}
  #nuageai21-root .nuageai21-launcher{width:58px!important;height:58px!important;margin-left:auto!important}
  #nuageai21-root.nuageai21-left .nuageai21-launcher{margin-left:0!important}
  #nuageai21-root .nuageai21-composer{grid-template-columns:minmax(0,1fr) 39px 43px!important;gap:6px!important;padding:9px 10px!important}
  #nuageai21-root .nuageai21-clear{width:39px!important;height:43px!important}
  #nuageai21-root .nuageai21-send{width:43px!important;height:43px!important}
}

