/*
 * 웹 대화방 개선 (2026-11-25, 오다스챗과 같은 규칙) — 색·말풍선·입력 카드·공감 칩은 _chat_room_look.css
 *  - 떠 있는 단추(.gcr-float): 맨 아래로 · 새 글 · 보던 답글로 돌아가기
 *  - 여기부터 안 읽은 글(.general-chat-unread-line)
 *  - 첨부 미리보기(.gca) · 공감한 사람(.gcrx)
 *  ⚠규칙 10: 배경·글자색을 함께 지정한다. 옛 인라인 스타일보다 앞이라 특이도를 .rmm-modal 로 높인다.
 */

/* ── 떠 있는 단추 — 높이 0 자리에서 위로 띄워 목록 높이를 흔들지 않는다 ── */
.gcr-float-anchor { position: relative; height: 0; flex: 0 0 auto; z-index: 4; }
.gcr-float {
  position: absolute; left: 0; right: 0; bottom: 10px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  pointer-events: none;
}
.gcr-float > * { pointer-events: auto; }
.gcr-float [hidden] { display: none; }
.gcr-float-pill {
  max-width: calc(100% - 130px);
  min-height: 36px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--ord-line-2);
  background: var(--ord-surface);
  color: var(--ord-text);
  font-size: 12.5px; font-weight: 600;
  box-shadow: var(--ord-shadow-pill);
  cursor: pointer;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.gcr-float-pill:hover { background: var(--ord-band); }
.gcr-float-pill.is-back { background: var(--ord-solid-blue); border-color: var(--ord-solid-blue); color: var(--ord-on-solid); }
.gcr-float-down {
  position: absolute; right: 18px; bottom: 0;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--ord-line-2);
  background: var(--ord-surface);
  color: var(--ord-text);
  box-shadow: var(--ord-shadow-pill);
  cursor: pointer;
  display: grid; place-items: center;
}
.gcr-float-down:hover { background: var(--ord-band); }
.gcr-float-down svg { width: 20px; height: 20px; }
.gcr-float-badge {
  position: absolute; top: -6px; right: -4px;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px;
  background: var(--ord-badge); color: var(--ord-on-solid);
  font-size: 10.5px; font-weight: 700; line-height: 18px; text-align: center;
}

/* ── 여기부터 안 읽은 글 ── */
.rmm-modal [id^="general-chat-room-content-"] .general-chat-unread-line {
  display: flex; align-items: center; gap: 10px;
  margin: 6px 0;
  color: var(--gct-meta-fg, var(--ord-text-3));
  font-size: 11.5px; font-weight: 600;
}
.rmm-modal [id^="general-chat-room-content-"] .general-chat-unread-line::before,
.rmm-modal [id^="general-chat-room-content-"] .general-chat-unread-line::after { content: ""; flex: 1; height: 1px; background: currentColor; opacity: .35; }
.rmm-modal [id^="general-chat-room-content-"] .general-chat-unread-line > span {
  padding: 2px 12px; border-radius: 999px;
  background: var(--gct-datechip-bg, var(--ord-band));
  color: var(--gct-datechip-fg, var(--ord-text-2));
}

/* 원문으로 이동했을 때 — 3초 강조 */
.rmm-modal [id^="general-chat-room-content-"] .general-chat-message-flash { animation-duration: 3s; }
@media (prefers-reduced-motion: reduce) {
  .rmm-modal [id^="general-chat-room-content-"] .general-chat-message-flash { animation: none; background: var(--ord-tint-cyan-bg); }
}

/* ── 첨부 미리보기 ── */
.gca { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px 12px; background: var(--ord-surface); color: var(--ord-text); }
.gca-stage {
  position: relative;
  height: min(46vh, 340px);
  border-radius: 12px;
  background: var(--ord-band); color: var(--ord-text-2);
  display: grid; place-items: center;
  overflow: hidden;
}
.gca-stage > img, .gca-stage > video { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; display: block; }
.gca-stage > .gca-icon { font-size: 64px; line-height: 1; }
.gca-step {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--ord-line-2);
  background: var(--ord-surface); color: var(--ord-text);
  font-size: 20px; line-height: 1; cursor: pointer;
}
.gca-step.is-prev { left: 10px; }
.gca-step.is-next { right: 10px; }
.gca-step:disabled { visibility: hidden; }
.gca-page { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); padding: 2px 12px; border-radius: 999px; background: var(--ord-surface); color: var(--ord-text); font-size: 12px; font-weight: 600; }
.gca-name { margin: 0; display: flex; gap: 8px; align-items: baseline; font-size: 13px; font-weight: 600; color: var(--ord-text); }
.gca-name > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gca-name > em { flex: 0 0 auto; margin-left: auto; font-style: normal; font-weight: 500; font-size: 12px; color: var(--ord-text-3); }
.gca-strip { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 4px; }
.gca-cell { position: relative; flex: 0 0 auto; }
.gca-thumb { width: 60px; height: 60px; padding: 0; border-radius: 10px; border: 1px solid var(--ord-line); background: var(--ord-band); color: var(--ord-text-2); overflow: hidden; display: grid; place-items: center; cursor: pointer; }
.gca-cell.is-on .gca-thumb { border: 2px solid var(--ord-tint-cyan-fg); }
.gca-thumb > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gca-thumb > .gca-icon { font-size: 24px; line-height: 1; }
.gca-remove { position: absolute; top: 2px; right: 2px; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--ord-line-2); background: var(--ord-surface); color: var(--ord-text); font-size: 11px; line-height: 1; cursor: pointer; }
.gca-add { flex: 0 0 auto; width: 60px; height: 60px; border-radius: 10px; border: 1px dashed var(--ord-line-2); background: var(--ord-surface); color: var(--ord-text-2); font-size: 22px; cursor: pointer; }
.gca-caption { box-sizing: border-box; width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--ord-line-2); background: var(--ord-surface); color: var(--ord-text); font-size: 13.5px; }
.gca-caption::placeholder { color: var(--ord-text-3); }
.gca-caption:focus { outline: 2px solid var(--ord-tint-cyan-fg); outline-offset: 0; }

/* ── 공감한 사람 ── */
.gcrx { padding: 14px 16px 12px; background: var(--ord-surface); color: var(--ord-text); }
.gcrx-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.gcrx-mine { margin: 0 0 8px; font-size: 12.5px; color: var(--ord-text-3); }
.gcrx-mine strong { color: var(--ord-text); }
.gcrx-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.gcrx-tab { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 13px; border-radius: 999px; border: 1px solid var(--ord-line-2); background: var(--ord-surface); color: var(--ord-text-2); font-size: 13px; cursor: pointer; }
.gcrx-tab.is-on { border-color: var(--ord-solid-cyan); background: var(--ord-solid-cyan); color: var(--ord-on-solid); font-weight: 700; }
.gcrx-list { list-style: none; margin: 10px 0 12px; padding: 0; max-height: 42vh; min-height: 96px; overflow-y: auto; }
.gcrx-row { display: flex; align-items: center; gap: 10px; padding: 6px 2px; }
.gcrx-row[hidden], .gcrx-emojis [hidden] { display: none; }
.gcrx-avatar { flex: 0 0 auto; width: 36px; height: 36px; border-radius: 38%; object-fit: cover; background: var(--ord-band); color: var(--ord-text-2); }
.gcrx-initial { display: grid; place-items: center; font-size: 13px; font-weight: 700; }
.gcrx-who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.gcrx-who b { font-size: 13.5px; font-weight: 600; color: var(--ord-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gcrx-who small { font-size: 11.5px; color: var(--ord-text-3); }
.gcrx-emojis { flex: 0 0 auto; display: inline-flex; gap: 5px; }
.gcrx-emojis .crx { width: 20px; height: 20px; }
.gcrx-empty { padding: 34px 0; text-align: center; font-size: 13px; color: var(--ord-text-3); }
.gcrx-bar { display: flex; gap: 6px; border-top: 1px solid var(--ord-line); padding-top: 12px; }
.gcrx-opt { flex: 1; display: grid; place-items: center; min-height: 46px; padding: 0; border-radius: 14px; border: 1px solid var(--ord-line); background: var(--ord-surface); color: var(--ord-text); cursor: pointer; }
.gcrx-opt > .crx { width: 25px; height: 25px; }
.gcrx-opt:hover { background: var(--ord-band); }
.gcrx-opt.is-mine { border: 2px solid var(--ord-tint-cyan-fg); background: var(--ord-tint-cyan-bg); }
.gcrx-note { margin: 10px 0 0; padding: 9px 12px; border-radius: 10px; background: var(--ord-tint-cyan-bg); color: var(--ord-tint-cyan-fg); font-size: 13px; font-weight: 600; }
.gcrx-note[hidden] { display: none; }
