/* ==========================================================================
   WhatsApp Authentic Theme for Chatwoot (Compact & Fit to Screen Edition)
   - Ultra space-efficient layout matching native WhatsApp Mobile & Desktop
   - Tight line-height, compact 13px typography, micro bubble padding
   - High-density conversation cards (56px) allowing 10-12 chats on mobile
   - Ultra-compact reply box (80px vs 239px) restoring full viewport to chat
   - 100dvh true mobile fit-to-screen with zero wasted vertical space
   ========================================================================== */

@import url("https://fonts.googleapis.com/css2?family=Hind+Siliguri:wght@400;500;600;700&display=swap");

:root {
  --wa-font: "Hind Siliguri", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --wa-bg-color: #efeae2;
  --wa-header-bg: #f0f2f5;
  --wa-reply-bg: #f0f2f5;
  --wa-border: #d1d7db;
  --wa-text-primary: #111b21;
  --wa-text-secondary: #667781;
  --wa-incoming-bg: #ffffff;
  --wa-outgoing-bg: #d9fdd3;
  --wa-green: #00a884;
  --wa-green-dark: #008069;
  --wa-green-hover: #008f6f;
  --wa-unread-badge: #25d366;
  --wa-read-tick: #53bdeb;
  --wa-note-bg: #fef9c3;
  --wa-note-border: #eab308;
  --wa-note-text: #713f12;
}

.dark {
  --wa-bg-color: #0c1317;
  --wa-header-bg: #202c33;
  --wa-reply-bg: #202c33;
  --wa-border: #222d34;
  --wa-text-primary: #e9edef;
  --wa-text-secondary: #8696a0;
  --wa-incoming-bg: #202c33;
  --wa-outgoing-bg: #005c4b;
  --wa-green: #00a884;
  --wa-green-dark: #005c4b;
  --wa-green-hover: #02906f;
  --wa-unread-badge: #00a884;
  --wa-read-tick: #53bdeb;
  --wa-note-bg: #3f3513;
  --wa-note-border: #eab308;
  --wa-note-text: #fef08a;
}

/* 0. Hide update banner to regain top screen space */
.woot-banner,
.banner {
  display: none !important;
}

/* Global Font & Polish */
body,
#app,
.conversation-details-wrap,
.conversations-list-wrap,
.reply-box,
input,
textarea,
button {
  font-family: var(--wa-font) !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 100dvh Fit to Screen Lock */
html, body, #app {
  height: 100% !important;
  height: 100dvh !important;
  max-height: 100dvh !important;
  overflow: hidden !important;
}

.conversation-details-wrap {
  height: 100% !important;
  height: 100dvh !important;
  max-height: 100dvh !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}

/* --- WhatsApp Doodle Wallpaper Background --- */
.conversation-panel,
.conversation-panel > ul,
.conversation-panel ul.bg-n-surface-1,
.conversation-panel .bg-n-surface-1,
.conversation-details-wrap,
.conversation-details-wrap .flex.h-full.min-h-0,
.conversation-details-wrap .flex.h-full.min-h-0 > div,
.conversation-details-wrap [class*="EmptyState"] {
  background-color: #efeae2 !important;
  background-image: url("/whatsapp_bg.png?v=3") !important;
  background-repeat: repeat !important;
  background-size: 380px auto !important;
  background-attachment: local !important;
}

.dark .conversation-panel,
.dark .conversation-panel > ul,
.dark .conversation-details-wrap,
.dark .conversation-details-wrap .flex.h-full.min-h-0,
.dark .conversation-details-wrap .flex.h-full.min-h-0 > div,
.dark .conversation-details-wrap [class*="EmptyState"] {
  background-color: #0c1317 !important;
  background-image: url("/whatsapp_bg_dark.png?v=3") !important;
}

.conversation-panel > ul,
.conversation-panel ul.bg-n-surface-1,
.conversation-details-wrap [class*="EmptyState"] [class*="EmptyStateMessage"] {
  background-color: transparent !important;
}

/* Hide agent avatar next to outgoing message bubbles for pure WhatsApp look */
.message-bubble-container .\[grid-area\:avatar\] {
  display: none !important;
}

.message-bubble-container .grid.grid-cols-\[1fr_24px\] {
  grid-template-columns: 1fr !important;
}

/* ==========================================================================
   MESSAGE STREAM & BUBBLES (High-Density WhatsApp Fit)
   ========================================================================== */
.conversation-panel {
  flex: 1 1 0% !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  padding: 4px 6px !important;
}

.conversation-panel > ul {
  gap: 1.5px !important;
  padding: 2px 4px !important;
  margin: 0 !important;
}

/* Tight vertical margin between messages: 1.5px */
.message-bubble-container,
.conversation-panel > ul > li,
.conversation-panel li,
[class*="MessageBubbleContainer"] {
  margin-top: 1.5px !important;
  margin-bottom: 1.5px !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

/* Customer / Contact Bubble (Incoming / Left) */
.left-bubble {
  position: relative !important;
  background-color: var(--wa-incoming-bg) !important;
  color: var(--wa-text-primary) !important;
  border-radius: 7.5px !important;
  border-top-left-radius: 0px !important;
  box-shadow: 0 1px 0.5px rgba(11, 20, 26, 0.13) !important;
  padding: 4px 8px 5px 8px !important;
  max-width: 82% !important;
  font-size: 13.2px !important;
  line-height: 1.32 !important;
}

.left-bubble::before {
  content: "" !important;
  position: absolute !important;
  top: 0 !important;
  left: -8px !important;
  width: 8px !important;
  height: 13px !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns=http://www.w3.org/2000/svg viewBox=0 0 8 13%3E%3Cpath fill=%23ffffff d=M1.533 3.568L8 12.193V0H2.812C1.042 0 .474 1.34 1.533 3.568z/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-size: contain !important;
  pointer-events: none !important;
}

.dark .left-bubble::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns=http://www.w3.org/2000/svg viewBox=0 0 8 13%3E%3Cpath fill=%23202c33 d=M1.533 3.568L8 12.193V0H2.812C1.042 0 .474 1.34 1.533 3.568z/%3E%3C/svg%3E") !important;
}

/* Agent / Bot Bubble (Outgoing / Right) */
.right-bubble {
  position: relative !important;
  background-color: var(--wa-outgoing-bg) !important;
  color: var(--wa-text-primary) !important;
  border-radius: 7.5px !important;
  border-top-right-radius: 0px !important;
  box-shadow: 0 1px 0.5px rgba(11, 20, 26, 0.13) !important;
  padding: 4px 8px 5px 8px !important;
  max-width: 82% !important;
  font-size: 13.2px !important;
  line-height: 1.32 !important;
}

.right-bubble::before {
  content: "" !important;
  position: absolute !important;
  top: 0 !important;
  right: -8px !important;
  width: 8px !important;
  height: 13px !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns=http://www.w3.org/2000/svg viewBox=0 0 8 13%3E%3Cpath fill=%23d9fdd3 d=M6.467 3.568L0 12.193V0h5.188c1.77 0 2.338 1.34 1.279 3.568z/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-size: contain !important;
  pointer-events: none !important;
}

.dark .right-bubble::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns=http://www.w3.org/2000/svg viewBox=0 0 8 13%3E%3Cpath fill=%23005c4b d=M6.467 3.568L0 12.193V0h5.188c1.77 0 2.338 1.34 1.279 3.568z/%3E%3C/svg%3E") !important;
}

/* Consecutive Grouped Messages: remove tail */
.group-with-next + .message-bubble-container .left-bubble::before,
.group-with-next + .message-bubble-container .right-bubble::before {
  display: none !important;
}

.group-with-next + .message-bubble-container .left-bubble {
  border-top-left-radius: 7.5px !important;
}

.group-with-next + .message-bubble-container .right-bubble {
  border-top-right-radius: 7.5px !important;
}

/* Typography Inside Bubbles: Tight, space-efficient, zero paragraph waste */
.left-bubble,
.right-bubble,
.left-bubble *,
.right-bubble *,
.prose-bubble,
.prose-bubble * {
  font-size: 13.2px !important;
  line-height: 1.32 !important;
  font-family: var(--wa-font) !important;
}

.left-bubble p,
.right-bubble p,
.prose-bubble p {
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.32 !important;
}

.left-bubble p + p,
.right-bubble p + p {
  margin-top: 3px !important;
}

.left-bubble a,
.right-bubble a {
  color: #027eb5 !important;
  text-decoration: underline !important;
}

/* Timestamps & Read Ticks (Compact WhatsApp style) */
.left-bubble time,
.right-bubble time,
.left-bubble .text-xs,
.right-bubble .text-xs,
.left-bubble [class*="time"],
.right-bubble [class*="time"] {
  font-size: 10px !important;
  line-height: 12px !important;
  color: var(--wa-text-secondary) !important;
  font-weight: 400 !important;
  margin-top: 1px !important;
}

.right-bubble [class*="i-lucide-check-check"].text-\[\#7EB6FF\],
.right-bubble svg.text-\[\#7EB6FF\],
.right-bubble [class*="text-\[\#7EB6FF\]"],
.message-bubble-container .status-icon svg {
  color: var(--wa-read-tick) !important;
}

/* Private Notes (Internal Staff Sticky Card) */
.left-bubble.bg-n-solid-amber,
.right-bubble.bg-n-solid-amber,
[class*="bg-n-solid-amber"] {
  background-color: var(--wa-note-bg) !important;
  color: var(--wa-note-text) !important;
  border-left: 3px solid var(--wa-note-border) !important;
  border-radius: 6px !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08) !important;
  padding: 4px 8px !important;
}

.left-bubble.bg-n-solid-amber::before,
.right-bubble.bg-n-solid-amber::before,
[class*="bg-n-solid-amber"]::before {
  display: none !important;
}

/* Quoted Reply inside Bubbles */
.left-bubble .bg-n-alpha-black1,
.right-bubble .bg-n-alpha-black1 {
  background-color: rgba(0, 0, 0, 0.05) !important;
  border-left: 3px solid var(--wa-green) !important;
  border-radius: 4px !important;
  padding: 3px 6px !important;
  margin-bottom: 3px !important;
}

/* ==========================================================================
   SYSTEM ACTIVITY & AUTOMATION PILLS (Micro-Compact WhatsApp Style)
   ========================================================================== */
.conversation-panel li:has(.bg-n-alpha-1) {
  margin-top: 1px !important;
  margin-bottom: 1px !important;
  padding: 0 !important;
}

.conversation-panel .bg-n-alpha-1.text-n-slate-11,
.conversation-panel [class*="ActivityBubble"],
.conversation-panel li .rounded-xl.bg-n-alpha-1,
.conversation-panel li .rounded-lg.bg-n-alpha-1 {
  background-color: rgba(255, 255, 255, 0.88) !important;
  color: var(--wa-text-secondary) !important;
  font-size: 10px !important;
  line-height: 13px !important;
  font-weight: 500 !important;
  border-radius: 5px !important;
  box-shadow: 0 1px 0.5px rgba(11, 20, 26, 0.08) !important;
  padding: 1.5px 7px !important;
  text-align: center !important;
  margin: 1px auto !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 3px !important;
  max-width: 85% !important;
}

.conversation-panel li .rounded-xl.bg-n-alpha-1 span,
.conversation-panel li .rounded-lg.bg-n-alpha-1 span {
  font-size: 10px !important;
  line-height: 13px !important;
}

.dark .conversation-panel .bg-n-alpha-1.text-n-slate-11,
.dark .conversation-panel [class*="ActivityBubble"],
.dark .conversation-panel li .rounded-xl.bg-n-alpha-1,
.dark .conversation-panel li .rounded-lg.bg-n-alpha-1 {
  background-color: #182229 !important;
  color: #8696a0 !important;
}

/* ==========================================================================
   CONVERSATION HEADER (Ultra-Compact WhatsApp Header: 48px Height)
   ========================================================================== */
.conversation-details-wrap > div:first-child,
.conversation-header,
div[class*="ConversationHeader"] {
  background-color: var(--wa-header-bg) !important;
  border-bottom: 1px solid var(--wa-border) !important;
  height: 48px !important;
  min-height: 48px !important;
  max-height: 48px !important;
  padding: 0 8px !important;
  display: flex !important;
  align-items: center !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  justify-content: space-between !important;
}

/* First child containing Back button, Avatar, User Name */
.conversation-details-wrap > div:first-child > div:first-child,
.conversation-header > div:first-child {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
  width: auto !important;
  overflow: hidden !important;
  gap: 6px !important;
}

.conversation-details-wrap > div:first-child > div:first-child button {
  padding: 2px 4px !important;
  font-size: 13px !important;
  flex-shrink: 0 !important;
}

.conversation-details-wrap > div:first-child [role="img"],
.conversation-header [role="img"] {
  width: 32px !important;
  height: 32px !important;
  border-radius: 50% !important;
  flex-shrink: 0 !important;
}

.conversation-details-wrap .text-n-slate-12,
.conversation-header .text-n-slate-12 {
  color: var(--wa-text-primary) !important;
  font-weight: 600 !important;
  font-size: 13.5px !important;
  line-height: 16px !important;
}

.conversation-header .conversation--header--actions,
.conversation-header .text-n-slate-11 {
  color: var(--wa-text-secondary) !important;
  font-size: 11px !important;
}

/* Second child containing Resolve & Actions */
.conversation-details-wrap > div:first-child > .header-actions-wrap,
.conversation-details-wrap > div:first-child > div:last-child:not(:first-child),
.conversation-header > div:last-child:not(:first-child) {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  flex: 0 0 auto !important;
  width: auto !important;
  gap: 4px !important;
}

.conversation-header button,
.conversation-details-wrap > div:first-child button {
  font-size: 11.5px !important;
}

/* ==========================================================================
   REPLY COMPOSER (Ultra-Compact WhatsApp Pill)
   ========================================================================== */
.reply-box,
.resizable-editor-wrapper,
div[class*="ReplyBox"] {
  background-color: var(--wa-reply-bg) !important;
  border-top: 1px solid var(--wa-border) !important;
  padding: 2px 6px !important;
}

/* Compact tab bar */
.reply-box .h-\[3\.25rem\],
.reply-box > div:first-child {
  height: 26px !important;
  min-height: 26px !important;
  padding: 1px 4px !important;
}

.reply-box .h-\[3\.25rem\] button,
.reply-box > div:first-child button {
  padding: 2px 6px !important;
  font-size: 11px !important;
  height: 20px !important;
}

/* Compact editor */
.reply-box .reply-box__top {
  min-height: unset !important;
  padding: 1px 4px !important;
}

.reply-box .ProseMirror,
.reply-box .input.popover-prosemirror-menu,
.reply-box [class*="WootMessageEditor"] {
  background-color: var(--wa-incoming-bg) !important;
  color: var(--wa-text-primary) !important;
  border: 1px solid var(--wa-border) !important;
  border-radius: 18px !important;
  padding: 4px 10px !important;
  font-size: 13px !important;
  line-height: 1.32 !important;
  min-height: 32px !important;
  max-height: 70px !important;
  height: auto !important;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04) !important;
}

.reply-box .ProseMirror:focus {
  outline: none !important;
  border-color: var(--wa-green) !important;
}

/* Compact bottom toolbar */
.reply-box .flex.justify-between.p-3,
.reply-box > div:last-child {
  padding: 2px 4px 2px 4px !important;
  height: 32px !important;
}

.reply-box > div:last-child button {
  padding: 2px 4px !important;
  font-size: 11.5px !important;
}

/* Send Button */
.reply-box .right-wrap button[type="submit"],
.reply-box button[type="submit"]:not(.bg-n-amber-9) {
  background-color: var(--wa-green) !important;
  color: #ffffff !important;
  border-radius: 15px !important;
  font-weight: 600 !important;
  font-size: 11.5px !important;
  padding: 3px 10px !important;
  height: 26px !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) !important;
}

.reply-box .right-wrap button[type="submit"]:hover,
.reply-box button[type="submit"]:not(.bg-n-amber-9):hover {
  background-color: var(--wa-green-hover) !important;
}

/* ==========================================================================
   CONVERSATION LIST (High-Density WhatsApp Inbox List: 56px per Item)
   ========================================================================== */
.conversations-list-wrap {
  background-color: var(--wa-incoming-bg) !important;
  border-right: 1px solid var(--wa-border) !important;
}

.conversations-list-wrap > div:first-child,
.conversations-list-wrap [class*="ChatListHeader"] {
  background-color: var(--wa-header-bg) !important;
  border-bottom: 1px solid var(--wa-border) !important;
  height: 46px !important;
  min-height: 46px !important;
}

.conversation {
  background-color: var(--wa-incoming-bg) !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
  padding: 5px 10px !important;
  min-height: 54px !important;
  height: auto !important;
  transition: background-color 0.1s ease !important;
  display: flex !important;
  align-items: center !important;
}

.conversation:hover {
  background-color: rgba(11, 20, 26, 0.03) !important;
}

.conversation.active {
  background-color: var(--wa-header-bg) !important;
  border-left: 3px solid var(--wa-green) !important;
}

/* Fix Avatar Alignment & Dimensions */
.conversation .relative:first-child {
  margin-top: 0 !important;
  align-self: center !important;
  flex-shrink: 0 !important;
}

.conversation .relative:first-child [class*="group/avatar"],
.conversation .relative:first-child [role="img"] {
  margin-top: 0 !important;
  width: 38px !important;
  height: 38px !important;
  border-radius: 50% !important;
}

/* Compact details body */
.conversation .border-line {
  padding-top: 2px !important;
  padding-bottom: 2px !important;
  margin-left: 8px !important;
}

/* Channel Header in List Item: Subtle & Micro */
.conversation .border-line > div:first-child {
  margin-bottom: 0px !important;
  font-size: 11px !important;
  line-height: 14px !important;
}

.conversation .border-line > div:first-child span {
  font-size: 11px !important;
}

/* Contact Name */
.conversation .conversation--user {
  font-size: 13.5px !important;
  font-weight: 600 !important;
  line-height: 17px !important;
  margin: 0 !important;
  padding: 0 !important;
  color: var(--wa-text-primary) !important;
}

/* Last Message Snippet */
.conversation .border-line > div.overflow-hidden {
  font-size: 11.5px !important;
  line-height: 15px !important;
  height: 15px !important;
  margin: 1px 0 !important;
  color: var(--wa-text-secondary) !important;
}

/* Compact Micro Tags */
.conversation .flex.flex-wrap.gap-1 {
  gap: 2.5px !important;
  margin-top: 2px !important;
}

.conversation [class*="text-label-small"],
.conversation [class*="rounded-md"],
.conversation [class*="rounded-full"]:not([role="img"]) {
  font-size: 9.5px !important;
  line-height: 13px !important;
  padding: 1px 5px !important;
  height: 15px !important;
  border-radius: 4px !important;
}

/* Unread Badge */
.conversation [class*="UnreadBadge"],
.conversation .bg-n-teal-9 {
  background-color: var(--wa-unread-badge) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  border-radius: 9999px !important;
  padding: 0 5px !important;
  font-size: 10px !important;
  min-width: 17px !important;
  height: 17px !important;
  line-height: 17px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.conversation .text-n-slate-11 {
  color: var(--wa-text-secondary) !important;
  font-size: 11px !important;
}

/* ==========================================================================
   📱 MOBILE WHATSAPP UI OPTIMIZATIONS (Screen width <= 1024px)
   ========================================================================== */
@media (max-width: 1024px) {
  /* 1. Header: Compact 48px WhatsApp Mobile Header */
  .conversation-details-wrap > div:first-child,
  .conversation-header,
  div[class*="ConversationHeader"] {
    height: 48px !important;
    min-height: 48px !important;
    max-height: 48px !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0 6px !important;
    background-color: var(--wa-header-bg) !important;
  }

  .conversation-details-wrap > div:first-child > div:first-child,
  .conversation-header > div:first-child {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    width: auto !important;
    overflow: hidden !important;
  }

  .conversation-details-wrap > div:first-child > .header-actions-wrap,
  .conversation-details-wrap > div:first-child > div:last-child:not(:first-child),
  .conversation-header > div:last-child:not(:first-child) {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    flex: 0 0 auto !important;
    width: auto !important;
  }

  .conversation-header button,
  .conversation-details-wrap > div:first-child button {
    padding: 2px 5px !important;
    font-size: 11px !important;
  }

  /* 2. Hide floating mobile hamburger inside active conversations */
  .conversation-details-wrap #mobile-sidebar-launcher,
  #mobile-sidebar-launcher {
    display: none !important;
  }

  /* 3. Mobile Message Bubbles: Expand width, maintain compact 13px font */
  .left-bubble,
  .right-bubble {
    max-width: 85% !important;
    font-size: 13px !important;
    padding: 4px 8px 5px 8px !important;
  }

  .message-bubble-container .\[grid-area\:bubble\] {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  /* 4. Mobile Composer: WhatsApp Mobile input bar style */
  .reply-box,
  .resizable-editor-wrapper {
    background-color: var(--wa-reply-bg) !important;
    padding: 2px 5px !important;
    border-top: 1px solid var(--wa-border) !important;
  }

  .reply-box .ProseMirror {
    border-radius: 16px !important;
    padding: 4px 10px !important;
    font-size: 13px !important;
    min-height: 32px !important;
    max-height: 70px !important;
  }

  .reply-box .right-wrap button[type="submit"] {
    border-radius: 15px !important;
    padding: 3px 10px !important;
    height: 26px !important;
  }

  /* 5. Mobile Conversation List */
  .conversations-list-wrap {
    width: 100% !important;
    max-width: 100vw !important;
  }

  .conversation {
    padding: 5px 10px !important;
    min-height: 54px !important;
  }
}

/* Audio Player */
[data-bubble-name="audio"] button {
  color: var(--wa-green) !important;
}

[data-bubble-name="audio"] input[type="range"] {
  accent-color: var(--wa-green) !important;
}

/* Sleek Scrollbars */
::-webkit-scrollbar {
  width: 5px !important;
  height: 5px !important;
}

::-webkit-scrollbar-track {
  background: transparent !important;
}

::-webkit-scrollbar-thumb {
  background: rgba(11, 20, 26, 0.2) !important;
  border-radius: 3px !important;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(11, 20, 26, 0.35) !important;
}

.dark ::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2) !important;
}

/* WhatsApp 3-Dots Action Menu */
.dark #wa-dropdown-menu {
  background: #202c33 !important;
  border-color: #2a3942 !important;
  box-shadow: 0 8px 30px rgba(0,0,0,0.5) !important;
}

.dark #wa-dropdown-menu .wa-menu-item {
  color: #e9edef !important;
}

.dark #wa-dropdown-menu .wa-menu-item:hover {
  background: #111b21 !important;
}

.dark #wa-3dots-btn {
  color: #aebac1 !important;
}

.dark #wa-3dots-btn:hover {
  background: rgba(255,255,255,0.08) !important;
}

.dark #wa-blocked-alert-banner {
  background: #3f1d24 !important;
  border-color: #7f1d1d !important;
  color: #fca5a5 !important;
}

/* ==========================================================================
   AUTHENTIC WHATSAPP VOICE NOTE PLAYER (Waveform & Speed Pill)
   ========================================================================== */
[data-bubble-name="audio"],
[data-bubble-name="audio"] > div {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 2px 4px !important;
  width: 100% !important;
  min-width: 240px !important;
  max-width: 320px !important;
}

[data-bubble-name="audio"] .flex.gap-1 {
  align-items: center !important;
  gap: 8px !important;
}

/* Play/Pause Button */
[data-bubble-name="audio"] button:has(.i-teenyicons-play-small-solid),
[data-bubble-name="audio"] button:has(.i-teenyicons-pause-small-solid),
[data-bubble-name="audio"] button:first-child {
  background: transparent !important;
  color: #54656f !important;
  width: 34px !important;
  height: 34px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
}

.dark [data-bubble-name="audio"] button:first-child {
  color: #aebac1 !important;
}

/* WhatsApp Speed Toggle Pill (1x, 1.5x, 2x) */
[data-bubble-name="audio"] button:has(span.text-xs) {
  background: #54656f !important;
  color: #ffffff !important;
  border-radius: 12px !important;
  padding: 2px 8px !important;
  height: 22px !important;
  min-width: 38px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-weight: 700 !important;
  font-size: 11px !important;
  letter-spacing: 0.02em !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15) !important;
  transition: transform 0.1s ease !important;
}

[data-bubble-name="audio"] button:has(span.text-xs):active {
  transform: scale(0.95) !important;
}

.dark [data-bubble-name="audio"] button:has(span.text-xs) {
  background: #374248 !important;
  color: #e9edef !important;
}

[data-bubble-name="audio"] button:has(span.text-xs) span {
  color: #ffffff !important;
  font-weight: 700 !important;
  font-size: 11px !important;
}

/* WhatsApp Audio Scrubber / Waveform Track */
[data-bubble-name="audio"] input[type="range"] {
  height: 4px !important;
  border-radius: 2px !important;
  background: rgba(0, 0, 0, 0.15) !important;
  accent-color: #00a884 !important;
  cursor: pointer !important;
}

.dark [data-bubble-name="audio"] input[type="range"] {
  background: rgba(255, 255, 255, 0.2) !important;
  accent-color: #00a884 !important;
}

/* Hide clutter buttons for clean WhatsApp audio look */
[data-bubble-name="audio"] button:has(.i-lucide-volume-2),
[data-bubble-name="audio"] button:has(.i-lucide-volume-off) {
  display: none !important;
}

[data-bubble-name="audio"] button:has(.i-lucide-download) {
  opacity: 0.5 !important;
  transform: scale(0.85) !important;
}

/* Timestamp duration styling */
[data-bubble-name="audio"] .tabular-nums {
  font-size: 11px !important;
  color: var(--wa-text-secondary) !important;
  font-weight: 500 !important;
}
