/* Neokraft chat assistant (js/chat.js) — uses the colour tokens from styles.css */
.nkc { position: fixed; right: 24px; bottom: 24px; z-index: 90; font-family: var(--font-body, system-ui, sans-serif); transition: bottom .3s ease; }
.nkc--raised { bottom: 84px; }
body.xp-open .nkc { display: none; }
.nkc svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* launcher */
.nkc-launch {
  position: relative; display: flex; align-items: center; gap: 10px; height: 60px; padding: 0 22px 0 8px; margin-left: auto;
  border: 1px solid rgba(255, 255, 255, .35); border-radius: 100px; cursor: pointer; color: #fff;
  /* glass: translucent brand blue with a frosted backdrop and a top highlight */
  background: linear-gradient(180deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, 0) 55%), linear-gradient(135deg, rgba(59, 139, 245, .8), rgba(15, 79, 184, .82));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 18px 40px -10px rgba(15, 79, 184, .6);
  backdrop-filter: blur(18px) saturate(180%); -webkit-backdrop-filter: blur(18px) saturate(180%);
  font: 600 15px/20px var(--font-body, system-ui); transition: transform .25s ease, box-shadow .25s ease;
}
.nkc-launch:hover { transform: translateY(-2px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 22px 44px -10px rgba(15, 79, 184, .7); }
.nkc-launch::after { content: ''; position: absolute; left: 40px; top: 9px; width: 12px; height: 12px; border-radius: 50%; background: #25D366; border: 2px solid #fff; }
.nkc-launch__icon, .nkc-launch__close { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: rgba(255, 255, 255, .16); }
.nkc-launch__close { display: none; }
.nkc.is-open .nkc-launch__icon, .nkc.is-open .nkc-launch__label, .nkc.is-open .nkc-launch::after { display: none; }
.nkc.is-open .nkc-launch__close { display: grid; }
.nkc.is-open .nkc-launch { padding: 0 8px; }

/* panel */
.nkc-panel {
  position: absolute; right: 0; bottom: 76px; display: flex; flex-direction: column;
  width: 380px; height: min(620px, calc(100vh - 140px)); overflow: hidden; border-radius: 24px;
  background: #F5F8FC; box-shadow: 0 40px 80px -20px rgba(3, 10, 31, .45), 0 0 0 1px rgba(11, 26, 51, .06);
  transform-origin: bottom right; animation: nkcIn .3s cubic-bezier(.2, .7, .2, 1);
}
.nkc-panel[hidden] { display: none; }
@keyframes nkcIn { from { opacity: 0; transform: translateY(12px) scale(.97); } }
.nkc-head { display: flex; align-items: center; gap: 10px; padding: 14px 12px 14px 16px; color: #fff; background: linear-gradient(135deg, #0D2A5C, #071A3D); }
.nkc-avatar { width: 40px; height: 40px; padding: 5px; border-radius: 12px; background: #fff; object-fit: contain; }
.nkc-head__text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.nkc-title { font: 600 16px/22px var(--font-display, system-ui); }
.nkc-status { display: flex; align-items: center; gap: 6px; font-size: 12px; line-height: 16px; color: rgba(255, 255, 255, .7); }
.nkc-status i { flex: none; width: 8px; height: 8px; border-radius: 50%; background: #25D366; }
.nkc-iconbtn { display: inline-flex; align-items: center; justify-content: center; gap: 4px; height: 36px; min-width: 36px; padding: 0 9px; border: 0; border-radius: 100px; cursor: pointer; color: #fff; background: rgba(255, 255, 255, .12); font: 700 11px/1 var(--font-body, system-ui); letter-spacing: .04em; }
.nkc-iconbtn:hover { background: rgba(255, 255, 255, .22); }
.nkc-iconbtn svg { width: 18px; height: 18px; }

/* messages */
.nkc-log { flex: 1; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; padding: 16px 14px; overscroll-behavior: contain; }
.nkc-msg { max-width: 86%; padding: 10px 14px; border-radius: 16px; font-size: 14px; line-height: 21px; overflow-wrap: anywhere; animation: nkcMsg .25s ease; }
@keyframes nkcMsg { from { opacity: 0; transform: translateY(6px); } }
.nkc-msg--bot { align-self: flex-start; color: var(--ink-900, #0B1A33); background: #fff; border-end-start-radius: 6px; box-shadow: 0 1px 2px rgba(11, 26, 51, .08); }
.nkc-msg--user { align-self: flex-end; color: #fff; background: var(--blue-600, #1C6BE0); border-end-end-radius: 6px; }
.nkc-msg--card { align-self: stretch; max-width: none; background: #fff; border: 1px solid var(--border, #E2E9F3); }
.nkc-card__title { display: block; margin-bottom: 8px; font: 700 13px/18px var(--font-body, system-ui); color: var(--blue-700, #0F4FB8); }
.nkc-msg--card dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0; font-size: 13px; line-height: 19px; }
.nkc-msg--card dt { color: var(--ink-500, #5C6B84); }
.nkc-msg--card dd { margin: 0; font-weight: 600; color: var(--ink-900, #0B1A33); }
.nkc-typing { display: inline-flex; gap: 4px; padding: 4px 0; }
.nkc-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-300, #A3AFC2); animation: nkcDot 1s infinite ease-in-out; }
.nkc-typing i:nth-child(2) { animation-delay: .15s; }
.nkc-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes nkcDot { 0%, 80%, 100% { transform: translateY(0); opacity: .5; } 40% { transform: translateY(-4px); opacity: 1; } }

/* choices + actions */
.nkc-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.nkc-chip {
  padding: 8px 14px; border-radius: 100px; cursor: pointer; text-align: start;
  border: 1px solid var(--blue-100, #E3EEFF); background: #fff; color: var(--blue-700, #0F4FB8);
  font: 600 13px/18px var(--font-body, system-ui); transition: background .2s, color .2s, border-color .2s;
}
.nkc-chip:hover, .nkc-chip:focus-visible { background: var(--blue-600, #1C6BE0); border-color: var(--blue-600, #1C6BE0); color: #fff; }
.nkc-chip--primary { background: var(--blue-600, #1C6BE0); border-color: var(--blue-600, #1C6BE0); color: #fff; }
.nkc-chip--ghost { background: transparent; border-color: var(--border, #E2E9F3); color: var(--ink-500, #5C6B84); }
.nkc-choices--langs { display: grid; grid-template-columns: 1fr 1fr; }
.nkc-chip--lang { text-align: center; font-size: 14px; }
.nkc-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.nkc-actions--stack { flex-direction: column; }
.nkc-wa, .nkc-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 18px; border-radius: 100px; text-decoration: none; font: 700 14px/18px var(--font-body, system-ui); }
.nkc-wa { color: #fff; background: #25D366; box-shadow: 0 10px 24px -8px rgba(37, 211, 102, .6); }
.nkc-wa:hover { background: #1EBE5B; }
.nkc-btn { color: var(--ink-900, #0B1A33); background: #fff; border: 1px solid var(--border, #E2E9F3); font-weight: 600; }
.nkc-btn:hover { border-color: var(--blue-600, #1C6BE0); color: var(--blue-600, #1C6BE0); }
.nkc-wa svg, .nkc-btn svg { width: 18px; height: 18px; }

/* input */
.nkc-input { display: flex; gap: 8px; padding: 10px 12px; background: #fff; border-top: 1px solid var(--border, #E2E9F3); }
.nkc-input[hidden] { display: none; }
.nkc-input input { flex: 1; min-width: 0; height: 44px; padding: 0 16px; border-radius: 100px; border: 1px solid var(--border, #E2E9F3); background: var(--surface-50, #F5F8FC); color: var(--ink-900, #0B1A33); font: 400 15px/20px var(--font-body, system-ui); outline: none; }
.nkc-input input:focus { border-color: var(--blue-600, #1C6BE0); background: #fff; }
.nkc-input button { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border: 0; border-radius: 50%; cursor: pointer; color: #fff; background: var(--blue-600, #1C6BE0); }
.nkc-input button svg { width: 18px; height: 18px; }
.nkc-panel[dir="rtl"] .nkc-input button svg { transform: scaleX(-1); }
.nkc-privacy { margin: 0; padding: 4px 12px 10px; background: #fff; text-align: center; font-size: 11px; line-height: 16px; color: var(--ink-500, #5C6B84); }

@media (max-width: 720px) {
  .nkc { right: 16px; bottom: 16px; }
  .nkc--raised { bottom: 76px; }
  .nkc-launch { height: 56px; padding: 0 6px; }
  .nkc-launch__label { display: none; }
  .nkc-launch::after { left: 38px; top: 7px; }
  .nkc.is-open .nkc-launch { display: none; }
  .nkc-panel { position: fixed; inset: 0; width: auto; height: auto; border-radius: 0; }
  .nkc-input input { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .nkc-panel, .nkc-msg { animation: none; }
  .nkc-typing i { animation: none; }
}
