/* ==========================================================================
   L'etoile Atelier - Hermès Luxury Instagram-Style Group Chat Engine
   Minimalist Visual-First UI (Zero Placeholders, 1-3 Word Labels)
   Supports: theme-gold-premium, theme-dark, theme-light
   ========================================================================== */

/* Main Chat Module Shell */
#view-chat {
  display: none;
  flex-direction: column;
  height: 100%;
  width: 100%;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: transparent !important;
  overflow: hidden;
  z-index: 10;
}

#view-chat:not(.active) {
  display: none !important;
}

#view-chat.active {
  display: flex !important;
  background: transparent !important;
}

.chat-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  position: relative;
  overflow: hidden;
  background: transparent !important;
}

/* ─── INSTAGRAM STYLE LUXURY HEADER (SYMMETRICAL 3-COLUMN LIQUID GLASS) ──── */
.chat-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  position: relative;
  width: 100%;
  min-height: 48px;
  padding: calc(env(safe-area-inset-top, 0px) + 8px) 14px 10px 14px;
  background: rgba(250, 247, 240, 0.88);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 30;
  box-sizing: border-box;
  flex-shrink: 0;
}

body.theme-dark .chat-header {
  background: rgba(13, 15, 20, 0.88);
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

body.theme-light .chat-header {
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.chat-header-left {
  justify-self: start;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 88px;
}

.chat-header .in-app-home-btn {
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
  min-height: 42px !important;
}

/* Luxury Files & Address Action Button */
.chat-header-files-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  min-width: 42px;
  min-height: 42px;
  padding: 0;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
  flex-shrink: 0;
  position: relative;
  border: none;
  background: transparent;
  user-select: none;
  -webkit-user-select: none;
}

body.theme-gold-premium .chat-header-files-btn {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(253, 245, 228, 0.85) 100%);
  border: 1.5px solid #d4af37;
  color: #734d05;
  box-shadow: 0 4px 14px rgba(184, 145, 37, 0.22), inset 0 1px 0 #ffffff;
}

body.theme-gold-premium .chat-header-files-btn:hover {
  border-color: #b8860b;
  color: #523602;
  transform: scale(1.08);
  box-shadow: 0 6px 18px rgba(184, 145, 37, 0.32), inset 0 1px 0 #ffffff;
}

body.theme-gold-premium .chat-header-files-btn:active {
  transform: scale(0.94);
}

body.theme-dark .chat-header-files-btn {
  background: rgba(30, 26, 20, 0.75);
  border: 1.5px solid rgba(212, 175, 55, 0.45);
  border-top-color: rgba(255, 235, 170, 0.6);
  color: #e5c158;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.12);
}

body.theme-dark .chat-header-files-btn:hover {
  background: rgba(45, 38, 28, 0.9);
  border-color: #f5d77f;
  color: #f5d77f;
  transform: scale(1.08);
}

body.theme-dark .chat-header-files-btn:active {
  transform: scale(0.94);
}

body.theme-light .chat-header-files-btn {
  background: #ffffff;
  border: 1.5px solid #e5e7eb;
  color: #111827;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

body.theme-light .chat-header-files-btn:hover {
  background: #f9fafb;
  border-color: #d1d5db;
  transform: scale(1.08);
}

body.theme-light .chat-header-files-btn:active {
  transform: scale(0.94);
}

.chat-files-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: linear-gradient(135deg, #d4af37, #996515);
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #ffffff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
  box-sizing: border-box;
  line-height: 1;
}

body.theme-dark .chat-files-badge {
  border-color: #12161c;
}

.chat-header-center {
  justify-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.chat-header-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 80px;
}

/* Unified Liquid Glass Capsule [ 📞 Phone Call ] */
.chat-liquid-glass-capsule {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.65);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border: 1.2px solid rgba(255, 255, 255, 0.85);
  border-top: 1.8px solid rgba(255, 255, 255, 0.98);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06), inset 0 1px 1px rgba(255, 255, 255, 0.95);
  box-sizing: border-box;
  flex-shrink: 0;
}

body.theme-gold-premium .chat-liquid-glass-capsule {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.88) 0%, rgba(253, 245, 228, 0.75) 100%);
  border: 1.5px solid #d4af37;
  box-shadow: 0 4px 14px rgba(184, 145, 37, 0.22), inset 0 1px 0 #ffffff;
}

body.theme-dark .chat-liquid-glass-capsule {
  background: rgba(30, 26, 20, 0.65);
  border: 1.2px solid rgba(212, 175, 55, 0.35);
  border-top-color: rgba(255, 235, 170, 0.5);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.12);
}

body.theme-light .chat-liquid-glass-capsule {
  background: #ffffff;
  border: 1.5px solid #e5e7eb;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.chat-capsule-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: #734d05;
  cursor: pointer;
  padding: 0;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
}

body.theme-gold-premium .chat-capsule-btn {
  color: #734d05;
}

body.theme-dark .chat-capsule-btn {
  color: #e5c158;
}

body.theme-light .chat-capsule-btn {
  color: #111827;
}

.chat-capsule-btn:hover {
  transform: scale(1.12);
  color: #b8860b;
  background: rgba(212, 175, 55, 0.16);
}

body.theme-dark .chat-capsule-btn:hover {
  color: #f5d77f;
  background: rgba(212, 175, 55, 0.22);
}

body.theme-light .chat-capsule-btn:hover {
  color: #000000;
  background: rgba(0, 0, 0, 0.05);
}

.chat-capsule-btn:active {
  transform: scale(0.92);
}

.chat-capsule-divider {
  width: 1px;
  height: 18px;
  background: rgba(212, 175, 55, 0.3);
  margin: 0 2px;
  flex-shrink: 0;
}

body.theme-dark .chat-capsule-divider {
  background: rgba(212, 175, 55, 0.25);
}

body.theme-light .chat-capsule-divider {
  background: #e5e7eb;
}

/* Liquid Glass Buttons (Calling, Video Call & Actions) */
.chat-liquid-glass-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  min-width: 38px;
  min-height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.65);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border: 1.2px solid rgba(255, 255, 255, 0.85);
  border-top: 1.8px solid rgba(255, 255, 255, 0.98);
  color: #734d05;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06), inset 0 1px 1px rgba(255, 255, 255, 0.95);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 0;
  flex-shrink: 0;
}

body.theme-gold-premium .chat-liquid-glass-btn {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.85) 0%, rgba(253, 245, 228, 0.7) 100%);
  border: 1.5px solid #d4af37;
  color: #734d05;
  box-shadow: 0 4px 14px rgba(184, 145, 37, 0.22), inset 0 1px 0 #ffffff;
}

body.theme-dark .chat-liquid-glass-btn {
  background: rgba(30, 26, 20, 0.65);
  border: 1.2px solid rgba(212, 175, 55, 0.35);
  border-top-color: rgba(255, 235, 170, 0.5);
  color: #e5c158;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.12);
}

body.theme-light .chat-liquid-glass-btn {
  background: #ffffff;
  border: 1.5px solid #e5e7eb;
  color: #111827;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.chat-liquid-glass-btn:hover {
  transform: translateY(-1px) scale(1.06);
  border-color: #d4af37;
  color: #b8860b;
  box-shadow: 0 6px 18px rgba(184, 145, 37, 0.35);
}

.chat-liquid-glass-btn:active {
  transform: scale(0.92);
}

.chat-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 0;
}

.chat-action-btn:hover {
  background: rgba(212, 175, 55, 0.12);
  color: #d4af37;
}

.chat-action-btn:active {
  transform: scale(0.9);
}

/* ─── ACTIVE MEMBERS TRAY (INSTAGRAM STORIES STYLE) ──────────────────────── */
.chat-stories-tray {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px 10px 14px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-secondary);
  flex-shrink: 0;
  scrollbar-width: none;
}

.chat-stories-tray::-webkit-scrollbar {
  display: none;
}

.story-pill-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  flex-shrink: 0;
  width: 54px;
  transition: transform 0.15s ease;
}

.story-pill-item:active {
  transform: scale(0.94);
}

.story-ring-wrap {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  padding: 2px;
  background: linear-gradient(135deg, #f5d77f, #d4af37 60%, #996515);
  box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
}

.story-ring-wrap.is-owner {
  background: linear-gradient(135deg, #ffd700, #ff8c00, #d4af37);
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.story-avatar-circle {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #201a14;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  border: 1.8px solid var(--bg-secondary);
  overflow: hidden;
}

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

.story-name-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

.story-online-dot {
  position: absolute;
  bottom: 1px;
  right: 1px;
  width: 10px;
  height: 10px;
  background: #10b981;
  border-radius: 50%;
  border: 1.5px solid var(--bg-secondary);
}

/* Persona Switcher Capsule Bar */
.chat-persona-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 14px;
  background: rgba(212, 175, 55, 0.08);
  border-bottom: 1px solid rgba(212, 175, 55, 0.15);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.persona-select-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-primary);
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0,0,0,0.06);
}

/* ─── MESSAGE STREAM (CHAT BODY) ────────────────────────────────────────── */
.chat-messages-stream {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 16px 12px 24px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  scroll-behavior: smooth;
  background: transparent !important;
  position: relative;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}

/* Date Divider */
.chat-date-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 12px 0 8px 0;
}

.chat-date-pill {
  padding: 4px 14px;
  background: rgba(255, 255, 255, 0.72) !important;
  backdrop-filter: blur(20px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
  border: 1.2px solid rgba(255, 255, 255, 0.9) !important;
  border-top: 1.5px solid #ffffff !important;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.5px;
  color: #734d05 !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05), inset 0 1px 1px rgba(255, 255, 255, 0.9) !important;
  text-transform: uppercase;
}

body.theme-dark .chat-date-pill {
  background: rgba(26, 21, 16, 0.75) !important;
  border: 1.2px solid rgba(212, 175, 55, 0.35) !important;
  color: #e5c158 !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4) !important;
}

/* Message Item Row Wrapper (Full Width Container for Swipe-to-Reveal Timestamps) */
.chat-msg-item-row {
  position: relative;
  width: 100%;
  display: flex;
  align-items: flex-end;
  margin-bottom: 4px;
  overflow: visible;
  touch-action: pan-y;
  animation: msgSlideIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.chat-msg-item-row.incoming {
  justify-content: flex-start;
}

.chat-msg-item-row.outgoing {
  justify-content: flex-end;
}

/* Message Item Container */
.chat-msg-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  position: relative;
  max-width: 76%;
  margin-bottom: 0;
  overflow: visible;
  touch-action: pan-y;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

@keyframes msgSlideIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.chat-msg-row.incoming {
  align-self: flex-start;
}

.chat-msg-row.outgoing {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.chat-msg-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #2a2016;
  color: #e5c158;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  border: 1px solid rgba(212, 175, 55, 0.4);
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  overflow: hidden;
  margin-bottom: 2px;
}

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

.chat-msg-content-col {
  display: flex;
  flex-direction: column;
  min-width: 60px;
  max-width: 100%;
}

.chat-msg-row.outgoing .chat-msg-content-col {
  align-items: flex-end;
}

.chat-msg-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 3px;
  padding: 0 4px;
}

.chat-msg-sender-name {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
}

.chat-msg-sender-role {
  display: none !important;
}

/* ─── BUBBLE STYLES (INSTAGRAM DM STYLE) ─────────────────────────────────── */
.chat-bubble {
  position: relative;
  padding: 10px 14px;
  font-size: 14.5px;
  line-height: 1.45;
  word-break: break-word;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  touch-action: pan-y;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
}

/* Incoming Bubble (Frosted Liquid Glass - Ultra-Readable over Wallpaper) */
.chat-msg-row.incoming .chat-bubble {
  background: rgba(255, 255, 255, 0.74) !important;
  backdrop-filter: blur(24px) saturate(190%) !important;
  -webkit-backdrop-filter: blur(24px) saturate(190%) !important;
  color: #1a1205 !important;
  border-radius: 20px 20px 20px 6px !important;
  border: 1.2px solid rgba(255, 255, 255, 0.88) !important;
  border-top: 1.8px solid #ffffff !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(212, 175, 55, 0.08), inset 0 1px 1px rgba(255, 255, 255, 0.95) !important;
}

body.theme-gold-premium .chat-msg-row.incoming .chat-bubble {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.82) 0%, rgba(253, 248, 236, 0.74) 100%) !important;
  border-color: rgba(212, 175, 55, 0.35) !important;
  border-top-color: #ffffff !important;
  box-shadow: 0 6px 20px rgba(184, 145, 37, 0.12), inset 0 1.2px 1px #ffffff !important;
  color: #1a1205 !important;
}

body.theme-dark .chat-msg-row.incoming .chat-bubble {
  background: rgba(22, 18, 14, 0.78) !important;
  backdrop-filter: blur(24px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
  border: 1.2px solid rgba(212, 175, 55, 0.35) !important;
  border-top: 1.8px solid rgba(255, 235, 170, 0.55) !important;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.55), inset 0 1px 1px rgba(255, 255, 255, 0.12) !important;
  color: #fdfaf2 !important;
}

body.theme-light .chat-msg-row.incoming .chat-bubble {
  background: rgba(255, 255, 255, 0.82) !important;
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
  border: 1.5px solid rgba(229, 231, 235, 0.9) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06) !important;
  color: #111827 !important;
}

/* Outgoing Bubble (Pure Porcelain White - Matches Navigation Pills & Input Capsule) */
.chat-msg-row.outgoing .chat-bubble {
  background: #ffffff !important;
  color: #1a1205 !important;
  border-radius: 20px 20px 6px 20px !important;
  box-shadow: 0 6px 20px rgba(184, 145, 37, 0.16), 0 2px 6px rgba(0, 0, 0, 0.05), inset 0 1px 1px #ffffff !important;
  border: 1.2px solid rgba(212, 175, 55, 0.42) !important;
  border-top: 1.8px solid #ffffff !important;
  text-shadow: none !important;
}

body.theme-gold-premium .chat-msg-row.outgoing .chat-bubble {
  background: #ffffff !important;
  color: #1a1205 !important;
  border-radius: 20px 20px 6px 20px !important;
  box-shadow: 0 6px 20px rgba(184, 145, 37, 0.16), 0 2px 6px rgba(0, 0, 0, 0.05), inset 0 1px 1px #ffffff !important;
  border: 1.2px solid rgba(212, 175, 55, 0.42) !important;
  border-top: 1.8px solid #ffffff !important;
  text-shadow: none !important;
}

body.theme-dark .chat-msg-row.outgoing .chat-bubble {
  background: linear-gradient(135deg, rgba(229, 193, 88, 0.92) 0%, rgba(184, 145, 37, 0.88) 100%) !important;
  color: #1a1205 !important;
  font-weight: 600 !important;
  text-shadow: none !important;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.45) !important;
}

body.theme-light .chat-msg-row.outgoing .chat-bubble {
  background: linear-gradient(135deg, rgba(31, 31, 35, 0.92) 0%, rgba(17, 17, 19, 0.94) 100%) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18) !important;
}

/* Quoted Reply inside Bubble (Clickable to jump to original) */
.chat-quoted-box {
  display: flex;
  flex-direction: column;
  padding: 5px 8px;
  margin-bottom: 6px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.05);
  border-left: 3px solid #d4af37;
  font-size: 11.5px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.12s ease;
  user-select: none;
  -webkit-user-select: none;
}

.chat-quoted-box:hover {
  background: rgba(0, 0, 0, 0.08);
}

.chat-quoted-box:active {
  transform: scale(0.98);
}

.chat-msg-row.outgoing .chat-quoted-box {
  background: rgba(212, 175, 55, 0.14) !important;
  border-left: 3px solid #d4af37 !important;
  color: #1a1205 !important;
}

.chat-msg-row.outgoing .chat-quoted-box:hover {
  background: rgba(212, 175, 55, 0.22) !important;
}

.quoted-author {
  font-weight: 700;
  margin-bottom: 1.5px;
  color: #8c6307;
}

body.theme-dark .quoted-author {
  color: #ffd875;
}

.quoted-text {
  opacity: 0.88;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Image Message Styling */
.chat-bubble-image-wrap {
  padding: 3px !important;
  overflow: hidden;
  background: var(--bg-card);
}

.chat-bubble-img {
  width: 100%;
  max-width: 280px;
  max-height: 320px;
  border-radius: 14px;
  display: block;
  object-fit: cover;
  cursor: zoom-in;
  transition: opacity 0.2s ease;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
  touch-action: pan-y;
}

.chat-bubble-img:hover {
  opacity: 0.95;
}

.chat-bubble-caption {
  padding: 8px 12px 6px 12px;
  font-size: 14px;
  line-height: 1.45;
  color: inherit;
  word-break: break-word;
}

.chat-msg-row.outgoing .chat-bubble.chat-bubble-image-wrap {
  background: #ffffff !important;
  color: #1a1205 !important;
}

body.theme-dark .chat-msg-row.outgoing .chat-bubble.chat-bubble-image-wrap {
  background: linear-gradient(135deg, rgba(229, 193, 88, 0.96) 0%, rgba(184, 145, 37, 0.92) 100%) !important;
  color: #1a1205 !important;
}

body.theme-light .chat-msg-row.outgoing .chat-bubble.chat-bubble-image-wrap {
  background: linear-gradient(135deg, rgba(31, 31, 35, 0.95) 0%, rgba(17, 17, 19, 0.95) 100%) !important;
  color: #ffffff !important;
}

body.theme-gold-premium .chat-msg-row.outgoing .chat-bubble.chat-bubble-image-wrap {
  background: #ffffff !important;
  color: #1a1205 !important;
}

/* ─── VOICE NOTE WAVEFORM AUDIO PLAYER ────────────────────────────────────── */
.chat-voice-player {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 2px;
  min-width: 210px;
}

.voice-play-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  border: none;
  color: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.chat-msg-row.incoming .voice-play-btn {
  background: linear-gradient(135deg, #f5d77f, #d4af37);
  color: #120e06;
}

.chat-msg-row.outgoing .voice-play-btn {
  background: linear-gradient(135deg, #f0ca62, #c9932b) !important;
  color: #1a1205 !important;
  box-shadow: 0 2px 8px rgba(184, 134, 11, 0.28) !important;
}

.voice-play-btn:active {
  transform: scale(0.92);
}

.voice-waveform-col {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 4px;
  min-width: 0;
}

.voice-bars-track {
  display: flex;
  align-items: center;
  gap: 2.5px;
  height: 28px;
  cursor: pointer;
  padding: 2px 0;
}

.voice-bar {
  width: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.4);
  transition: background-color 0.1s ease, height 0.15s ease;
}

.chat-msg-row.outgoing .voice-bar {
  background: rgba(184, 134, 11, 0.3) !important;
}

.chat-msg-row.incoming .voice-bar {
  background: rgba(0, 0, 0, 0.2);
}

body.theme-dark .chat-msg-row.incoming .voice-bar {
  background: rgba(255, 255, 255, 0.25);
}

.voice-bar.active {
  background: #ffffff !important;
}

.chat-msg-row.outgoing .voice-bar.active {
  background: #b8860b !important;
}

.chat-msg-row.incoming .voice-bar.active {
  background: #d4af37 !important;
}

.voice-time-label {
  font-size: 10px;
  font-weight: 600;
  opacity: 0.85;
}

.chat-msg-row.outgoing .voice-time-label {
  color: #734d05 !important;
}

/* Time & Read Receipts (Liquid Glass Capsule) - Hidden from static view */
.chat-msg-footer {
  display: none !important;
}

/* ─── SWIPE-TO-REVEAL TIMESTAMPS (iOS iMessage Style) ─────────────────────── */
.chat-msg-peek-time {
  position: absolute;
  right: 6px;
  left: auto;
  bottom: 4px;
  display: inline-flex;
  align-items: center;
  gap: 3.5px;
  padding: 2.5px 7.5px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-top: 1.4px solid #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), inset 0 1px 1px rgba(255, 255, 255, 0.9);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.25px;
  color: #734d05;
  line-height: 1.25;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateX(18px);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
  will-change: transform, opacity;
  z-index: 5;
}

body.theme-gold-premium .chat-msg-peek-time {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.88) 0%, rgba(253, 245, 228, 0.82) 100%);
  border: 1px solid rgba(212, 175, 55, 0.38);
  border-top: 1.4px solid #ffffff;
  color: #734d05;
  box-shadow: 0 3px 10px rgba(184, 145, 37, 0.16), inset 0 1px 1px #ffffff;
}

body.theme-dark .chat-msg-peek-time {
  background: rgba(26, 21, 16, 0.85);
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-top: 1.4px solid rgba(255, 235, 170, 0.5);
  color: #e5c158;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

body.theme-light .chat-msg-peek-time {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(229, 231, 235, 0.9);
  color: #4b5563;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

/* Ticks and arrows completely disabled for clean timestamp aesthetic */
.chat-peek-ticks,
.chat-read-ticks {
  display: none !important;
}

/* Individual Message Tap Time Reveal (Only tapped message moves, springs back smoothly) */
.chat-msg-item-row.time-revealed .chat-msg-row.outgoing {
  transform: translateX(-86px);
}

.chat-msg-item-row.time-revealed .chat-msg-row.incoming {
  transform: translateX(0px);
}

.chat-msg-item-row.time-revealed .chat-msg-peek-time {
  opacity: 1;
  transform: translateX(0);
}

/* Global swipe peek reveal fallback */
.chat-messages-stream.timestamps-revealed .chat-msg-row.outgoing {
  transform: translateX(-86px);
}

.chat-messages-stream.timestamps-revealed .chat-msg-row.incoming {
  transform: translateX(0px);
}

.chat-messages-stream.timestamps-revealed .chat-msg-peek-time {
  opacity: 1;
  transform: translateX(0);
}

/* Active Drag State: disable CSS transitions for 1:1 finger tracking */
.chat-messages-stream.is-swiping .chat-msg-row,
.chat-messages-stream.is-swiping .chat-msg-peek-time,
.chat-messages-stream.is-swiping .chat-swipe-reply-btn {
  transition: none;
}

/* ─── SWIPE-TO-REPLY BADGES (BIDIRECTIONAL: SWIPE RIGHT OR SWIPE LEFT) ──────── */
.chat-swipe-reply-btn {
  position: absolute;
  top: 50%;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(18px) saturate(190%);
  -webkit-backdrop-filter: blur(18px) saturate(190%);
  border: 1.5px solid rgba(212, 175, 55, 0.5);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12), inset 0 1px 1.5px #ffffff;
  color: #734d05;
  pointer-events: none;
  opacity: 0;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
  will-change: transform, opacity;
  z-index: 12;
}

/* Right Badge (Revealed on Swipe Left) */
.chat-swipe-reply-btn.reply-btn-right {
  right: -42px;
  left: auto;
  transform: translateY(-50%) scale(0.3);
}

/* Left Badge (Revealed on Swipe Right) */
.chat-swipe-reply-btn.reply-btn-left {
  left: -42px;
  right: auto;
  transform: translateY(-50%) scale(0.3);
}

/* For incoming messages: left badge sits in the opening gap beside avatar */
.chat-msg-row.incoming .chat-swipe-reply-btn.reply-btn-left {
  left: 36px;
  transform: translateY(-50%) scale(0.3);
}

.chat-swipe-reply-btn svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  transform: rotate(0deg);
  transition: transform 0.18s ease;
}

/* Left badge reply arrow points rightward toward the bubble */
.chat-swipe-reply-btn.reply-btn-left svg {
  transform: scaleX(-1);
}

/* When pulled past the reply trigger threshold */
.chat-swipe-reply-btn.is-triggered {
  background: linear-gradient(135deg, #d4af37 0%, #a87d0e 100%) !important;
  border-color: #ffd875 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 20px rgba(184, 145, 37, 0.55), inset 0 1px 2px rgba(255, 255, 255, 0.8) !important;
}

.chat-swipe-reply-btn.reply-btn-right.is-triggered {
  transform: translateY(-50%) scale(1.18) !important;
}

.chat-swipe-reply-btn.reply-btn-right.is-triggered svg {
  transform: rotate(-12deg) scale(1.1);
}

.chat-swipe-reply-btn.reply-btn-left.is-triggered {
  transform: translateY(-50%) scale(1.18) !important;
}

.chat-swipe-reply-btn.reply-btn-left.is-triggered svg {
  transform: scaleX(-1) rotate(12deg) scale(1.1);
}

body.theme-gold-premium .chat-swipe-reply-btn {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96) 0%, rgba(253, 245, 228, 0.92) 100%);
  border: 1.5px solid rgba(212, 175, 55, 0.5);
  color: #734d05;
}

body.theme-gold-premium .chat-swipe-reply-btn.is-triggered {
  background: linear-gradient(135deg, #d4af37 0%, #997008 100%) !important;
  color: #ffffff !important;
  border-color: #ffe08a !important;
}

body.theme-dark .chat-swipe-reply-btn {
  background: rgba(36, 28, 20, 0.94);
  border: 1.5px solid rgba(212, 175, 55, 0.45);
  color: #e5c158;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.55);
}

body.theme-dark .chat-swipe-reply-btn.is-triggered {
  background: linear-gradient(135deg, #d4af37 0%, #aa8010 100%) !important;
  color: #1a1510 !important;
}

#chat-messages-stream,
.chat-messages-stream {
  overflow-x: hidden;
}

.chat-time-pill {
  display: none !important;
}

/* Double-Tap Heart Floating Animation */
.heart-pop-anim {
  position: absolute;
  pointer-events: none;
  font-size: 46px;
  animation: heartBloom 0.75s cubic-bezier(0.17, 0.89, 0.32, 1.28) forwards;
  z-index: 50;
  filter: drop-shadow(0 4px 10px rgba(239, 68, 68, 0.5));
}

@keyframes heartBloom {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.2);
  }
  35% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.3);
  }
  60% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -100%) scale(1.4);
  }
}

/* Reaction Chips on Bubble */
.chat-reactions-wrap {
  position: absolute;
  bottom: -9px;
  display: flex;
  gap: 3px;
  z-index: 5;
}

.chat-msg-row.incoming .chat-reactions-wrap {
  right: 10px;
}

.chat-msg-row.outgoing .chat-reactions-wrap {
  left: 10px;
}

.reaction-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 22px;
  padding: 2px 8px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  cursor: pointer;
  transition: transform 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

body.theme-dark .reaction-chip {
  background: rgba(36, 34, 30, 0.94);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.reaction-chip:active {
  transform: scale(1.15);
}

/* ─── WHATSAPP STYLE LONG-PRESS & REACTION SYSTEM ───────────────────────── */

/* Dimmed backdrop when a message is held */
.chat-whatsapp-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 900;
  opacity: 0;
  animation: chatBackdropFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  touch-action: none;
}

@keyframes chatBackdropFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Elevated message bubble when focused / held */
.chat-bubble.chat-bubble-focused {
  position: relative !important;
  z-index: 950 !important;
  transform: scale(1.025);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35), 0 0 0 1.5px rgba(212, 175, 55, 0.45) !important;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s ease !important;
}

/* Quick Reaction Floating Toolbar (WhatsApp Floating Pill) */
.chat-quick-reaction-bar {
  position: absolute;
  top: -48px;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.22), 0 2px 8px rgba(0, 0, 0, 0.08);
  z-index: 1002;
  animation: reactionPillPop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  -webkit-user-select: none;
}

body.theme-dark .chat-quick-reaction-bar {
  background: rgba(32, 30, 27, 0.94);
  border-color: rgba(212, 175, 55, 0.32);
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.65);
}

@keyframes reactionPillPop {
  from { opacity: 0; transform: scale(0.6) translateY(12px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.reaction-emoji-btn {
  position: relative;
  background: transparent;
  border: none;
  font-size: 26px;
  line-height: 1;
  padding: 4px;
  cursor: pointer;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.16s cubic-bezier(0.17, 0.89, 0.32, 1.4), background-color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.reaction-emoji-btn:hover,
.reaction-emoji-btn:active {
  transform: scale(1.36) translateY(-4px);
}

.reaction-emoji-btn.active-reaction {
  background: rgba(212, 175, 55, 0.22);
  outline: 1.5px solid #d4af37;
}

.reaction-plus-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: #555;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
  margin-left: 2px;
}

body.theme-dark .reaction-plus-btn {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.15);
  color: #ddd;
}

.reaction-plus-btn:hover,
.reaction-plus-btn:active {
  transform: scale(1.15);
  background: #d4af37;
  color: #120f0c;
  border-color: #d4af37;
}

.reaction-plus-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2.6;
}

/* Expanded Atelier Emojis Tray */
.chat-reaction-more-tray {
  position: fixed;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 14px;
  max-width: 280px;
  border-radius: 22px;
  background: rgba(246, 246, 246, 0.96);
  backdrop-filter: blur(35px);
  -webkit-backdrop-filter: blur(35px);
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
  z-index: 1003;
  animation: reactionTrayPop 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

body.theme-dark .chat-reaction-more-tray {
  background: rgba(30, 28, 25, 0.96);
  border-color: rgba(212, 175, 55, 0.35);
}

@keyframes reactionTrayPop {
  from { opacity: 0; transform: scale(0.85); }
  to { opacity: 1; transform: scale(1); }
}

/* WhatsApp-Style Floating Action Context Menu */
.chat-whatsapp-context-menu {
  position: fixed;
  width: 236px;
  border-radius: 20px;
  background: rgba(246, 246, 246, 0.94);
  backdrop-filter: blur(35px) saturate(180%);
  -webkit-backdrop-filter: blur(35px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.24), 0 2px 8px rgba(0, 0, 0, 0.08);
  z-index: 1002;
  overflow: hidden;
  animation: waMenuSlideDown 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 6px;
}

body.theme-dark .chat-whatsapp-context-menu {
  background: rgba(30, 28, 25, 0.94);
  border-color: rgba(212, 175, 55, 0.3);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.65);
}

@keyframes waMenuSlideDown {
  from { opacity: 0; transform: translateY(-8px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.chat-wa-menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  padding: 10px 14px;
  background: transparent;
  border: none;
  border-radius: 12px;
  font-size: 15.5px;
  font-weight: 500;
  color: #111;
  cursor: pointer;
  transition: background 0.14s ease, transform 0.1s ease;
  -webkit-tap-highlight-color: transparent;
}

body.theme-dark .chat-wa-menu-item {
  color: #f3f4f6;
}

.chat-wa-menu-item:hover,
.chat-wa-menu-item:active {
  background: rgba(0, 0, 0, 0.06);
}

body.theme-dark .chat-wa-menu-item:hover,
body.theme-dark .chat-wa-menu-item:active {
  background: rgba(255, 255, 255, 0.08);
}

.chat-wa-menu-item.danger-item {
  color: #e53935 !important;
}

.chat-wa-menu-item.danger-item svg {
  stroke: #e53935 !important;
}

.chat-wa-menu-item.danger-item:hover,
.chat-wa-menu-item.danger-item:active {
  background: rgba(229, 57, 53, 0.08);
}

.chat-wa-menu-item svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2.1;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.chat-wa-menu-divider {
  height: 1px;
  background: rgba(0, 0, 0, 0.08);
  margin: 4px 10px;
}

body.theme-dark .chat-wa-menu-divider {
  background: rgba(255, 255, 255, 0.09);
}

/* ─── NATIVE IOS WHATSAPP STYLE MESSAGE INFO SHEET ───────────────────────── */
.chat-info-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  animation: chatBackdropFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes chatBackdropFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (min-width: 768px) {
  .chat-info-modal-backdrop {
    align-items: center;
    padding: 24px;
  }
}

.chat-info-card {
  width: 100%;
  max-width: 440px;
  max-height: 82vh;
  border-radius: 20px 20px 0 0;
  background: #f2f2f7;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.22);
  transform: translateY(100%);
  animation: chatSheetSlideUp 0.26s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@media (min-width: 768px) {
  .chat-info-card {
    border-radius: 20px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
    transform: scale(0.95);
    animation: chatModalScaleIn 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  }
}

body.theme-dark .chat-info-card {
  background: #1c1c1e;
  box-shadow: 0 -8px 35px rgba(0, 0, 0, 0.6);
}

@keyframes chatSheetSlideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

@keyframes chatModalScaleIn {
  from { opacity: 0; transform: scale(0.94); }
  to { opacity: 1; transform: scale(1); }
}

/* Grabber Bar */
.chat-info-grabber-wrap {
  display: flex;
  justify-content: center;
  padding: 8px 0 4px 0;
}

.chat-info-grabber {
  width: 36px;
  height: 5px;
  border-radius: 3px;
  background: rgba(60, 60, 67, 0.3);
}

body.theme-dark .chat-info-grabber {
  background: rgba(235, 235, 245, 0.3);
}

/* Header */
.chat-info-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 16px 10px 16px;
  position: relative;
}

.chat-info-title {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  font-weight: 600;
  color: #000000;
  letter-spacing: -0.015em;
  margin: 0;
}

body.theme-dark .chat-info-title {
  color: #ffffff;
}

.chat-info-close-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(118, 118, 128, 0.14);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #3c3c43;
  cursor: pointer;
  padding: 0;
  transition: background 0.15s ease, transform 0.12s ease;
  flex-shrink: 0;
}

body.theme-dark .chat-info-close-btn {
  background: rgba(118, 118, 128, 0.28);
  color: #ebebf5;
}

.chat-info-close-btn:active {
  transform: scale(0.92);
  background: rgba(118, 118, 128, 0.24);
}

/* Message Preview Bubble (WhatsApp floating bubble) */
.chat-info-preview-wrap {
  padding: 4px 16px 12px 16px;
  display: flex;
  justify-content: flex-end;
}

.chat-info-bubble-preview {
  background: #ffffff;
  border-radius: 16px 16px 4px 16px;
  padding: 9px 12px 6px 12px;
  max-width: 88%;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
  border: 0.5px solid rgba(0, 0, 0, 0.04);
}

.chat-info-bubble-preview.outgoing {
  background: #fbf7ee;
  border: 0.5px solid rgba(212, 175, 55, 0.28);
}

body.theme-dark .chat-info-bubble-preview {
  background: #2c2c2e;
  border-color: rgba(255, 255, 255, 0.08);
}

body.theme-dark .chat-info-bubble-preview.outgoing {
  background: #2b271f;
  border-color: rgba(212, 175, 55, 0.3);
}

.chat-info-bubble-header {
  font-size: 11px;
  font-weight: 700;
  color: var(--gold-primary, #b8860b);
  margin-bottom: 2px;
}

.chat-info-bubble-text {
  font-size: 14px;
  line-height: 1.35;
  color: var(--text-primary, #1c1c1e);
  word-break: break-word;
}

.chat-info-bubble-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  margin-top: 3px;
}

.chat-info-bubble-time {
  font-size: 10.5px;
  color: rgba(60, 60, 67, 0.6);
  font-weight: 500;
}

body.theme-dark .chat-info-bubble-time {
  color: rgba(235, 235, 245, 0.6);
}

/* iOS Segmented Control */
.chat-info-segmented-track {
  margin: 0 16px 12px 16px;
  background: rgba(118, 118, 128, 0.12);
  padding: 2.5px;
  border-radius: 9px;
  display: flex;
  gap: 2px;
}

body.theme-dark .chat-info-segmented-track {
  background: rgba(118, 118, 128, 0.24);
}

.chat-info-seg-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 6px 8px;
  border-radius: 7px;
  border: none;
  background: transparent;
  color: #3c3c43;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.16s ease;
  white-space: nowrap;
}

body.theme-dark .chat-info-seg-btn {
  color: #ebebf5;
}

.chat-info-seg-btn.active {
  background: #ffffff;
  color: #000000;
  font-weight: 600;
  box-shadow: 0 1.5px 4px rgba(0, 0, 0, 0.12), 0 0.5px 1px rgba(0, 0, 0, 0.05);
}

body.theme-dark .chat-info-seg-btn.active {
  background: #636366;
  color: #ffffff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.35);
}

/* Scrollable Lists Area & Inset Card */
.chat-info-scroll-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 16px calc(env(safe-area-inset-bottom, 20px) + 16px) 16px;
}

.chat-info-inset-card {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  overflow: hidden;
}

body.theme-dark .chat-info-inset-card {
  background: #2c2c2e;
}

/* Item Rows */
.chat-info-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  position: relative;
  transition: background 0.12s ease;
}

.chat-info-item-row:hover {
  background: rgba(0, 0, 0, 0.02);
}

body.theme-dark .chat-info-item-row:hover {
  background: rgba(255, 255, 255, 0.03);
}

.chat-info-item-row + .chat-info-item-row::before {
  content: '';
  position: absolute;
  top: 0;
  left: 60px;
  right: 0;
  height: 0.5px;
  background: rgba(60, 60, 67, 0.12);
}

body.theme-dark .chat-info-item-row + .chat-info-item-row::before {
  background: rgba(255, 255, 255, 0.08);
}

.chat-info-member-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.chat-info-avatar {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #e5e5ea;
  color: #1c1c1e;
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  letter-spacing: -0.02em;
}

body.theme-dark .chat-info-avatar {
  background: #3a3a3c;
  color: #ffffff;
}

.chat-info-avatar-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #34c759;
  border: 2px solid #ffffff;
}

body.theme-dark .chat-info-avatar-dot {
  border-color: #2c2c2e;
}

.chat-info-member-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.chat-info-member-name {
  font-size: 14.5px;
  font-weight: 600;
  color: #000000;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.theme-dark .chat-info-member-name {
  color: #ffffff;
}

.chat-info-badge-sender {
  font-size: 11px;
  font-weight: 500;
  color: rgba(60, 60, 67, 0.6);
}

body.theme-dark .chat-info-badge-sender {
  color: rgba(235, 235, 245, 0.6);
}

.chat-info-member-role {
  display: none !important;
}

.chat-info-member-right {
  display: flex;
  align-items: center;
  gap: 6px;
  text-align: right;
  flex-shrink: 0;
}

.chat-info-time-text {
  font-size: 12.5px;
  font-weight: 400;
  color: rgba(60, 60, 67, 0.6);
}

body.theme-dark .chat-info-time-text {
  color: rgba(235, 235, 245, 0.6);
}

.chat-double-ticks-blue {
  color: #34b7f1;
  display: inline-flex;
}

.chat-double-ticks-gray {
  color: #8e8e93;
  display: inline-flex;
}

.chat-info-reaction-badge {
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.chat-info-remove-hint {
  font-size: 11px;
  color: #ff3b30;
  font-weight: 500;
}

.chat-info-empty-state {
  padding: 28px 16px;
  text-align: center;
  color: rgba(60, 60, 67, 0.6);
  font-size: 13.5px;
  font-weight: 500;
}

body.theme-dark .chat-info-empty-state {
  color: rgba(235, 235, 245, 0.6);
}

/* Typing Indicator (Instagram 3-dots) */
.chat-typing-indicator-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
  padding: 0 6px;
  animation: fadeInMobile 0.2s ease;
}

.typing-bubble {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 10px 14px;
  border-radius: 18px 18px 18px 4px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

body.theme-dark .typing-bubble {
  background: #181c28;
}

.typing-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #d4af37;
  opacity: 0.4;
  animation: typingBounce 1.2s infinite ease-in-out;
}

.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.4; }
  40% { transform: translateY(-5px); opacity: 1; }
}

/* ─── INSTAGRAM DM STYLE BOTTOM INPUT BAR ───────────────────────────────── */
.chat-input-area {
  padding: 8px 12px calc(env(safe-area-inset-bottom, 16px) + 8px) 12px;
  background: rgba(250, 247, 240, 0.95);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 30;
  position: relative;
  flex-shrink: 0;
}

body.theme-dark .chat-input-area {
  background: rgba(13, 15, 20, 0.95);
  border-top: 1px solid rgba(212, 175, 55, 0.2);
}

body.theme-light .chat-input-area {
  background: rgba(255, 255, 255, 0.95);
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

/* Reply Banner Above Input (Luxury Instagram/WhatsApp Style) */
.chat-input-reply-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 12px;
  background: rgba(212, 175, 55, 0.14);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 14px;
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-left: 3.5px solid #d4af37;
  animation: replySlideDown 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
}

@keyframes replySlideDown {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reply-banner-left {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  flex: 1;
}

.reply-banner-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(212, 175, 55, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8c6307;
  flex-shrink: 0;
}

body.theme-dark .reply-banner-icon {
  background: rgba(212, 175, 55, 0.25);
  color: #f7d570;
}

.reply-banner-text-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.reply-banner-author {
  font-size: 11.5px;
  font-weight: 700;
  color: #734d05;
  line-height: 1.25;
  margin-bottom: 1.5px;
}

body.theme-dark .reply-banner-author {
  color: #f7d570;
}

.reply-banner-snippet {
  font-size: 12px;
  color: var(--text-primary);
  opacity: 0.88;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
}

.reply-banner-close {
  background: rgba(212, 175, 55, 0.16);
  border: 1px solid rgba(212, 175, 55, 0.3);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #734d05;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: all 0.15s ease;
  margin-left: 8px;
}

body.theme-dark .reply-banner-close {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(212, 175, 55, 0.3);
  color: #f7d570;
}

.reply-banner-close:hover {
  background: rgba(212, 175, 55, 0.35);
  color: #000000;
  transform: scale(1.06);
}

.reply-banner-close:active {
  transform: scale(0.9);
}

.reply-banner-right-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.reply-banner-thumb {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  border: 1.2px solid rgba(212, 175, 55, 0.45);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  background: rgba(0, 0, 0, 0.1);
}

.reply-banner-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  user-select: none;
  -webkit-user-select: none;
}

.lightbox-reply-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(212, 175, 55, 0.22);
  border: 1px solid rgba(212, 175, 55, 0.55);
  color: #ffffff;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.lightbox-reply-btn:hover {
  background: rgba(212, 175, 55, 0.42);
  transform: scale(1.02);
}

.lightbox-reply-btn:active {
  transform: scale(0.96);
}

.chat-bubble-image-wrap .chat-quoted-box {
  margin: 6px 6px 8px 6px;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 8px;
}

.chat-bubble-address-wrap .chat-quoted-box {
  margin: 8px 12px 2px 12px;
  border-radius: 8px;
}

/* Staged Photo Attachment Strip above Composer (Luxury Instagram/WhatsApp Style) */
.chat-input-attach-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  background: rgba(212, 175, 55, 0.14);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 14px;
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-left: 3.5px solid #d4af37;
  animation: replySlideDown 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
}

body.theme-dark .chat-input-attach-card {
  background: rgba(21, 25, 36, 0.88);
  border-color: rgba(212, 175, 55, 0.35);
  border-left-color: #f7d570;
}

body.theme-light .chat-input-attach-card {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(0, 0, 0, 0.1);
  border-left-color: #d4af37;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.chat-attach-preview-thumb-wrap {
  position: relative;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 10px;
}

.chat-attach-preview-thumb {
  width: 100%;
  height: 100%;
  border-radius: 10px;
  object-fit: cover;
  display: block;
  border: 1.5px solid rgba(212, 175, 55, 0.4);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  cursor: zoom-in;
  transition: transform 0.15s ease;
}

.chat-attach-preview-thumb:hover {
  transform: scale(1.03);
}

.chat-attach-preview-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.chat-attach-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.theme-dark .chat-attach-title {
  color: #f7d570;
}

.chat-attach-badge {
  font-size: 11px;
  font-weight: 600;
  color: #8c6307;
  opacity: 0.85;
  margin-top: 2px;
}

body.theme-dark .chat-attach-badge {
  color: rgba(247, 213, 112, 0.85);
}

.chat-attach-card-close {
  margin-left: auto;
}

/* Quoted Jump Highlight Pulse */
@keyframes bubbleReplyFlash {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.7);
  }
  30% {
    transform: scale(1.03);
    box-shadow: 0 0 18px 5px rgba(212, 175, 55, 0.55);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(212, 175, 55, 0);
  }
}

.chat-bubble.chat-bubble-reply-highlight {
  animation: bubbleReplyFlash 1.4s ease-out;
  border-color: #d4af37 !important;
}

/* Main Input Pill Row */
.chat-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

.chat-input-capsule {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: 26px;
  padding: 4px 6px 4px 12px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  min-height: 44px;
}

body.theme-dark .chat-input-capsule {
  background: #151924;
  border-color: rgba(212, 175, 55, 0.35);
}

.chat-input-capsule:focus-within {
  border-color: #d4af37;
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
}

.chat-text-input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 15px;
  outline: none;
  padding: 6px 0;
  resize: none;
  max-height: 100px;
  line-height: 1.35;
}

.chat-input-tool-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  transition: transform 0.15s ease, color 0.15s ease;
  padding: 0;
  flex-shrink: 0;
}

.chat-input-tool-btn:hover {
  color: #d4af37;
}

.chat-input-tool-btn:active {
  transform: scale(0.9);
}

.chat-send-btn {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f5d77f, #d4af37 60%, #996515);
  border: none;
  color: #1a1205;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(184, 134, 11, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

body.theme-light .chat-send-btn {
  background: linear-gradient(135deg, #27272a 0%, #111111 100%) !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
}

body.theme-light .chat-send-btn * {
  color: #ffffff !important;
  fill: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

.chat-send-btn:active {
  transform: scale(0.92);
}

/* ─── LIVE VOICE RECORDING TRAY (EXPANDED DURING RECORDING) ───────────────── */
.chat-recording-panel {
  display: none;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 8px 12px;
  background: #181c28;
  border-radius: 24px;
  color: #ffffff;
  animation: pulseRecording 2s infinite ease-in-out;
}

.chat-recording-panel.active {
  display: flex;
}

@keyframes pulseRecording {
  0%, 100% { box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.4); }
  50% { box-shadow: 0 0 0 5px rgba(239, 68, 68, 0.1); }
}

.recording-status-col {
  display: flex;
  align-items: center;
  gap: 10px;
}

.recording-red-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ef4444;
  animation: blinkRec 0.8s infinite alternate;
}

@keyframes blinkRec {
  from { opacity: 0.3; }
  to { opacity: 1; }
}

.recording-timer {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.recording-live-wave {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 20px;
}

.recording-wave-bar {
  width: 3px;
  border-radius: 2px;
  background: #e5c158;
  animation: liveWaveBar 0.5s infinite alternate ease-in-out;
}

@keyframes liveWaveBar {
  from { height: 4px; }
  to { height: 18px; }
}

.recording-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.recording-cancel-btn {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #ffffff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.recording-send-btn {
  background: #10b981;
  border: none;
  color: #ffffff;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* ─── FULL-SCREEN LIGHTBOX VIEWER ────────────────────────────────────────── */
.chat-lightbox-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  animation: fadeIn 0.2s ease;
}

.chat-lightbox-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(env(safe-area-inset-top, 0px) + 12px) 16px 12px 16px;
  color: #ffffff;
}

.lightbox-author-col {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lightbox-author-name {
  font-weight: 700;
  font-size: 14px;
}

.lightbox-time {
  font-size: 11px;
  opacity: 0.7;
}

.lightbox-close-btn,
.lightbox-download-btn {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #ffffff;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.chat-lightbox-body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow: hidden;
}

.chat-lightbox-body img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.8);
}

.chat-lightbox-caption {
  padding: 16px 20px calc(env(safe-area-inset-bottom, 20px) + 16px) 20px;
  color: #ffffff;
  font-size: 14px;
  text-align: center;
  background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
}

/* ─── GROUP INFO & CALL MODALS ───────────────────────────────────────────── */
.chat-drawer-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 999;
  display: flex;
  justify-content: flex-end;
  animation: fadeIn 0.2s ease;
}

.chat-drawer-card {
  width: 100%;
  max-width: 380px;
  height: 100%;
  background: rgba(253, 250, 243, 0.94) !important;
  backdrop-filter: blur(35px) saturate(200%) !important;
  -webkit-backdrop-filter: blur(35px) saturate(200%) !important;
  border-left: 1.2px solid rgba(255, 255, 255, 0.85);
  box-shadow: -10px 0 35px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideInRight 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

body.theme-dark .chat-drawer-card {
  background: rgba(18, 15, 12, 0.94) !important;
  border-left: 1.2px solid rgba(212, 175, 55, 0.3);
  box-shadow: -10px 0 35px rgba(0, 0, 0, 0.6);
}

body.theme-light .chat-drawer-card {
  background: rgba(255, 255, 255, 0.96) !important;
  border-left: 1px solid rgba(0, 0, 0, 0.08);
}

@keyframes slideInRight {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

.chat-drawer-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: calc(env(safe-area-inset-top, 0px) + 12px) 16px 8px 16px;
  border-bottom: none;
  background: transparent;
  gap: 12px;
}

.chat-drawer-title-group {
  display: flex;
  flex-direction: column;
}

.chat-drawer-title {
  font-family: var(--font-serif, 'Playfair Display', serif);
  font-size: 17px;
  font-weight: 850;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.drawer-header-subtitle {
  font-size: 11px;
  font-weight: 600;
  color: var(--gold-primary, #b8860b);
  margin-top: 1px;
}

/* ─── LUXURY GOLD DRAWER BACK BUTTON (Left-aligned 38px Touch-Target with SVG Chevron) ─── */
.chat-drawer-back-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  margin-right: auto;
  padding: 0;
  border: 1.2px solid #d4af37;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(253, 245, 228, 0.92) 100%);
  color: #734d05;
  box-shadow: 0 3px 12px rgba(184, 145, 37, 0.2), inset 0 1px 0 #ffffff;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  -webkit-tap-highlight-color: transparent;
  outline: none;
}

.chat-drawer-back-btn:hover {
  background: linear-gradient(135deg, #ffffff 0%, #faefd9 100%);
  border-color: #b8860b;
  color: #593c04;
  transform: scale(1.06);
  box-shadow: 0 4px 16px rgba(184, 145, 37, 0.32);
}

.chat-drawer-back-btn:active {
  transform: scale(0.94);
  box-shadow: 0 2px 6px rgba(184, 145, 37, 0.16);
}

.chat-drawer-back-btn svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: block;
}

[dir="rtl"] .chat-drawer-back-btn {
  margin-right: 0;
  margin-left: auto;
}

body.theme-gold-premium .chat-drawer-back-btn {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(253, 245, 228, 0.92) 100%);
  border-color: #d4af37;
  color: #734d05;
  box-shadow: 0 3px 12px rgba(184, 145, 37, 0.22), inset 0 1px 0 #ffffff;
}

body.theme-gold-premium .chat-drawer-back-btn:hover {
  background: linear-gradient(135deg, #ffffff 0%, #faefd9 100%);
  border-color: #b8860b;
  color: #593c04;
  transform: scale(1.08);
  box-shadow: 0 4px 16px rgba(184, 145, 37, 0.35);
}

body.theme-dark .chat-drawer-back-btn {
  background: linear-gradient(135deg, rgba(45, 38, 28, 0.95) 0%, rgba(30, 24, 16, 0.9) 100%);
  border-color: rgba(212, 175, 55, 0.5);
  color: #f5d77f;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.15);
}

body.theme-dark .chat-drawer-back-btn:hover {
  background: linear-gradient(135deg, rgba(60, 50, 36, 0.95) 0%, rgba(42, 34, 22, 0.9) 100%);
  border-color: #f5d77f;
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.7);
}

body.theme-light .chat-drawer-back-btn {
  background: #ffffff;
  border-color: #d1d5db;
  color: #111827;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

body.theme-light .chat-drawer-back-btn:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
  color: #000000;
}

/* ─── LUXURY GOLD DRAWER CLOSE BUTTON (38px Touch-Target with SVG Icon) ─── */
.chat-drawer-close-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  margin-left: auto;
  padding: 0;
  border: 1.2px solid #d4af37;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(253, 245, 228, 0.92) 100%);
  color: #734d05;
  box-shadow: 0 3px 12px rgba(184, 145, 37, 0.2), inset 0 1px 0 #ffffff;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  -webkit-tap-highlight-color: transparent;
  outline: none;
}

.chat-drawer-close-btn:hover {
  background: linear-gradient(135deg, #ffffff 0%, #faefd9 100%);
  border-color: #b8860b;
  color: #593c04;
  transform: scale(1.06);
  box-shadow: 0 4px 16px rgba(184, 145, 37, 0.32);
}

.chat-drawer-close-btn:active {
  transform: scale(0.94);
  box-shadow: 0 2px 6px rgba(184, 145, 37, 0.16);
}

.chat-drawer-close-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: block;
}

body.theme-gold-premium .chat-drawer-close-btn {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(253, 245, 228, 0.92) 100%);
  border-color: #d4af37;
  color: #734d05;
  box-shadow: 0 3px 12px rgba(184, 145, 37, 0.22), inset 0 1px 0 #ffffff;
}

body.theme-gold-premium .chat-drawer-close-btn:hover {
  background: linear-gradient(135deg, #ffffff 0%, #faefd9 100%);
  border-color: #b8860b;
  color: #593c04;
  transform: scale(1.08);
  box-shadow: 0 4px 16px rgba(184, 145, 37, 0.35);
}

body.theme-dark .chat-drawer-close-btn {
  background: linear-gradient(135deg, rgba(45, 38, 28, 0.95) 0%, rgba(30, 24, 16, 0.9) 100%);
  border-color: rgba(212, 175, 55, 0.5);
  color: #f5d77f;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.15);
}

body.theme-dark .chat-drawer-close-btn:hover {
  background: linear-gradient(135deg, rgba(60, 50, 36, 0.95) 0%, rgba(42, 34, 22, 0.9) 100%);
  border-color: #f5d77f;
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.7);
}

body.theme-light .chat-drawer-close-btn {
  background: #ffffff;
  border-color: #d1d5db;
  color: #111827;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

body.theme-light .chat-drawer-close-btn:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
  color: #000000;
}

/* ─── AUTHENTIC SEGMENTED TABS (SMART 3 TABS: PHOTOS | ADDRESS | DOCS) ─── */
.drawer-segmented-tabs {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  background: transparent;
  border-bottom: 1px solid var(--border-subtle);
  gap: 6px;
  flex-shrink: 0;
}

.drawer-tab-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 38px;
  padding: 0 10px;
  border-radius: 9999px;
  border: 1.2px solid transparent;
  background: rgba(0, 0, 0, 0.04);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  -webkit-user-select: none;
  white-space: nowrap;
}

body.theme-dark .drawer-tab-btn {
  background: rgba(255, 255, 255, 0.06);
  color: #9ca3af;
}

.drawer-tab-btn:hover {
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.07);
}

body.theme-dark .drawer-tab-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #f3f4f6;
}

.drawer-tab-btn.active {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(253, 245, 228, 0.9) 100%) !important;
  color: #734d05 !important;
  border: 1.2px solid #d4af37 !important;
  box-shadow: 0 4px 14px rgba(184, 145, 37, 0.22), inset 0 1px 0 #ffffff !important;
}

body.theme-dark .drawer-tab-btn.active {
  background: linear-gradient(135deg, rgba(45, 38, 28, 0.95) 0%, rgba(30, 24, 16, 0.9) 100%) !important;
  color: #f5d77f !important;
  border-color: rgba(212, 175, 55, 0.5) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.15) !important;
}

body.theme-light .drawer-tab-btn.active {
  background: #ffffff !important;
  color: #111827 !important;
  border-color: #d1d5db !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}

.drawer-tab-badge {
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  background: rgba(184, 145, 37, 0.18);
  color: #734d05;
}

body.theme-dark .drawer-tab-badge {
  background: rgba(212, 175, 55, 0.25);
  color: #f5d77f;
}

/* ─── TAB CONTENT PANES ──────────────────────────────────────────────────── */
.chat-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
}

.drawer-tab-pane {
  display: none;
  animation: fadeIn 0.2s ease;
}

.drawer-tab-pane.active {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ─── BENTO CARDS ────────────────────────────────────────────────────────── */
.drawer-bento-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

body.theme-gold-premium .drawer-bento-card {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.96) 0%, rgba(254, 250, 242, 0.9) 100%);
  border: 1.2px solid rgba(212, 175, 55, 0.35);
  box-shadow: 0 4px 14px rgba(184, 145, 37, 0.08);
}

body.theme-dark .drawer-bento-card {
  background: rgba(26, 22, 16, 0.85);
  border: 1.2px solid rgba(212, 175, 55, 0.3);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.drawer-bento-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer-bento-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.drawer-bento-icon {
  font-size: 15px;
}

.drawer-bento-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.drawer-bento-badge {
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 750;
  background: rgba(212, 175, 55, 0.16);
  color: var(--gold-primary, #b8860b);
  border: 1px solid rgba(212, 175, 55, 0.3);
}

body.theme-dark .drawer-bento-badge {
  background: rgba(212, 175, 55, 0.22);
  color: #f5d77f;
}

.drawer-count-chip {
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  background: rgba(0, 0, 0, 0.08);
  color: var(--text-secondary);
}

body.theme-dark .drawer-count-chip {
  background: rgba(255, 255, 255, 0.1);
  color: #e5c158;
}

.drawer-text-action-btn {
  background: transparent;
  border: none;
  color: var(--gold-primary, #b8860b);
  font-size: 11px;
  font-weight: 750;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
  transition: opacity 0.15s ease;
}

.drawer-text-action-btn:hover {
  opacity: 0.8;
  background: rgba(212, 175, 55, 0.1);
}

/* ─── 1. VENUE & ADDRESS ─────────────────────────────────────────────────── */
.drawer-venue-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.drawer-venue-address {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.4;
  cursor: pointer;
  word-break: break-word;
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

.drawer-venue-address:hover {
  color: var(--gold-primary, #b8860b);
}

.drawer-address-pin-icon {
  flex-shrink: 0;
  color: var(--gold-primary, #d4af37);
  margin-top: 1px;
}

.drawer-venue-message {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.45;
  margin-bottom: 6px;
  word-break: break-word;
}

.drawer-venue-badge {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gold-primary, #b8860b);
  margin-bottom: 4px;
}

.drawer-address-btn-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}

.drawer-address-meta {
  font-size: 11.5px;
  color: var(--text-muted, #8c7c64);
  font-weight: 600;
  margin-top: 4px;
}

body.theme-dark .drawer-address-meta {
  color: #c4b59d;
}



/* ─── CHAT ADDRESS BUBBLE CARD (Unified flush card: address on top, note below) ─── */
.chat-bubble.chat-bubble-address-wrap {
  padding: 0 !important;
  overflow: hidden !important;
  max-width: 295px;
}

.chat-address-bubble-card {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
  min-width: 235px;
  max-width: 295px;
  padding: 0;
  box-sizing: border-box;
  -webkit-touch-callout: none;
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;
}

.chat-address-bubble-top {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px 10px 14px;
  background: transparent;
  border: none;
  box-sizing: border-box;
}

.chat-address-venue-badge {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gold-primary, #b8860b);
}

body.theme-dark .chat-msg-row.outgoing .chat-address-venue-badge {
  color: #593c04;
}

.chat-address-bubble-text {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.4;
  cursor: pointer;
  word-break: break-word;
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

.chat-address-pin-icon {
  flex-shrink: 0;
  color: var(--gold-primary, #d4af37);
  margin-top: 1px;
}

.chat-address-bubble-text:hover {
  text-decoration: underline;
}

.chat-address-bubble-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 6px;
}

.chat-address-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 7px 10px;
  border-radius: 10px;
  font-size: 11.5px;
  font-weight: 750;
  border: 1px solid var(--border-color);
  background: var(--bg-card, #ffffff);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.15s ease;
  box-sizing: border-box;
}

.chat-address-btn:hover {
  border-color: var(--gold-primary, #d4af37);
  transform: translateY(-1px);
}

.chat-address-btn.primary {
  background: linear-gradient(135deg, #d4af37, #b8860b);
  color: #ffffff;
  border-color: #d4af37;
}

body.theme-dark .chat-address-btn {
  background: rgba(40, 35, 28, 0.9);
  border-color: rgba(212, 175, 55, 0.3);
  color: #f7f3ec;
}

body.theme-dark .chat-msg-row.outgoing .chat-address-btn {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(0, 0, 0, 0.1);
  color: #1a1205;
}

body.theme-dark .chat-msg-row.outgoing .chat-address-btn.primary {
  background: #1a1205;
  border-color: #1a1205;
  color: #ffffff;
}

.chat-address-caption {
  padding: 9px 14px 11px 14px;
  font-size: 14.5px;
  line-height: 1.45;
  color: var(--text-primary);
  word-break: break-word;
  border-top: 1px solid rgba(212, 175, 55, 0.22);
  background: rgba(255, 255, 255, 0.3);
}

.chat-msg-row.outgoing .chat-address-caption {
  background: rgba(212, 175, 55, 0.07);
}

body.theme-dark .chat-address-caption {
  border-top-color: rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.22);
}

/* Address Send Modal Inputs */
.chat-addr-modal-input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1.2px solid var(--border-color, #e5e0d8);
  background: var(--bg-card, #ffffff);
  color: var(--text-primary, #1a1205);
  font-size: 13px;
  font-weight: 600;
  outline: none;
  transition: border-color 0.15s ease;
}

.chat-addr-modal-input:focus {
  border-color: var(--gold-primary, #d4af37);
}

body.theme-dark .chat-addr-modal-input {
  background: rgba(30, 26, 20, 0.95);
  border-color: rgba(212, 175, 55, 0.35);
  color: #f7f3ec;
}

.drawer-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 7px 10px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
  color: var(--text-primary);
  transition: all 0.15s ease;
  box-sizing: border-box;
}

.drawer-action-btn:hover {
  border-color: var(--gold-primary, #d4af37);
  transform: translateY(-1px);
}

.drawer-action-btn:active {
  transform: scale(0.96);
}

.drawer-action-btn.primary {
  background: linear-gradient(135deg, #d4af37, #b8860b);
  color: #ffffff;
  border-color: #d4af37;
  box-shadow: 0 2px 8px rgba(184, 145, 37, 0.3);
}

.drawer-chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 2px;
}

.drawer-micro-chip {
  padding: 3px 8px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 700;
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.drawer-micro-chip.highlight {
  border-color: rgba(212, 175, 55, 0.4);
  color: var(--gold-primary, #b8860b);
  background: rgba(212, 175, 55, 0.08);
}

body.theme-dark .drawer-micro-chip.highlight {
  color: #f5d77f;
  background: rgba(212, 175, 55, 0.15);
}

/* ─── 2. PHOTOS GRID ("files like thr images sent") ───────────────────────── */
.drawer-photos-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.drawer-photo-card {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  cursor: pointer;
  background: #000000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.drawer-photo-card:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 14px rgba(212, 175, 55, 0.25);
}

.drawer-photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.drawer-photo-glass-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 4px 8px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.78) 0%, rgba(0, 0, 0, 0.1) 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #ffffff;
}

.drawer-photo-sender {
  font-size: 10px;
  font-weight: 750;
  text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}

.drawer-photo-expand-icon {
  font-size: 11px;
  opacity: 0.85;
}

/* ─── 3. SPEC FILES & DOCUMENTS ──────────────────────────────────────────── */
.drawer-docs-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.drawer-doc-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: all 0.15s ease;
}

.drawer-doc-row:hover {
  border-color: var(--gold-primary, #d4af37);
  background: rgba(212, 175, 55, 0.05);
}

.doc-badge-pill {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  color: #ffffff;
  font-size: 10px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.3);
}

.doc-meta-col {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.doc-title {
  font-size: 12px;
  font-weight: 750;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.doc-size {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-secondary);
}

.doc-open-btn {
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 750;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--gold-primary, #b8860b);
  cursor: pointer;
  transition: all 0.15s ease;
}

.doc-open-btn:hover {
  background: var(--gold-primary, #d4af37);
  color: #ffffff;
  border-color: var(--gold-primary, #d4af37);
}

/* ─── 4. AUDIO BRIEFING ──────────────────────────────────────────────────── */
.drawer-briefing-player {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
}

.drawer-play-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #d4af37, #aa7c11);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(184, 145, 37, 0.35);
  transition: transform 0.15s ease;
}

.drawer-play-btn:active {
  transform: scale(0.92);
}

.drawer-waveform-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.drawer-waveform-bars {
  display: flex;
  align-items: center;
  gap: 2.5px;
  height: 24px;
}

.drawer-vbar {
  flex: 1;
  background: rgba(184, 145, 37, 0.35);
  border-radius: 2px;
  transition: background 0.2s ease, height 0.2s ease;
}

body.theme-dark .drawer-vbar {
  background: rgba(229, 193, 88, 0.35);
}

.drawer-audio-time-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-secondary);
}

/* ─── DOCUMENT PREVIEW MODAL ─────────────────────────────────────────────── */
.doc-preview-card {
  max-width: 480px;
}

.doc-preview-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
  border-radius: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  margin-bottom: 8px;
}

.doc-section-heading {
  font-size: 12px;
  font-weight: 800;
  color: var(--gold-primary, #b8860b);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom: 2px;
}

body.theme-dark .doc-section-heading {
  color: #f5d77f;
}

.doc-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-primary);
  padding: 4px 0;
  border-bottom: 1px dashed var(--border-subtle);
}

.doc-item-row:last-child {
  border-bottom: none;
}

.doc-timeline-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px dashed var(--border-subtle);
}

.doc-timeline-item:last-child {
  border-bottom: none;
}

.timeline-time {
  font-size: 11px;
  font-weight: 800;
  color: var(--gold-primary, #b8860b);
  white-space: nowrap;
  width: 62px;
  flex-shrink: 0;
}

body.theme-dark .timeline-time {
  color: #f5d77f;
}

.timeline-text {
  font-size: 11.5px;
  color: var(--text-primary);
  line-height: 1.35;
}

.timeline-text b {
  display: block;
  font-weight: 750;
  margin-bottom: 1px;
}

/* ─── DRAWER TEAM & CALLS ROSTER ────────────────────────────────────────── */
.drawer-team-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.drawer-team-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(184, 145, 37, 0.06);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.drawer-team-card:hover {
  border-color: rgba(212, 175, 55, 0.45);
  box-shadow: 0 4px 12px rgba(184, 145, 37, 0.12);
  transform: translateY(-1px);
}

body.theme-gold-premium .drawer-team-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(253, 248, 238, 0.88) 100%);
  border: 1px solid rgba(212, 175, 55, 0.3);
  box-shadow: 0 2px 8px rgba(184, 145, 37, 0.08);
}

body.theme-dark .drawer-team-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(212, 175, 55, 0.2);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

body.theme-light .drawer-team-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.drawer-team-card-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.drawer-team-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #222632 0%, #151821 100%);
  border: 1.5px solid #d4af37;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 750;
  color: #f5d77f;
  font-size: 16px;
  position: relative;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  overflow: visible;
}

.drawer-team-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.drawer-team-status-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  background: #10b981;
}

body.theme-dark .drawer-team-status-dot {
  border-color: #1e1810;
}

.drawer-team-status-dot.offline {
  background: #9ca3af;
}

[dir="rtl"] .drawer-team-status-dot {
  left: 0;
  right: auto;
}

.drawer-team-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.drawer-team-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.drawer-team-name {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-primary, #1c1917);
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.theme-dark .drawer-team-name {
  color: #f3f4f6;
}

body.theme-light .drawer-team-name {
  color: #111827;
}

.drawer-team-badge-owner {
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 750;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.2) 0%, rgba(184, 145, 37, 0.15) 100%);
  color: #946914;
  border: 1px solid rgba(212, 175, 55, 0.4);
  letter-spacing: 0.02em;
}

body.theme-dark .drawer-team-badge-owner {
  background: rgba(212, 175, 55, 0.25);
  color: #f5d77f;
  border-color: rgba(212, 175, 55, 0.5);
}

body.theme-light .drawer-team-badge-owner {
  background: #fef3c7;
  color: #92400e;
  border-color: #fde68a;
}

.drawer-team-role {
  display: none !important;
}

body.theme-gold-premium .drawer-team-role {
  display: none !important;
}

body.theme-dark .drawer-team-role {
  display: none !important;
}

body.theme-light .drawer-team-role {
  display: none !important;
}

.drawer-team-card-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.drawer-team-call-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(253, 245, 228, 0.92) 100%);
  border: 1.2px solid #d4af37;
  color: #734d05;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(184, 145, 37, 0.18), inset 0 1px 0 #ffffff;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  -webkit-tap-highlight-color: transparent;
  outline: none;
}

.drawer-team-call-btn:hover {
  background: linear-gradient(135deg, #ffffff 0%, #faefd9 100%);
  border-color: #b8860b;
  color: #593c04;
  transform: scale(1.08);
  box-shadow: 0 4px 14px rgba(184, 145, 37, 0.32);
}

.drawer-team-call-btn:active {
  transform: scale(0.92);
  box-shadow: 0 1px 4px rgba(184, 145, 37, 0.2);
}

body.theme-dark .drawer-team-call-btn {
  background: linear-gradient(135deg, rgba(45, 38, 28, 0.95) 0%, rgba(30, 24, 16, 0.9) 100%);
  border-color: rgba(212, 175, 55, 0.5);
  color: #f5d77f;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.15);
}

body.theme-dark .drawer-team-call-btn:hover {
  background: linear-gradient(135deg, rgba(60, 50, 36, 0.95) 0%, rgba(42, 34, 22, 0.9) 100%);
  border-color: #f5d77f;
  color: #ffffff;
}

body.theme-light .drawer-team-call-btn {
  background: #ffffff;
  border-color: #d1d5db;
  color: #111827;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

body.theme-light .drawer-team-call-btn:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
  color: #000000;
}

/* Call Simulator Modal */
.chat-call-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #0d0f14;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: calc(env(safe-area-inset-top, 0px) + 30px) 24px calc(env(safe-area-inset-bottom, 20px) + 30px) 24px;
  color: #ffffff;
  animation: fadeIn 0.3s ease;
}

.call-modal-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.call-modal-title {
  font-size: 22px;
  font-weight: 700;
  color: #ffffff;
}

.call-modal-status {
  font-size: 13px;
  color: #d4af37;
  font-weight: 600;
}

.call-modal-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.call-pulsing-avatar {
  width: 110px;
  height: 110px;
  border-radius: 36px;
  border: 3px solid #d4af37;
  box-shadow: 0 0 35px rgba(212, 175, 55, 0.5);
  animation: callPulse 1.8s infinite ease-in-out;
}

@keyframes callPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 25px rgba(212, 175, 55, 0.4); }
  50% { transform: scale(1.05); box-shadow: 0 0 45px rgba(212, 175, 55, 0.7); }
}

.call-modal-controls {
  display: flex;
  align-items: center;
  gap: 24px;
}

.call-ctrl-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.call-ctrl-btn:active {
  transform: scale(0.9);
}

.call-ctrl-btn.end-call {
  background: #ef4444;
  box-shadow: 0 4px 18px rgba(239, 68, 68, 0.5);
}

/* ==========================================================================
   JESSY CHAT PRIVACY & VISIBILITY CONTROLS (EXCLUSIVE OWNER POWER)
   Hermès Liquid Glass & Gold Aesthetic
   ========================================================================== */



/* Pinned Alert Banner for Jessy in Message Stream */
.chat-jessy-banner-wrap {
  padding: 8px 12px 6px 12px;
  position: sticky;
  top: 0;
  z-index: 25;
  animation: slideDownSmooth 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.chat-jessy-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(26, 20, 14, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(212, 175, 55, 0.4);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.45);
}

.chat-jessy-banner-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.chat-jessy-banner-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.chat-jessy-banner-text {
  min-width: 0;
}

.chat-jessy-banner-text strong {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #f59e0b;
  letter-spacing: 0.2px;
}

.chat-jessy-banner-text p {
  margin: 1px 0 0 0;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-jessy-enable-btn {
  padding: 6px 13px;
  border-radius: 10px;
  background: linear-gradient(135deg, #d4af37, #b8860b);
  color: #12100e;
  font-size: 11px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.chat-jessy-enable-btn:active {
  transform: scale(0.95);
}

/* Worker Disabled State Screen */
.chat-disabled-empty-state {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 240px);
  padding: 24px 16px;
  animation: fadeInScale 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.chat-disabled-glass-card {
  width: 100%;
  max-width: 360px;
  padding: 34px 24px 28px 24px;
  text-align: center;
  border-radius: 24px;
  background: rgba(22, 18, 14, 0.88);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(212, 175, 55, 0.35);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.chat-disabled-shield-icon {
  width: 68px;
  height: 68px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.22), rgba(212, 175, 55, 0.06));
  border: 1.5px solid rgba(212, 175, 55, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #d4af37;
  margin-bottom: 18px;
  box-shadow: 0 0 26px rgba(212, 175, 55, 0.3);
}

.chat-disabled-title {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 8px 0;
  letter-spacing: -0.2px;
}

.chat-disabled-subtitle {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.72);
  margin: 0 0 16px 0;
  line-height: 1.45;
}

.chat-disabled-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 13px;
  border-radius: 20px;
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(245, 158, 11, 0.42);
  color: #f59e0b;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 14px;
}

.chat-disabled-pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f59e0b;
  animation: chatPrivacyPulse 1.8s infinite ease-in-out;
}

.chat-disabled-hint {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.45);
  margin: 0;
  line-height: 1.4;
}

/* Worker Disabled Bottom Bar */
.chat-input-disabled-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px dashed rgba(212, 175, 55, 0.3);
  color: rgba(255, 255, 255, 0.55);
  font-size: 12px;
  font-weight: 600;
  width: 100%;
}

/* Drawer Access Section for Jessy */
.drawer-privacy-admin-card {
  margin-bottom: 14px;
  border: 1px solid rgba(212, 175, 55, 0.3);
  background: rgba(212, 175, 55, 0.06);
}

.drawer-privacy-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 8px;
}

.drawer-privacy-status-text {
  font-size: 14px;
  font-weight: 700;
  color: #f59e0b;
}

.drawer-privacy-status-text.is-open {
  color: #d4af37;
}

.drawer-privacy-status-desc {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 2px;
}

.drawer-privacy-btn {
  padding: 8px 16px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s ease;
}

.drawer-privacy-btn.btn-disable {
  background: rgba(239, 68, 68, 0.18);
  border: 1px solid rgba(239, 68, 68, 0.45);
  color: #fca5a5;
}

.drawer-privacy-btn.btn-enable {
  background: linear-gradient(135deg, #d4af37, #b8860b);
  color: #12100e;
}

.drawer-privacy-btn:active {
  transform: scale(0.95);
}

.drawer-member-access-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 13px;
  border-radius: 9999px;
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  letter-spacing: 0.3px;
  box-sizing: border-box;
  text-transform: none;
}

/* Green "✓ Can View" - Rich emerald with high contrast */
.drawer-member-access-pill.is-allowed {
  background: #d1fae5;
  border: 1.5px solid #059669;
  color: #065f46;
  box-shadow: 0 1px 4px rgba(5, 150, 105, 0.2);
}

.drawer-member-access-pill.is-allowed:hover {
  background: #a7f3d0;
  border-color: #047857;
  color: #046c4e;
}

/* Red "🔒 Hidden" - Rich solid crimson with high contrast */
.drawer-member-access-pill.is-blocked {
  background: #fee2e2;
  border: 1.5px solid #dc2626;
  color: #991b1b;
  box-shadow: 0 1px 4px rgba(220, 38, 38, 0.2);
}

.drawer-member-access-pill.is-blocked:hover {
  background: #fecaca;
  border-color: #b91c1c;
  color: #7f1d1d;
}

.drawer-member-access-pill:active {
  transform: scale(0.94);
}

/* Dark mode overrides for sharp contrast */
body.theme-dark .drawer-member-access-pill.is-allowed,
[data-theme="dark"] .drawer-member-access-pill.is-allowed {
  background: rgba(16, 185, 129, 0.28);
  border: 1.5px solid #10b981;
  color: #6ee7b7;
}

body.theme-dark .drawer-member-access-pill.is-blocked,
[data-theme="dark"] .drawer-member-access-pill.is-blocked {
  background: rgba(239, 68, 68, 0.28);
  border: 1.5px solid #ef4444;
  color: #fca5a5;
}

/* Blocked / Restricted Chat State for Disabled Workers */
.chat-restricted-full-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 380px;
  height: 100%;
  padding: 30px 20px;
  box-sizing: border-box;
}

.chat-restricted-luxury-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 340px;
  width: 100%;
  padding: 32px 24px;
  background: rgba(255, 255, 255, 0.92);
  border: 1.5px solid rgba(212, 175, 55, 0.35);
  border-radius: 24px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(212, 175, 55, 0.12);
}

.chat-restricted-lock-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(212, 175, 55, 0.2));
  color: #dc2626;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.15);
}

.chat-restricted-title {
  font-family: 'Cinzel', 'Playfair Display', serif, -apple-system;
  font-size: 18px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 10px 0;
  letter-spacing: 0.5px;
}

.chat-restricted-message {
  font-size: 13px;
  line-height: 1.55;
  color: #666;
  margin: 0 0 18px 0;
}

.chat-restricted-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 14px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 800;
  background: #fee2e2;
  border: 1.5px solid #dc2626;
  color: #991b1b;
  letter-spacing: 0.4px;
}

body.theme-dark .chat-restricted-luxury-card,
[data-theme="dark"] .chat-restricted-luxury-card {
  background: rgba(24, 24, 27, 0.92);
  border: 1.5px solid rgba(212, 175, 55, 0.3);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.4);
}

body.theme-dark .chat-restricted-title,
[data-theme="dark"] .chat-restricted-title {
  color: #f4f4f5;
}

body.theme-dark .chat-restricted-message,
[data-theme="dark"] .chat-restricted-message {
  color: #a1a1aa;
}

body.theme-dark .chat-restricted-pill,
[data-theme="dark"] .chat-restricted-pill {
  background: rgba(239, 68, 68, 0.25);
  border: 1.5px solid #ef4444;
  color: #fca5a5;
}

.chat-text-input.is-blocked {
  background: rgba(0, 0, 0, 0.04) !important;
  color: #888 !important;
  cursor: not-allowed !important;
}

body.theme-dark .chat-text-input.is-blocked,
[data-theme="dark"] .chat-text-input.is-blocked {
  background: rgba(255, 255, 255, 0.05) !important;
  color: #666 !important;
}

/* Chat Privacy Interactive Modal for Jessy */
.chat-privacy-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.chat-privacy-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.chat-privacy-modal-card {
  width: 100%;
  max-width: 480px;
  background: rgba(20, 16, 12, 0.96);
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-bottom: none;
  border-radius: 24px 24px 0 0;
  padding: 20px 20px 32px 20px;
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.6);
  transform: translateY(100%);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  max-height: 85vh;
  overflow-y: auto;
}

.chat-privacy-modal-overlay.active .chat-privacy-modal-card {
  transform: translateY(0);
}

.chat-privacy-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.chat-privacy-modal-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-privacy-modal-icon-wrap {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: rgba(212, 175, 55, 0.16);
  border: 1px solid rgba(212, 175, 55, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #d4af37;
}

.chat-privacy-modal-title-col {
  display: flex;
  flex-direction: column;
}

.chat-privacy-modal-title {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
}

.chat-privacy-modal-subtitle {
  font-size: 11px;
  color: #d4af37;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.chat-privacy-modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.chat-privacy-modal-close:active {
  transform: scale(0.9);
}

.chat-privacy-status-box {
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid rgba(212, 175, 55, 0.35);
}

.chat-privacy-status-box.status-disabled {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.45);
}

.chat-privacy-status-box.status-enabled {
  background: rgba(34, 197, 94, 0.08);
  border-color: rgba(34, 197, 94, 0.35);
}

.chat-privacy-status-info {
  min-width: 0;
}

.chat-privacy-current-badge {
  font-size: 13px;
  font-weight: 700;
  display: block;
  margin-bottom: 3px;
}

.chat-privacy-status-box.status-disabled .chat-privacy-current-badge {
  color: #f59e0b;
}

.chat-privacy-status-box.status-enabled .chat-privacy-current-badge {
  color: #86efac;
}

.chat-privacy-status-desc {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.65);
  margin: 0;
  line-height: 1.35;
}

.chat-privacy-master-toggle-btn {
  padding: 10px 18px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

.chat-privacy-master-toggle-btn.btn-disable {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.5);
  color: #fca5a5;
}

.chat-privacy-master-toggle-btn.btn-enable {
  background: linear-gradient(135deg, #d4af37, #b8860b);
  color: #12100e;
}

.chat-privacy-master-toggle-btn:active {
  transform: scale(0.95);
}

.chat-privacy-members-section {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 16px;
}

.chat-privacy-section-title {
  font-size: 13px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
  margin: 0 0 12px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-privacy-member-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  margin-bottom: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.chat-privacy-member-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-privacy-member-avatar {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(212, 175, 55, 0.2);
  color: #d4af37;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
}

.chat-privacy-member-name {
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
}

.chat-privacy-member-role {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
}
