/* ZERO WORKS — chat intake widget. Scoped under .nesc- to avoid collisions. */
.nesc-launcher {
  position: fixed; right: 22px; bottom: 22px; z-index: 9990;
  width: 60px; height: 60px; border-radius: 50%;
  background: #18181b; color: #fff; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(0,0,0,.22);
  transition: transform .18s ease, background .18s ease;
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
}
.nesc-launcher:hover { background: #00E065; transform: translateY(-2px); }
.nesc-launcher svg { width: 26px; height: 26px; }
.nesc-launcher .nesc-x { display: none; }
.nesc-launcher.nesc-open .nesc-chat-ic { display: none; }
.nesc-launcher.nesc-open .nesc-x { display: block; }

.nesc-teaser {
  position: fixed; right: 92px; bottom: 34px; z-index: 9990;
  background: #fff; border: 1px solid #e4e4e7; border-radius: 16px 16px 4px 16px;
  padding: 10px 14px; font-size: 14px; color: #18181b; max-width: 230px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  opacity: 0; transform: translateY(8px); pointer-events: none;
  transition: opacity .3s ease, transform .3s ease;
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
}
.nesc-teaser.nesc-show { opacity: 1; transform: none; pointer-events: auto; }
.nesc-teaser button {
  background: none; border: none; color: #a1a1aa; cursor: pointer;
  font-size: 14px; margin-left: 8px; padding: 0; vertical-align: middle;
}
.nesc-teaser button:hover { color: #18181b; }

.nesc-panel {
  position: fixed; right: 22px; bottom: 94px; z-index: 9991;
  width: 384px; max-width: calc(100vw - 32px);
  height: 600px; max-height: min(72dvh, 640px);
  background: #fafafa; border: 1px solid #e4e4e7; border-radius: 24px;
  box-shadow: 0 24px 64px rgba(0,0,0,.18);
  display: flex; flex-direction: column; overflow: hidden;
  opacity: 0; transform: translateY(18px) scale(.98); pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
}
.nesc-panel.nesc-open { opacity: 1; transform: none; pointer-events: auto; }

.nesc-head {
  background: #18181b; color: #fff; padding: 16px 18px 12px;
  display: flex; align-items: center; gap: 12px; flex: none;
}
.nesc-avatar {
  width: 38px; height: 38px; border-radius: 12px; background: #00E065;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; flex: none; color: #0B0B0C;
}
.nesc-head .nesc-title { font-weight: 600; font-size: 15px; letter-spacing: -.01em; }
.nesc-head .nesc-status { font-size: 12.5px; color: #a1a1aa; display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.nesc-dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; display: inline-block; }
.nesc-progress { height: 3px; background: rgba(255,255,255,.12); flex: none; }
.nesc-progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg,#00E065,#00A34A); transition: width .4s ease; }

.nesc-msgs { flex: 1; overflow-y: auto; padding: 18px 16px 8px; display: flex; flex-direction: column; gap: 10px; }
.nesc-row { display: flex; }
.nesc-row.nesc-bot { justify-content: flex-start; }
.nesc-row.nesc-user { justify-content: flex-end; }
.nesc-bubble {
  max-width: 85%; padding: 11px 15px; font-size: 14.5px; line-height: 1.55;
  animation: nesc-in .25s ease;
}
@keyframes nesc-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.nesc-bot .nesc-bubble { background: #fff; border: 1px solid #e4e4e7; color: #18181b; border-radius: 16px 16px 16px 5px; }
.nesc-user .nesc-bubble { background: #18181b; color: #fff; border-radius: 16px 16px 5px 16px; }
.nesc-bubble.nesc-err { border-color: #00E065; color: #006B37; background: #E6FCF0; }

.nesc-typing { display: inline-flex; gap: 5px; padding: 4px 2px; }
.nesc-typing span { width: 7px; height: 7px; border-radius: 50%; background: #a1a1aa; animation: nesc-blink 1.1s infinite; }
.nesc-typing span:nth-child(2) { animation-delay: .18s; }
.nesc-typing span:nth-child(3) { animation-delay: .36s; }
@keyframes nesc-blink { 0%, 60%, 100% { opacity: .25; } 30% { opacity: 1; } }

.nesc-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 2px 8px; animation: nesc-in .25s ease; }
.nesc-chip {
  background: #fff; border: 1.5px solid #e4e4e7; color: #18181b;
  border-radius: 99px; padding: 9px 16px; font-size: 14px; font-weight: 500;
  cursor: pointer; transition: all .15s ease; font-family: inherit;
}
.nesc-chip:hover { border-color: #00E065; transform: translateY(-1px); }
.nesc-chip.nesc-sel { background: #E6FCF0; border-color: #00E065; color: #006B37; }
.nesc-chip.nesc-done { background: #18181b; border-color: #18181b; color: #fff; }
.nesc-chip.nesc-skip { border-style: dashed; color: #52525b; }

.nesc-inputbar {
  flex: none; display: flex; gap: 10px; padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
  background: #fff; border-top: 1px solid #e4e4e7; align-items: center;
}
.nesc-inputbar[hidden] { display: none; }
.nesc-input {
  flex: 1; border: 1.5px solid #e4e4e7; border-radius: 99px;
  padding: 11px 18px; font-size: 14.5px; font-family: inherit; color: #18181b;
  outline: none; background: #fafafa; min-width: 0;
}
.nesc-input:focus { border-color: #00E065; background: #fff; box-shadow: 0 0 0 3px rgba(0,224,101,.15); }
.nesc-send {
  flex: none; width: 44px; height: 44px; border-radius: 50%; border: none; cursor: pointer;
  background: #18181b; color: #fff; display: flex; align-items: center; justify-content: center;
  transition: background .15s ease, transform .15s ease;
}
.nesc-send:hover { background: #00E065; transform: translateY(-1px); }
.nesc-send:disabled { opacity: .45; cursor: wait; transform: none; }
.nesc-send svg { width: 18px; height: 18px; }

.nesc-retry {
  background: #18181b; color: #fff; border: none; border-radius: 99px;
  padding: 10px 22px; font-size: 14px; font-weight: 500; cursor: pointer; font-family: inherit;
}
.nesc-retry:hover { background: #000; }

@media (max-width: 560px) {
  .nesc-panel { right: 10px; left: 10px; bottom: 10px; width: auto; max-width: none; height: 74dvh; max-height: none; }
  .nesc-launcher { right: 16px; bottom: 16px; width: 56px; height: 56px; }
  .nesc-teaser { right: 84px; bottom: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  .nesc-panel, .nesc-bubble, .nesc-chips, .nesc-teaser, .nesc-launcher { animation: none; transition: none; }
  .nesc-typing span { animation: none; opacity: .6; }
}
