/* Resollect — chaos artefact animation styles */

/* typing cursor */
.typing-cursor::after {
  content: '|';
  display: inline-block;
  margin-left: 1px;
  color: #1F7244;
  animation: blink 0.9s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* excel cell edit highlight */
.chaos_excel td.ce-edit {
  background: #fff8d6 !important;
  outline: 2px solid #ffd34a;
  outline-offset: -1px;
  transition: background 200ms ease;
}
.chaos_excel .ce_bar.ce-flash {
  background: #d04a2a !important;
}

/* whatsapp typing indicator */
.chaos_wa .wa_typing {
  background: #fff !important;
  display: inline-flex !important;
  gap: 4px;
  align-items: center;
  padding: 8px 12px !important;
  align-self: flex-start;
  max-width: 60px !important;
}
.chaos_wa .wa_dot {
  width: 6px; height: 6px; border-radius: 999px;
  background: #94a0b8;
  animation: waType 1.2s ease-in-out infinite;
}
.chaos_wa .wa_dot:nth-child(2) { animation-delay: 0.18s; }
.chaos_wa .wa_dot:nth-child(3) { animation-delay: 0.36s; }
@keyframes waType {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}
/* drop-in animation for new messages */
.chaos_wa .wa_drop {
  animation: waDrop 320ms cubic-bezier(0.2, 0.9, 0.2, 1.1);
  transform-origin: bottom left;
}
.chaos_wa .wa_msg.me.wa_drop { transform-origin: bottom right; }
@keyframes waDrop {
  from { opacity: 0; transform: translateY(8px) scale(0.92); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.chaos_wa .wa_fade {
  animation: waFade 380ms ease forwards;
}
@keyframes waFade {
  to { opacity: 0; transform: translateY(-6px) scale(0.95); height: 0; padding-top: 0; padding-bottom: 0; margin: 0; }
}
.chaos_wa .wa_body {
  scroll-behavior: smooth;
  overflow: hidden;
  max-height: 220px;
}

/* inbox new email animation */
.chaos_mail .em_new {
  animation: emailDrop 380ms cubic-bezier(0.2, 0.9, 0.2, 1.05);
}
@keyframes emailDrop {
  from { opacity: 0; transform: translateY(-8px); background: #fff8d6 !important; }
  to { opacity: 1; transform: translateY(0); }
}
.chaos_mail .em_fade {
  animation: emailFade 380ms ease forwards;
}
@keyframes emailFade {
  to { opacity: 0; transform: translateY(8px); height: 0; padding-top: 0; padding-bottom: 0; }
}
.chaos_mail .em_bar .dot.em_pulse {
  animation: emPulse 600ms ease-out;
}
@keyframes emPulse {
  0% { box-shadow: 0 0 0 0 rgba(242,92,55,0.6); }
  100% { box-shadow: 0 0 0 12px rgba(242,92,55,0); }
}

/* slight breathing on the chaos cards so it feels alive */
.chaos { perspective: 1200px; }
.chaos_card {
  transition: transform 400ms cubic-bezier(0.2,0,0,1), box-shadow 400ms ease;
}
.chaos_card.chaos_excel { animation: floatA 11s ease-in-out infinite alternate; }
.chaos_card.chaos_wa    { animation: floatB 8s ease-in-out infinite alternate; }
.chaos_card.chaos_mail  { animation: floatC 9s ease-in-out infinite alternate; }
@keyframes floatA {
  from { transform: translateZ(40px) translateY(0) rotate(-0.4deg); }
  to   { transform: translateZ(50px) translateY(-6px) rotate(-0.1deg); }
}
@keyframes floatB {
  from { transform: translateZ(140px) translateY(0) rotate(-2.4deg); }
  to   { transform: translateZ(160px) translateY(-10px) rotate(-1.6deg); }
}
@keyframes floatC {
  from { transform: translateZ(90px) translateY(0) rotate(1.6deg); }
  to   { transform: translateZ(105px) translateY(-7px) rotate(2.2deg); }
}

/* annotation chips can pulse subtly */
.chaos_anno {
  animation: annoNudge 4s ease-in-out infinite alternate;
}
.chaos_anno.a2 { animation-delay: 1.5s; }
@keyframes annoNudge {
  from { transform: translate(0,0); }
  to { transform: translate(-3px, -2px); }
}
