/*
 * The "ask your AI about us" bubble and its footer chip. The bubble is a small, non-modal card under the sticky header; it
 * is fixed, so showing it never moves the page.
 */
.agent-bubble {
  position: fixed;
  top: 76px;
  right: 16px;
  z-index: 30;
  width: min(400px, calc(100vw - 32px));
  padding: 16px 16px 14px;
  background: var(--panel, #181109);
  color: var(--text, #f2e9dd);
  border: 1px solid var(--line-strong, rgba(216,185,138,0.26));
  border-radius: 14px;
  box-shadow: 0 18px 50px -12px rgba(0, 0, 0, 0.65);
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.agent-bubble[hidden] { display: none; }

.agent-bubble.is-open {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

/* The tail, pointing up at the header. */
.agent-bubble::before {
  content: "";
  position: absolute;
  top: -7px;
  right: 40px;
  width: 12px;
  height: 12px;
  background: var(--panel, #181109);
  border-left: 1px solid var(--line-strong, rgba(216,185,138,0.26));
  border-top: 1px solid var(--line-strong, rgba(216,185,138,0.26));
  transform: rotate(45deg);
}

.agent-bubble-title {
  margin: 0 0 4px;
  font-size: 1rem;
  font-weight: 600;
}

.agent-bubble-lead {
  margin: 0;
  color: var(--muted, #a89a8c);
  font-size: 0.86rem;
}

.agent-bubble-prompt {
  margin: 10px 0 12px;
  padding: 10px 12px;
  max-height: 8.5em;
  overflow: auto;
  background: var(--panel-2, #120c07);
  border: 1px solid var(--line, rgba(216,185,138,0.14));
  border-radius: 10px;
  font: 0.78rem/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  user-select: all;
}

.agent-bubble-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.agent-bubble-actions [role="status"] { flex-basis: 100%; }

.agent-bubble-copy,
.agent-bubble-close {
  font: inherit;
  font-size: 0.86rem;
  cursor: pointer;
  white-space: nowrap;
  border-radius: 999px;
  padding: 7px 16px;
}

.agent-bubble-copy {
  background: var(--accent, #d8b98a);
  color: #120d0a;
  border: 1px solid var(--accent, #d8b98a);
  font-weight: 600;
}

.agent-bubble-close {
  background: transparent;
  color: var(--muted, #a89a8c);
  border: 1px solid var(--line-strong, rgba(216,185,138,0.26));
}

.agent-bubble-copy:hover,
.agent-bubble-close:hover { filter: brightness(1.1); }

.agent-bubble-copy:focus-visible,
.agent-bubble-close:focus-visible,
.agent-copy:focus-visible {
  outline: 2px solid var(--accent, #d8b98a);
  outline-offset: 2px;
}

/* The same copy action, always available in the footer. */
.footer-links .agent-copy {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.footer-links .agent-copy:hover { color: var(--accent, #d8b98a); }

@media (prefers-reduced-motion: reduce) {
  .agent-bubble { transition: none; transform: none; }
}
