/* Extra micro-interaction animations */

/* Message send button send-pulse */
@keyframes sendPulse {
  0%   { box-shadow: 0 0 0 0 var(--accent-glow); }
  70%  { box-shadow: 0 0 0 10px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
.btn-send--sending { animation: sendPulse 0.5s ease; }

/* Unread badge pop */
@keyframes badgePop {
  0%   { transform: scale(0); }
  70%  { transform: scale(1.2); }
  100% { transform: scale(1); }
}
.conv-item__badge { animation: badgePop 0.2s cubic-bezier(0.34,1.56,0.64,1); }

/* New message notification glow on conv item */
@keyframes convGlow {
  0%   { background: var(--bg-hover); }
  50%  { background: rgba(108,99,255,0.12); }
  100% { background: transparent; }
}
.conv-item--new-msg { animation: convGlow 1s ease; }

/* Sidebar slide in on mobile */
@keyframes sidebarSlideIn {
  from { transform: translateX(-100%); }
  to   { transform: translateX(0); }
}

/* Bubble shimmer on hover */
.msg-row--out .msg-bubble {
  background-size: 200% 100%;
  transition: background-position 0.4s ease;
}
.msg-row--out .msg-bubble:hover {
  background-position: right center;
}

/* Smooth scroll behaviour */
.messages-area { scroll-behavior: smooth; }

/* Focus ring overrides for accessibility */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Link style in messages */
.msg-bubble a {
  color: inherit; text-decoration: underline;
  text-decoration-color: rgba(255,255,255,0.4);
  text-underline-offset: 2px;
}
.msg-row--in .msg-bubble a {
  color: var(--accent-light);
  text-decoration-color: var(--accent-glow);
}

/* Code block in messages */
.msg-bubble code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: rgba(0,0,0,0.25);
  padding: 1px 5px; border-radius: 4px;
}
