/* ═══════════════════════════════════════════════════
   NEONPEAK — chat widget (chat.css)
   Dark, logo colours. Same layout on phone and desktop;
   on phones the open panel becomes a bottom sheet.
   ═══════════════════════════════════════════════════ */
.npc {
  --npc-cyan: #19D3FF;
  --npc-blue: #2563EB;
  --npc-violet: #7B3BFF;
  --npc-magenta: #F21BF6;
  --npc-bg: #0B0D14;
  --npc-surface: #131623;
  --npc-line: #262C40;
  --npc-text: #EEF2F8;
  --npc-mid: #A7B1C2;
  --npc-lift: 0px;
  position: fixed;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  width: 56px;
  height: 56px;
  z-index: 90;            /* under the nav (100) so the mobile menu always wins */
  font-family: var(--font-body, Inter, system-ui, sans-serif);
}
.npc-sr, .npc-hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Bubble */
.npc-bubble {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 0;
  cursor: pointer;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--npc-cyan) 0%, var(--npc-blue) 45%, var(--npc-magenta) 100%);
  box-shadow: 0 0 0 1px rgba(255,255,255,.12), 0 10px 28px -6px rgba(37,99,235,.6), 0 6px 22px -8px rgba(242,27,246,.55);
  transform: translateY(calc(-1 * var(--npc-lift)));
  transition: transform .25s ease, opacity .2s ease;
}
.npc-bubble:hover { box-shadow: 0 0 0 2px rgba(25,211,255,.5), 0 12px 32px -6px rgba(37,99,235,.7), 0 8px 26px -8px rgba(242,27,246,.65); }
.npc-bubble:focus-visible { outline: 2px solid var(--npc-cyan); outline-offset: 3px; }
/* Nothing free near the corner → tuck into the page edge, only a slim tab shows */
.npc.npc-tucked .npc-bubble { transform: translateX(54px); border-radius: 28px 0 0 28px; }
.npc.npc-tucked .npc-bubble svg { transform: translateX(-16px) scale(.8); }
.npc.npc-hidden .npc-bubble { opacity: 0; pointer-events: none; }
.npc.is-open .npc-bubble { transform: none; border-radius: 50%; }
.npc.is-open .npc-bubble svg { transform: none; }

/* Panel */
.npc-panel {
  position: fixed;
  right: 16px;
  bottom: calc(84px + env(safe-area-inset-bottom, 0px));
  width: min(370px, calc(100vw - 32px));
  height: min(560px, calc(100vh - 120px));
  display: flex;
  flex-direction: column;
  background: var(--npc-bg);
  border: 1px solid var(--npc-line);
  border-radius: 18px;
  overflow: hidden;
  color: var(--npc-text);
  box-shadow: 0 24px 60px -12px rgba(0,0,0,.75), 0 0 0 1px rgba(25,211,255,.08), 0 30px 80px -30px rgba(123,59,255,.5);
}
.npc-panel[hidden] { display: none; }
.npc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 10px 10px 16px;
  border-bottom: 1px solid var(--npc-line);
  background: linear-gradient(180deg, #10131D 0%, var(--npc-bg) 100%);
}
.npc-head img { display: block; height: 20px; width: auto; }
.npc-close {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border: 0; border-radius: 10px;
  background: transparent; color: var(--npc-mid); cursor: pointer;
}
.npc-close:hover { color: var(--npc-text); background: var(--npc-surface); }

.npc-log {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.npc-msg {
  max-width: 88%;
  padding: 10px 13px;
  border-radius: 14px;
  font-size: .9375rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.npc-bot { align-self: flex-start; background: var(--npc-surface); border: 1px solid var(--npc-line); border-bottom-left-radius: 4px; }
.npc-me  { align-self: flex-end; background: var(--npc-blue); color: #fff; border-bottom-right-radius: 4px; }
.npc-msg a { color: var(--npc-cyan); font-weight: 600; }
.npc-msg strong { color: #fff; }

.npc-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.npc-chip {
  min-height: 44px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  border-radius: 100px;
  border: 1px solid rgba(25,211,255,.35);
  background: rgba(25,211,255,.06);
  color: var(--npc-text);
  font: inherit;
  font-size: .875rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: border-color .2s, background .2s, color .2s;
}
.npc-chip:hover { border-color: var(--npc-cyan); color: var(--npc-cyan); background: rgba(25,211,255,.1); }

/* Lead form */
.npc-lead {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border-radius: 14px;
  background: var(--npc-surface);
  border: 1px solid rgba(123,59,255,.4);
}
.npc-lead label { display: flex; flex-direction: column; gap: 4px; font-size: .8125rem; font-weight: 600; color: var(--npc-mid); }
.npc-lead input, .npc-lead textarea {
  font: inherit;
  font-size: 16px;               /* stops iOS zooming into the field */
  color: var(--npc-text);
  background: var(--npc-bg);
  border: 1px solid var(--npc-line);
  border-radius: 10px;
  padding: 10px 12px;
  min-height: 44px;
  resize: vertical;
}
.npc-lead input:focus, .npc-lead textarea:focus { outline: none; border-color: var(--npc-cyan); box-shadow: 0 0 0 3px rgba(25,211,255,.15); }
.npc-err { margin: 0; font-size: .8125rem; color: #FDA4AF; }
.npc-err a { color: var(--npc-cyan); }
.npc-send {
  min-height: 46px;
  border: 0;
  border-radius: 10px;
  background: var(--npc-blue);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.npc-send:hover { background: #1D4ED8; }
.npc-send:disabled { opacity: .6; cursor: default; }

/* Free-text input */
.npc-input {
  display: flex;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid var(--npc-line);
  background: #090B11;
}
.npc-input input {
  flex: 1;
  min-width: 0;
  min-height: 46px;
  padding: 0 14px;
  font: inherit;
  font-size: 16px;
  color: var(--npc-text);
  background: var(--npc-surface);
  border: 1px solid var(--npc-line);
  border-radius: 12px;
}
.npc-input input:focus { outline: none; border-color: var(--npc-cyan); }
.npc-input button {
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 12px;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, var(--npc-cyan), var(--npc-blue) 55%, var(--npc-magenta));
}

/* Phones: open panel becomes a bottom sheet */
@media (max-width: 600px) {
  .npc-panel {
    right: 0;
    left: 0;
    bottom: 0;
    width: 100%;
    height: min(78vh, 620px);
    height: min(78dvh, 620px);
    border-radius: 18px 18px 0 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .npc.is-open .npc-bubble { opacity: 0; pointer-events: none; }   /* sheet has its own close button */
}

@media (prefers-reduced-motion: reduce) {
  .npc-bubble, .npc-chip { transition: none; }
}
