/* "Ask Nexta" assistant widget. Uses the site's colour tokens from styles.css. */
.nx-assist { position: fixed; right: 20px; bottom: 20px; z-index: 80; font-family: var(--font-sans, system-ui, sans-serif); color: var(--ink, #1d221f); }
.nx-assist *, .nx-assist *::before, .nx-assist *::after { box-sizing: border-box; }

.nx-launcher {
  display: inline-flex; align-items: center; gap: 10px; margin-left: auto;
  padding: 14px 20px 14px 16px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--pine, #2e4636); color: var(--bone, #f2eee7);
  font: inherit; font-size: .95rem; font-weight: 500; letter-spacing: .01em;
  box-shadow: 0 12px 30px -10px rgba(29, 34, 31, .45);
  transition: background .25s ease, transform .25s ease;
}
.nx-launcher:hover { background: var(--ink, #1d221f); transform: translateY(-1px); }
.nx-launcher-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--clay, #b4643c); box-shadow: 0 0 0 4px rgba(180, 100, 60, .25); }
.nx-assist { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
/* Panel and teaser stack above the launcher, which stays anchored bottom-right. */
.nx-panel { order: 1; }
.nx-teaser { order: 2; }
.nx-launcher { order: 3; }
.nx-assist.is-open .nx-launcher-label::after { content: " · close"; opacity: .7; }
.nx-assist[data-compact="true"] .nx-launcher { padding: 12px 16px 12px 14px; font-size: .88rem; }

.nx-teaser {
  position: relative; max-width: 280px; padding: 16px 34px 16px 18px; border-radius: 14px 14px 4px 14px;
  background: var(--linen, #faf8f3); border: 1px solid var(--line, #d9d1c3);
  box-shadow: 0 18px 40px -24px rgba(29, 34, 31, .35); font-size: .9rem; line-height: 1.45; animation: nx-in .4s ease;
}
.nx-teaser p { margin: 0; cursor: pointer; }
.nx-teaser-close { position: absolute; top: 6px; right: 8px; border: 0; background: none; font-size: 1.2rem; line-height: 1; color: var(--muted, #6f756e); cursor: pointer; }

.nx-panel {
  width: min(400px, calc(100vw - 32px)); height: min(620px, calc(100vh - 110px));
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--linen, #faf8f3); border: 1px solid var(--line, #d9d1c3); border-radius: 14px;
  box-shadow: 0 30px 80px -30px rgba(29, 34, 31, .45); animation: nx-in .3s ease;
}
.nx-panel[hidden], .nx-teaser[hidden] { display: none; }
@keyframes nx-in { from { opacity: 0; transform: translateY(8px); } }

.nx-head { display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 16px; border-bottom: 1px solid var(--line-soft, #e6dfd2); background: var(--bone, #f2eee7); }
.nx-avatar svg { width: 34px; height: 34px; display: block; }
.nx-head-text { flex: 1; min-width: 0; }
.nx-head-text strong { display: block; font-weight: 600; font-size: .95rem; }
.nx-head-text small { display: flex; align-items: center; gap: 6px; font-size: .75rem; color: var(--muted, #6f756e); }
.nx-head-text small i { width: 7px; height: 7px; border-radius: 50%; background: #5f8f6a; }
.nx-reset, .nx-close { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line, #d9d1c3); background: transparent; cursor: pointer; font-size: 1.05rem; line-height: 1; color: var(--ink-2, #3e443f); }
.nx-reset:hover, .nx-close:hover { border-color: var(--ink, #1d221f); }

.nx-log { flex: 1; overflow-y: auto; padding: 18px 16px; display: flex; flex-direction: column; gap: 10px; scroll-behavior: smooth; }
.nx-msg { max-width: 88%; font-size: .92rem; line-height: 1.5; }
.nx-msg--user { align-self: flex-end; padding: 10px 14px; border-radius: 14px 14px 4px 14px; background: var(--pine, #2e4636); color: var(--bone, #f2eee7); white-space: pre-wrap; overflow-wrap: anywhere; }
.nx-msg--bot { align-self: flex-start; }
.nx-msg--bot .nx-text { padding: 10px 14px; border-radius: 14px 14px 14px 4px; background: var(--sand, #e8e1d4); overflow-wrap: anywhere; }
.nx-text p { margin: 0 0 .5em; }
.nx-text p:last-child { margin-bottom: 0; }
.nx-text ul { margin: .2em 0 .5em; padding-left: 1.1em; }
.nx-text li { margin-bottom: .2em; }
.nx-text a { color: var(--pine, #2e4636); font-weight: 500; }
.nx-msg.is-typing::after { content: ""; display: inline-block; width: 46px; height: 30px; border-radius: 14px; background: var(--sand, #e8e1d4) radial-gradient(circle, var(--muted, #6f756e) 3px, transparent 3.5px) 0 50% / 14px 100% repeat-x; animation: nx-dots 1s linear infinite; }
@keyframes nx-dots { to { background-position: 14px 50%; } }

.nx-starters { display: flex; flex-wrap: wrap; gap: 6px; }
.nx-chip { padding: 8px 13px; border-radius: 999px; border: 1px solid var(--line, #d9d1c3); background: transparent; font: inherit; font-size: .85rem; cursor: pointer; color: var(--ink-2, #3e443f); transition: border-color .2s ease, background .2s ease; }
.nx-chip:hover { border-color: var(--pine, #2e4636); background: var(--sage-soft, #e1e6da); }

.nx-cards { display: grid; gap: 8px; margin-top: 8px; }
.nx-card { padding: 14px 14px 12px; border-radius: 10px; background: #fff; border: 1px solid var(--line-soft, #e6dfd2); }
.nx-card-group { display: block; font-size: .64rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted, #6f756e); }
.nx-card-name { display: block; font-family: var(--font-serif, Georgia, serif); font-weight: 400; font-size: 1.15rem; margin: 2px 0 1px; }
.nx-card-price { display: block; font-size: .85rem; font-weight: 600; color: var(--pine, #2e4636); }
.nx-card-why { margin: 6px 0 10px; font-size: .84rem; color: var(--ink-2, #3e443f); }
.nx-card-why:empty { display: none; }
.nx-card-actions { display: flex; gap: 8px; }
.nx-card-actions a { flex: 1; text-align: center; padding: 8px 10px; border-radius: 999px; font-size: .82rem; font-weight: 500; text-decoration: none; }
.nx-card-more { border: 1px solid var(--line, #d9d1c3); color: var(--ink, #1d221f); }
.nx-card-go { background: var(--pine, #2e4636); color: var(--bone, #f2eee7); }
.nx-card-go:hover { background: var(--ink, #1d221f); }

.nx-lead { margin: 8px 0 0; font-size: .8rem; font-weight: 600; color: #3f6b4b; }
.nx-error { margin: 8px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--clay-soft, #efdfd2); color: #7a3a1c; font-size: .85rem; }

.nx-form { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line-soft, #e6dfd2); background: #fff; }
.nx-form textarea { flex: 1; resize: none; border: 0; outline: none; font: inherit; font-size: .95rem; line-height: 1.4; padding: 8px 4px; max-height: 120px; background: transparent; color: var(--ink, #1d221f); }
.nx-form button { flex: none; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--clay, #b4643c); color: #fff; cursor: pointer; display: grid; place-items: center; }
.nx-form button svg { width: 17px; height: 17px; }
.nx-note { margin: 0; padding: 6px 14px 10px; font-size: .7rem; color: var(--muted, #6f756e); background: #fff; }
.nx-note a { color: inherit; }

@media (max-width: 520px) {
  .nx-assist { right: 12px; bottom: 12px; }
  .nx-assist.is-open { inset: 0; padding: 0; }
  .nx-assist.is-open .nx-launcher { display: none; }
  .nx-assist.is-open .nx-panel { width: 100vw; height: 100dvh; border-radius: 0; border: 0; }
}
@media (prefers-reduced-motion: reduce) { .nx-panel, .nx-teaser { animation: none; } .nx-msg.is-typing::after { animation: none; } }
@media print { .nx-assist { display: none; } }
