/* ==========================================================================
   RewardRoots — Smart Assist Chat
   Design direction: "growth, not glow." RewardRoots is a loyalty/rewards
   builder — the accent language is moss green (established growth) and a
   warm amber (the reward itself), not generic tech-teal. The one signature
   moment is the avatar: it breathes gently while the assistant is online,
   like something alive and tended, rather than a static status dot.
   ========================================================================== */

.rr-bulk-chat {
  --bulk-chat-bg: color-mix(in srgb, var(--panel) 92%, transparent 8%);
  --bulk-chat-border: color-mix(in srgb, var(--accent-2) 22%, var(--border) 78%);
  --bulk-chat-ink: var(--text);
  --bulk-chat-muted: var(--muted);

  /* Moss (growth / assistant) and amber (reward / user) replace the old
     teal/blue duo — same slots, warmer identity. */
  --bulk-chat-moss: #3c9c74;
  --bulk-chat-moss-deep: #276b4e;
  --bulk-chat-amber: #d9a441;
  --bulk-chat-amber-deep: #a8762a;
  --bulk-chat-accent: var(--bulk-chat-moss);
  --bulk-chat-accent-2: var(--bulk-chat-amber);

  position: relative;
  overflow: hidden;
  border: 1px solid var(--bulk-chat-border);
  border-radius: 20px;
  background:
    linear-gradient(160deg, color-mix(in srgb, var(--panel) 95%, transparent 5%), color-mix(in srgb, var(--panel-2) 86%, transparent 14%)),
    var(--bulk-chat-bg);
  box-shadow:
    0 0 0 1px rgba(60, 156, 116, 0.10),
    0 24px 60px rgba(5, 16, 12, 0.32),
    var(--shadow-soft);
}

.rr-bulk-chat::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 70% at 0% 0%, color-mix(in srgb, var(--bulk-chat-moss) 16%, transparent 84%), transparent 55%),
    radial-gradient(90% 60% at 100% 0%, color-mix(in srgb, var(--bulk-chat-amber) 12%, transparent 88%), transparent 55%);
  opacity: 0.9;
}

.rr-bulk-chat > * {
  position: relative;
  z-index: 1;
}

/* ---------------------------------------------------------------- hero -- */

.rr-bulk-chat__hero {
  position: relative;
  overflow: hidden;
  padding: 20px 20px 18px;
  border-bottom: 1px solid color-mix(in srgb, var(--bulk-chat-border) 65%, transparent 35%);
  background:
    linear-gradient(135deg, rgba(60, 156, 116, 0.20), rgba(217, 164, 65, 0.10)),
    color-mix(in srgb, var(--panel) 88%, transparent 12%);
}

/* Signature: a faint root/vein trace instead of a generic dot grid.
   Pure CSS gradients, no image asset required. */
.rr-bulk-chat__hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(100deg, transparent 0 18%, rgba(255, 255, 255, 0.10) 18.6%, transparent 19.2% 40%, rgba(255, 255, 255, 0.08) 40.6%, transparent 41.2% 100%),
    linear-gradient(64deg, transparent 0 55%, rgba(255, 255, 255, 0.07) 55.6%, transparent 56.2% 100%);
  mask-image: linear-gradient(100deg, black, transparent 82%);
  opacity: 0.55;
}

.rr-bulk-chat__hero-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.rr-bulk-chat__brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 13px;
}

.rr-bulk-chat__avatar,
.rr-bulk-chat__bubble-avatar {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 999px;
  font-weight: 800;
}

.rr-bulk-chat__avatar {
  position: relative;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: linear-gradient(135deg, var(--bulk-chat-moss), var(--bulk-chat-moss-deep));
  box-shadow: 0 14px 30px rgba(15, 45, 33, 0.32);
  animation: rr-bulk-chat-breathe 3.6s ease-in-out infinite;
}

.rr-bulk-chat__avatar-dot {
  width: 13px;
  height: 13px;
  border-radius: inherit;
  background: #fbe7b8;
  box-shadow: 0 0 0 7px rgba(251, 231, 184, 0.16);
}

.rr-bulk-chat__brand-text {
  min-width: 0;
}

.rr-bulk-chat__eyebrow,
.rr-bulk-chat__status,
.rr-bulk-chat__empty-title,
.rr-bulk-chat__empty-text {
  margin: 0;
}

.rr-bulk-chat__eyebrow {
  color: color-mix(in srgb, var(--bulk-chat-muted) 70%, var(--bulk-chat-amber) 30%);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.rr-bulk-chat__title {
  margin: 3px 0 4px;
  color: var(--bulk-chat-ink);
  font-size: 1.28rem;
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -0.01em;
}

.rr-bulk-chat__status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--bulk-chat-muted);
  font-size: 0.87rem;
  line-height: 1.3;
}

.rr-bulk-chat__status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #4fcf8f;
  box-shadow: 0 0 0 4px rgba(79, 207, 143, 0.16);
  animation: rr-bulk-chat-pulse 2.2s ease-in-out infinite;
}

.rr-bulk-chat__hero-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rr-bulk-chat__icon-btn,
.rr-bulk-chat__composer-side,
.rr-bulk-chat__send,
.rr-bulk-chat__bubble-action,
.rr-bulk-chat__revert-trigger,
.rr-bulk-chat__btn,
.rr-bulk-chat__chip {
  border: 0;
  font: inherit;
  cursor: pointer;
}

.rr-bulk-chat__icon-btn,
.rr-bulk-chat__composer-side,
.rr-bulk-chat__send {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  color: var(--bulk-chat-ink);
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.rr-bulk-chat__icon-btn,
.rr-bulk-chat__composer-side {
  border: 1px solid color-mix(in srgb, var(--bulk-chat-border) 76%, transparent 24%);
  background: color-mix(in srgb, var(--panel) 84%, transparent 16%);
}

.rr-bulk-chat__icon-btn svg,
.rr-bulk-chat__composer-side svg,
.rr-bulk-chat__send svg {
  width: 18px;
  height: 18px;
}

.rr-bulk-chat__icon-btn:hover,
.rr-bulk-chat__composer-side:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--bulk-chat-moss) 40%, var(--bulk-chat-border) 60%);
  box-shadow: 0 12px 24px rgba(9, 32, 20, 0.20);
}

.rr-bulk-chat__icon-btn:focus-visible,
.rr-bulk-chat__composer-side:focus-visible,
.rr-bulk-chat__send:focus-visible,
.rr-bulk-chat__chip:focus-visible,
.rr-bulk-chat__input:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--bulk-chat-moss) 70%, white 30%);
  outline-offset: 2px;
}

/* ---------------------------------------------------------------- body -- */

.rr-bulk-chat__body {
  display: grid;
  gap: 0;
}

.rr-bulk-chat__thread {
  min-height: 360px;
  max-height: 520px;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scroll-behavior: smooth;
}

.rr-bulk-chat__thread::-webkit-scrollbar {
  width: 9px;
}

.rr-bulk-chat__thread::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: color-mix(in srgb, var(--bulk-chat-muted) 28%, transparent 72%);
  border: 3px solid transparent;
  background-clip: padding-box;
}

.rr-bulk-chat__empty {
  min-height: 320px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 13px;
  padding: 22px 10px;
  text-align: center;
}

.rr-bulk-chat__empty-icon {
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  color: color-mix(in srgb, var(--bulk-chat-moss) 80%, var(--bulk-chat-ink) 20%);
  border: 1px solid color-mix(in srgb, var(--bulk-chat-border) 74%, transparent 26%);
  background: linear-gradient(150deg, color-mix(in srgb, var(--bulk-chat-moss) 18%, transparent 82%), color-mix(in srgb, var(--bulk-chat-amber) 12%, transparent 88%));
}

.rr-bulk-chat__empty-icon svg {
  width: 30px;
  height: 30px;
}

.rr-bulk-chat__empty-title {
  color: var(--bulk-chat-ink);
  font-weight: 800;
  font-size: 1.08rem;
}

.rr-bulk-chat__empty-text {
  max-width: 34rem;
  color: var(--bulk-chat-muted);
  line-height: 1.6;
}

.rr-bulk-chat__suggestions {
  width: 100%;
  max-width: 560px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 4px;
}

.rr-bulk-chat__chip {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--bulk-chat-border) 80%, transparent 20%);
  background: color-mix(in srgb, var(--panel) 88%, transparent 12%);
  color: var(--bulk-chat-ink);
  text-align: left;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.2;
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.rr-bulk-chat__chip:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--bulk-chat-moss) 44%, var(--bulk-chat-border) 56%);
  background: color-mix(in srgb, var(--panel) 74%, rgba(60, 156, 116, 0.14) 26%);
  box-shadow: 0 10px 22px rgba(9, 32, 20, 0.16);
}

.rr-bulk-chat__chip-icon {
  flex: 0 0 auto;
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(60, 156, 116, 0.30), rgba(217, 164, 65, 0.20));
  color: color-mix(in srgb, var(--bulk-chat-ink) 80%, var(--bulk-chat-moss) 20%);
  font-size: 0.72rem;
  font-weight: 900;
}

/* -------------------------------------------------------------- bubbles -- */

.rr-bulk-chat__message {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  animation: rr-bulk-chat-message-in 200ms ease both;
}

.rr-bulk-chat__message--user {
  flex-direction: row-reverse;
}

.rr-bulk-chat__message.is-leaving {
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.rr-bulk-chat__bubble-avatar {
  width: 34px;
  height: 34px;
  border: 1px solid color-mix(in srgb, var(--bulk-chat-border) 80%, transparent 20%);
  background: color-mix(in srgb, var(--panel) 80%, rgba(60, 156, 116, 0.16) 20%);
  color: var(--bulk-chat-ink);
  font-size: 0.66rem;
  letter-spacing: 0;
}

.rr-bulk-chat__message--user .rr-bulk-chat__bubble-avatar {
  background: color-mix(in srgb, var(--panel) 72%, rgba(217, 164, 65, 0.24) 28%);
}

.rr-bulk-chat__bubble {
  position: relative;
  min-width: 0;
  max-width: min(86%, 620px);
  display: grid;
  gap: 8px;
  border-radius: 18px;
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--bulk-chat-border) 74%, transparent 26%);
  background: color-mix(in srgb, var(--panel) 90%, transparent 10%);
  color: var(--bulk-chat-ink);
  box-shadow: 0 12px 26px rgba(6, 20, 15, 0.16);
  overflow: hidden;
  word-break: break-word;
}

.rr-bulk-chat__message--assistant .rr-bulk-chat__bubble {
  border-top-left-radius: 6px;
}

.rr-bulk-chat__message--user .rr-bulk-chat__bubble {
  border-top-right-radius: 6px;
  border-color: color-mix(in srgb, var(--bulk-chat-amber) 36%, var(--bulk-chat-border) 64%);
  background: linear-gradient(135deg, rgba(217, 164, 65, 0.16), rgba(60, 156, 116, 0.08)), color-mix(in srgb, var(--panel) 88%, transparent 12%);
}

.rr-bulk-chat__message--loading .rr-bulk-chat__bubble {
  min-width: 86px;
}

.rr-bulk-chat__bubble-head,
.rr-bulk-chat__bubble-meta,
.rr-bulk-chat__bubble-actions,
.rr-bulk-chat__revert-actions {
  display: flex;
  align-items: center;
}

.rr-bulk-chat__bubble-head {
  justify-content: space-between;
  gap: 12px;
}

.rr-bulk-chat__bubble-name {
  color: var(--bulk-chat-ink);
  font-size: 0.76rem;
  font-weight: 800;
}

.rr-bulk-chat__bubble-time {
  color: color-mix(in srgb, var(--bulk-chat-muted) 78%, transparent 22%);
  font-size: 0.72rem;
  white-space: nowrap;
}

.rr-bulk-chat__bubble-body {
  color: color-mix(in srgb, var(--bulk-chat-ink) 90%, var(--bulk-chat-muted) 10%);
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.rr-bulk-chat__bubble-meta {
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 2px;
}

.rr-bulk-chat__badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--bulk-chat-border) 78%, transparent 22%);
  background: color-mix(in srgb, var(--panel) 84%, transparent 16%);
  color: var(--bulk-chat-ink);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.rr-bulk-chat__badge--success {
  border-color: rgba(79, 207, 143, 0.38);
  background: rgba(79, 207, 143, 0.14);
  color: #cdf3de;
}

.rr-bulk-chat__badge--link {
  color: color-mix(in srgb, var(--bulk-chat-amber) 80%, var(--bulk-chat-ink) 20%);
}

.rr-bulk-chat__badge--link:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(6, 20, 15, 0.18);
}

.rr-bulk-chat__badge--error {
  border-color: rgba(214, 92, 72, 0.4);
  background: rgba(214, 92, 72, 0.12);
  color: color-mix(in srgb, #d65c48 86%, var(--bulk-chat-ink) 14%);
}

.rr-bulk-chat__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  padding: 10px 18px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(79, 207, 143, 0.22), rgba(60, 156, 116, 0.16));
  border: 1px solid rgba(79, 207, 143, 0.36);
  color: #cdf3de;
  font-size: 0.84rem;
  font-weight: 800;
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
  box-shadow: 0 4px 14px rgba(79, 207, 143, 0.12);
}

.rr-bulk-chat__cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(79, 207, 143, 0.22);
  border-color: rgba(79, 207, 143, 0.56);
}

.rr-bulk-chat__cta:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(79, 207, 143, 0.1);
}

.rr-bulk-chat__cta-arrow {
  transition: transform 160ms ease;
}

.rr-bulk-chat__cta:hover .rr-bulk-chat__cta-arrow {
  transform: translateX(3px);
}

.rr-bulk-chat__bubble-actions {
  position: absolute;
  top: 8px;
  right: 8px;
  opacity: 0;
  transition: opacity 140ms ease;
}

.rr-bulk-chat__message--assistant .rr-bulk-chat__bubble:hover .rr-bulk-chat__bubble-actions,
.rr-bulk-chat__message--assistant .rr-bulk-chat__bubble:focus-within .rr-bulk-chat__bubble-actions {
  opacity: 1;
}

.rr-bulk-chat__bubble-action {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--panel) 88%, transparent 12%);
  color: var(--bulk-chat-muted);
  font-size: 1.05rem;
  line-height: 1;
  transition: color 140ms ease, background 140ms ease;
}

.rr-bulk-chat__bubble-action:hover {
  color: #d65c48;
  background: rgba(214, 92, 72, 0.12);
}

.rr-bulk-chat__typing {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 20px;
}

.rr-bulk-chat__typing span {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--bulk-chat-moss) 78%, var(--bulk-chat-muted) 22%);
  animation: rr-bulk-chat-typing 900ms ease-in-out infinite;
}

.rr-bulk-chat__typing span:nth-child(2) {
  animation-delay: 120ms;
}

.rr-bulk-chat__typing span:nth-child(3) {
  animation-delay: 240ms;
}

.rr-bulk-chat__system {
  align-self: center;
  max-width: 86%;
  border-radius: 999px;
  padding: 8px 13px;
  background: rgba(214, 92, 72, 0.12);
  color: color-mix(in srgb, #d65c48 84%, var(--bulk-chat-ink) 16%);
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.35;
}

/* --------------------------------------------------------------- revert -- */

.rr-bulk-chat__revert {
  display: grid;
  gap: 8px;
  margin-top: 2px;
}

.rr-bulk-chat__revert-trigger,
.rr-bulk-chat__btn {
  width: fit-content;
  min-height: 32px;
  border-radius: 999px;
  padding: 6px 11px;
  border: 1px solid color-mix(in srgb, var(--bulk-chat-border) 82%, transparent 18%);
  background: color-mix(in srgb, var(--panel) 84%, transparent 16%);
  color: var(--bulk-chat-ink);
  font-size: 0.8rem;
  font-weight: 800;
  transition: border-color 140ms ease, background 140ms ease;
}

.rr-bulk-chat__revert-trigger:hover,
.rr-bulk-chat__btn:hover {
  border-color: color-mix(in srgb, var(--bulk-chat-moss) 40%, var(--bulk-chat-border) 60%);
}

.rr-bulk-chat__revert-preview {
  padding: 11px;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--bulk-chat-border) 76%, transparent 24%);
  background: color-mix(in srgb, var(--panel-2) 88%, transparent 12%);
  display: grid;
  gap: 10px;
}

.rr-bulk-chat__revert-preview-heading {
  margin: 0;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--bulk-chat-ink);
}

.rr-bulk-chat__revert-preview-list {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 5px;
  list-style: none;
}

.rr-bulk-chat__revert-preview-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--bulk-chat-ink);
  line-height: 1.35;
}

.rr-bulk-chat__revert-preview-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--bulk-chat-moss) 16%, transparent);
  color: var(--bulk-chat-moss);
  font-size: 0.7rem;
  font-weight: 800;
  display: grid;
  place-items: center;
}

.rr-bulk-chat__revert-preview-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.rr-bulk-chat__revert-mode {
  padding: 11px;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--bulk-chat-border) 76%, transparent 24%);
  background: color-mix(in srgb, var(--panel-2) 88%, transparent 12%);
  display: grid;
  gap: 10px;
}

.rr-bulk-chat__revert-list {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 7px;
  list-style: none;
}

.rr-bulk-chat__revert-list label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--bulk-chat-ink);
  font-size: 0.84rem;
  line-height: 1.35;
}

.rr-bulk-chat__revert-list input {
  width: 16px;
  height: 16px;
  accent-color: var(--bulk-chat-moss);
}

.rr-bulk-chat__revert-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.rr-bulk-chat__btn--danger {
  border-color: rgba(214, 92, 72, 0.38);
  background: rgba(214, 92, 72, 0.12);
  color: color-mix(in srgb, #d65c48 86%, var(--bulk-chat-ink) 14%);
}

.rr-bulk-chat__btn--ghost {
  background: transparent;
}

.rr-bulk-chat__reverted-note {
  margin: 2px 0 0;
  color: var(--bulk-chat-muted);
  font-size: 0.84rem;
  font-weight: 700;
}

/* ------------------------------------------------------------ composer -- */

.rr-bulk-chat__composer {
  padding: 0 18px 18px;
}

.rr-bulk-chat__form {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: end;
  gap: 9px;
  padding: 10px;
  border-radius: 22px;
  border: 1px solid color-mix(in srgb, var(--bulk-chat-border) 82%, transparent 18%);
  background: color-mix(in srgb, var(--panel) 92%, transparent 8%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10), 0 14px 28px rgba(6, 20, 15, 0.18);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.rr-bulk-chat__form:focus-within {
  border-color: color-mix(in srgb, var(--bulk-chat-moss) 46%, var(--bulk-chat-border) 54%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10), 0 0 0 3px rgba(60, 156, 116, 0.16), 0 14px 28px rgba(6, 20, 15, 0.18);
}

.rr-bulk-chat__input {
  width: 100%;
  min-height: 40px;
  max-height: 180px;
  resize: none;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--bulk-chat-ink);
  padding: 9px 2px;
  line-height: 1.4;
}

.rr-bulk-chat__input::placeholder {
  color: color-mix(in srgb, var(--bulk-chat-muted) 82%, transparent 18%);
}

.rr-bulk-chat__input:disabled {
  opacity: 0.72;
}

.rr-bulk-chat__send {
  background: linear-gradient(135deg, var(--bulk-chat-moss), var(--bulk-chat-moss-deep));
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(39, 107, 78, 0.34);
}

.rr-bulk-chat__send:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(39, 107, 78, 0.42);
}

.rr-bulk-chat__send:active {
  transform: translateY(0);
}

.rr-bulk-chat__send:disabled {
  cursor: wait;
  opacity: 0.72;
  transform: none;
  box-shadow: none;
}

.rr-bulk-chat__send.is-loading svg {
  animation: rr-bulk-chat-send-pulse 700ms ease-in-out infinite alternate;
}

/* --------------------------------------------------------------- toast -- */

.rr-bulk-chat__toast {
  position: fixed;
  left: 50%;
  bottom: max(24px, env(safe-area-inset-bottom));
  z-index: 140;
  transform: translate(-50%, 12px);
  opacity: 0;
  pointer-events: none;
  border-radius: 999px;
  padding: 10px 15px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(14, 24, 19, 0.92);
  color: #ffffff;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.32);
  transition: opacity 180ms ease, transform 180ms ease;
}

.rr-bulk-chat__toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* -------------------------------------------------------------- themes -- */

[data-display-mode="light"] .rr-bulk-chat {
  --bulk-chat-bg: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 36px rgba(12, 40, 28, 0.14);
}

[data-display-mode="light"] .rr-bulk-chat__hero {
  background:
    linear-gradient(135deg, rgba(60, 156, 116, 0.14), rgba(217, 164, 65, 0.10)),
    rgba(255, 255, 255, 0.86);
}

[data-display-mode="dark"] .rr-bulk-chat__bubble,
[data-display-mode="dark"] .rr-bulk-chat__form,
[data-display-mode="dark"] .rr-bulk-chat__icon-btn,
[data-display-mode="dark"] .rr-bulk-chat__composer-side {
  background: rgba(11, 20, 16, 0.74);
}

/* ------------------------------------------------------------ mobile ---- */

@media (max-width: 720px) {
  .rr-dashboard-card--bulk-assist {
    order: 4;
  }

  .rr-bulk-chat__hero {
    padding: 16px 14px 14px;
  }

  .rr-bulk-chat__hero-inner {
    align-items: flex-start;
  }

  .rr-bulk-chat__avatar {
    width: 40px;
    height: 40px;
  }

  .rr-bulk-chat__title {
    font-size: 1.1rem;
  }

  .rr-bulk-chat__thread {
    min-height: 330px;
    max-height: 62vh;
    padding: 14px;
  }

  .rr-bulk-chat__empty {
    min-height: 300px;
  }

  .rr-bulk-chat__suggestions {
    grid-template-columns: 1fr;
  }

  .rr-bulk-chat__bubble {
    max-width: calc(100% - 40px);
    border-radius: 16px;
  }

  .rr-bulk-chat__composer {
    padding: 0 14px 14px;
  }

  .rr-bulk-chat__form {
    grid-template-columns: minmax(0, 1fr) auto;
    border-radius: 18px;
    gap: 7px;
  }

  .rr-bulk-chat__composer-side {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rr-bulk-chat *,
  .rr-bulk-chat *::before,
  .rr-bulk-chat *::after {
    animation: none !important;
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

/* ------------------------------------------------------------ motion ---- */

@keyframes rr-bulk-chat-message-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes rr-bulk-chat-typing {
  0%,
  80%,
  100% {
    transform: translateY(0);
    opacity: 0.48;
  }

  40% {
    transform: translateY(-4px);
    opacity: 1;
  }
}

@keyframes rr-bulk-chat-send-pulse {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(2px);
  }
}

@keyframes rr-bulk-chat-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 4px rgba(79, 207, 143, 0.16);
  }

  50% {
    box-shadow: 0 0 0 7px rgba(79, 207, 143, 0.06);
  }
}

/* Signature motion: the avatar breathes — a slow, living glow rather than
   a static badge — reinforcing "ready to build" without shouting it. */
@keyframes rr-bulk-chat-breathe {
  0%,
  100% {
    box-shadow: 0 14px 30px rgba(15, 45, 33, 0.32), 0 0 0 0 rgba(60, 156, 116, 0.28);
  }

  50% {
    box-shadow: 0 14px 30px rgba(15, 45, 33, 0.32), 0 0 0 8px rgba(60, 156, 116, 0);
  }
}
.rr-bulk-chat__message--user .rr-bulk-chat__bubble:hover .rr-bulk-chat__bubble-actions,
.rr-bulk-chat__message--user .rr-bulk-chat__bubble:focus-within .rr-bulk-chat__bubble-actions {
  opacity: 1;
}