/* The chat's touch part (round 3, package C8, docs/CHAT_ROUND3_SPEC.md 5.11): swipe to decide,
   the long press menu's three dots, the Accepting row with its Undo. */

/* a thing a swipe can move: vertical pans stay the browser's, sideways ones come to the part */
#deskItems .tc-thing { position: relative; touch-action: pan-y; }
#deskItems .tc-thing img { -webkit-touch-callout: none; }
#deskItems .tc-thing.tc-dragging { overflow-x: clip; }
#deskItems .tc-thing.tc-dragging > .desk-body,
#deskItems .tc-thing.tc-dragging > .desk-card-d { position: relative; z-index: 1; will-change: transform; }
#deskItems .tc-spring { transition: transform 180ms ease-out; }

/* the label under the finger: aria-hidden; the thing's own Accept and Retake are the buttons */
#deskItems .tc-label { position: absolute; top: 0; bottom: 0; z-index: 0; display: flex; align-items: center;
  overflow: hidden; white-space: nowrap; font-size: 14px; font-weight: 600; border-radius: 12px; opacity: .55;
  padding: 0 14px; box-sizing: border-box; pointer-events: none; color: var(--bg, #0b0c0e); max-width: 100%; }
#deskItems .tc-label.tc-right { left: 0; justify-content: flex-start; background: var(--ok, #5fd39a); }
#deskItems .tc-label.tc-left { right: 0; justify-content: flex-end; background: var(--warn, #f5b454); }
#deskItems .tc-label.tc-armed { opacity: 1; }

/* the three dots: 44 by 44 hit area, a quiet round mark */
#deskItems .tc-dots { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
  width: 44px; height: 44px; min-width: 44px; min-height: 44px; padding: 0; margin: 0 0 0 auto;
  border: 0; border-radius: 999px; background: transparent; color: var(--muted, currentColor); box-shadow: none; }
#deskItems .tc-dots:hover, #deskItems .tc-dots:focus-visible { background: color-mix(in srgb, currentColor 10%, transparent); }
#deskItems .tc-dotsrow { display: flex; justify-content: flex-end; }

/* Accepting, with Undo, for 5 seconds; then what happened, in words */
#deskItems .tc-pend { display: flex; align-items: center; gap: 10px; margin-top: 6px; min-height: 44px;
  font-size: 14px; line-height: 1.45; color: var(--ok, #5fd39a); }
#deskItems .tc-pend.tc-said { color: var(--muted, currentColor); }
#deskItems .tc-pendwords { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#deskItems .tc-undo { flex: 0 0 auto; min-height: 44px; min-width: 44px; padding: 0 16px; white-space: nowrap;
  border-radius: 12px; border: 1px solid var(--line-strong, rgba(127,127,127,.4)); background: transparent; color: inherit; font-size: 14px; }

@media (prefers-reduced-motion: reduce) {
  #deskItems .tc-spring { transition: none; }
}
