/* BzBee chat carousel. All selectors are prefixed .bzc to avoid collisions.
   Override the custom properties on .bzc (or a parent) to re-theme. */
.bzc {
  --bzc-panel: #2c2a24;
  --bzc-border: #4c4840;
  --bzc-divider: #3d3a33;
  --bzc-owner-bg: #f3eee5;
  --bzc-owner-fg: #2c2a24;
  --bzc-ai-bg: #3d3a33;
  --bzc-ai-fg: #e8e2d6;
  --bzc-card-border: #58534a;
  --bzc-accent: #b08968;
  --bzc-accent-press: #c29a78;
  --bzc-accent-soft: #d9b98f;
  --bzc-applied: #5b6b4e;
  --bzc-muted: #9a9385;
  --bzc-muted-2: #8a8478;
  --bzc-cancel-fg: #bdb5a7;
  --bzc-cancel-border: #6a655b;
  --bzc-font: 'Hanken Grotesk', system-ui, sans-serif;
  --bzc-font-label: 'Space Grotesk', system-ui, sans-serif;
  --bzc-font-serif: 'Newsreader', Georgia, serif;
  --bzc-stage-min-height: 340px;

  box-sizing: border-box;
  background: var(--bzc-panel);
  border: 1px solid var(--bzc-border);
  border-radius: 20px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  font-family: var(--bzc-font);
}
.bzc *, .bzc *::before, .bzc *::after { box-sizing: border-box; }

.bzc-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.bzc-label {
  font-family: var(--bzc-font-label); font-size: 12px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--bzc-muted);
}
.bzc-counter { font-family: var(--bzc-font-label); font-size: 12px; color: var(--bzc-muted); }

.bzc-stage {
  min-height: var(--bzc-stage-min-height);
  display: flex; flex-direction: column; gap: 12px;
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.bzc-stage.bzc-fading { opacity: 0; transform: translateY(6px); }

.bzc-bubble { max-width: 85%; padding: 11px 16px; font-size: 15px; line-height: 1.45; }
.bzc-bubble--owner {
  align-self: flex-end; background: var(--bzc-owner-bg); color: var(--bzc-owner-fg);
  border-radius: 16px 16px 4px 16px; transform-origin: bottom right;
}
.bzc-row { display: flex; gap: 10px; align-items: flex-end; max-width: 85%; }
.bzc-row--assistant { align-self: flex-start; transform-origin: bottom left; }
.bzc-bubble--assistant { max-width: none; background: var(--bzc-ai-bg); color: var(--bzc-ai-fg); border-radius: 16px 16px 16px 4px; }
.bzc-avatar {
  flex: none; width: 26px; height: 26px; border-radius: 50%;
  background: var(--bzc-accent); color: #fff;
  font-family: var(--bzc-font-serif); font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}

.bzc-typing {
  background: var(--bzc-ai-bg); padding: 14px 16px; border-radius: 16px 16px 16px 4px;
  display: flex; gap: 5px;
}
.bzc-typing span {
  width: 6px; height: 6px; border-radius: 50%; background: #d6cfc2;
  animation: bzc-typing 1s infinite;
}
.bzc-typing span:nth-child(2) { animation-delay: 0.15s; }
.bzc-typing span:nth-child(3) { animation-delay: 0.3s; }

.bzc-card {
  align-self: flex-start; margin-left: 36px; width: min(320px, 80%);
  background: var(--bzc-ai-bg); border: 1px solid var(--bzc-card-border);
  border-radius: 14px; padding: 14px 16px;
  display: flex; flex-direction: column; gap: 10px;
}
.bzc-card-title {
  font-family: var(--bzc-font-label); font-size: 11px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--bzc-accent-soft);
}
.bzc-card-text { font-size: 14px; line-height: 1.5; color: var(--bzc-ai-fg); }
.bzc-card-actions { display: flex; gap: 8px; align-items: center; }

.bzc-btn {
  display: inline-block; font-size: 13px; font-weight: 600;
  padding: 7px 14px; border-radius: 999px; white-space: nowrap; align-self: flex-start;
}
.bzc-btn--apply { position: relative; background: var(--bzc-accent); color: #fff; }
.bzc-btn--cancel { border: 1px solid var(--bzc-cancel-border); color: var(--bzc-cancel-fg); }
.bzc-btn--applied { background: var(--bzc-applied); color: #fff; display: none; }
.bzc-ripple {
  position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; border-radius: 50%;
  background: var(--bzc-owner-bg); pointer-events: none; opacity: 0;
}

/* Card phases: idle → press → done */
.bzc-card[data-phase="press"] .bzc-btn--apply { background: var(--bzc-accent-press); animation: bzc-press 0.45s ease both; }
.bzc-card[data-phase="press"] .bzc-ripple { animation: bzc-ripple 0.55s ease-out both; }
.bzc-card[data-phase="done"] .bzc-card-actions { display: none; }
.bzc-card[data-phase="done"] .bzc-btn--applied { display: inline-block; animation: bzc-in 0.3s ease both; }

.bzc-system { align-self: center; font-size: 12px; color: var(--bzc-muted-2); }

.bzc-in { animation: bzc-in 0.4s cubic-bezier(.2,.7,.3,1) both; }

.bzc-foot {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding-top: 16px; border-top: 1px solid var(--bzc-divider);
}
.bzc-dots { display: flex; gap: 6px; align-items: center; }
.bzc-dot {
  width: 8px; height: 8px; border-radius: 999px; border: 0; padding: 0; cursor: pointer;
  background: var(--bzc-card-border); transition: width 0.25s, background 0.25s;
}
.bzc-dot--active { width: 22px; background: var(--bzc-accent-soft); }
.bzc-nav { display: flex; gap: 8px; }
.bzc-arrow {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--bzc-card-border);
  background: transparent; color: var(--bzc-ai-fg); font-size: 15px; cursor: pointer;
}
.bzc-arrow:hover { border-color: var(--bzc-accent-soft); }
.bzc-dot:focus-visible, .bzc-arrow:focus-visible { outline: 2px solid var(--bzc-accent-soft); outline-offset: 2px; }
.bzc-caption { font-size: 13px; color: var(--bzc-muted); }

@keyframes bzc-in { from { opacity: 0; transform: translateY(10px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes bzc-typing { 0%, 60%, 100% { opacity: 0.3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
@keyframes bzc-press { 0% { transform: scale(1); } 40% { transform: scale(0.9); } 100% { transform: scale(1); } }
@keyframes bzc-ripple { 0% { opacity: 0.55; transform: translate(-50%,-50%) scale(0.2); } 100% { opacity: 0; transform: translate(-50%,-50%) scale(1.6); } }

@media (prefers-reduced-motion: reduce) {
  .bzc-stage, .bzc-dot { transition: none; }
  .bzc-in, .bzc-typing span { animation: none; }
}
