/* ═══════════════════════════════════════════════════════════════ */
/* Rainbow Real Chat (Live Simulation) — rc-* prefixed styles    */
/* Mirrors live-chat styles for the Chat Simulator tab           */
/* ═══════════════════════════════════════════════════════════════ */

/* Container already defined in rainbow-layout.css:
   .rc-container, .rc-sidebar */

/* Sidebar Header */
.rc-sidebar-header {
  padding: 10px 16px;
  background: #f0f2f5;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-bottom: 1px solid #e5e7eb;
  flex-shrink: 0;
}

.rc-search {
  border: 1px solid #e5e7eb;
  outline: none;
  width: 100%;
  font-size: 13px;
  background: #fff;
  color: #111b21;
  padding: 6px 10px;
  border-radius: 6px;
}

.rc-search:focus {
  border-color: #00a884;
}

.rc-instance-filter {
  width: 100%;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
  font-size: 12px;
  background-color: #fff;
  color: #54656f;
}

/* Chat List */
.rc-chat-list {
  flex: 1;
  overflow-y: auto;
  background: #fff;
}

.rc-chat-item {
  display: flex;
  padding: 12px 16px;
  cursor: pointer;
  position: relative;
  border-bottom: 1px solid #f0f2f5;
  transition: background 0.2s;
  align-items: center;
  gap: 10px;
}

.rc-chat-item:hover {
  background: #f5f6f6;
}

.rc-chat-item.active {
  background: #f0f2f5;
}

.rc-sidebar-empty {
  padding: 40px 20px;
  text-align: center;
  color: #8696a0;
  font-size: 14px;
}

/* Main Chat Area */
.rc-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #efeae2;
  position: relative;
  min-width: 0;
}

.rc-main-header {
  height: 60px;
  background: #f0f2f5;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid #d1d7db;
  flex-shrink: 0;
  z-index: 10;
  gap: 10px;
}

.rc-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #dfe3e5;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 500;
  flex-shrink: 0;
}

.rc-header-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.rc-header-name {
  font-size: 16px;
  color: #111b21;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Header status line (replaces .rc-header-phone, US-182) */
.rc-header-status {
  font-size: 13px;
  color: #667781;
  display: flex;
  align-items: center;
  gap: 4px;
}

.rc-header-phone {
  font-size: 13px;
  color: #667781;
}

.rc-header-actions {
  display: flex;
  gap: 8px;  /* US-005: min 8px between buttons to prevent visual overlap */
  color: #54656f;
  align-items: center;
  flex-wrap: nowrap;  /* US-005: prevent wrapping that caused delete/fullscreen overlap */
  flex-shrink: 0;
}

.rc-header-actions button {
  padding: 6px;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s;
  background: transparent;
  border: none;
  color: #54656f;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;  /* US-005: prevent buttons from being squeezed together */
}

.rc-header-actions button:hover {
  background: #d9dce0;
}

/* Instance Badge */
.rc-instance-badge {
  display: inline-block;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 8px;
  text-transform: uppercase;
}

/* Developer Mode Toggle */
.rc-dev-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px !important;
  border-radius: 16px !important;
  background: #e9edef;
  font-size: 12px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
}

.rc-dev-toggle:hover {
  background: #d1d7db !important;
}

.rc-dev-toggle.active {
  background: #d1fae5 !important;
  color: #059669;
}

/* Translate Toggle */
.rc-translate-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px !important;
  border-radius: 16px !important;
  background: #e9edef;
  font-size: 12px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
}

.rc-translate-toggle:hover {
  background: #d1d7db !important;
}

.rc-translate-toggle.active {
  background: #e0f2fe !important;
  color: #0284c7;
}

/* Language Selector */
.rc-lang-selector {
  padding: 3px 6px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  font-size: 12px;
  background: #fff;
  color: #54656f;
}

/* Refresh Indicator */
.rc-refresh-indicator {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: #8696a0;
  padding: 2px 8px;
  background: #f0f2f5;
  border-radius: 12px;
}

.rc-spin-icon {
  display: inline-block;
  animation: rc-spin 2s linear infinite;
}

@keyframes rc-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Empty State */
.rc-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  padding: 40px;
  background: #f0f2f5;
}

.rc-empty-state svg {
  width: 220px;
  height: auto;
  margin-bottom: 24px;
}

.rc-empty-state h3 {
  font-size: 24px;
  font-weight: 300;
  color: #41525d;
  margin-bottom: 12px;
}

.rc-empty-state p {
  font-size: 14px;
  color: #667781;
  max-width: 400px;
}

/* Messages Area */
.rc-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px 8%;
  display: flex;
  flex-direction: column;
  gap: 2px;
  background-color: #efeae2;
  /* WhatsApp-style CSS-only doodle pattern (no external assets) */
  background-image:
    url("data:image/svg+xml,%3Csvg width='200' height='200' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3Cstyle%3E.d%7Bfill:%23ddd8cf;opacity:.45%7D%3C/style%3E%3C/defs%3E%3Cpath class='d' d='M20 15c1.5 0 3-1 3-2.5s-1-2-2.5-2.5c.5-1 0-2.5-1.2-3-.5-1.5-2-2-3.3-1.5-1-1.5-2.8-1.5-3.8 0-1.3-.5-2.8 0-3.3 1.5-1.2.5-1.7 2-1.2 3C6.2 10.5 5 12 5 13.5 5 15.5 7 17 9 17h11z'/%3E%3Ccircle class='d' cx='60' cy='30' r='3'/%3E%3Ccircle class='d' cx='62' cy='30' r='3'/%3E%3Cpath class='d' d='M58 33c0-1.5 2-3 4-3s4 1.5 4 3'/%3E%3Cpath class='d' d='M140 20l2-6 2 6-6-4h8z'/%3E%3Ccircle class='d' cx='100' cy='50' r='6' fill='none' stroke='%23ddd8cf' stroke-width='1.2' opacity='.4'/%3E%3Cpath class='d' d='M100 44v3m0 6v3m-6-6h3m6 0h3'/%3E%3Cpath class='d' d='M30 70l8 0 0 6-8 0z' fill='none' stroke='%23ddd8cf' stroke-width='1' opacity='.35'/%3E%3Cpath class='d' d='M34 70v-3m-2 3v-2'/%3E%3Cpath class='d' d='M170 60c-2 0-3.5 1.5-3.5 3s1.5 3 3.5 3 3.5-1.5 3.5-3-1.5-3-3.5-3zm-1 2.5c-.4 0-.7-.3-.7-.7s.3-.7.7-.7.7.3.7.7-.3.7-.7.7z'/%3E%3Cpath class='d' d='M80 90h12v8H80z' fill='none' stroke='%23ddd8cf' stroke-width='1' opacity='.35'/%3E%3Cpath class='d' d='M82 94h8M82 96h5'/%3E%3Cpath class='d' d='M150 100l-4 8h8z' fill='none' stroke='%23ddd8cf' stroke-width='1' opacity='.4'/%3E%3Cpath class='d' d='M40 130a5 5 0 1 1 10 0 5 5 0 1 1-10 0z' fill='none' stroke='%23ddd8cf' stroke-width='1' opacity='.35'/%3E%3Cpath class='d' d='M42 130h6m-3-3v6'/%3E%3Cpath class='d' d='M120 140l3-8 3 8-8-5h10z' fill='none' stroke='%23ddd8cf' stroke-width='1' opacity='.35'/%3E%3Cpath class='d' d='M175 150c0 0 2-4 4-4s4 4 4 4' fill='none' stroke='%23ddd8cf' stroke-width='1.2' opacity='.4'/%3E%3Cpath class='d' d='M177 146c1-1 2-1.5 2-1.5m4 5.5c0 0 1-.5 2-1.5'/%3E%3Cpath class='d' d='M15 170h6v8h-6z' fill='none' stroke='%23ddd8cf' stroke-width='1' opacity='.3'/%3E%3Ccircle class='d' cx='18' cy='174' r='1.5'/%3E%3Cpath class='d' d='M100 170l5-3v6z'/%3E%3C/svg%3E");
  background-repeat: repeat;
  position: relative;
}

/* Bubble Wrap */
.rc-bubble-wrap {
  display: flex;
  flex-direction: column;
  margin-bottom: 8px;
  position: relative;
  max-width: 100%;
}

.rc-bubble-wrap.guest {
  align-items: flex-start;
}

.rc-bubble-wrap.ai,
.rc-bubble-wrap.bot {
  align-items: flex-end;
}

/* Bubbles */
.rc-bubble {
  padding: 6px 7px 8px 9px;
  border-radius: 7.5px;
  position: relative;
  max-width: 65%;
  font-size: 14.2px;
  line-height: 19px;
  color: #111b21;
  box-shadow: 0 1px 0.5px rgba(11, 20, 26, .13);
  word-wrap: break-word;
}

.rc-bubble.guest {
  background: #fff;
  border-top-left-radius: 0;
}

.rc-bubble.ai {
  background: #d9fdd3;
  border-top-right-radius: 0;
}

/* Legacy .bot class support */
.rc-bubble.bot {
  background: #d9fdd3;
  border-top-right-radius: 0;
}

/* WhatsApp-style bubble tails (US-183) */
.rc-bubble.guest::before {
  content: '';
  position: absolute;
  top: 0;
  left: -8px;
  width: 0;
  height: 0;
  border-top: 0 solid transparent;
  border-bottom: 8px solid transparent;
  border-right: 8px solid #fff;
}

.rc-bubble.ai::before,
.rc-bubble.bot::before {
  content: '';
  position: absolute;
  top: 0;
  right: -8px;
  width: 0;
  height: 0;
  border-top: 0 solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 8px solid #d9fdd3;
}

/* Consecutive message grouping: no tail, tighter spacing (US-183) */
.rc-bubble-wrap.continuation {
  margin-bottom: 2px;
}

.rc-bubble-wrap.continuation .rc-bubble.guest {
  border-top-left-radius: 7.5px;
}

.rc-bubble-wrap.continuation .rc-bubble.guest::before {
  display: none;
}

.rc-bubble-wrap.continuation .rc-bubble.ai,
.rc-bubble-wrap.continuation .rc-bubble.bot {
  border-top-right-radius: 7.5px;
}

.rc-bubble-wrap.continuation .rc-bubble.ai::before,
.rc-bubble-wrap.continuation .rc-bubble.bot::before {
  display: none;
}

.rc-bubble-meta {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-top: -4px;
  margin-right: -4px;
  margin-bottom: -4px;
  float: right;
  padding-left: 7px;
  color: #667781;
  font-size: 11px;
  height: 15px;
}

.rc-bubble-time {
  margin-right: 3px;
}

.rc-bubble-text {
  white-space: pre-wrap;
  word-break: break-word;
}

/* WhatsApp-style inline timestamp + checkmark (US-183) */
.rc-bubble-footer {
  display: inline-flex;
  align-items: center;
  float: right;
  margin: -4px -4px -4px 7px;
  padding-top: 4px;
  gap: 3px;
  height: 15px;
}

.rc-bubble-time {
  font-size: 11px;
  color: #667781;
  white-space: nowrap;
}

/* Double checkmark for read receipts (US-183) */
.rc-bubble-check {
  display: inline-flex;
  align-items: center;
  color: #53bdeb;
  margin-left: 1px;
}

.rc-bubble-check svg {
  width: 16px;
  height: 11px;
}

/* Manual reply indicator (US-183) */
.rc-bubble-manual-tag {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: rgba(0, 0, 0, 0.04);
  color: #667781;
  border-radius: 3px;
  padding: 0 4px;
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  margin-right: 2px;
}

/* Footer action buttons (edit, add example) — shown on hover */
.rc-bubble-actions {
  display: none;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.rc-bubble:hover .rc-bubble-actions {
  display: flex;
}

.rc-bubble-actions button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 11px;
  color: #667781;
  padding: 2px 6px;
  border-radius: 4px;
  transition: all 0.15s;
}

.rc-bubble-actions button:hover {
  background: rgba(0, 0, 0, 0.06);
  color: #111b21;
}

/* Existing footer classes for non-WhatsApp mode — keep for backward compat */
.rc-bubble-intent {
  font-size: 10px;
  color: #667781;
  margin-left: 4px;
}

.rc-bubble-confidence {
  font-size: 10px;
  font-weight: 500;
  margin-left: 2px;
}

.rc-bubble-edit {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 11px;
  color: #667781;
  padding: 1px 4px;
  border-radius: 4px;
  margin-left: 4px;
}

.rc-bubble-edit:hover {
  background: rgba(0, 0, 0, 0.06);
  color: #111b21;
}

.rc-bubble-add-example {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 11px;
  color: #667781;
  padding: 1px 4px;
  border-radius: 4px;
  margin-left: 4px;
  opacity: 0;
  transition: opacity 0.15s;
}

.rc-bubble:hover .rc-bubble-add-example {
  opacity: 1;
}

/* Dev metadata under messages */
.rc-meta-row {
  display: flex;
  gap: 6px;
  font-size: 11px;
  color: #8696a0;
  margin-top: 4px;
  flex-wrap: wrap;
}

.rc-meta-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: #f0f2f5;
  padding: 1px 6px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 500;
  color: #54656f;
}

.rc-meta-badge.intent { color: #0369a1; background: #e0f2fe; }
.rc-meta-badge.confidence { color: #059669; background: #d1fae5; }
.rc-meta-badge.tier { color: #7c3aed; background: #ede9fe; }
.rc-meta-badge.time { color: #ea580c; background: #fff7ed; }

/* ── Collapsible Dev Metadata Panel (US-185) ──────────────────── */
.rc-dev-panel-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  padding: 3px 0 0;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  cursor: pointer;
  user-select: none;
  font-size: 10px;
  color: #8696a0;
  transition: color 0.15s;
}

.rc-dev-panel-toggle:hover {
  color: #54656f;
}

.rc-dev-panel-toggle .rc-dev-chevron {
  display: inline-block;
  font-size: 8px;
  transition: transform 0.2s;
  line-height: 1;
}

.rc-dev-panel-toggle.open .rc-dev-chevron {
  transform: rotate(180deg);
}

.rc-dev-panel {
  display: none;
  margin-top: 4px;
  padding: 6px 8px;
  background: rgba(0, 0, 0, 0.025);
  border-radius: 6px;
  font-size: 11px;
  line-height: 1.5;
}

.rc-dev-panel.open {
  display: block;
}

.rc-dev-panel-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 1px 0;
}

.rc-dev-panel-label {
  color: #8696a0;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  min-width: 72px;
  flex-shrink: 0;
}

.rc-dev-panel-value {
  color: #3b4a54;
  font-size: 11px;
  word-break: break-word;
}

.rc-dev-panel-value .rb-badge {
  vertical-align: middle;
}

/* US-001: Token usage badge in dev panel */
.rc-dev-token-badge {
  display: inline-block;
  padding: 1px 6px;
  background: rgba(59, 130, 246, 0.08);
  color: #2563eb;
  border-radius: 3px;
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 10px;
  letter-spacing: 0.02em;
}

.rc-dev-panel-kb {
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px dashed rgba(0, 0, 0, 0.06);
}

.rc-dev-panel-kb-chip {
  display: inline-block;
  padding: 1px 6px;
  margin: 1px 2px;
  background: #f5f3ff;
  color: #7c3aed;
  border-radius: 4px;
  font-size: 10px;
  font-family: monospace;
  cursor: pointer;
  transition: background 0.15s;
}

.rc-dev-panel-kb-chip:hover {
  background: #ede9fe;
}

/* Flash animation for new messages */
.rc-message-flash {
  animation: rc-flash 1.2s ease-out;
}

@keyframes rc-flash {
  0% { background: rgba(37, 211, 102, 0.2); }
  100% { background: transparent; }
}

/* Input Area — WhatsApp-style (US-184) */
.rc-input-area {
  padding: 5px 10px;
  background: #f0f2f5;
  display: flex;
  align-items: flex-end;
  gap: 6px;
}

.rc-input-box {
  flex: 1;
  border: none;
  outline: none;
  background: #fff;
  border-radius: 21px;
  padding: 9px 12px 11px;
  font-size: 15px;
  font-family: inherit;
  resize: none;
  max-height: 100px;
  min-height: 42px;
  line-height: 20px;
  overflow-y: auto;
}

.rc-input-box:focus {
  outline: none;
}

.rc-send-btn {
  background: #00a884;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .2s;
  flex-shrink: 0;
}

.rc-send-btn:hover {
  background: #008f72;
}

.rc-send-btn svg {
  width: 20px;
  height: 20px;
}

/* Attach button & menu — WhatsApp-style (US-184) */
.rc-attach-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.rc-attach-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  color: #54656f;
  transition: all .15s;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 42px;
  height: 42px;
}

.rc-attach-btn:hover {
  background: #e9edef;
  color: #00a884;
}

.rc-attach-menu {
  position: absolute;
  bottom: 100%;
  left: 0;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,.15);
  padding: 8px 0;
  min-width: 180px;
  z-index: 20;
  margin-bottom: 8px;
}

.rc-attach-option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 16px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 14px;
  color: #3b4a54;
  text-align: left;
}

.rc-attach-option:hover {
  background: #f5f6f6;
}

.rc-attach-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.rc-attach-photo { background: #7f66ff; color: #fff; }
.rc-attach-doc { background: #5157ae; color: #fff; }

/* File Preview */
.rc-file-preview {
  position: absolute;
  bottom: 80px;
  left: 10px;
  right: 10px;
  background: #f0f2f5;
  border: 1px solid #d1d7db;
  border-radius: 8px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 20;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
}

.rc-file-preview-inner {
  display: flex;
  gap: 12px;
  align-items: center;
}

.rc-file-preview-thumb {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  background: #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.rc-file-preview-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rc-file-preview-info {
  flex: 1;
  min-width: 0;
}

.rc-file-preview-name {
  font-size: 13px;
  font-weight: 500;
  color: #111b21;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rc-file-preview-size {
  font-size: 11px;
  color: #8696a0;
}

.rc-file-preview-remove {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  color: #8696a0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.rc-file-preview-remove:hover {
  background: #fee2e2;
  color: #dc2626;
}

.rc-file-caption {
  width: 100%;
  padding: 8px;
  border: 1px solid #d1d7db;
  border-radius: 4px;
  font-size: 14px;
}

/* Stats Bar */
.rc-stats-bar {
  display: flex;
  justify-content: space-between;
  padding: 4px 16px;
  font-size: 11px;
  color: #8696a0;
  background: #f0f2f5;
  border-top: 1px solid #e5e7eb;
}

/* Message Search Bar */
.rc-msg-search-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: #f0f2f5;
  border-bottom: 1px solid #e5e7eb;
}

.rc-msg-search-input {
  flex: 1;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 13px;
  outline: none;
  background: #fff;
}

.rc-msg-search-input:focus {
  border-color: #00a884;
}

.rc-msg-search-count {
  font-size: 12px;
  color: #667781;
  white-space: nowrap;
  min-width: 50px;
  text-align: center;
}

.rc-msg-search-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  color: #54656f;
  font-size: 14px;
  transition: all .15s;
}

.rc-msg-search-btn:hover {
  background: #e9edef;
  color: #111b21;
}

/* Translation Modal */
.rc-translate-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
}

.rc-translate-content {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.rc-translate-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
  color: #111b21;
}

.rc-translate-text {
  background: #f0f2f5;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  color: #111b21;
  margin-top: 4px;
}

.rc-translate-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

.rc-translate-btn {
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  cursor: pointer;
  border: none;
  font-weight: 500;
}

.rc-translate-btn.cancel {
  background: #fff;
  color: #008069;
  border: 1px solid #008069;
}

.rc-translate-btn.cancel:hover {
  background: #f0fdf4;
}

.rc-translate-btn.send {
  background: #008069;
  color: #fff;
}

.rc-translate-btn.send:hover {
  background: #006d59;
}

/* Chat item info */
.rc-chat-info {
  flex: 1;
  min-width: 0;
}

.rc-chat-name {
  font-size: 15px;
  color: #111b21;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rc-chat-preview {
  font-size: 13px;
  color: #667781;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 2px;
}

.rc-chat-time {
  font-size: 11px;
  color: #667781;
  white-space: nowrap;
}

.rc-unread {
  background: #25d366;
  color: #fff;
  border-radius: 50%;
  min-width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  padding: 0 4px;
}

/* Date separator — WhatsApp pill style (US-182) */
.rc-date-sep {
  text-align: center;
  margin: 8px 0;
  display: flex;
  justify-content: center;
}

.rc-date-sep span {
  background: rgba(255, 255, 255, 0.92);
  color: #54656f;
  padding: 5px 12px 6px;
  border-radius: 7.5px;
  font-size: 12.5px;
  text-transform: uppercase;
  box-shadow: 0 1px 0.5px rgba(11, 20, 26, .13);
  letter-spacing: 0.01em;
}

/* Manual tag */
.rc-manual-tag {
  background: #f0f2f5;
  color: #54656f;
  border-radius: 4px;
  padding: 1px 4px;
  font-size: 9px;
  text-transform: uppercase;
  font-weight: 600;
  margin-right: 4px;
  border: 1px solid #e5e7eb;
}

/* Checkmark */
.rc-checkmark {
  width: 16px;
  height: 11px;
  color: #53bdeb;
}

/* Clickable links */
.rc-link {
  color: #027eb5;
  text-decoration: underline;
  word-break: break-all;
}

.rc-link:hover {
  color: #025a82;
}

/* Scroll-to-bottom floating button (US-182) */
.rc-scroll-bottom {
  position: absolute;
  bottom: 80px;
  right: 24px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #fff;
  border: none;
  box-shadow: 0 1px 3px rgba(11, 20, 26, .26);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #54656f;
  z-index: 15;
  transition: all 0.2s;
}

.rc-scroll-bottom:hover {
  background: #f0f2f5;
  box-shadow: 0 2px 6px rgba(11, 20, 26, .3);
}

.rc-scroll-bottom svg {
  width: 20px;
  height: 20px;
}

/* ═══════════════════════════════════════════════════════════════ */
/* WhatsApp Floating Status Bar (US-007)                          */
/* ═══════════════════════════════════════════════════════════════ */

.wa-floating-status {
  position: absolute;
  top: 8px;
  right: 12px;
  z-index: 20;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.3s, color 0.3s, box-shadow 0.3s;
  background: #e5e7eb;
  color: #6b7280;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.wa-floating-status .wa-icon {
  font-size: 14px;
}

.wa-floating-status.wa-connected {
  background: #dcfce7;
  color: #166534;
}

.wa-floating-status.wa-connecting {
  background: #fef3c7;
  color: #92400e;
}

.wa-floating-status.wa-disconnected {
  background: #fde2e2;
  color: #991b1b;
}

/* Responsive */
@media (max-width: 768px) {
  .rc-sidebar {
    width: 100%;
    position: absolute;
    z-index: 10;
    height: 100%;
  }

  .rc-main {
    width: 100%;
  }

  .rc-messages {
    padding: 12px 16px;
  }
}
