/*
 * 할 일·일정·투표 카드 (2026-11-27, 웹 v2.435.0) — utils/chat_cards.js 가 그린다. 오다스챗 안드로이드 cards.dart 와 같은 모양.
 *  ⚠테마 토큰만(규칙 14) · 배경·글자색을 함께(규칙 10) · 특이도는 대화방 루트로 높인다(_chat_room_look 보다 앞서 읽혀도 이기게).
 */
.rmm-modal [id^="general-chat-room-content-"] .chat-card {
  --cc-ink: var(--ord-tint-violet-fg);
  --cc-soft: var(--ord-tint-violet-bg);
  width: min(280px, 100%);
  box-sizing: border-box;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--ord-line-2);
  background: var(--ord-surface);
  color: var(--ord-text);
  display: flex; flex-direction: column; gap: 4px;
  text-align: left;
}
.rmm-modal [id^="general-chat-room-content-"] .chat-card-task { --cc-ink: var(--ord-tint-green-fg); --cc-soft: var(--ord-tint-green-bg); }
.rmm-modal [id^="general-chat-room-content-"] .chat-card-event { --cc-ink: var(--ord-tint-cyan-fg); --cc-soft: var(--ord-tint-cyan-bg); }

.rmm-modal [id^="general-chat-room-content-"] .chat-card-head {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700; color: var(--cc-ink);
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.rmm-modal [id^="general-chat-room-content-"] .chat-card-icon { width: 15px; height: 15px; flex: none; }
.rmm-modal [id^="general-chat-room-content-"] .chat-card-title {
  margin-top: 2px; font-size: 14.5px; line-height: 1.4; font-weight: 700; color: var(--ord-text);
  overflow-wrap: anywhere;
}
.rmm-modal [id^="general-chat-room-content-"] .chat-card-sub { font-size: 12.5px; color: var(--ord-text-2); }
.rmm-modal [id^="general-chat-room-content-"] .chat-card-sub.is-late { color: var(--ord-tint-red-fg); }
.rmm-modal [id^="general-chat-room-content-"] .chat-card-row { margin-top: 6px; display: flex; }
.rmm-modal [id^="general-chat-room-content-"] .chat-card-status {
  padding: 3px 9px; border-radius: 10px;
  font-size: 12px; font-weight: 700;
  background: var(--ord-tint-amber-bg); color: var(--ord-tint-amber-fg);
}
.rmm-modal [id^="general-chat-room-content-"] .chat-card-status.is-done { background: var(--cc-soft); color: var(--cc-ink); }

.rmm-modal [id^="general-chat-room-content-"] .chat-card-acts { margin-top: 8px; display: flex; gap: 6px; }
.rmm-modal [id^="general-chat-room-content-"] .chat-card-btn {
  flex: 1 1 0; min-width: 0; min-height: 36px;
  padding: 0 8px; border: 0; border-radius: 12px;
  background: var(--ord-band); color: var(--ord-text-2);
  font-size: 12.5px; font-weight: 600; cursor: pointer;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.rmm-modal [id^="general-chat-room-content-"] .chat-card-btn:hover { filter: brightness(0.97); }
.rmm-modal [id^="general-chat-room-content-"] .chat-card-btn.is-on { background: var(--cc-soft); color: var(--cc-ink); font-weight: 800; }
.rmm-modal [id^="general-chat-room-content-"] .chat-card-btn:disabled { cursor: default; opacity: 0.6; }

.rmm-modal [id^="general-chat-room-content-"] .chat-card-options { margin-top: 6px; display: flex; flex-direction: column; gap: 6px; }
.rmm-modal [id^="general-chat-room-content-"] .chat-card-option {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 8px;
  min-height: 38px; padding: 0 10px;
  border: 0; border-radius: 10px;
  background: var(--ord-band); color: var(--ord-text);
  font-size: 13px; text-align: left; cursor: pointer;
}
.rmm-modal [id^="general-chat-room-content-"] .chat-card-option:disabled { cursor: default; }
.rmm-modal [id^="general-chat-room-content-"] .chat-card-bar { position: absolute; left: 0; top: 0; bottom: 0; background: var(--cc-soft); }
.rmm-modal [id^="general-chat-room-content-"] .chat-card-option > span:not(.chat-card-bar) { position: relative; }
.rmm-modal [id^="general-chat-room-content-"] .chat-card-option-mark {
  width: 14px; height: 14px; flex: none; box-sizing: border-box;
  border-radius: 50%; border: 2px solid var(--ord-text-3);
}
.rmm-modal [id^="general-chat-room-content-"] .chat-card-option.is-mine .chat-card-option-mark { border-color: var(--cc-ink); background: var(--cc-ink); }
.rmm-modal [id^="general-chat-room-content-"] .chat-card-option.is-mine .chat-card-option-label { font-weight: 700; }
.rmm-modal [id^="general-chat-room-content-"] .chat-card-option-label { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.rmm-modal [id^="general-chat-room-content-"] .chat-card-option-count { font-weight: 700; color: var(--cc-ink); }

.rmm-modal [id^="general-chat-room-content-"] .chat-card-foot {
  margin-top: 6px; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-size: 11.5px; color: var(--ord-text-2);
}
.rmm-modal [id^="general-chat-room-content-"] .chat-card-link {
  padding: 4px 2px; border: 0; background: transparent; color: var(--ord-link);
  font-size: 12px; font-weight: 700; cursor: pointer; white-space: nowrap;
}
.rmm-modal [id^="general-chat-room-content-"] .chat-card-voters {
  margin-top: 4px; padding: 8px 10px; border-radius: 10px;
  background: var(--ord-band); color: var(--ord-text);
  font-size: 12.5px; line-height: 1.55;
}
.rmm-modal [id^="general-chat-room-content-"] .chat-card-voters[hidden] { display: none; }
.rmm-modal [id^="general-chat-room-content-"] .chat-card-voter b { color: var(--ord-text-2); font-weight: 700; margin-right: 4px; }

/* ── 예약 보내기·[+] 메뉴·만들기 모달 (2026-11-27, 웹 v2.436.0) ── */
/* 입력칸 위 «예약 n개» — gem 푸터 왼쪽(가로 flex)을 건드리지 않게 입력 카드 위에 띄운다 */
.rmm-modal .general-chat-room-scheduled-chip {
  position: absolute; left: 10px; bottom: calc(100% + 6px); z-index: 2;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 11px; border: 0; border-radius: 999px;
  background: var(--ord-tint-blue-bg); color: var(--ord-tint-blue-fg);
  font-size: 12px; font-weight: 700; cursor: pointer;
  box-shadow: var(--ord-shadow-pill);
}
.rmm-modal .general-chat-room-scheduled-chip[hidden] { display: none; }
.rmm-modal .general-chat-room-scheduled-chip.is-failed { background: var(--ord-tint-red-bg); color: var(--ord-tint-red-fg); }
.rmm-modal .general-chat-room-scheduled-chip svg { width: 14px; height: 14px; }
.general-chat-room-schedule-btn {
  flex: 0 0 auto; display: grid; place-items: center; width: 36px; height: 36px; padding: 0;
  border: 0; border-radius: 50%;
  background: var(--gct-composer-chip, var(--ord-band)); color: var(--gct-composer-fg, var(--ord-text-2)); cursor: pointer;
}
.general-chat-room-schedule-btn[hidden] { display: none; }
.general-chat-room-schedule-btn svg { width: 19px; height: 19px; }
.general-chat-room-schedule-btn:hover { filter: brightness(.95); }
.general-chat-plus-menu { padding: 6px; border-radius: 14px; background: var(--ord-surface); color: var(--ord-text); }

/* 모달 본문 공용 — 바탕·카드는 .gcp-*(A-4 톤, _chat_governance.css) */
.rmm-modal .chat-form-input {
  width: 100%; box-sizing: border-box; height: 38px; padding: 0 10px;
  border: 1px solid var(--ord-line); border-radius: 8px;
  background: var(--ord-surface); color: var(--ord-text);
  font-family: inherit; font-size: 13.5px;
}
.rmm-modal .chat-form-input:focus { outline: none; border-color: var(--ord-accent); box-shadow: 0 0 0 3px var(--ord-tint-blue-bg); }
.rmm-modal .chat-form-input::placeholder { color: var(--ord-text-4); opacity: 1; }
/* 달력 아이콘·체크 상자도 테마를 따르게(다크에서 검은 아이콘이 묻히지 않게) — 값은 토큰 */
.rmm-modal .chat-form-input,
.rmm-modal .chat-cardf-check input { color-scheme: var(--ord-scheme); }
.rmm-modal .chat-form-btn {
  flex: none; height: 34px; padding: 0 12px;
  border: 1px solid var(--ord-line); border-radius: 8px;
  background: var(--ord-surface); color: var(--ord-text-2);
  font-size: 12.5px; font-weight: 700; cursor: pointer; white-space: nowrap;
}
.rmm-modal .chat-form-btn:hover:not(:disabled) { background: var(--ord-band); }
.rmm-modal .chat-form-btn:disabled { opacity: .55; cursor: default; }
.rmm-modal .chat-form-btn.is-danger { color: var(--ord-tint-red-fg); }
.rmm-modal .chat-form-hint { margin: 10px 2px 0; font-size: 11.5px; line-height: 1.6; color: var(--ord-text-3); word-break: keep-all; }
.rmm-modal .chat-form-hint.is-error { color: var(--ord-tint-red-fg); font-weight: 700; }

/* 언제 보낼까요? · 예약한 글 */
.rmm-modal .chat-sched { display: flex; flex-direction: column; gap: 10px; }
.rmm-modal .chat-sched-preview {
  padding: 10px 12px; border-radius: 10px;
  background: var(--ord-tint-blue-bg); color: var(--ord-tint-blue-fg);
  font-size: 13px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.rmm-modal .chat-sched-preview:empty { display: none; }
.rmm-modal .chat-sched-item {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 0 14px;
  border: 0; border-bottom: 1px solid var(--ord-line-soft);
  background: var(--ord-panel); color: var(--ord-text);
  font-size: 13.5px; text-align: left; cursor: pointer;
}
.rmm-modal .chat-sched-item:hover { background: var(--ord-band); }
.rmm-modal .chat-sched-item svg { width: 17px; height: 17px; flex: none; color: var(--ord-text-3); }
.rmm-modal .chat-sched-label { flex: 1; font-weight: 700; }
.rmm-modal .chat-sched-note { font-size: 12px; color: var(--ord-text-3); }
.rmm-modal .chat-sched-custom { padding: 10px 14px 12px; background: var(--ord-panel); }
.rmm-modal .chat-sched-custom-label { display: block; margin-bottom: 6px; font-size: 12px; font-weight: 700; color: var(--ord-text-2); }
.rmm-modal .chat-sched-custom-row { display: flex; gap: 6px; }
.rmm-modal .chat-sched-custom-row .chat-form-input { flex: 1; min-width: 0; width: auto; }
.rmm-modal .chat-sched-empty { margin: 8px 0; text-align: center; font-size: 13px; color: var(--ord-text-3); }
.rmm-modal .chat-sched-empty[hidden] { display: none; }
.rmm-modal .chat-sched-row.is-failed .chat-sched-when { color: var(--ord-tint-red-fg); }
.rmm-modal .chat-sched-text { font-size: 13px; line-height: 1.55; color: var(--ord-text); white-space: pre-wrap; overflow-wrap: anywhere; }
.rmm-modal .chat-sched-reason { margin-top: 4px; font-size: 12px; color: var(--ord-tint-red-fg); }
.rmm-modal .chat-sched-acts { margin-top: 8px; display: flex; justify-content: flex-end; }

/* 할 일·일정·투표 만들기 */
.rmm-modal .chat-cardf { display: flex; flex-direction: column; gap: 10px; }
.rmm-modal .chat-cardf-sub { margin-left: 4px; font-weight: 500; color: var(--ord-text-4); }
.rmm-modal .chat-cardf-people { display: flex; flex-direction: column; gap: 2px; max-height: 220px; overflow-y: auto; }
.rmm-modal .chat-cardf-check { display: flex; align-items: center; gap: 8px; min-height: 32px; font-size: 13px; color: var(--ord-text); cursor: pointer; }
.rmm-modal .chat-cardf-check input { width: 16px; height: 16px; margin: 0; accent-color: var(--ord-accent); }
.rmm-modal .chat-cardf-options { display: flex; flex-direction: column; gap: 6px; }
.rmm-modal .chat-cardf-add { align-self: flex-start; }
.rmm-modal .chat-cardf-add[hidden] { display: none; }
.rmm-modal .chat-cardf-error {
  margin: 0; padding: 8px 12px; border-radius: 8px;
  background: var(--ord-tint-red-bg); color: var(--ord-tint-red-fg);
  font-size: 12.5px; font-weight: 700;
}
.rmm-modal .chat-cardf-error[hidden] { display: none; }
