.chat-messages .wa-message-row {
  padding-inline: 7px;
  margin-top: 5px;
}
.wa-message-row .wa-message-column {
  min-width: 0;
  max-width: min(76%, 620px);
}
.wa-message-row .wa-message-bubble {
  --bubble-color: #fff;
  position: relative;
  padding: 6px 9px 5px;
  border-radius: 8px;
  background: var(--bubble-color);
  color: #111b21;
  box-shadow: 0 1px 1px #0b141a20;
  min-width: 0;
  overflow-wrap: anywhere;
}
.wa-message-row .wa-outgoing { --bubble-color: #d9fdd3; border-top-right-radius: 2px; }
.wa-message-row .wa-incoming { border-top-left-radius: 2px; }
.wa-message-bubble::before {
  content: '';
  position: absolute;
  top: 0;
  width: 8px;
  height: 12px;
  background: var(--bubble-color);
  pointer-events: none;
}
.wa-incoming::before { left: -7px; clip-path: polygon(0 0, 100% 0, 100% 100%); }
.wa-outgoing::before { right: -7px; clip-path: polygon(0 0, 100% 0, 0 100%); }
.wa-message-bubble .wa-message-text { font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.wa-message-bubble .message-status { color: #667781; font-size: 11px; line-height: 16px; margin-top: 2px; gap: 4px; }
.wa-message-bubble.wa-text-only { display: flex; flex-wrap: wrap; align-items: flex-end; column-gap: 10px; }
.wa-text-only > .wa-message-text { flex: 1 1 auto; min-width: 0; }
.wa-text-only > .message-status { margin-left: auto; margin-bottom: -2px; }
.wa-message-bubble .sender-badge { font-size: 9px; max-width: 100px; }
.wa-message-bubble .wa-voice-player { width: 280px; max-width: 100%; min-width: min(200px, 100%); padding: 5px 0; }
.wa-message-bubble img, .wa-message-bubble video { max-width: 100%; }
.dark .wa-message-row .wa-message-bubble { --bubble-color: #202c33; color: #e9edef; }
.dark .wa-message-row .wa-outgoing { --bubble-color: #005c4b; }
.dark .wa-message-bubble .message-status { color: #a7b7bd; }
.dark .wa-message-bubble .wa-message-text a { color: #7ad9c4; }
@media (max-width: 640px) {
  .wa-message-row .wa-message-column { max-width: 90%; }
  .wa-message-bubble .wa-message-text { font-size: 15px; }
  .wa-message-bubble .message-status { font-size: 10px; gap: 3px; }
}
.wa-message-row .wa-message-column.wa-photo-column { width:330px;max-width:85%; }
.wa-message-row .wa-message-bubble.wa-photo-message { padding:3px;border-radius:9px; }
.wa-photo-attachment { margin:0;max-width:100%;overflow:hidden;border-radius:6px; }
.wa-photo-open { display:block;width:100%;border:0;padding:0;background:transparent;cursor:pointer; }
.wa-photo-open:focus-visible { outline:2px solid #53bdeb;outline-offset:-3px; }
.wa-message-bubble .wa-photo-image { display:block;width:100%;height:auto;max-height:520px;object-fit:cover;border:0;border-radius:6px; }
.wa-photo-message > .wa-message-text { display:block;padding:6px 6px 0; }
.wa-photo-message > .message-status { margin:2px 5px 1px; }
.wa-photo-message > p:not(.message-status), .wa-photo-message > .border-l-2 { margin:4px 6px; }
.wa-photo-overlay .wa-photo-attachment::after { content:'';position:absolute;inset:auto 3px 3px;height:44px;border-radius:0 0 6px 6px;background:linear-gradient(transparent,rgba(0,0,0,.58));pointer-events:none; }
:root .wa-message-row .wa-message-bubble.wa-photo-overlay > .message-status { position:absolute;right:9px;bottom:6px;margin:0;color:white;text-shadow:0 1px 2px #0009;pointer-events:none; }
:root .wa-photo-overlay > .message-status .sender-badge,
:root .wa-photo-overlay > .message-status > span { color:inherit; }
.wa-message-row .wa-message-column.wa-voice-column { width:340px;max-width:90%; }
.wa-message-row .wa-message-bubble.wa-voice-message { display:flex;flex-wrap:wrap;align-items:center;padding:7px 9px 4px;column-gap:6px; }
.wa-voice-message > :not(.wa-voice-attachment):not(.message-status):not(.wa-message-menu-button) { flex-basis:100%; }
.wa-voice-message .wa-voice-attachment, .wa-voice-message .wa-transcription-controls { display:contents; }
.wa-voice-message > .message-status { margin:0 0 0 auto;order:5;min-height:24px; }
.wa-message-row .wa-voice-player { display:flex;align-items:center;gap:9px;position:relative;flex-wrap:wrap;width:100%;min-width:0;max-width:none;padding:2px 0 0;flex-basis:100%;order:2; }
.wa-voice-avatar { display:block;position:relative;flex-shrink:0; }
.wa-voice-avatar > svg { position:absolute;bottom:-2px;right:-4px;color:#53bdeb;fill:var(--bubble-color,#fff);stroke-width:2.5;filter:drop-shadow(0 0 1px var(--bubble-color,#fff)); }
.wa-voice-play { display:flex;align-items:center;justify-content:center;flex-shrink:0;width:32px;height:44px;color:#7c9099;border:0;padding:0;background:transparent; }
.wa-voice-play:focus-visible,.wa-voice-speed:focus-visible { outline:2px solid #53bdeb;outline-offset:1px;border-radius:4px; }
.wa-voice-track { flex:1;min-width:0; }
.wa-voice-seek { height:34px;position:relative; }
.wa-voice-wave { width:100%;height:32px;display:block;fill:#84969d;opacity:.65; }
.wa-voice-wave .wa-wave-played { fill:#53bdeb; }
.wa-voice-seek input { position:absolute;inset:0;width:100%;height:34px;margin:0;padding:0;appearance:none;-webkit-appearance:none;background:transparent;cursor:pointer; }
.wa-voice-seek input::-webkit-slider-runnable-track { height:3px;background:transparent; }
.wa-voice-seek input::-webkit-slider-thumb { appearance:none;-webkit-appearance:none;width:12px;height:12px;margin-top:-4.5px;border:0;border-radius:50%;background:#53bdeb; }
.wa-voice-seek input::-moz-range-track { background:transparent;height:3px; }
.wa-voice-seek input::-moz-range-thumb { width:12px;height:12px;border:0;border-radius:50%;background:#53bdeb; }
.wa-voice-seek input:focus-visible { outline:2px solid #53bdeb;border-radius:4px; }
.wa-voice-details { display:flex;align-items:center;justify-content:space-between;color:#7c9099;font-size:11px;line-height:18px; }
.wa-voice-speed { min-width:30px;min-height:24px;padding:0 3px;margin-top:-3px;color:inherit;font-size:11px;font-weight:600;border-radius:10px;background:rgba(127,147,155,.12); }
.wa-transcribe-button { display:inline-flex;align-items:center;gap:4px;border:0;background:none;padding:3px 0;color:#008b70;font-size:12px;line-height:20px;order:4;cursor:pointer; }
.wa-transcription-result { flex-basis:100%;width:100%;order:3;margin-bottom:3px; }
.wa-voice-error { flex-basis:100%;font-size:11px; }
.wa-voice-error a { text-decoration:underline; }
.dark .wa-transcribe-button, html.crm-glass .wa-transcribe-button, html.crm-violet .wa-transcribe-button { color:#75dfb7; }
.dark .wa-voice-play,.dark .wa-voice-details,html.crm-glass .wa-voice-play,html.crm-glass .wa-voice-details,html.crm-violet .wa-voice-play,html.crm-violet .wa-voice-details { color:#b2c5cc; }
@media(max-width:640px) {
  .wa-message-row .wa-message-column.wa-photo-column { width:300px;max-width:85%; }
  .wa-message-bubble .wa-photo-image { max-height:470px; }
  .wa-message-row .wa-message-column.wa-voice-column { width:320px;max-width:94%; }
  .wa-photo-message > .message-status, .wa-voice-message > .message-status { font-size:11px; }
  .wa-photo-message .sender-badge, .wa-voice-message .sender-badge { font-size:10px; }
}
