/**
 * File:          /pwa/css/chat-reply.css
 * Version:       0.1.1
 * Last Modified: 2026-10-24 07:11 PM ET
 * Changes:       0.1.1: swipe-to-reply arrow; chat list clips the swiped row (no sideways scroll).
 *                New — iMessage-style Reply: composer reply bar, quote above a
 *                sent reply, and the 1.2s highlight on the original (chat-reply.js).
 */

/* ---------- Composer reply bar ---------- */
.reply-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin: 0 0 6px;
  padding: 6px 0 6px 10px;
  border-left: 3px solid var(--accent);
  border-radius: 4px;
  background: var(--bg-tertiary);
}
.reply-bar-body { flex: 1 1 auto; min-width: 0; }
.reply-bar-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}
.reply-bar-text {
  font-size: 13px;
  line-height: 1.3;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.reply-bar-close {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  font-size: 16px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* ---------- Quote above a sent reply ---------- */
.reply-quote {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1px;
  max-width: 100%;
  margin: 0;
  padding: 6px 10px;
  border: 0;
  border-radius: 12px;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  opacity: 0.75;
  font: inherit;
  font-size: 13px;
  line-height: 1.3;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.reply-quote:disabled { cursor: default; }
.reply-quote-label { font-size: 11px; font-weight: 600; color: var(--text-secondary); }
.reply-quote-text {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}
/* Thin curved connector from the quote down to the bubble (speaker's side). */
.reply-quote::after {
  content: '';
  position: absolute;
  bottom: -6px;
  width: 10px;
  height: 12px;
  border: 0 solid var(--text-secondary);
}
.message.user .reply-quote::after {
  right: 14px;
  border-right-width: 2px;
  border-bottom-width: 2px;
  border-bottom-right-radius: 10px;
}
.message.assistant .reply-quote::after {
  left: 14px;
  border-left-width: 2px;
  border-bottom-width: 2px;
  border-bottom-left-radius: 10px;
}

/* Long press opens the app's message menu (chat-reply.js), not the iOS callout. */
.message .message-bubble { -webkit-touch-callout: none; }

/* ---------- Swipe right to reply ---------- */
.chat-messages { overflow-x: hidden; }
.reply-swipe-arrow {
  position: absolute;
  left: -34px;
  top: 50%;
  width: 28px;
  height: 28px;
  margin-top: -14px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-size: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

/* ---------- Highlight when jumping to the original ---------- */
@keyframes reply-highlight-pulse {
  0%, 100% { background: transparent; }
  30% { background: color-mix(in srgb, var(--accent) 18%, transparent); }
}
.message.reply-highlight { animation: reply-highlight-pulse 1.2s ease-in-out; border-radius: 12px; }

/* === END OF FILE (FILENAME: /pwa/css/chat-reply.css) === */
