/* ═══════════════════════════════════════════════════════════════
   Freedom — chat.css  v3.0
   Inclui layout completo do #page-chat + todos os componentes.
   ═══════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════
   Freedom — chat.css  v3.1
   Paleta: Preto profundo #000000 · Cards #1A1A1A · Texto #FFFFFF · Labels #AAAAAA
   ═══════════════════════════════════════════════════════════════ */

/* ── Tokens do chat alinhados à paleta preta ────────────────── */
:root {
  --mc-bg:          #000000;
  --mc-surface:     #1A1A1A;
  --mc-surface2:    #222222;
  --mc-blue:        #1A1A1A;       /* era #10182E — agora surface */
  --mc-blue-mid:    #AAAAAA;
  --mc-blue-light:  #AAAAAA;
  --mc-yellow:      #00C9B8;       /* teal da marca */
  --mc-yellow-soft: rgba(0,201,184,.12);
  --mc-white:       #FFFFFF;
  --mc-bubble-me:   #2A2A2A;       /* era branco — agora cinza escuro */
  --mc-bubble-out:  rgba(255,255,255,0.06);
  --mc-text:        #FFFFFF;
  --mc-text-soft:   #AAAAAA;
  --mc-border:      rgba(255,255,255,0.08);
  --mc-shadow:      0 2px 8px rgba(0,0,0,0.5);
  --mc-shadow-sm:   0 1px 4px rgba(0,0,0,0.4);
  --mc-radius:      18px;
  --mc-input-h:     60px;
  --mc-header-h:    60px;
  --mc-font:        'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ── #page-chat layout (ID usado no novo index.html) ─────────── */
#page-chat {
  display: none;
  flex-direction: column;
  height: 100dvh;
  background: var(--mc-bg);
  position: relative;
  overflow: hidden;
}
#page-chat.active { display: flex; }

/* ── Unread badge na lista de conversas ──────────────────────── */
.conversa-unread-badge {
  background: var(--mc-yellow) !important;
  color: #fff !important;
  font-size: 10px;
  font-weight: 800;
  border-radius: 10px;
  padding: 2px 8px;
  min-width: 20px;
  text-align: center;
  flex-shrink: 0;
  line-height: 1.6;
}

/* ── Chat header: fundo surface escuro ───────────────────────── */
.chat-header {
  background: var(--mc-surface, #1A1A1A) !important;
  border-bottom: 1px solid var(--mc-border) !important;
}

/* ── Send button: teal da marca ──────────────────────────────── */
.chat-send-btn {
  background: var(--or, #00C9B8) !important;
}
.chat-send-btn:disabled { background: rgba(255,255,255,0.08) !important; }

/* ── Input wrap: borda teal ao focar ─────────────────────────── */
.chat-input-wrap:focus-within {
  border-color: var(--or, #00C9B8) !important;
}

/* ── Tick lido: teal ─────────────────────────────────────────── */
.chat-tick.lido { color: var(--or, #00C9B8) !important; }

/* ════════════════════════════════════════════════════════════
   Freedom — chat_v2.css
   Identidade própria: Azul escuro + Amarelo + Branco
   Mobile-first, WebView-optimized
   ════════════════════════════════════════════════════════════ */

/* ── Variáveis ───────────────────────────────────────────── */


/* ── Fonte ───────────────────────────────────────────────── */

/* ── Reset da página de chat ─────────────────────────────── */


/* ── Header ──────────────────────────────────────────────── */
.chat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--mc-surface, #1A1A1A);
  border-bottom: 1px solid var(--mc-border);
  min-height: var(--mc-header-h);
  box-shadow: 0 2px 12px rgba(0,0,0,0.4);
  z-index: 10;
  flex-shrink: 0;
}

.chat-back {
  background: none;
  border: none;
  color: var(--mc-white);
  font-size: 22px;
  cursor: pointer;
  padding: 6px 8px 6px 2px;
  line-height: 1;
  opacity: 0.9;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}
.chat-back:active { opacity: 0.6; }

.chat-header-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--mc-surface2, #222222);
  color: var(--mc-yellow, #00C9B8);
  font-size: 16px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 2px solid rgba(255,255,255,0.1);
  text-transform: uppercase;
}
.chat-header-avatar.prestador {
  background: rgba(0,201,184,.15);
  color: var(--mc-yellow, #00C9B8);
}
.chat-header-avatar.cliente {
  background: rgba(255,255,255,.1);
  color: #fff;
}

.chat-header-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.chat-header-nome {
  font-size: 15px;
  font-weight: 700;
  color: var(--mc-white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.chat-header-sub {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  color: rgba(255,255,255,0.72);
  font-weight: 500;
  margin-top: 1px;
  min-height: 16px;
}

.chat-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4CD98A;
  flex-shrink: 0;
}
.chat-status-dot.typing-dot-header {
  background: var(--mc-yellow);
  animation: dotPulse 1.2s ease-in-out infinite;
}
@keyframes dotPulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.5; transform: scale(0.7); }
}

/* ── Área de mensagens ───────────────────────────────────── */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 14px 12px 76px; /* bottom é sobrescrito dinamicamente pelo JS via ResizeObserver */
  display: flex;
  flex-direction: column;
  gap: 2px;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

/* Fundo sem padrão — preto limpo */
.chat-messages::before {
  content: none;
}

/* ── Separador de data ───────────────────────────────────── */
.chat-date-sep {
  display: flex;
  justify-content: center;
  margin: 12px 0 6px;
  position: relative;
  z-index: 1;
}
.chat-date-sep span {
  background: rgba(255,255,255,.06);
  color: var(--mc-text-soft);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 20px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* ── Bolha wrapper ───────────────────────────────────────── */
.chat-msg-wrap {
  display: flex;
  flex-direction: column;
  max-width: min(78%, 380px);
  position: relative;
  z-index: 1;
  animation: bubbleIn 0.18s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes bubbleIn {
  from { opacity: 0; transform: translateY(10px) scale(0.94); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}
.chat-msg-wrap[style*="animation: none"] { animation: none !important; }

.chat-msg-wrap.me  { align-self: flex-end;   align-items: flex-end; }
.chat-msg-wrap.out { align-self: flex-start; align-items: flex-start; }

/* Espaçamento entre grupos */
.chat-msg-wrap + .chat-msg-wrap       { margin-top: 4px; }
.chat-msg-wrap.grouped                { margin-top: 1px; }
.chat-msg-wrap.me  + .chat-msg-wrap.out,
.chat-msg-wrap.out + .chat-msg-wrap.me { margin-top: 10px; }

/* ── Bolha principal ─────────────────────────────────────── */
.chat-bubble {
  padding: 9px 13px 6px;
  border-radius: var(--mc-radius);
  word-break: break-word;
  position: relative;
  box-shadow: var(--mc-shadow-sm);
  min-width: 64px;
}

/* Bolha do CLIENTE (eu) — cinza escuro, cauda direita */
.chat-msg-wrap.me .chat-bubble {
  background: var(--mc-bubble-me, #2A2A2A);
  border-bottom-right-radius: 5px;
  box-shadow: 0 1px 4px rgba(0,0,0,.3);
}
.chat-msg-wrap.me.grouped .chat-bubble {
  border-bottom-right-radius: var(--mc-radius);
  border-top-right-radius: 5px;
}

/* Bolha do PRESTADOR (outro) — azul claro */
.chat-msg-wrap.out .chat-bubble {
  background: var(--mc-bubble-out);
  border-bottom-left-radius: 5px;
}
.chat-msg-wrap.out.grouped .chat-bubble {
  border-bottom-left-radius: var(--mc-radius);
  border-top-left-radius: 5px;
}

/* ── Texto da bolha ──────────────────────────────────────── */
.chat-bubble-text {
  font-size: 14.5px;
  line-height: 1.52;
  color: var(--mc-text);
  font-weight: 500;
}
.chat-link {
  color: var(--mc-yellow, #00C9B8);
  text-decoration: underline;
  word-break: break-all;
}

/* ── Meta (hora + tick) ──────────────────────────────────── */
.chat-bubble-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  margin-top: 3px;
}
.chat-msg-time {
  font-size: 10px;
  color: var(--mc-text-soft);
  font-weight: 600;
  white-space: nowrap;
  opacity: 0.8;
}
.chat-msg-tick {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  margin-bottom: -1px;
}
.chat-tick { vertical-align: middle; transition: color 0.3s; }
.chat-tick.sending   { color: #B0BECC; }
.chat-tick.enviado   { color: #B0BECC; }
.chat-tick.entregue  { color: #7A9AB8; }
.chat-tick.lido      { color: var(--mc-yellow); }

/* Flash de status */
@keyframes tickFlash {
  0%,100% { opacity: 1; }
  40%     { opacity: 0.3; }
}
.chat-msg-wrap.tick-changed .chat-msg-tick {
  animation: tickFlash 0.4s ease;
}

/* ── Mensagem de sistema ─────────────────────────────────── */
.chat-system-msg {
  align-self: center;
  background: rgba(255,255,255,0.06);
  color: var(--mc-text-soft);
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 14px;
  border-radius: 20px;
  margin: 8px 0;
  text-align: center;
  max-width: 85%;
  z-index: 1;
  position: relative;
}

/* ── Typing indicator ────────────────────────────────────── */
.chat-typing-bubble {
  display: none;
  align-self: flex-start;
  background: var(--mc-bubble-out);
  border-radius: var(--mc-radius);
  border-bottom-left-radius: 5px;
  padding: 10px 14px;
  box-shadow: var(--mc-shadow-sm);
  gap: 4px;
  align-items: center;
  margin-top: 4px;
  z-index: 1;
  position: relative;
}
.chat-typing-bubble.show { display: flex; animation: bubbleIn 0.2s ease; }
.typing-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--mc-blue-light);
  opacity: 0.5;
  animation: typingBounce 1.4s ease-in-out infinite;
}
.typing-dot:nth-child(2) { animation-delay: 0.18s; }
.typing-dot:nth-child(3) { animation-delay: 0.36s; }
@keyframes typingBounce {
  0%,60%,100% { transform: translateY(0); opacity: 0.5; }
  30%         { transform: translateY(-5px); opacity: 1; }
}

/* ── Imagens ─────────────────────────────────────────────── */
.chat-img-wrap { border-radius: 12px; overflow: hidden; max-width: 220px; }
.chat-img {
  display: block;
  width: 100%;
  max-width: 220px;
  border-radius: 12px;
  cursor: zoom-in;
  transition: opacity 0.2s;
}
.chat-img:active { opacity: 0.85; }
.chat-img-error { font-size: 12px; color: var(--mc-text-soft); font-style: italic; }

/* Lightbox */
.chat-img-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.88);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.chat-img-overlay img { max-width: 94vw; max-height: 88vh; border-radius: 8px; }
.chat-img-overlay-close {
  position: absolute;
  top: 16px; right: 18px;
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  font-size: 20px;
  width: 38px; height: 38px;
  border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}

/* ── Loading skeleton ────────────────────────────────────── */
.chat-loading {
  display: flex;
  justify-content: center;
  padding: 40px 0;
}
.chat-loading-dots {
  display: flex;
  gap: 7px;
  align-items: center;
}
.chat-loading-dots span {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--mc-blue);
  opacity: 0.25;
  animation: ldBounce 1.2s ease-in-out infinite;
}
.chat-loading-dots span:nth-child(2) { animation-delay: 0.18s; }
.chat-loading-dots span:nth-child(3) { animation-delay: 0.36s; }
@keyframes ldBounce {
  0%,60%,100% { opacity: 0.2; transform: scale(0.85); }
  30%         { opacity: 0.8; transform: scale(1.1); }
}

/* Skeleton de mensagens */
.chat-skeleton-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 8px 0;
  z-index: 1;
}
.chat-skeleton {
  height: 42px;
  border-radius: 16px;
  background: linear-gradient(90deg, rgba(255,255,255,0.06) 25%, rgba(255,255,255,0.10) 50%, rgba(255,255,255,0.06) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}
.chat-skeleton.me  { align-self: flex-end;   width: 55%; }
.chat-skeleton.out { align-self: flex-start; width: 45%; }
.chat-skeleton.long { width: 70%; height: 58px; }
@keyframes shimmer {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}

/* ── Estado vazio ────────────────────────────────────────── */
.chat-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 48px 20px;
  text-align: center;
  z-index: 1;
  margin: auto;
}
.chat-empty-icon { font-size: 44px; opacity: 0.6; }
.chat-empty-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--mc-text);
  opacity: 0.7;
}
.chat-empty-sub {
  font-size: 13px;
  color: var(--mc-text-soft);
  max-width: 240px;
  line-height: 1.5;
}

/* ── Botão scroll-to-bottom ──────────────────────────────── */
.scroll-down-btn {
  display: none;
  position: absolute;
  bottom: calc(var(--mc-input-h) + 12px);
  right: 14px;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--mc-blue);
  border: none;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 3px 12px rgba(0,0,0,0.5);
  align-items: center;
  justify-content: center;
  z-index: 20;
  transition: transform 0.15s;
}
.scroll-down-btn.show { display: flex; }
.scroll-down-btn:active { transform: scale(0.92); }
.scroll-badge {
  position: absolute;
  top: -4px; right: -4px;
  background: var(--mc-yellow);
  color: var(--mc-blue);
  font-size: 9px;
  font-weight: 800;
  border-radius: 10px;
  padding: 1px 5px;
  min-width: 16px;
  text-align: center;
}

/* ── Input bar ───────────────────────────────────────────── */
.chat-input-bar {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 8px 10px;
  padding-bottom: max(8px, env(safe-area-inset-bottom));
  background: var(--mc-surface, #1A1A1A);
  border-top: 1px solid var(--mc-border);
  min-height: var(--mc-input-h);
  flex-shrink: 0;
  z-index: 10;
}

.chat-attach-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--mc-surface2, #222222);
  border: 1px solid rgba(255,255,255,.08);
  color: var(--mc-text-soft, #AAAAAA);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  flex-shrink: 0;
  align-self: flex-end;
  margin-bottom: 1px;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s, color 0.15s;
}
.chat-attach-btn:active { background: rgba(255,255,255,.1); color: var(--mc-white,#FFFFFF); }

.chat-input-wrap {
  flex: 1;
  background: var(--mc-bg);
  border-radius: 22px;
  border: 1.5px solid var(--mc-border);
  padding: 0 14px;
  display: flex;
  align-items: center;
  transition: border-color 0.15s;
}
.chat-input-wrap:focus-within {
  border-color: var(--mc-yellow, #00C9B8);
  background: var(--mc-surface2, #222222);
}

.chat-textarea {
  flex: 1;
  border: none;
  background: transparent;
  resize: none;
  font-family: var(--mc-font);
  font-size: 14.5px;
  font-weight: 500;
  color: var(--mc-text);
  padding: 9px 0;
  min-height: 38px;
  max-height: 120px;
  outline: none;
  line-height: 1.45;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.chat-textarea::placeholder { color: var(--mc-text-soft, #AAAAAA); opacity: .6; }

.chat-send-btn {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--mc-yellow, #00C9B8);
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  align-self: flex-end;
  margin-bottom: 1px;
  transition: background 0.15s, transform 0.1s, opacity 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.chat-send-btn:disabled {
  background: rgba(255,255,255,.08);
  opacity: 0.7;
  cursor: default;
}
.chat-send-btn:not(:disabled):active { transform: scale(0.9); }
.chat-send-btn.sending { background: var(--mc-yellow, #00C9B8); opacity: 0.8; }

/* ── Barra bloqueada (serviço finalizado) ────────────────── */
.chat-blocked-bar {
  width: 100%;
  text-align: center;
  padding: 13px;
  color: var(--mc-text-soft);
  font-size: 13px;
  font-weight: 600;
  background: var(--mc-bg);
}

/* ── Botão "Ver mensagens anteriores" ────────────────────── */
.chat-load-more {
  align-self: center;
  background: rgba(255,255,255,.06);
  color: var(--mc-text-soft, #AAAAAA);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 16px;
  border-radius: 20px;
  cursor: pointer;
  margin: 8px 0;
  z-index: 1;
  position: relative;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s;
}
.chat-load-more:active { background: rgba(255,255,255,.1); }

/* ── Lista de conversas ──────────────────────────────────── */
.chat-list-loading {
  display: flex;
  justify-content: center;
  padding: 32px 0;
}
.conversa-item {
  display: flex;
  gap: 12px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--mc-border);
  cursor: pointer;
  transition: background 0.12s;
  -webkit-tap-highlight-color: transparent;
  align-items: center;
  font-family: var(--mc-font);
}
.conversa-item:active { background: var(--mc-bg); }

.conversa-avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: rgba(0,201,184,.15);
  color: var(--mc-yellow, #00C9B8);
  font-size: 18px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  text-transform: uppercase;
}
.conversa-avatar.prestador-av {
  background: var(--mc-surface2, #222222);
  color: var(--mc-yellow, #00C9B8);
}
.conv-unread-dot {
  position: absolute;
  top: -2px; right: -2px;
  background: var(--mc-yellow);
  color: var(--mc-blue);
  font-size: 9px;
  font-weight: 800;
  border-radius: 10px;
  padding: 1px 5px;
  min-width: 16px;
  text-align: center;
}

.conversa-body { flex: 1; min-width: 0; }
.conversa-top-row, .conversa-bottom-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}
.conversa-top-row { margin-bottom: 2px; }
.conversa-nome {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--mc-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.conversa-hora {
  font-size: 11px;
  color: var(--mc-text-soft);
  white-space: nowrap;
  font-weight: 600;
}
.conversa-hora.unread-hora { color: var(--mc-blue-light); font-weight: 700; }
.conversa-preview {
  font-size: 13px;
  color: var(--mc-text-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 4px;
}
.conversa-preview.unread { color: var(--mc-text); font-weight: 700; }
.conversa-unread-badge {
  background: var(--mc-yellow, #00C2FF);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  border-radius: 10px;
  padding: 2px 8px;
  min-width: 20px;
  max-width: 32px;
  text-align: center;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1.5;
}
.conversa-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--mc-text-soft);
  font-weight: 600;
  margin-top: 3px;
}
.conversa-chip.chip-green { color: #2A9D5C; }
.conv-tick { display: inline-flex; align-items: center; flex-shrink: 0; }

/* ── Badge no ícone de chat ──────────────────────────────── */
#chat-badge-cliente,
#chat-badge-prestador {
  display: none;
  background: var(--mc-yellow);
  color: var(--mc-blue);
  font-size: 9px;
  font-weight: 800;
  border-radius: 10px;
  padding: 1px 5px;
  min-width: 16px;
  text-align: center;
  vertical-align: super;
}

/* ── Botão chat em cards ─────────────────────────────────── */
.pedido-chat-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 700;
  color: var(--mc-yellow, #00C9B8);
  background: rgba(0,201,184,.08);
  border: 1.5px solid rgba(0,201,184,.25);
  border-radius: 20px;
  padding: 5px 14px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  font-family: var(--mc-font);
  transition: background 0.15s;
}
.pedido-chat-btn:active { background: rgba(0,201,184,.15); }
.pedido-chat-unread {
  background: var(--mc-yellow, #00C9B8);
  color: #000;
  font-size: 9px;
  font-weight: 800;
  border-radius: 8px;
  padding: 1px 5px;
}

/* ── Indicador offline ───────────────────────────────────── */
.chat-offline-bar {
  background: #E8410A;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  padding: 5px;
  letter-spacing: 0.03em;
}

/* ── Mensagem com falha de envio (FIX-REENVIO) ───────────── */
.chat-msg-wrap.chat-msg-failed .chat-bubble {
  opacity: 0.7;
  border: 1.5px solid #E8410A33;
}
.chat-msg-wrap.chat-msg-failed .chat-bubble::after {
  content: '⚠';
  font-size: 10px;
  color: #E8410A;
  margin-left: 4px;
}
.chat-tick-erro {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  color: #E8410A;
}

/* ── Barra de reenvio ────────────────────────────────────── */
.chat-msg-wrap .chat-retry-btn {
  font-size: 11px;
  color: #E8410A;
  background: none;
  border: none;
  font-weight: 700;
  cursor: pointer;
  padding: 2px 0;
  font-family: var(--mc-font);
}

/* ── WebView / mobile fixes ──────────────────────────────── */
* { -webkit-tap-highlight-color: transparent; }
.chat-textarea, .chat-send-btn, .chat-attach-btn {
  touch-action: manipulation;
}