/* WhatsApp Chat Component */

.whatsapp-chat-shell {
  display: flex;
  height: calc(100vh - 180px);
  border: 1px solid #dee2e6;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.whatsapp-chat-shell .card {
  cursor: default;
}

/* Left panel - Chat list */
.wa-chat-list {
  width: 340px;
  min-width: 340px;
  border-right: 1px solid #dee2e6;
  display: flex;
  flex-direction: column;
  background: #fff;
}

.wa-chat-list-header {
  padding: 0.75rem;
  border-bottom: 1px solid #dee2e6;
}

.wa-chat-list-header input {
  border-radius: 20px;
  background: #f0f2f5;
  border: none;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

.wa-chat-list-header input:focus {
  background: #fff;
  box-shadow: 0 0 0 2px rgba(0, 128, 105, 0.25);
}

.wa-chat-items {
  flex: 1;
  overflow-y: auto;
  padding: 0;
  margin: 0;
  list-style: none;
}

.wa-chat-items::-webkit-scrollbar {
  width: 6px;
}

.wa-chat-items::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.wa-chat-items::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

.wa-chat-items::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

.wa-chat-item {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f0f2f5;
  cursor: pointer;
  transition: background 0.15s;
  gap: 0.75rem;
}

.wa-chat-item:hover {
  background: #f0f2f5;
}

.wa-chat-item.active {
  background: #e9ecef;
}

.wa-chat-avatar {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 50%;
  background: #dfe5e7;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: #8696a0;
  overflow: hidden;
}

.wa-chat-avatar svg {
  width: 22px;
  height: 22px;
}

.wa-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wa-chat-info {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.wa-chat-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: #111b21;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wa-chat-phone {
  font-size: 0.75rem;
  color: #8696a0;
}


.wa-chat-last-msg {
  font-size: 0.85rem;
  color: #8696a0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.wa-chat-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

.wa-chat-time {
  font-size: 0.75rem;
  color: #8696a0;
}

.wa-unread-badge {
  background: #25d366;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Right panel - Messages */
.wa-messages-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #ece5dd;
  min-width: 0;
  position: relative;
}

.wa-messages-header {
  padding: 0.75rem 1rem;
  background: #f0f2f5;
  border-bottom: 1px solid #dee2e6;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.wa-messages-header-name {
  font-weight: 600;
  font-size: 1rem;
  color: #111b21;
}

.wa-messages-body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 4rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.wa-messages-body::-webkit-scrollbar {
  width: 6px;
}

.wa-messages-body::-webkit-scrollbar-track {
  background: transparent;
}

.wa-messages-body::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 3px;
}

.wa-message {
  display: flex;
  flex-direction: column;
  margin-bottom: 2px;
}

.wa-message.sent {
  align-items: flex-end;
}

.wa-message.received {
  align-items: flex-start;
}

.wa-bubble {
  max-width: 65%;
  padding: 6px 12px 8px;
  border-radius: 8px;
  position: relative;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
  word-wrap: break-word;
  font-size: 0.9rem;
  line-height: 1.4;
}

.wa-message.sent .wa-bubble {
  background: #d9fdd3;
  border-top-right-radius: 0;
}

.wa-message.received .wa-bubble {
  background: #fff;
  border-top-left-radius: 0;
}

.wa-bubble-text {
  white-space: pre-wrap;
  word-wrap: break-word;
}

.wa-bubble-text strong { font-weight: 700; }
.wa-bubble-text em { font-style: italic; }
.wa-bubble-text s { text-decoration: line-through; }

.wa-bubble-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: rgba(0, 0, 0, 0.06);
  padding: 0.05em 0.3em;
  border-radius: 4px;
  font-size: 0.88em;
}

.wa-bubble-pre {
  margin: 0.25rem 0;
  padding: 0.5rem 0.7rem;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 6px;
  white-space: pre-wrap;
  font-size: 0.85em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.wa-bubble-pre code {
  background: transparent;
  padding: 0;
}

.wa-bubble-time {
  font-size: 0.68rem;
  color: #667781;
  text-align: right;
  margin-top: 2px;
  margin-left: 12px;
  float: right;
  position: relative;
  top: 5px;
}

/* Message status icons */
.wa-msg-status {
  margin-left: 3px;
  display: inline-block;
  vertical-align: middle;
  position: relative;
  top: -1px;
}
.wa-msg-status svg {
  vertical-align: middle;
}
.wa-msg-status-pending { color: #667781; }
.wa-msg-status-sent { color: #667781; }
.wa-msg-status-delivered { color: #667781; }
.wa-msg-status-read { color: #53bdeb; }
.wa-msg-status-failed { color: #e74c3c; }

/* Compose bar */
.wa-compose {
  padding: 0.75rem 1rem;
  background: #f0f2f5;
  border-top: 1px solid #dee2e6;
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
}

.wa-compose input,
.wa-compose textarea {
  flex: 1;
  border-radius: 20px !important;
  border: none !important;
  padding: 0.6rem 1rem;
  font-size: 0.9rem;
  background: #fff;
  font-family: inherit;
  line-height: 1.4;
  resize: none !important;
  max-height: 120px;
  overflow-y: auto;
  box-shadow: none;
}

.wa-compose input:focus,
.wa-compose textarea:focus {
  outline: none !important;
  box-shadow: none !important;
  border-color: transparent !important;
  --tw-ring-shadow: 0 0 #0000;
  --tw-ring-offset-shadow: 0 0 #0000;
}

.wa-compose button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: #00a884;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s;
  flex-shrink: 0;
}

.wa-compose button:hover {
  background: #008c6f;
}

.wa-compose button:disabled {
  background: #b0b0b0;
  cursor: not-allowed;
}

/* Empty state */
.wa-empty-state {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #8696a0;
  background: #f0f2f5;
}

.wa-empty-state i {
  font-size: 5rem;
  margin-bottom: 1rem;
  opacity: 0.4;
}

.wa-empty-state p {
  font-size: 1rem;
}

/* History loading */
.wa-history-loading {
  text-align: center;
  color: #8696a0;
  font-size: 0.85rem;
  padding: 2rem;
}

/* Media messages */
.wa-media-img {
  max-width: 100%;
  border-radius: 6px;
  cursor: pointer;
  display: block;
  margin-bottom: 4px;
}

.wa-media-video {
  max-width: 100%;
  border-radius: 6px;
  display: block;
  margin-bottom: 4px;
}

.wa-media-audio {
  width: 100%;
  margin-bottom: 4px;
}

.wa-voice-note {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 240px;
  margin-bottom: 4px;
}

.wa-voice-note audio {
  display: none;
}

.wa-voice-play {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 50%;
  border: none;
  background: #00a884;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  padding: 0;
}

.wa-voice-play:hover {
  background: #008c6f;
}

.wa-voice-track {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  height: 24px;
  justify-content: center;
}

.wa-voice-track::before {
  content: "";
  display: block;
  height: 4px;
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.15);
  width: 100%;
}

.wa-voice-bar {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  height: 4px;
  border-radius: 2px;
  background: #00a884;
  width: 0%;
  transition: width 0.1s linear;
}

.wa-voice-duration {
  font-size: 0.7rem;
  color: #667781;
  position: absolute;
  bottom: -2px;
  left: 0;
}

.wa-media-sticker {
  max-width: 180px;
  display: block;
  margin-bottom: 4px;
}

.wa-media-doc {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.04);
  border-radius: 6px;
  color: #027eb5;
  text-decoration: none;
  font-size: 0.85rem;
  margin-bottom: 4px;
}

.wa-media-doc:hover {
  background: rgba(0, 0, 0, 0.08);
}

.wa-media-doc i {
  font-size: 1.25rem;
}

.wa-bubble-unsupported {
  color: #8696a0;
  font-style: italic;
  font-size: 0.85rem;
}

/* Attach button */
.wa-attach-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: #54656f;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.25rem;
  flex-shrink: 0;
  transition: color 0.15s;
}

.wa-attach-btn:hover {
  color: #111b21;
}

/* File preview bar */
.wa-file-preview {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 1rem;
  background: #e8e8e8;
  border-top: 1px solid #dee2e6;
}

.wa-file-preview-thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
}

.wa-file-preview i {
  font-size: 2rem;
  color: #54656f;
}

.wa-file-preview-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.wa-file-preview-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: #111b21;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wa-file-preview-size {
  font-size: 0.75rem;
  color: #667781;
}

.wa-file-preview-remove {
  background: none;
  border: none;
  font-size: 1.25rem;
  color: #667781;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
}

.wa-file-preview-remove:hover {
  color: #111b21;
}

/* Drop zone overlay */
.wa-drop-zone {
  display: none;
  position: absolute;
  inset: 0;
  background: rgba(0, 168, 132, 0.15);
  border: 3px dashed #00a884;
  border-radius: 8px;
  z-index: 10;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 600;
  color: #00a884;
  pointer-events: none;
}

.wa-drop-zone.active {
  display: flex;
}

/* Upload state */
.wa-uploading .wa-compose {
  opacity: 0.6;
  pointer-events: none;
}

/* Session selector */
.wa-session-select {
  border-radius: 6px;
  font-size: 0.85rem;
  padding: 0.25rem 0.5rem;
  border: 1px solid #dee2e6;
}

/* Date dividers */
.wa-date-divider {
  display: flex;
  justify-content: center;
  margin: 12px 0;
}

.wa-date-divider span {
  background: rgba(255, 255, 255, 0.9);
  color: rgba(0, 0, 0, 0.6);
  font-size: 0.8rem;
  padding: 4px 12px;
  border-radius: 6px;
  box-shadow: 0 0 1px 1px rgba(0, 0, 0, 0.06), 0 1px 0 0 rgba(0, 0, 0, 0.05);
}

/* Group chat sender name */
.wa-bubble-sender {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: #1f7aec; /* default, overridden by inline style per contact */
  margin-bottom: 2px;
}

/* Raw JSON dialog (easter egg) */
.wa-json-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wa-json-dialog {
  background: #1e1e1e;
  color: #d4d4d4;
  border-radius: 8px;
  width: 600px;
  max-width: 90vw;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.wa-json-dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #333;
  font-weight: 600;
  font-size: 0.9rem;
}

.wa-json-dialog-close {
  background: none;
  border: none;
  color: #d4d4d4;
  font-size: 1.2rem;
  cursor: pointer;
}

.wa-json-dialog pre {
  margin: 0;
  padding: 16px;
  overflow: auto;
  flex: 1;
  font-family: monospace;
  font-size: 0.75rem;
  white-space: pre-wrap;
  word-break: break-all;
  user-select: text;
}

/* Chat dialog (modal) */
.wa-chat-dialog-body {
  height: 70vh;
  display: flex;
  flex-direction: column;
}

.wa-chat-dialog-body .wa-messages-panel {
  flex: 1;
  border-radius: 0;
}

.wa-chat-dialog-body .wa-messages-body {
  padding: 1rem 2rem;
}

.wa-loading-spinner {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 0.2em solid currentColor;
  border-right-color: transparent;
  animation: wa-spin 0.75s linear infinite;
  color: #25d366;
}

@keyframes wa-spin {
  to { transform: rotate(360deg); }
}

/* Per-message action menu (delete / edit) */
.wa-bubble {
  /* Ensure the absolute-positioned menu trigger anchors correctly */
}

/* Message action menu — WhatsApp Web style */
.wa-msg-menu {
  position: absolute;
  top: 0;
  right: 0;
  opacity: 0;
  transition: opacity 0.12s ease-in;
  z-index: 5;
  pointer-events: none;
}

.wa-message.received .wa-msg-menu {
  right: 0;
  left: auto;
}

.wa-bubble:hover .wa-msg-menu,
.wa-msg-menu:focus-within,
.wa-msg-menu:has(.wa-msg-menu-dropdown.open) {
  opacity: 1;
  pointer-events: auto;
}

/* Gradient fade behind the chevron so it blends with bubble */
.wa-msg-menu::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 42px;
  height: 32px;
  border-radius: 0 8px 0 0;
  pointer-events: none;
}

.wa-message.sent .wa-msg-menu::before {
  background: linear-gradient(to left, #d9fdd3 40%, transparent);
}

.wa-message.received .wa-msg-menu::before {
  background: linear-gradient(to left, #fff 40%, transparent);
}

.wa-msg-menu-trigger {
  position: relative;
  z-index: 1;
  width: 28px;
  height: 28px;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
  color: #54656f;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 0;
  margin: 2px 2px 0 0;
}

.wa-msg-menu-trigger:hover {
  color: #111b21;
}

/* Chevron icon via CSS instead of text "⋮" */
.wa-msg-menu-trigger::after {
  content: "";
  display: block;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
}

.wa-msg-menu-dropdown {
  display: none;
  position: absolute;
  top: 28px;
  right: 0;
  min-width: 190px;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
  padding: 6px 0;
  z-index: 100;
  overflow: hidden;
}

.wa-message.received .wa-msg-menu-dropdown {
  right: 0;
  left: auto;
}

.wa-msg-menu-dropdown.open {
  display: block;
}

.wa-msg-menu-item {
  display: block !important;
  width: 100% !important;
  padding: 10px 20px !important;
  text-align: left !important;
  background: transparent !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  font-size: 0.9rem !important;
  color: #111b21 !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  font-family: inherit !important;
  line-height: 1.4 !important;
}

.wa-msg-menu-item:hover {
  background: #f0f2f5 !important;
}

/* "Editing message" banner above the compose box */
.wa-edit-banner {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 1rem;
  background: #f0f2f5;
  border-top: 1px solid #dee2e6;
  border-left: 3px solid #00a884;
  font-size: 0.85rem;
  color: #111b21;
}

.wa-edit-banner > i {
  color: #00a884;
  font-size: 1rem;
  flex-shrink: 0;
}

.wa-edit-banner-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.wa-edit-banner-title {
  font-weight: 600;
  color: #00a884;
  font-size: 0.8rem;
}

.wa-edit-banner-preview {
  color: #54656f;
  font-size: 0.8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wa-edit-banner-cancel {
  background: transparent;
  border: none;
  color: #54656f;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  flex-shrink: 0;
}

.wa-edit-banner-cancel:hover {
  color: #111b21;
}

/* Reply bar — shown above the compose area when replying */
.wa-reply-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  background: #f0f2f5;
  border-top: 1px solid #e9edef;
}

.wa-reply-bar-accent {
  width: 4px;
  align-self: stretch;
  background: #00a884;
  border-radius: 2px;
  flex-shrink: 0;
}

.wa-reply-bar-body {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.wa-reply-bar-sender {
  font-size: 0.8rem;
  font-weight: 600;
  color: #00a884;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wa-reply-bar-text {
  font-size: 0.82rem;
  color: #54656f;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wa-reply-bar-cancel {
  background: none;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  cursor: pointer;
  color: #54656f;
  font-size: 1.2rem;
  padding: 0 4px;
  flex-shrink: 0;
  line-height: 1;
}

.wa-reply-bar-cancel:hover {
  color: #111b21;
}

/* Quoted / reply preview inside bubble */
.wa-quoted-msg {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  border-left: 4px solid #00a884;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 4px;
  margin-bottom: 6px;
  overflow: hidden;
  max-width: 100%;
}

.wa-message.sent .wa-quoted-msg {
  border-left-color: #0a6e4e;
}

/* Text body (sender + preview text) */
.wa-quoted-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 0;
  min-width: 0;
  padding: 5px 10px;
}

.wa-quoted-sender {
  font-size: 0.8rem;
  font-weight: 600;
  color: #00a884;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wa-message.sent .wa-quoted-sender {
  color: #0a6e4e;
}

.wa-quoted-text {
  font-size: 0.82rem;
  color: #54656f;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* Thumbnail on the right side of the quoted preview */
.wa-quoted-thumb {
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  object-fit: cover;
  display: block;
  border-radius: 0 4px 4px 0;
}

/* Placeholder shown when thumb data is absent */
.wa-quoted-thumb-placeholder {
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.12);
  border-radius: 0 4px 4px 0;
  font-size: 1.4rem;
  color: #54656f;
}

/* Flash highlight when scrolling to original */
.wa-msg-highlight .wa-bubble {
  animation: wa-highlight-flash 1.5s ease-out;
}

@keyframes wa-highlight-flash {
  0%   { box-shadow: 0 0 0 4px rgba(0, 168, 132, 0.5); }
  100% { box-shadow: none; }
}

/* @Mentions inside bubbles */
.wa-mention {
  color: #027eb5;
  font-weight: 500;
  cursor: default;
}

.wa-message.sent .wa-mention {
  color: #0a6e4e;
}

/* Clickable links inside bubbles */
.wa-bubble-link {
  color: #027eb5;
  text-decoration: underline;
  word-break: break-all;
}

.wa-message.sent .wa-bubble-link {
  color: #0a6e4e;
}

.wa-bubble-link:hover {
  opacity: 0.8;
}

/* Reactions bar */
.wa-reactions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: -10px;
  padding: 0 6px;
  position: relative;
  z-index: 2;
}

.wa-message.sent .wa-reactions {
  justify-content: flex-end;
  padding-right: 10px;
}

.wa-message.received .wa-reactions {
  justify-content: flex-start;
  padding-left: 10px;
}

.wa-reaction-pill {
  display: inline-flex;
  align-items: center;
  background: #fff;
  border: 1.5px solid #e9edef;
  border-radius: 20px;
  padding: 2px 5px;
  font-size: 0.75rem;
  line-height: 1;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
  cursor: default;
  user-select: none;
  gap: 2px;
}

/* Deleted (revoked) bubble */
.wa-bubble-deleted {
  opacity: 0.65;
}

.wa-bubble-deleted-text {
  text-decoration: line-through;
  color: #8696a0;
}

/* Edited label inside bubble */
.wa-bubble-edited {
  display: inline-block;
  font-size: 0.7rem;
  color: #8696a0;
  margin-right: 6px;
  cursor: pointer;
  font-style: italic;
  vertical-align: middle;
}

.wa-bubble-edited:hover {
  color: #54656f;
  text-decoration: underline;
}

/* Edit history popover */
.wa-edit-history-popover {
  position: absolute;
  z-index: 9999;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  min-width: 260px;
  max-width: 360px;
  overflow: hidden;
}

.wa-edit-history-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: #54656f;
  padding: 10px 14px 6px;
  border-bottom: 1px solid #f0f2f5;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.wa-edit-history-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 14px;
  border-bottom: 1px solid #f0f2f5;
}

.wa-edit-history-row:last-child {
  border-bottom: none;
}

.wa-edit-history-current {
  background: #f0fdf4;
}

.wa-edit-history-version {
  font-size: 0.7rem;
  font-weight: 600;
  color: #8696a0;
  min-width: 36px;
  padding-top: 2px;
  flex-shrink: 0;
}

.wa-edit-history-current .wa-edit-history-version {
  color: #00a884;
}

.wa-edit-history-text {
  font-size: 0.88rem;
  color: #111b21;
  line-height: 1.4;
  word-break: break-word;
}
