/* PresentTool™ Storytelling — section: concierge (zwevende AI-assistent) */

.story-concierge {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1200;
  font-family: var(--pt-sans, 'Inter', system-ui, sans-serif);
}

/* ── Drijvende knop ── */
.cnc-fab {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 18px;
  border: none;
  border-radius: 999px;
  background: var(--story-accent, var(--pt-primary));
  color: #fff;
  font: inherit;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.30);
  transition: transform .15s ease, filter .15s ease;
}
.cnc-fab:hover { transform: translateY(-2px); filter: brightness(1.05); }
.cnc-fab svg { width: 18px; height: 18px; }
.cnc-fab__close { display: none; }
.story-concierge.is-open .cnc-fab__open,
.story-concierge.is-open .cnc-fab__label { display: none; }
.story-concierge.is-open .cnc-fab__close { display: inline-block; }
.story-concierge.is-open .cnc-fab { padding: 14px; }

/* ── Chatpaneel ── */
.cnc-panel {
  position: absolute;
  right: 0;
  bottom: 62px;
  width: min(360px, calc(100vw - 32px));
  height: min(520px, calc(100vh - 120px));
  display: flex;
  flex-direction: column;
  background: var(--pt-surface-1, #fff);
  color: var(--pt-text);
  border: 1px solid var(--pt-border, rgba(0,0,0,0.10));
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.30);
  animation: cnc-pop .2s ease;
}
@keyframes cnc-pop {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}

.cnc-head {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--pt-border, rgba(0,0,0,0.08));
  background: var(--pt-surface-2, #f4f3f0);
}
.cnc-head__avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--story-accent, var(--pt-primary));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.cnc-head__avatar svg { width: 18px; height: 18px; }
.cnc-head__meta { display: flex; flex-direction: column; line-height: 1.2; }
.cnc-head__title { font-weight: 700; font-size: 14px; }
.cnc-head__sub { font-size: 12px; color: var(--pt-text-dim, #6b6258); }

.cnc-log {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  -webkit-overflow-scrolling: touch;
}
.cnc-msg {
  max-width: 84%;
  padding: 10px 13px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.cnc-msg--bot {
  align-self: flex-start;
  background: var(--pt-surface-2, #f1efeb);
  color: var(--pt-text);
  border-bottom-left-radius: 5px;
}
.cnc-msg--user {
  align-self: flex-end;
  background: var(--story-accent, var(--pt-primary));
  color: #fff;
  border-bottom-right-radius: 5px;
}

.cnc-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 2px;
}
.cnc-chip {
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--pt-border, rgba(0,0,0,0.16));
  background: transparent;
  color: var(--pt-text-dim, #6b6258);
  font: inherit;
  font-size: 12.5px;
  cursor: pointer;
  transition: border-color .14s ease, color .14s ease;
}
.cnc-chip:hover { border-color: var(--story-accent, var(--pt-primary)); color: var(--story-accent, var(--pt-primary)); }

.cnc-typing { display: inline-flex; gap: 4px; align-items: center; }
.cnc-typing span {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--pt-text-dim, #9a9189);
  animation: cnc-bounce 1s infinite ease-in-out;
}
.cnc-typing span:nth-child(2) { animation-delay: .15s; }
.cnc-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes cnc-bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: .5; }
  40% { transform: translateY(-4px); opacity: 1; }
}

.cnc-form {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--pt-border, rgba(0,0,0,0.08));
}
.cnc-input {
  flex: 1;
  min-width: 0;
  padding: 11px 14px;
  border-radius: 999px;
  border: 1px solid var(--pt-border, rgba(0,0,0,0.16));
  background: var(--pt-surface-2, #faf8f5);
  color: var(--pt-text);
  font: inherit;
  font-size: 14px;
}
.cnc-input:focus { outline: none; border-color: var(--story-accent, var(--pt-primary)); }
.cnc-send {
  flex: none;
  width: 42px; height: 42px;
  border: none;
  border-radius: 50%;
  background: var(--story-accent, var(--pt-primary));
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: filter .14s ease;
}
.cnc-send:hover:not(:disabled) { filter: brightness(1.06); }
.cnc-send:disabled { opacity: 0.5; cursor: default; }
.cnc-send svg { width: 17px; height: 17px; }

.cnc-foot {
  margin: 0;
  padding: 0 14px 12px;
  font-size: 10.5px;
  color: var(--pt-text-dim, #9a9189);
  text-align: center;
}

@media (max-width: 768px) {
  .story-concierge { right: 14px; bottom: 14px; }
  .cnc-fab__label { display: none; }
  .cnc-fab { padding: 14px; }
  .cnc-panel { bottom: 64px; height: min(70vh, 540px); }
}
