/* "Talk to Amani": the floating button and chat panel. Uses the site's own colour variables. */
.amani-fab {
  position: fixed; right: 20px; bottom: 68px; z-index: 900;  /* clear of the corner and Netlify's badge */
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 18px;
  border: 0; border-radius: 999px; cursor: pointer;
  background: var(--accent, #00826d); color: var(--on-accent, #fff);
  font: 600 .95rem/1 system-ui, sans-serif; box-shadow: 0 6px 24px rgba(0, 0, 0, .22);
}
.amani-fab:hover { filter: brightness(1.08); }
.amani-fab:focus-visible, .amani-panel button:focus-visible, .amani-panel input:focus-visible {
  outline: 2px solid var(--accent, #00826d); outline-offset: 2px;
}
.amani-fab svg { width: 18px; height: 18px; }

.amani-panel {
  position: fixed; right: 20px; bottom: 20px; z-index: 901;
  width: min(380px, calc(100vw - 32px)); height: min(560px, calc(100vh - 40px));
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--card, #fff); color: var(--ink, #1b2150);
  border: 1px solid var(--line, rgba(48, 58, 140, .17)); border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .28); backdrop-filter: blur(12px);
  font: .95rem/1.45 system-ui, sans-serif;
}
.amani-panel[hidden], .amani-fab[hidden] { display: none; }
@media (max-width: 480px) { .amani-panel { right: 16px; bottom: 16px; } .amani-fab { right: 16px; bottom: 64px; } }

.amani-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line, #ddd); }
.amani-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted, #888); flex: none; }
.amani-dot.live { background: var(--accent, #00826d); box-shadow: 0 0 0 4px rgba(62, 240, 181, .18); }
.amani-dot.speaking { animation: amani-pulse 1s ease-in-out infinite; }
@keyframes amani-pulse { 50% { transform: scale(1.35); } }
@media (prefers-reduced-motion: reduce) { .amani-dot.speaking { animation: none; } }
.amani-title { flex: 1; min-width: 0; }
.amani-title strong { display: block; font-size: .98rem; }
.amani-title span { display: block; color: var(--muted, #666); font-size: .8rem; }
.amani-x { border: 0; background: none; color: var(--muted, #666); font-size: 1.4rem; line-height: 1; cursor: pointer; padding: 4px; }

.amani-body { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.amani-intro p { margin: 0 0 10px; }
.amani-note { color: var(--muted, #666); font-size: .82rem; }
.amani-msg { max-width: 85%; padding: 8px 12px; border-radius: 12px; overflow-wrap: anywhere; }
.amani-msg.amani { align-self: flex-start; background: var(--soft, rgba(0, 0, 0, .05)); border: 1px solid var(--line, #ddd); }
.amani-msg.you { align-self: flex-end; background: var(--accent, #00826d); color: var(--on-accent, #fff); }
.amani-status { align-self: center; color: var(--muted, #666); font-size: .8rem; text-align: center; }

.amani-foot { border-top: 1px solid var(--line, #ddd); padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.amani-row { display: flex; gap: 8px; }
.amani-row input {
  flex: 1; min-width: 0; padding: 9px 11px; border-radius: 10px;
  border: 1px solid var(--line, #ccc); background: var(--soft, transparent); color: inherit; font: inherit;
}
.amani-btn {
  border: 1px solid var(--line, #ccc); border-radius: 10px; padding: 9px 12px; cursor: pointer;
  background: var(--soft, transparent); color: inherit; font: 600 .9rem system-ui, sans-serif;
}
.amani-btn.primary { background: var(--accent, #00826d); color: var(--on-accent, #fff); border-color: transparent; }
.amani-btn[disabled] { opacity: .5; cursor: default; }
.amani-stars { display: flex; justify-content: center; gap: 6px; }
.amani-stars button { border: 0; background: none; cursor: pointer; font-size: 1.7rem; color: var(--muted, #999); padding: 2px; }
.amani-stars button.on { color: var(--accent, #00826d); }
