/* ==========================================================================
   MELIOR CHAT: NANO BANANA EDITION (TASK-MEL-210)
   Pixel-perfect implementation of the approved Nano Banana visual reference.
   File: melior_modules/css/chat_nanobanana.css
   ========================================================================== */

/* 1. Fullscreen Container */
#nbChatContainer {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  z-index: 100000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  
  /* Soft, warm, pastel multi-color gradient mesh matching reference 1:1 */
  /* TASK-MEL-376: Removed background-attachment: fixed to prevent Android WebView black screen discard on suspend */
  background: 
    radial-gradient(circle at 12% 12%, rgba(190, 235, 255, 0.95), transparent 45%),
    radial-gradient(circle at 88% 18%, rgba(255, 232, 205, 0.92), transparent 48%),
    radial-gradient(circle at 18% 75%, rgba(255, 218, 228, 0.9), transparent 48%),
    radial-gradient(circle at 85% 82%, rgba(255, 242, 215, 0.95), transparent 45%),
    #eef5ff;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

#nbChatContainer.is-hidden { display: none !important; }

/* 2. Top Header Bar (Floating Glassmorphism) */
.nb-chat-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  padding: calc(env(safe-area-inset-top, 10px) + 6px) 12px 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: nowrap;
  z-index: 30;
  pointer-events: none;
  box-sizing: border-box;
}

.nb-header-btn {
  pointer-events: auto;
  background: rgba(255, 255, 255, 0.20) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  border: 1px solid rgba(255, 255, 255, 0.30) !important;
  border-radius: 14px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
  color: #0f172a;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.12s ease, background 0.15s ease;
  user-select: none;
}

.nb-header-btn:active {
  transform: scale(0.96);
  background: rgba(255, 255, 255, 0.35) !important;
}

.nb-btn-back {
  padding: 8px 16px;
  font-size: 15px;
  font-weight: 600;
}

.nb-interlocutor-btn {
  padding: 8px 14px;
  font-size: 15px;
  font-weight: 700;
  position: relative;
}

.nb-interlocutor-btn .nb-arrow {
  font-size: 12px;
  color: #64748b;
  margin-left: 2px;
  transition: transform 0.2s ease;
}

.nb-interlocutor-btn.is-active .nb-arrow {
  transform: rotate(180deg);
}

/* Dropdown Dialogue Menu */
.nb-dialogue-menu {
  position: absolute;
  top: 60px;
  right: 16px;
  min-width: 210px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 18px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.12);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 40;
}

.nb-dialogue-menu.is-hidden { display: none !important; }

.nb-dialogue-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 12px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: #0f172a;
  font-size: 15px;
  font-weight: 600;
  transition: background 0.15s ease;
  width: 100%;
  box-sizing: border-box;
}

.nb-dialogue-option:hover,
.nb-dialogue-option.is-active {
  background: rgba(224, 242, 254, 0.85);
  color: #0284c7;
}

.nb-dialogue-badge {
  background: #ef4444;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
}

.nb-dialogue-badge.is-zero {
  display: none;
}

/* 3. Messages History Area */
.nb-messages-area {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 86px 16px 160px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-sizing: border-box;
  -webkit-overflow-scrolling: touch;
}

.nb-messages-area::-webkit-scrollbar {
  width: 4px;
}
.nb-messages-area::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.35);
  border-radius: 4px;
}

/* Message Bubble: User (Sender #27) */
.nb-msg-row-user {
  display: flex;
  justify-content: flex-end;
  width: 100%;
}

.nb-msg-user-bubble {
  max-width: 84%;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  padding: 12px 16px;
  border-radius: 20px 20px 4px 20px;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.28);
  font-size: 15px;
  line-height: 1.45;
  word-break: break-word;
}

.nb-msg-user-bubble .nb-msg-time {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.75);
  text-align: right;
  margin-top: 4px;
}

/* TASK-MEL-215: User Task Status Indicator */
.nb-user-task-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  padding: 3px 9px;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  transition: transform 0.12s ease;
  user-select: none;
}

.nb-user-task-badge:active {
  transform: scale(0.96);
}

.nb-user-task-badge.is-completed {
  background: rgba(34, 197, 94, 0.25);
  color: #86efac;
  border: 1px solid rgba(34, 197, 94, 0.45);
}

.nb-user-task-badge.is-in-progress {
  background: rgba(245, 158, 11, 0.25);
  color: #fde68a;
  border: 1px solid rgba(245, 158, 11, 0.45);
}

.nb-user-task-badge.is-pending {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.nb-user-task-badge.is-error {
  background: rgba(239, 68, 68, 0.25);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.45);
}

/* Message Bubble: Semyon (Blueish lavender on the left) */
.nb-msg-row-semyon {
  display: flex;
  justify-content: flex-start;
  width: 100%;
}

.nb-msg-semyon-bubble {
  max-width: 84%;
  background: #e0f2fe;
  border: 1px solid rgba(255, 255, 255, 0.95);
  color: #0f172a;
  padding: 12px 16px;
  border-radius: 20px 20px 20px 4px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

.nb-msg-semyon-bubble .nb-msg-sender {
  font-size: 12px;
  color: #64748b;
  font-weight: 600;
  margin-bottom: 2px;
}

.nb-msg-semyon-bubble .nb-msg-text {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.4;
  color: #0f172a;
}

/* Message Bubble: Antigravity plain text */
.nb-msg-row-agent {
  display: flex;
  justify-content: flex-start;
  width: 100%;
}

.nb-msg-agent-bubble {
  max-width: 86%;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #0f172a;
  padding: 12px 16px;
  border-radius: 20px 20px 20px 4px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
  font-size: 15px;
  line-height: 1.45;
}

/* 4. ANTIGRAVITY REPORT CARD (Reference 1:1) */
.nb-report-card {
  width: 100%;
  box-sizing: border-box;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 22px;
  padding: 16px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.nb-report-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

/* Card Top Row: Task ID badge on left, Status badge + Date on right */
.nb-card-top-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.nb-card-task-pill {
  background: rgba(238, 230, 255, 0.85);
  border: 1px solid rgba(215, 195, 255, 0.7);
  border-radius: 12px;
  padding: 4px 10px;
  font-size: 13px;
  font-weight: 700;
  color: #4338ca;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.nb-card-status-col {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.nb-card-status-pill {
  border-radius: 12px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  letter-spacing: 0.3px;
}

.nb-card-status-pill.is-in-progress {
  background: rgba(254, 205, 205, 0.75);
  border: 1px solid rgba(252, 165, 165, 0.65);
  color: #dc2626;
}

.nb-card-status-pill.is-completed {
  background: rgba(187, 247, 208, 0.75);
  border: 1px solid rgba(134, 239, 172, 0.65);
  color: #16a34a;
}

.nb-card-status-pill.is-cancelled {
  background: rgba(226, 232, 240, 0.85);
  border: 1px solid rgba(203, 213, 225, 0.7);
  color: #64748b;
}

.nb-card-status-dot {
  font-size: 10px;
}

.nb-card-status-date {
  font-size: 12px;
  color: #64748b;
  margin-top: 3px;
  font-weight: 500;
}

/* Card Body Row: Title & Event Timestamp */
.nb-card-body-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nb-card-title {
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.35;
  margin: 2px 0;
}

.nb-card-time {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  color: #64748b;
  font-weight: 500;
}

/* Card Action Row: 3 equal-height buttons */
.nb-card-actions-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}

.nb-card-btn {
  flex: 1;
  height: 42px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.15;
  color: #1e293b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  white-space: normal;
  text-align: left;
  padding: 0 6px;
}

.nb-card-btn:active {
  transform: scale(0.96);
  background: rgba(255, 255, 255, 0.7);
}

.nb-card-btn.is-copied {
  background: rgba(220, 252, 231, 0.9) !important;
  border-color: #86efac !important;
  color: #15803d !important;
}

.nb-card-btn.btn-has-images {
  color: #334155;
  font-size: 12px;
}

.nb-card-btn.btn-has-images.is-empty {
  opacity: 0.45;
  cursor: default;
}

/* 5. Fixed Bottom Input Bar */
.nb-bottom-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 10px 16px calc(env(safe-area-inset-bottom, 12px) + 8px) 16px;
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid rgba(255, 255, 255, 0.7);
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 35;
  box-sizing: border-box;
}

/* Row 1: Textarea */
.nb-input-row {
  width: 100%;
}

.nb-textarea {
  width: 100%;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.98);
  border-radius: 16px;
  padding: 12px 18px;
  font-size: 16px;
  color: #0f172a;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
  outline: none;
  resize: none;
  min-height: 48px;
  max-height: 130px;
  line-height: 1.4;
  font-family: inherit;
  transition: border-color 0.15s ease;
}

.nb-textarea:focus {
  border-color: rgba(56, 189, 248, 0.6);
}

.nb-textarea::placeholder {
  color: #94a3b8;
  font-size: 15px;
}

/* Attach Preview Strip */
.nb-attach-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0;
}
.nb-attach-thumb {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.9);
  flex-shrink: 0;
}
.nb-attach-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.nb-attach-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 16px;
  height: 16px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  cursor: pointer;
}

/* Row 2: Controls & Send Button */
.nb-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.nb-tools-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

@media (max-width: 395px) {
  .nb-tools-group { gap: 4px; }
  .nb-tool-btn { width: 39px; height: 44px; border-radius: 12px; }
  .nb-actions-group { gap: 4px; }
  .nb-btn-media, .nb-btn-send { width: 44px; min-width: 44px; max-width: 44px; height: 44px; min-height: 44px; border-radius: 12px; }
}

.nb-tool-btn {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0f172a;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease;
  user-select: none;
}

.nb-tool-btn:active {
  transform: scale(0.94);
  background: rgba(255, 255, 255, 0.98);
}

.nb-tool-btn.is-active {
  background: rgba(224, 242, 254, 0.95);
  border-color: #38bdf8;
  color: #0284c7;
}

/* Filter Dropdown Menu (Pops up above tool button) */
.nb-filter-menu {
  position: absolute;
  bottom: 56px;
  left: 120px;
  min-width: 180px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 18px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.14);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 45;
}

.nb-filter-menu.is-hidden { display: none !important; }

.nb-filter-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: #0f172a;
  font-size: 14.5px;
  font-weight: 600;
  transition: background 0.12s ease;
  width: 100%;
  box-sizing: border-box;
}

.nb-filter-option:hover,
.nb-filter-option.is-active {
  background: rgba(224, 242, 254, 0.9);
  color: #0284c7;
}

/* Actions Group & Compact Send / Voice / Video-Circle Buttons (TASK-MEL-426) */
.nb-actions-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/* Compact Voice & Video-Circle Buttons (48x48 px, BL-04 compliant) */
.nb-btn-media {
  width: 48px;
  min-width: 48px;
  height: 48px;
  min-height: 48px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0284c7;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  user-select: none;
  flex-shrink: 0;
  touch-action: manipulation;
  padding: 0;
}

.nb-btn-media:hover {
  background: rgba(224, 242, 254, 0.95);
  border-color: #38bdf8;
  color: #0369a1;
}

.nb-btn-media:active {
  transform: scale(0.94);
}

.nb-btn-media.is-recording {
  background: #ef4444;
  border-color: #dc2626;
  color: #ffffff;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.25);
  animation: nbRecPulse 1.1s infinite ease-in-out;
}

@keyframes nbRecPulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.28); }
  50% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0.08); }
}

/* Compact Courier-with-Parcel Send Button (~1/4 of previous 142px width -> 48x48 icon button) */
.nb-btn-send {
  background: linear-gradient(135deg, #00c2ff 0%, #a855f7 100%);
  color: #ffffff;
  border: none;
  border-radius: 14px;
  padding: 0;
  width: 48px;
  min-width: 48px;
  max-width: 48px;
  height: 48px;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 194, 255, 0.38);
  cursor: pointer;
  transition: transform 0.12s ease, opacity 0.15s ease;
  user-select: none;
  flex-shrink: 0;
  touch-action: manipulation;
}

.nb-btn-send:active {
  transform: scale(0.94);
  opacity: 0.92;
}

/* Voice Recording Strip (TASK-MEL-426) */
.nb-voice-rec-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  margin-bottom: 6px;
  border-radius: 14px;
  background: rgba(254, 242, 242, 0.96);
  border: 1.5px solid rgba(239, 68, 68, 0.45);
  color: #0f172a;
}
.nb-voice-rec-bar.is-hidden { display: none !important; }
.nb-voice-rec-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ef4444;
  flex-shrink: 0;
  animation: nbRecPulse 1s infinite;
}
.nb-voice-rec-info {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nb-voice-rec-timer {
  font-size: 13px;
  font-weight: 800;
  color: #dc2626;
}
.nb-voice-rec-transcript {
  font-size: 13.5px;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nb-voice-rec-btn {
  min-width: 44px;
  min-height: 44px;
  border-radius: 12px;
  border: none;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.nb-voice-rec-cancel { background: #e2e8f0; color: #334155; }
.nb-voice-rec-send { background: #16a34a; color: #ffffff; }

/* Circular Video Recorder Overlay (TASK-MEL-426, opens ONLY on user tap) */
.nb-vc-overlay {
  position: fixed;
  inset: 0;
  z-index: 100025;
  background: rgba(15, 23, 42, 0.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 20px;
}
.nb-vc-overlay.is-hidden { display: none !important; }
.nb-vc-ring {
  width: 244px;
  height: 244px;
  border-radius: 50%;
  padding: 4px;
  background: conic-gradient(#ef4444, #00c2ff, #a855f7, #ef4444);
  box-shadow: 0 12px 36px rgba(0, 194, 255, 0.32);
  display: flex;
  align-items: center;
  justify-content: center;
}
.nb-vc-preview {
  width: 236px;
  height: 236px;
  border-radius: 50%;
  object-fit: cover;
  background: #020617;
  transform: scaleX(-1);
}
.nb-vc-timer {
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
  background: rgba(239, 68, 68, 0.85);
  padding: 4px 14px;
  border-radius: 999px;
}
.nb-vc-controls {
  display: flex;
  align-items: center;
  gap: 16px;
}
.nb-vc-btn {
  min-height: 52px;
  min-width: 108px;
  padding: 0 16px;
  border-radius: 14px;
  border: none;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
}
.nb-vc-btn--cancel { background: #334155; color: #f8fafc; }
.nb-vc-btn--flip { min-width: 52px; padding: 0 12px; background: rgba(255, 255, 255, 0.16); color: #ffffff; font-size: 20px; }
.nb-vc-btn--send { background: linear-gradient(135deg, #00c2ff, #a855f7); color: #ffffff; }

/* Circular Video Message Bubble in Feed (TASK-MEL-426 / CLD-018: 216px circle) */
.nb-video-circle-wrap {
  width: 216px;
  height: 216px;
  border-radius: 50%;
  overflow: hidden;
  border: none;
  box-shadow: 0 6px 22px rgba(14, 165, 233, 0.25);
  position: relative;
  cursor: pointer;
  background: #0f172a;
  flex-shrink: 0;
}
.nb-video-circle-el {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.nb-video-circle-badge {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.65);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  pointer-events: none;
}

/* User-to-User Message Corner Flag Translate Button (TASK-MEL-426 / CLD-018, RU <-> VI) */
.nb-msg-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 5px;
}
.nb-flag-translate-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  min-height: 26px;
  padding: 3px 5px;
  border-radius: 6px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(255, 255, 255, 0.65);
  opacity: 0.72;
  cursor: pointer;
  transition: transform 0.12s ease, opacity 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  touch-action: manipulation;
  flex-shrink: 0;
}
.nb-flag-translate-btn:hover,
.nb-flag-translate-btn.is-translated {
  opacity: 1;
  border-color: #0284c7;
  background: rgba(224, 242, 254, 0.92);
}
.nb-flag-translate-btn:active {
  transform: scale(0.92);
}
.nb-trans-inline {
  margin-top: 6px;
  padding: 6px 9px;
  border-radius: 10px;
  background: rgba(2, 132, 199, 0.08);
  border-left: 2.5px solid #0284c7;
  color: #0f172a;
  font-size: 14.5px;
  line-height: 1.42;
  white-space: pre-wrap;
  word-break: break-word;
}

/* TASK-MEL-426 / CLD-018: High-specificity overrides to beat chat_nanobanana.css cascade on 360px & 412px */
#nbChatContainer .nb-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  width: 100%;
  box-sizing: border-box;
}
#nbChatContainer .nb-tools-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
#nbChatContainer .nb-actions-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
#nbChatContainer .nb-tool-btn {
  width: 44px;
  min-width: 40px;
  height: 44px;
  padding: 0;
  border-radius: 13px;
  flex-shrink: 0;
}
#nbChatContainer .nb-btn-media {
  width: 44px;
  min-width: 40px;
  max-width: 46px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  border-radius: 13px;
  flex-shrink: 0;
}
#nbChatContainer .nb-btn-send {
  width: 48px;
  min-width: 48px;
  max-width: 48px;
  height: 48px;
  min-height: 48px;
  padding: 0;
  border-radius: 14px;
  flex-shrink: 0;
  color: #ffffff;
}
@media (max-width: 400px) {
  #nbChatContainer .nb-controls-row { gap: 4px; }
  #nbChatContainer .nb-tools-group { gap: 4px; }
  #nbChatContainer .nb-actions-group { gap: 4px; }
  #nbChatContainer .nb-tool-btn {
    width: 40px;
    min-width: 40px;
    height: 44px;
    border-radius: 12px;
  }
  #nbChatContainer .nb-btn-media {
    width: 42px;
    min-width: 40px;
    max-width: 44px;
    height: 44px;
    min-height: 44px;
    border-radius: 12px;
  }
  #nbChatContainer .nb-btn-send {
    width: 44px;
    min-width: 44px;
    max-width: 44px;
    height: 44px;
    min-height: 44px;
    border-radius: 12px;
  }
}

/* Individual Message Trash Can Button */
.nb-msg-trash-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  transition: color 0.15s ease, background 0.15s ease, transform 0.12s ease, opacity 0.15s ease;
  opacity: 0.6;
  user-select: none;
  vertical-align: middle;
}

.nb-msg-trash-btn:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
  opacity: 1;
  transform: scale(1.1);
}

/* 6. Fullscreen Report Modal Viewer */
.nb-report-viewer-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 100010;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}

.nb-report-viewer-modal.is-hidden { display: none !important; }

.nb-report-viewer-card {
  width: 100%;
  max-width: 540px;
  max-height: 85vh;
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.nb-report-viewer-header {
  padding: 16px 20px;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nb-report-viewer-body {
  padding: 20px;
  overflow-y: auto;
  font-size: 15px;
  line-height: 1.6;
  color: #1e293b;
  word-break: break-word;
}

.nb-report-viewer-footer {
  padding: 14px 20px;
  border-top: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
}

/* Guarantee classic modal is hidden when is-hidden is present */
#meliorChatModal.is-hidden,
.melior-modal-overlay.is-hidden { display: none !important; }

/* TASK-MEL-215: Lightbox Modal z-index fix */
.chat-lightbox-modal {
  z-index: 200000 !important;
  background: rgba(0, 0, 0, 0.94) !important;
}

.chat-lightbox-modal img {
  max-width: 95vw !important;
  max-height: 85vh !important;
  object-fit: contain !important;
  border-radius: 12px !important;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8) !important;
}

/* ==========================================================================
   TASK-MEL-219: Message Actions, Voice Notes & Round Video Notes
   ========================================================================== */

/* Message Bubble Action Trigger & Context Dropdown */
.nb-msg-bubble {
  position: relative;
}

.nb-msg-action-trigger {
  opacity: 0.7;
  background: rgba(255, 255, 255, 0.22);
  border: none;
  border-radius: 8px;
  padding: 2px 7px;
  cursor: pointer;
  font-size: 13px;
  color: inherit;
  transition: opacity 0.15s ease, background 0.15s ease;
  margin-left: 6px;
  vertical-align: middle;
}

.nb-msg-bubble--me .nb-msg-action-trigger {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.nb-msg-action-trigger:hover,
.nb-msg-action-trigger:active {
  opacity: 1;
  background: rgba(255, 255, 255, 0.45);
}

.nb-msg-actions-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 4px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
  padding: 6px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  min-width: 150px;
  gap: 4px;
}

.nb-msg-actions-dropdown.is-hidden { display: none !important; }

.nb-msg-action-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: none;
  background: transparent;
  border-radius: 8px;
  color: #1e293b;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: background 0.12s ease;
}

.nb-msg-action-item:hover,
.nb-msg-action-item:active {
  background: rgba(2, 132, 199, 0.1);
  color: #0284c7;
}

.nb-msg-action-item.is-danger {
  color: #ef4444;
}

.nb-msg-action-item.is-danger:hover {
  background: rgba(239, 68, 68, 0.1);
}

/* Voice Audio Notes */
.nb-voice-bubble {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.22);
  border-radius: 16px;
  margin-top: 6px;
  min-width: 220px;
}

.nb-voice-play-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: #0284c7;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.35);
  user-select: none;
}

.nb-msg-bubble--me .nb-voice-play-btn {
  background: #ffffff;
  color: #0284c7;
}

.nb-voice-progress-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nb-voice-progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(148, 163, 184, 0.3);
  border-radius: 3px;
  position: relative;
  cursor: pointer;
}

.nb-voice-progress-fill {
  height: 100%;
  background: #0284c7;
  border-radius: 3px;
  width: 0%;
  transition: width 0.1s linear;
}

.nb-msg-bubble--me .nb-voice-progress-fill {
  background: #ffffff;
}

.nb-voice-time {
  font-size: 12px;
  opacity: 0.85;
  font-variant-numeric: tabular-nums;
}

.nb-voice-recording-banner.is-hidden { display: none !important; }

.nb-voice-recording-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: #fee2e2;
  border: 1px solid #fca5a5;
  border-radius: 14px;
  margin-bottom: 8px;
  animation: pulseRecording 1.5s infinite;
}

@keyframes pulseRecording {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.nb-voice-rec-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ef4444;
  display: inline-block;
  margin-right: 6px;
}

/* Round Video Notes */
.nb-video-note-wrap {
  position: relative;
  width: 210px;
  height: 210px;
  margin: 6px 0;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
  border: 3px solid rgba(255, 255, 255, 0.7);
  cursor: pointer;
  background: #000;
}

.nb-video-note-player {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.nb-video-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 250000;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.nb-video-modal.is-hidden { display: none !important; }

.nb-video-circle-wrap {
  width: 250px;
  height: 250px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid #00f0ff;
  box-shadow: 0 0 30px rgba(0, 240, 255, 0.5);
  background: #000;
  position: relative;
}

.nb-video-camera-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}

.nb-video-rec-timer {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.nb-video-modal-controls {
  margin-top: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.nb-video-ctrl-btn {
  padding: 12px 20px;
  border-radius: 14px;
  border: none;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.nb-video-btn-rec { background: #ef4444; color: #fff; }
.nb-video-btn-stop { background: #f59e0b; color: #fff; }
.nb-video-btn-send { background: #0284c7; color: #fff; }
.nb-video-btn-cancel { background: #475569; color: #fff; }

/* Forward Message Modal */
.nb-forward-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 250000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nb-forward-modal.is-hidden { display: none !important; }

.nb-forward-box {
  width: 90%;
  max-width: 360px;
  background: #ffffff;
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.nb-forward-title {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}

.nb-forward-preview {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px;
  color: #475569;
  max-height: 80px;
  overflow-y: auto;
}

.nb-forward-targets {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nb-forward-target-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  color: #0f172a;
  transition: all 0.15s ease;
}

.nb-forward-target-btn:hover,
.nb-forward-target-btn:active {
  background: #e0f2fe;
  border-color: #0284c7;
  color: #0369a1;
}

/* --- TASK-MEL-271: Message Actions Fix --- */
.nb-msg-user-bubble, 
.nb-msg-semyon-bubble, 
.nb-msg-agent-bubble {
  position: relative !important;
}

.nb-msg-actions-dropdown {
  position: absolute !important;
  top: 100% !important;
  right: 0 !important;
  margin-top: 4px !important;
  background: rgba(255, 255, 255, 0.98) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border: 1px solid rgba(226, 232, 240, 0.9) !important;
  border-radius: 14px !important;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22) !important;
  padding: 6px !important;
  z-index: 10000 !important;
  display: flex !important;
  flex-direction: column !important;
  min-width: 155px !important;
  gap: 3px !important;
}

.nb-msg-actions-dropdown.is-hidden { display: none !important; }

.nb-msg-action-trigger {
  opacity: 0.75;
  background: rgba(255, 255, 255, 0.22);
  border: none;
  border-radius: 6px;
  padding: 1px 6px;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  color: inherit;
  transition: all 0.15s ease;
  user-select: none;
}

.nb-msg-action-trigger:hover,
.nb-msg-action-trigger:active {
  opacity: 1;
  background: rgba(255, 255, 255, 0.45);
}

.nb-msg-action-item {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 7px 10px !important;
  border: none !important;
  background: transparent !important;
  border-radius: 8px !important;
  color: #1e293b !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  text-align: left !important;
  transition: background 0.12s ease !important;
  white-space: nowrap !important;
}

.nb-msg-action-item:hover,
.nb-msg-action-item:active {
  background: rgba(2, 132, 199, 0.1) !important;
  color: #0284c7 !important;
}

.nb-msg-action-item.is-danger {
  color: #ef4444 !important;
}

.nb-msg-action-item.is-danger:hover {
  background: rgba(239, 68, 68, 0.1) !important;
}

/* Chat toast notification */
.nb-chat-toast {
  position: absolute;
  top: 72px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #ffffff;
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  z-index: 99999;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.nb-chat-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(4px);
}

.nb-chat-toast.is-error {
  background: rgba(220, 38, 38, 0.95);
}


/* ==========================================================================
   TASK-MEL-274: OWNER SERGEI (#27) WHITE MESSAGE BUBBLE & RED PANDA BADGE
   ========================================================================== */

.nb-msg-user-bubble.nb-msg-owner-bubble {
  background: #ffffff !important;
  color: #0f172a !important;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
}

.nb-msg-semyon-bubble.nb-msg-owner-bubble {
  background: #ffffff !important;
  color: #0f172a !important;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
}

.nb-msg-owner-bubble .nb-user-header,
.nb-msg-owner-bubble .nb-msg-sender {
  color: #475569 !important;
  font-weight: 600;
  font-size: 13.5px;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 6px;
  margin-bottom: 8px;
}

.nb-msg-owner-bubble .nb-owner-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nb-msg-owner-bubble .nb-owner-tag {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 1px 7px;
  border-radius: 6px;
  background: #f1f5f9;
  color: #0284c7;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 2px;
}

.nb-msg-owner-bubble .nb-msg-panda-badge,
.nb-msg-panda-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 10px;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  overflow: visible;
  transition: transform 0.15s ease;
}

.nb-msg-owner-bubble .nb-msg-panda-badge:hover {
  transform: scale(1.08);
}

.nb-msg-owner-bubble .nb-panda-thumb-img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.nb-msg-owner-bubble .nb-msg-text-clamped,
.nb-msg-owner-bubble .nb-msg-text,
.nb-msg-owner-bubble [id^="nb-msg-user-text-"] {
  color: #0f172a !important;
  font-size: 14.5px;
  line-height: 1.5;
}

.nb-msg-owner-bubble a {
  color: #0284c7 !important;
  text-decoration: underline;
}

.nb-msg-owner-bubble .nb-msg-time {
  color: #94a3b8 !important;
  font-size: 11px;
  margin-top: 6px;
}

.nb-msg-owner-bubble .nb-msg-action-trigger {
  color: #94a3b8 !important;
  background: transparent;
  border: none;
  font-size: 14px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  line-height: 1;
}

.nb-msg-owner-bubble .nb-msg-action-trigger:hover {
  background: #f1f5f9 !important;
  color: #0f172a !important;
}

.nb-msg-owner-bubble .nb-btn-expand-msg {
  color: #0284c7 !important;
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
}

/* --- Compact Header Row & Obshak Alignment (TASK-MEL-293) --- */
.nb-header-btn {
  height: 38px !important;
  font-size: 13.5px !important;
  border-radius: 12px !important;
  padding: 0 12px !important;
  flex-shrink: 0;
  box-sizing: border-box;
}

.nb-btn-back {
  min-width: 68px;
  padding: 0 10px !important;
}

.nb-btn-obshak {
  background: rgba(240, 253, 250, 0.9) !important;
  border: 1px solid rgba(20, 184, 166, 0.4) !important;
  color: #0d9488 !important;
  font-weight: 700 !important;
  padding: 0 10px !important;
}

.nb-btn-obshak.is-hidden { display: none !important; }

.nb-interlocutor-btn {
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 10px !important;
}

/* --- Dual-Mode Media Button Styles (TASK-MEL-293) --- */
.nb-btn-media.is-audio {
  background: rgba(254, 243, 199, 0.9) !important;
  border-color: rgba(245, 158, 11, 0.6) !important;
  color: #d97706 !important;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.25) !important;
}

/* --- Audio Recording Modal (TASK-MEL-293) --- */
.nb-audio-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 250000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}

.nb-audio-modal.is-hidden { display: none !important; }

.nb-audio-card {
  background: rgba(255, 255, 255, 0.96);
  border-radius: 24px;
  padding: 28px 24px;
  width: 100%;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  text-align: center;
  animation: vlFadeDown 0.2s ease;
}

.nb-audio-icon-pulse {
  font-size: 42px;
  transition: transform 0.2s ease;
}
.nb-audio-icon-pulse.is-recording {
  animation: nbPulse 1s infinite alternate;
}
@keyframes nbPulse {
  from { transform: scale(1); filter: drop-shadow(0 0 4px rgba(239, 68, 68, 0.4)); }
  to { transform: scale(1.15); filter: drop-shadow(0 0 12px rgba(239, 68, 68, 0.8)); }
}

.nb-audio-title {
  font-size: 16.5px;
  font-weight: 700;
  color: #0f172a;
}

.nb-audio-rec-timer {
  font-size: 24px;
  font-weight: 800;
  color: #ef4444;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.5px;
}

.nb-audio-modal-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  justify-content: center;
  margin-top: 8px;
}

.nb-audio-ctrl-btn {
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: transform 0.12s ease;
  user-select: none;
}
.nb-audio-ctrl-btn:active {
  transform: scale(0.95);
}

.nb-audio-btn-cancel {
  background: #f1f5f9;
  color: #64748b;
}

.nb-audio-btn-rec {
  background: #ef4444;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.35);
}

.nb-audio-btn-stop {
  background: #0f172a;
  color: #ffffff;
}

.nb-audio-btn-send {
  background: linear-gradient(135deg, #00c2ff 0%, #a855f7 100%);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 194, 255, 0.35);
}

/* TASK-MEL-357: Video message windows and button strictly suppressed */
#nbVideoRecordModal, #meliorVideoRecordModal, .nb-video-modal, .melior-video-modal, #nbBtnMediaRecord {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}


/* TASK-MEL-380: Action Toast & CSS Containment for Smooth 60fps Scroll */
.nb-msg-row-user, .nb-report-card, .nb-msg-row-other {
  contain: content;
}

.nb-action-toast {
  position: fixed;
  bottom: 84px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #ffffff;
  padding: 10px 18px;
  border-radius: 24px;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 100000;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  max-width: 90vw;
  box-sizing: border-box;
}
.nb-action-toast.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.nb-action-toast-msg {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nb-action-toast-btn {
  background: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%);
  color: #ffffff;
  border: none;
  padding: 6px 14px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.3);
  transition: transform 0.1s ease;
}
.nb-action-toast-btn:active {
  transform: scale(0.96);
}

/* TASK-MEL-389: Bidirectional message navigation and highlight pulse */
.nb-msg-jump-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: rgba(99, 102, 241, 0.08);
  color: #4f46e5;
  border: 1px solid rgba(99, 102, 241, 0.22);
  cursor: pointer;
  padding: 0;
  transition: all 0.18s ease;
  flex-shrink: 0;
}
.nb-msg-jump-btn:active {
  transform: scale(0.92);
  background: rgba(99, 102, 241, 0.25);
}
.nb-highlight-pulse {
  animation: nbHighlightPulseAnim 1.4s ease-out;
}
@keyframes nbHighlightPulseAnim {
  0% { transform: scale(1); box-shadow: 0 0 0 rgba(79, 70, 229, 0); }
  25% { transform: scale(1.025); box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.35), 0 4px 16px rgba(79, 70, 229, 0.25); }
  100% { transform: scale(1); box-shadow: 0 0 0 rgba(79, 70, 229, 0); }
}

/* TASK-MEL-390: Message Pin Styles */
.nb-msg-pin-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: rgba(148, 163, 184, 0.1);
  color: #64748b;
  border: 1px solid rgba(148, 163, 184, 0.25);
  cursor: pointer;
  padding: 0;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.nb-msg-pin-btn:hover {
  background: rgba(99, 102, 241, 0.12);
  color: #4f46e5;
  border-color: rgba(99, 102, 241, 0.3);
}
.nb-msg-pin-btn.is-pinned {
  background: rgba(225, 29, 72, 0.12);
  color: #e11d48;
  border-color: rgba(225, 29, 72, 0.35);
}
.nb-msg-pin-btn:active {
  transform: scale(0.92);
}


/* ==========================================================================
   CLD-020 / CLD-032: CLAUDE STARRY BACKGROUND ONLY + DRAGON FIGURINE BADGE (DEV)
   Cards, buttons, status badges, icons & owner messages stay IDENTICAL to Antigravity!
   ========================================================================== */

/* Dragon badge matching Owner Panda badge dimensions & light card style */
.nb-msg-dragon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 10px;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  overflow: visible;
  transition: transform 0.15s ease;
}
.nb-msg-dragon-badge:hover {
  transform: scale(1.08);
}
.nb-msg-dragon-badge .nb-panda-thumb-img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* Starry cosmic sky background ONLY on Claude dialogue container & messages area */
#nbChatContainer.nb-theme-claude {
  background: radial-gradient(ellipse at 30% 0%, #3b1d6e 0%, #1a1035 45%, #0b0820 100%) !important;
}

#nbChatContainer.nb-theme-claude #nbMessagesArea {
  background: url(/assets/claude/stars_tile.svg?v=1) repeat,
              radial-gradient(ellipse at 30% 0%, #3b1d6e 0%, #1a1035 45%, #0b0820 100%) !important;
  background-attachment: local, fixed !important;
}

/* Header & input field: subtle violet border to distinguish Claude, keeping crisp light readability */
#nbChatContainer.nb-theme-claude .nb-header-btn {
  background: rgba(255, 255, 255, 0.90) !important;
  border: 1.5px solid #8b5cf6 !important;
  color: #0f172a !important;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.25) !important;
}
#nbChatContainer.nb-theme-claude .nb-textarea {
  border: 2px solid #8b5cf6 !important;
  box-shadow: 0 2px 10px rgba(139, 92, 246, 0.22) !important;
}
#nbChatContainer.nb-theme-claude .nb-textarea:focus {
  border-color: #7c3aed !important;
}
#nbChatContainer.nb-theme-claude .nb-bottom-bar {
  background: rgba(255, 255, 255, 0.88) !important;
  border-top: 1.5px solid rgba(139, 92, 246, 0.45) !important;
}

/* Report card header alignment for dragon badge */
.nb-report-card .nb-card-unified-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Date separators & banners legible on starry background */
#nbChatContainer.nb-theme-claude .nb-date-sep,
#nbChatContainer.nb-theme-claude .nb-date-divider,
#nbChatContainer.nb-theme-claude .nb-history-banner {
  color: #e9d5ff !important;
}

/* ==========================================================================
   CLD-028 / TASK-MEL-429: Device Confirmation Card (Untrusted Browser UX)
   ========================================================================== */
.nb-device-confirm-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 14px;
  width: 100%;
  box-sizing: border-box;
}
.nb-device-confirm-card {
  width: 100%;
  max-width: 360px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.45);
  border-radius: 20px;
  padding: 22px 18px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
  text-align: center;
  color: #0f172a;
  box-sizing: border-box;
}
.nb-device-confirm-icon {
  font-size: 36px;
  line-height: 1;
  margin-bottom: 10px;
}
.nb-device-confirm-title {
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 6px;
}
.nb-device-confirm-sub {
  font-size: 14px;
  font-weight: 700;
  color: #b45309;
  margin-bottom: 10px;
}
.nb-device-confirm-desc {
  font-size: 14px;
  line-height: 1.45;
  color: #334155;
  margin-bottom: 16px;
}
.nb-device-confirm-btn,
.nb-device-confirm-submit {
  width: 100%;
  min-height: 48px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  padding: 10px 16px;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.28);
}
.nb-device-confirm-btn.is-hidden,
.nb-device-confirm-form.is-hidden { display: none !important; }
.nb-device-confirm-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}
.nb-device-confirm-input {
  width: 100%;
  min-height: 48px;
  box-sizing: border-box;
  border-radius: 12px;
  border: 1.5px solid #94a3b8;
  background: #f8fafc;
  color: #0f172a;
  font-size: 18px;
  letter-spacing: 0.2em;
  text-align: center;
  padding: 10px 12px;
  outline: none;
}
.nb-device-confirm-input:focus {
  border-color: #4f46e5;
  background: #ffffff;
}
.nb-device-confirm-err {
  font-size: 13.5px;
  font-weight: 600;
  color: #dc2626;
  min-height: 18px;
}

#nbChatContainer.nb-theme-claude .nb-device-confirm-card {
  background: rgba(30, 16, 60, 0.92);
  border-color: rgba(167, 139, 250, 0.5);
  color: #f8fafc;
}
#nbChatContainer.nb-theme-claude .nb-device-confirm-title { color: #f8fafc; }
#nbChatContainer.nb-theme-claude .nb-device-confirm-sub { color: #fde68a; }
#nbChatContainer.nb-theme-claude .nb-device-confirm-desc { color: #e2e8f0; }
#nbChatContainer.nb-theme-claude .nb-device-confirm-input {
  background: rgba(15, 10, 36, 0.9);
  border-color: rgba(167, 139, 250, 0.6);
  color: #f8fafc;
}
#nbChatContainer.nb-theme-claude .nb-device-confirm-err { color: #fca5a5; }

.nb-device-confirm-input::placeholder {
  letter-spacing: normal;
  font-size: 15px;
  color: #64748b;
}


/* ==========================================================================
   CLD-030: Prevent Pull-to-Refresh inside Chat & Scrollable Modals
   ========================================================================== */
#nbChatContainer {
  overscroll-behavior: none !important;
  overscroll-behavior-y: none !important;
}
#nbMessagesArea,
.modal-scroll,
.nb-report-modal-body {
  overscroll-behavior: contain !important;
  overscroll-behavior-y: contain !important;
  touch-action: pan-y !important;
}
html.chat-modal-open,
body.chat-modal-open {
  overflow: hidden !important;
  height: 100% !important;
  overscroll-behavior: none !important;
  overscroll-behavior-y: none !important;
}


/* ==========================================================================
   CLD-022: Reply Quote Banner, Message Quote Block & Multi-Select Forward Bar
   ========================================================================== */
.nb-reply-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(241, 245, 249, 0.95);
  border-left: 3px solid #4f46e5;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}
.nb-reply-banner.is-hidden { display: none !important; }
.nb-reply-banner-body {
  min-width: 0;
  flex: 1;
}
.nb-reply-banner-author {
  font-size: 12px;
  font-weight: 700;
  color: #4f46e5;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nb-reply-banner-text {
  font-size: 13px;
  color: #334155;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.3;
}
.nb-reply-banner-close {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 10px;
  background: rgba(148, 163, 184, 0.2);
  color: #334155;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
}

/* Quoted message inside bubble */
.nb-msg-quote-block {
  margin: 0 0 8px 0;
  padding: 6px 10px;
  border-left: 3px solid #6366f1;
  border-radius: 8px;
  background: rgba(99, 102, 241, 0.09);
  cursor: pointer;
  transition: background 0.15s ease;
}
.nb-msg-quote-block:active {
  background: rgba(99, 102, 241, 0.18);
}
.nb-msg-quote-author {
  font-size: 11.5px;
  font-weight: 700;
  color: #4f46e5;
  margin-bottom: 2px;
}
.nb-msg-quote-text {
  font-size: 12.5px;
  line-height: 1.3;
  color: #334155;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}



/* Multi-select checkboxes & floating bar */
.nb-selection-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.92);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.25);
}
.nb-selection-bar.is-hidden { display: none !important; }
.nb-selection-cancel {
  min-height: 40px;
  padding: 6px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: transparent;
  color: #e2e8f0;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.nb-selection-fwd {
  min-height: 40px;
  padding: 6px 16px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.nb-select-check {
  width: 26px;
  height: 26px;
  min-width: 26px;
  border-radius: 50%;
  border: 2px solid #94a3b8;
  background: rgba(255, 255, 255, 0.9);
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-right: 8px;
  align-self: center;
  flex-shrink: 0;
  padding: 0;
}
.nb-select-check.is-selected {
  background: #4f46e5;
  border-color: #4f46e5;
}
.is-selected-row > .nb-msg-user-bubble,
.is-selected-row > .nb-msg-semyon-bubble,
.is-selected-row > .nb-msg-agent-bubble,
.nb-report-card.is-selected-row {
  outline: 2px solid #6366f1 !important;
  outline-offset: 2px;
}

/* ==========================================================================
   CLD-041: Pinned Header with Android Soft Keyboard (visualViewport)
   ========================================================================== */
#nbChatContainer {
  position: fixed !important;
  top: var(--nb-vv-top, 0px);
  left: 0;
  right: 0;
  bottom: auto;
  width: 100% !important;
  height: var(--nb-vv-height, 100dvh);
  max-height: var(--nb-vv-height, 100dvh);
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}
#nbChatContainer .nb-chat-header {
  position: absolute !important;
  top: 0 !important;
  left: 0;
  right: 0;
  z-index: 30;
}
#nbChatContainer #nbMessagesArea {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
}
#nbChatContainer .nb-bottom-bar {
  flex: 0 0 auto !important;
}

/* ==========================================================================
   CLD-045: Disable Pull-to-Refresh Globally + 40px Circular Scroll-Down Button
   ========================================================================== */
html,
body {
  overscroll-behavior-y: none !important;
  overscroll-behavior: none !important;
}
#nbMessagesArea {
  overscroll-behavior-y: contain !important;
  -webkit-overflow-scrolling: touch !important;
}
.nb-scroll-down-btn {
  position: absolute;
  right: 14px;
  bottom: 138px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  z-index: 55;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #0f172a;
  border: 1px solid rgba(148, 163, 184, 0.45);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.18);
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.nb-scroll-down-btn:active {
  transform: scale(0.92);
}
.nb-scroll-down-btn.is-hidden { display: none !important; }
#nbChatContainer.nb-theme-claude .nb-scroll-down-btn {
  background: rgba(30, 27, 75, 0.82);
  color: #f8fafc;
  border-color: rgba(167, 139, 250, 0.45);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.42);
}
.nb-scroll-down-badge {
  position: absolute;
  top: -6px;
  right: -5px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ef4444;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.45);
  pointer-events: none;
}

/* ==========================================================================
   CLD-060: Long Voice Upload Progress & Retry Bar
   ========================================================================== */
.nb-voice-upload-bar {
  margin-bottom: 6px;
  padding: 9px 12px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.35;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.08);
}
.nb-voice-upload-bar.is-progress {
  background: rgba(239, 246, 255, 0.96);
  border: 1px solid rgba(59, 130, 246, 0.35);
  color: #1e3a8a;
}
.nb-voice-upload-bar.is-retry {
  background: rgba(254, 242, 242, 0.97);
  border: 1px solid rgba(239, 68, 68, 0.45);
  color: #991b1b;
}
.nb-vup-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-weight: 600;
}
.nb-vup-track {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.18);
  overflow: hidden;
}
.nb-vup-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #2563eb, #38bdf8);
  transition: width 0.15s ease;
}
.nb-vup-retry-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.nb-vup-retry-text {
  font-weight: 600;
  flex: 1 1 160px;
}
.nb-vup-retry-btns {
  display: flex;
  align-items: center;
  gap: 6px;
}
.nb-vup-btn-retry {
  border: none;
  background: #dc2626;
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  padding: 7px 12px;
  min-height: 36px;
  border-radius: 9px;
  cursor: pointer;
}
.nb-vup-btn-discard {
  border: 1px solid rgba(220, 38, 38, 0.35);
  background: #ffffff;
  color: #991b1b;
  font-size: 14px;
  font-weight: 700;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  cursor: pointer;
}


/* CLD-092: Melior Voice Wave Theme Accents */
#nbChatContainer {
  --accent: #0ea5e9;
}
#nbChatContainer .mvw {
  min-width: 210px;
  max-width: 100%;
  box-sizing: border-box;
}
.nb-msg-user-bubble .mvw {
  --mvw-accent: #0284c7;
  --mvw-dim: rgba(2, 132, 199, 0.28);
}
.nb-msg-semyon-bubble .mvw {
  --mvw-accent: #4f46e5;
  --mvw-dim: rgba(79, 70, 229, 0.28);
}
.nb-msg-agent-bubble .mvw {
  --mvw-accent: #7c3aed;
  --mvw-dim: rgba(124, 58, 237, 0.28);
}


/* CLDP-022: во время записи голоса в подвале видна только полоса записи */
footer.nb-is-voice-recording > *:not(#nbVoiceRecBar) { display: none !important; }
footer.nb-is-voice-recording #nbVoiceRecBar {
  margin: 0; padding: 12px 14px; min-height: 64px; border-radius: 18px;
}
footer.nb-is-voice-recording .nb-voice-rec-timer { font-size: 16px; }
footer.nb-is-voice-recording .nb-voice-rec-btn { min-width: 52px; min-height: 52px; font-size: 20px; border-radius: 16px; }

/* CLDP-028: Claude Task Status Badges */
.nb-claude-task-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  padding: 2px 7px;
  border-radius: 12px;
  margin-left: 4px;
  cursor: pointer;
  border: 1px solid transparent;
  outline: none;
  background: transparent;
  transition: transform 0.15s ease, opacity 0.15s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.nb-claude-task-badge:active {
  transform: scale(0.95);
  opacity: 0.85;
}
.nb-claude-task-badge.is-accepted {
  color: #64748b;
  background: #f1f5f9;
  border-color: #cbd5e1;
}
.nb-claude-task-badge.is-completed {
  color: #059669;
  background: #ecfdf5;
  border-color: #a7f3d0;
}
.nb-claude-task-badge.is-needs-owner {
  color: #d97706;
  background: #fffbeb;
  border-color: #fde68a;
}
.nb-claude-task-badge.is-failed {
  color: #dc2626;
  background: #fef2f2;
  border-color: #fecaca;
}

/* ==========================================================================
   STAGE B: Owner Card & Reactions & Panda Emoji (CLDP-260, CLDP-262, CLDP-263)
   ========================================================================== */
.nb-owner-card {
  background: #ffffff !important;
  border: 1.5px solid #cbd5e1 !important;
  border-radius: 14px !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04) !important;
  padding: 10px 12px !important;
  margin-bottom: 8px !important;
}

.nb-owner-unified-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 6px !important;
  padding-bottom: 6px !important;
  border-bottom: 1px solid #e2e8f0 !important;
  margin-bottom: 4px !important;
}

.nb-reaction-pill {
  transition: transform 0.15s ease, background-color 0.15s ease;
  user-select: none;
  -webkit-user-select: none;
}
.nb-reaction-pill:hover {
  background: #e2e8f0 !important;
  transform: scale(1.05);
}
.nb-reaction-pill:active {
  transform: scale(0.95);
}

.nb-btn-add-reaction {
  transition: transform 0.15s ease, background-color 0.15s ease;
}
.nb-btn-add-reaction:hover {
  background: #e2e8f0 !important;
  transform: scale(1.08);
}

.nb-panda-emoji-grid button:hover,
.nb-panda-picker-item:hover {
  background: #f1f5f9 !important;
  transform: scale(1.15);
}

.nb-panda-inline {
  width: 28px !important;
  height: 28px !important;
  vertical-align: middle !important;
  display: inline-block !important;
  object-fit: contain !important;
  margin: 0 2px !important;
}


/* ==========================================================================
   CLDP-273 EMERGENCY HOTFIX: Disable Pandas & Floating Stickers
   ========================================================================== */
#nbPandaPickerPopup,
.nb-panda-picker-popup,
#nbBtnPandaPicker,
.nb-panda-emoji-grid {
  display: none !important;
}

.nb-global-reaction-popup.is-hidden {
  display: none !important;
}

.nb-global-reaction-popup {
  position: fixed;
  z-index: 300000 !important;
  width: 230px;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
  padding: 8px 10px;
  box-sizing: border-box;
}

.nb-reaction-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 12px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  font-size: 13px;
  cursor: pointer;
  transition: transform 0.1s ease;
}
.nb-reaction-pill:active {
  transform: scale(0.95);
}

.nb-btn-add-reaction {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 14px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.1s ease;
}
.nb-btn-add-reaction:active {
  transform: scale(0.95);
}

/* ==========================================================================
   CLDP-334: убрать пустую «дыру» внизу чата. Был жёсткий запас 160px под панель ввода (рассчитан на открытую панель
   стикеров). Теперь чат сам меряет высоту панели ввода (с открытыми смайликами — выше, без — ниже) и оставляет ровно её + 14px.
   ========================================================================== */
#nbChatContainer #nbMessagesArea,
#nbChatContainer .nb-messages-area {
  padding-bottom: calc(var(--nb-bar-h, 146px) + 14px) !important;
}