/* Demand conversation, shared by the client portal and the admin (shared/_conversation). */
.chat { display: flex; flex-direction: column; gap: 14px; margin: 0; padding: 0; list-style: none; }
.chat-day { display: flex; align-items: center; gap: 12px; margin: 8px 0 2px; color: #5A5E69; font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.chat-day::before, .chat-day::after { content: ""; flex: 1; height: 1px; background: rgba(27, 29, 36, 0.09); }
.chat-message { display: flex; align-items: flex-end; gap: 10px; max-width: min(86%, 680px); }
.chat-message.is-mine { flex-direction: row-reverse; align-self: flex-end; }
.chat-message.is-theirs { align-self: flex-start; }
.chat-avatar {
  display: inline-flex; flex: none; align-items: center; justify-content: center; width: 34px; height: 34px;
  border-radius: 50%; color: #2F4636; background: #E3EAE3; font-size: 11px; font-weight: 700; letter-spacing: 0.02em;
}
.chat-message.is-team .chat-avatar { border-radius: 10px; color: #FFFFFF; background: #1B1D24; font-size: 10px; }
.chat-bubble {
  min-width: 0; padding: 12px 16px 14px; border: 1px solid rgba(27, 29, 36, 0.08); border-radius: 20px;
  background: #FFFFFF; box-shadow: 0 1px 2px rgba(27, 29, 36, 0.04), 0 10px 24px -18px rgba(27, 29, 36, 0.2);
}
.chat-message.is-theirs .chat-bubble { border-bottom-left-radius: 6px; }
.chat-message.is-mine .chat-bubble { border-color: rgba(63, 90, 71, 0.16); border-bottom-right-radius: 6px; background: #E9EFE8; }
.chat-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; margin-bottom: 4px; font-size: 13px; }
.chat-meta strong { font-weight: 600; }
.chat-meta time { color: #5A5E69; font-size: 12px; }
.chat-body { font-size: 15px; line-height: 1.6; overflow-wrap: anywhere; }
.chat-body p { margin: 0; }
.chat-body p + p { margin-top: 8px; }
.chat-files { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; padding: 0; list-style: none; }
.chat-files a {
  display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 7px 12px;
  border: 1px solid rgba(27, 29, 36, 0.1); border-radius: 12px; background: rgba(255, 255, 255, 0.7);
  color: #1B1D24 !important; font-size: 13px; font-weight: 500; text-decoration: none; overflow-wrap: anywhere;
}
.chat-files a:hover { border-color: rgba(63, 90, 71, 0.45); }
.chat-files svg { flex: none; color: #5A5E69; }
.chat-files small { color: #5A5E69; white-space: nowrap; }
.chat-label { display: block; margin-bottom: 0.35rem; font-size: 0.85rem; font-weight: 700; }
.chat-field textarea { width: 100%; }

/* Demand status, shared. */
.status-badge {
  display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px 4px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 700; white-space: nowrap; color: #2F4636; background: #E3EAE3;
}
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status-badge.status-open { color: #6B4E26; background: #F1E6D4; }
.status-badge.status-in-progress { color: #2F4636; background: #E3EAE3; }
.status-badge.status-waiting-client { color: #6B4A16; background: #F6E7C8; }
.status-badge.status-delivered { color: #2B5265; background: #E1EBF0; }
.status-badge.status-closed { color: #5A5E69; background: #ECEBE6; }
@media (max-width: 640px) { .chat-message { max-width: 100%; } .chat-avatar { display: none; } }
