/* チャットパネル (modules/chat-panel.ts)
   SidePanel 内の軽量チャットビュー (読む + 送る)。一覧系のため body 余白なし (padded 不使用)、
   行側とヘッダー側に余白を持つ。
   公開部品: .chat-panel__form / __input / __send は meeting-room (発言ログパネルの送信欄) が
   再利用している。見た目を再設計するときはプラグイン側の利用箇所も確認すること */

.chat-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

.chat-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
}

.chat-panel__name {
  font-size: 0.85rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-panel__full {
  border: none;
  background: transparent;
  color: var(--color-accent-base, #7282bb);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  padding: 2px 4px;
  white-space: nowrap;
}
.chat-panel__full:hover {
  text-decoration: underline;
}

.chat-panel__messages {
  flex: 1;
  overflow-y: auto;
  padding: 10px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
}

.chat-panel__msg-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.chat-panel__msg-from {
  font-size: 0.78rem;
  font-weight: 600;
}

.chat-panel__msg-time {
  font-size: 0.7rem;
  color: var(--color-text-tertiary);
}

.chat-panel__msg-body {
  font-size: 0.85rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.chat-panel__attach {
  margin-left: 6px;
  font-size: 0.72rem;
  color: var(--color-text-tertiary);
}

.chat-panel__empty {
  color: var(--color-text-tertiary);
  font-size: 0.8rem;
  text-align: center;
  padding: 24px 0;
}

.chat-panel__form {
  display: flex;
  /* コアのグローバル form スタイル (カード風の枠 + 縦積み + 大きな余白) を明示的に打ち消す */
  flex-direction: row;
  align-items: flex-end;
  gap: 8px;
  padding: 10px 16px;
  margin: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  border-top: 1px solid var(--color-border);
  box-shadow: none;
  transition: none;
  flex-shrink: 0;
}

.chat-panel__input {
  flex: 1;
  resize: none;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface);
  color: var(--color-text);
  font-size: 0.85rem;
  line-height: 1.5;
  padding: 8px 10px;
  font-family: inherit;
  min-height: 0;
}
.chat-panel__input:focus {
  outline: none;
  border-color: var(--color-accent-base, #7282bb);
}

.chat-panel__send {
  border: 1px solid var(--color-accent-base, #7282bb);
  background: var(--color-accent-base, #7282bb);
  color: #fff;
  border-radius: 8px;
  font-size: 0.8rem;
  padding: 8px 14px;
  cursor: pointer;
  flex-shrink: 0;
}
.chat-panel__send:disabled {
  opacity: 0.5;
  cursor: default;
}

.chat-panel__readonly {
  padding: 10px 16px;
  border-top: 1px solid var(--color-border);
  font-size: 0.78rem;
  color: var(--color-text-tertiary);
  flex-shrink: 0;
}
