/* Rare UI component styles adapted to the site's CSS-only theme system. */
:root {
  --rare-control-surface: #f4f4f9;
  --rare-control-glyph: #868593;
  --rare-badge-red: #ff3b30;
  --rare-badge-orange: #ff9500;
  --rare-badge-green: #34c759;
  --rare-badge-blue: #007aff;
  --rare-badge-violet: #af52de;
}
:root[data-theme="dark"] {
  --rare-control-surface: #262626;
  --rare-control-glyph: #9b9aa7;
  --rare-badge-red: #ff453a;
  --rare-badge-orange: #ff9f0a;
  --rare-badge-green: #30d158;
  --rare-badge-blue: #0a84ff;
  --rare-badge-violet: #bf5af2;
}

.rare-ai-status {
  --ai-status-ink: var(--muted);
  --ai-status-shine: var(--ink);
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 32px;
  width: fit-content;
  max-width: 100%;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}
.rare-ai-status-icon,
.rare-ai-status-icon-inner,
.rare-ai-status-favicon {
  display: flex;
  align-items: center;
  justify-content: center;
}
.rare-ai-status-icon {
  position: relative;
  flex: none;
  width: 20px;
  height: 20px;
}
.rare-ai-status-icon svg {
  width: 18px;
  height: 18px;
  fill: initial;
  stroke: none;
}
.rare-ai-status-icon svg path[stroke],
.rare-ai-status-icon svg circle[stroke],
.rare-ai-status-icon svg line[stroke] {
  fill: none;
  stroke: currentColor;
}
.rare-ai-status-icon svg path[fill="currentColor"] {
  fill: currentColor;
}
.rare-ai-status-icon .rare-ai-status-error-icon,
.rare-ai-status[data-state="error"] .rare-ai-status-label {
  color: var(--error);
}
.rare-ai-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 100%;
  background: var(--muted);
}
.rare-ai-status-width {
  position: relative;
  overflow-x: clip;
  min-width: 0;
  max-width: 100%;
}
.rare-ai-status-measure {
  display: flex;
  align-items: center;
  width: max-content;
  max-width: min(28rem, calc(100vw - 56px));
  gap: 6px;
}
.rare-ai-status-swap {
  position: relative;
  display: grid;
  min-width: 0;
}
.rare-ai-status-label {
  min-width: 0;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.rare-ai-status-detail,
.rare-ai-status-timer {
  flex: none;
  color: var(--muted);
  font-weight: 400;
}
.rare-ai-status-timer { font-variant-numeric: tabular-nums; }
.rare-ai-status-detail {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 6px;
}
.rare-ai-status-favicon {
  flex: none;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  object-fit: contain;
}
.rare-ai-status-detail-text {
  max-width: 224px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rare-ai-status-shimmer {
  background-clip: text;
  color: transparent;
}

.rare-bell-trigger {
  position: relative;
  display: grid;
  place-items: center;
  flex: none;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  transition: transform 150ms var(--ease);
}
.rare-bell-trigger:active { transform: scale(.9); }
.rare-bell-trigger .rare-bell-icon {
  fill: none;
  stroke: currentColor;
}
.rare-bell-badge {
  position: absolute;
  z-index: 10;
  display: grid;
  place-items: center;
  border-radius: 100px;
  pointer-events: none;
}
.rare-bell-badge[data-color="red"] { background: var(--rare-badge-red); }
.rare-bell-badge[data-color="orange"] { background: var(--rare-badge-orange); }
.rare-bell-badge[data-color="green"] { background: var(--rare-badge-green); }
.rare-bell-badge[data-color="blue"] { background: var(--rare-badge-blue); }
.rare-bell-badge[data-color="violet"] { background: var(--rare-badge-violet); }
.rare-bell-badge-number {
  display: flex;
  color: #fff;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  letter-spacing: -.025em;
}

.rare-emoji-reaction {
  --rare-emoji-icon-size: 20px;
  --rare-emoji-gap: 4px;
  --rare-emoji-padding: 6px;
  position: relative;
  display: flex;
  align-items: center;
  width: fit-content;
}
.rare-emoji-reaction[data-size="sm"] {
  --rare-emoji-icon-size: 16px;
  --rare-emoji-gap: 2px;
  --rare-emoji-padding: 4px;
}
.rare-emoji-reaction[data-size="lg"] {
  --rare-emoji-icon-size: 24px;
  --rare-emoji-gap: 6px;
  --rare-emoji-padding: 8px;
}
.rare-emoji-trigger {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: var(--control-regular);
  height: var(--control-regular);
  padding: 0;
  border-radius: 100%;
  background: var(--rare-control-surface);
  color: var(--muted);
  touch-action: none;
}
.rare-emoji-trigger:hover { color: var(--ink); }
.rare-emoji-trigger .rare-emoji-trigger-icon {
  width: var(--rare-emoji-icon-size);
  height: var(--rare-emoji-icon-size);
}
.rare-emoji-trigger-icon circle[fill="currentColor"] { fill: currentColor; stroke: none; }
.rare-emoji-float { position: absolute; z-index: 30; }
.rare-emoji-float[data-align="left"] { left: 0; }
.rare-emoji-float[data-align="center"] { left: 50%; }
.rare-emoji-float[data-align="right"] { right: 0; }
.rare-emoji-float[data-side="top"] {
  bottom: 100%;
  margin-bottom: 16px;
}
.rare-emoji-float[data-side="bottom"] {
  top: 100%;
  margin-top: 16px;
}
.rare-emoji-pill {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--rare-emoji-gap);
  padding: var(--rare-emoji-padding);
  border-radius: 100px;
  background: var(--rare-control-surface);
  box-shadow: var(--menu-shadow);
}
.rare-emoji-choice {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: var(--control-regular);
  height: var(--control-regular);
  padding: 0;
  border-radius: 100%;
  touch-action: none;
}
.rare-emoji-choice:focus-visible { outline-offset: -2px; }
.rare-emoji-glyph {
  display: grid;
  place-items: center;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  line-height: 1;
}
.rare-emoji-tail {
  position: absolute;
  width: 12px;
  height: 12px;
  translate: -50%;
  border-radius: 100%;
  background: var(--rare-control-surface);
}
.rare-emoji-tail-tip { width: 6px; height: 6px; }
.rare-emoji-float[data-side="top"] .rare-emoji-tail { bottom: -4px; }
.rare-emoji-float[data-side="top"] .rare-emoji-tail-tip { bottom: -16px; }
.rare-emoji-float[data-side="bottom"] .rare-emoji-tail { top: -4px; }
.rare-emoji-float[data-side="bottom"] .rare-emoji-tail-tip { top: -16px; }
.rare-emoji-burst {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
  .rare-bell-trigger { transition: none; }
  .rare-bell-trigger:active { transform: none; }
}
