/* Stitch 17/25: conversation list and chat, with the stacked mobile screen 18. */
#team-chat { display: grid; gap: 16px; min-width: 0; }
.chat-layout.card { padding: 0; display: grid; grid-template-columns: minmax(180px, 260px) minmax(0, 1fr); overflow: hidden; }
.chat-sidebar { background: var(--team-side); padding: 14px; border-inline-end: 1px solid var(--line); display: grid; align-content: start; gap: 12px; min-width: 0; }
.chat-kinds, .chat-suggestions { display: flex; flex-wrap: wrap; gap: 6px; }
.chat-kinds .button { min-height: 34px; padding: 3px 8px; font-size: .82rem; }
.chat-kinds .button[aria-pressed="true"] { background: var(--selected); border-color: var(--accent); }
.chat-thread-list, .chat-messages ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.chat-thread-list { max-height: 290px; overflow: auto; padding: 3px; }
.chat-main { display: grid; align-content: start; min-width: 0; }
.chat-head { padding: 12px 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.chat-head .field { display: flex; gap: 8px; align-items: center; }
.chat-head select { min-height: 38px; }
.chat-mode { padding: 10px 18px 0; font-size: .88rem; }
.chat-messages { min-height: 175px; max-height: 53vh; overflow: auto; padding: 18px; }
.chat-empty { padding-block: 20px; }
.chat-turn { display: grid; gap: 7px; }
.chat-question, .chat-answer { padding: 10px 13px; border-radius: 10px; min-width: 0; }
.chat-question { justify-self: end; background: var(--selected); }
.chat-answer { background: var(--low); }
.chat-answer-text { white-space: pre-wrap; }
.chat-compose { padding: 14px 18px 18px; display: grid; gap: 9px; border-top: 1px solid var(--line); }
.chat-compose textarea { min-height: 62px; }
.chat-attachments { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.chat-file-picker { position: relative; cursor: pointer; }
.chat-file-picker input { position: absolute; inset: 0; opacity: 0; width: 100%; cursor: pointer; }
.chat-file-picker:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.chat-compose .chat-suggestions .button { min-height: 35px; font-size: .85rem; text-align: start; }
.chat-mention-info { color: var(--primary); font-size: .88rem; }
.chat-mention-info .button { min-height: 30px; padding: 1px 9px; }
.chat-compose button:disabled, .chat-sidebar button:disabled { cursor: default; opacity: .6; }

@media (max-width: 780px) {
  .chat-layout.card { grid-template-columns: minmax(0, 1fr); }
  .chat-sidebar { border-inline-end: 0; border-bottom: 1px solid var(--line); }
  .chat-thread-list { max-height: 145px; }
  .chat-head, .chat-compose, .chat-messages { padding: 12px; }
  .chat-mode { padding-inline: 12px; }
}
