/* Issue #9: Discussions Live Update animations.
   Uses an inset box-shadow overlay for the "changed" highlight so it shows on top
   of whatever background a tile already has, without altering layout. */

@keyframes dlu-flash {
   0%   { box-shadow: inset 0 0 0 9999px rgba(255, 199, 102, 0.55),
                      0 0 0 2px rgba(224, 122, 63, 0.65); }
   60%  { box-shadow: inset 0 0 0 9999px rgba(255, 199, 102, 0.22),
                      0 0 0 2px rgba(224, 122, 63, 0.30); }
   100% { box-shadow: inset 0 0 0 9999px rgba(255, 199, 102, 0),
                      0 0 0 2px rgba(224, 122, 63, 0); }
}

ul.DataList.Discussions > li.DLU-flash {
   animation: dlu-flash 1.6s ease-out;
   border-radius: inherit;
}

/* Smooth the size changes jQuery slide produces when tiles are inserted/moved. */
ul.DataList.Discussions > li[data-discussionid] {
   transition: opacity 0.25s ease;
}

/* Issue #12: card-flip for content changes. The rotateY transform and timing are
   driven from JS (liveupdate.js flipReveal); this just establishes the 3D context
   and keeps the back face visible so the flipped-over side shows its content. */
ul.DataList.Discussions > li.DLU-flip {
   transform-origin: center center;
   backface-visibility: visible;
   -webkit-backface-visibility: visible;
   will-change: transform;
   /* Stay above neighbours while rotating so the raised edge isn't clipped. */
   position: relative;
   z-index: 2;
}

@media (prefers-reduced-motion: reduce) {
   ul.DataList.Discussions > li.DLU-flash { animation-duration: 0.01s; }
}
