@import url('../tools/render_visual/style.css');

/* =============================================================================
   FLOWORK OS — NANO-MODULAR COMPONENT: CHAT_VIEWPORT.CSS
   Author: Flowork OS Sovereign Architect & Awenk Audico
   Co-authored-by: Flowork OS <agent@floworkos.com>
   ============================================================================= */

/* =============================================================================
   RIGHT BAR CHAT PANEL (Aerodynamic Cyber-Bubblegum Noir)
   - Pure UI presentation on the right side
   - Zero logic, smooth layout matching X-Flow design system
   ========================================================================== */
.rightbar-chat {
  width: var(--rightbar-width, 360px);
  min-width: var(--rightbar-min-width, 280px);
  max-width: var(--rightbar-max-width, 950px);
  height: 100%;
  flex-shrink: 0;
  background: rgba(4, 10, 24, 0.22) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: 1px solid rgba(0, 229, 255, 0.22) !important;
  border-radius: 14px;
  position: relative;
  overflow: hidden;
  display: flex !important;
  flex-direction: column !important;
  box-shadow: -4px 0 16px rgba(0, 0, 0, 0.35);
  transform: none !important;
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1), 
              opacity 0.25s ease;
  z-index: 25;
}

.rightbar-chat.is-resizing {
  transition: none !important;
}

.rightbar-chat.collapsed {
  width: 0 !important;
  min-width: 0 !important;
  max-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  opacity: 0 !important;
  border-width: 0 !important;
  pointer-events: none !important;
  transform: rotateY(0deg) translateZ(0) !important;
}

/* Chat Header */
.rightbar-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(0, 229, 255, 0.04) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border-bottom: 1px solid rgba(0, 229, 255, 0.18) !important;
}

.chat-header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-avatar-badge {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.2) 0%, rgba(176, 66, 255, 0.3) 100%);
  border: 1px solid rgba(0, 229, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  font-size: 16px;
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.25);
}

.chat-avatar-badge .pulse-beacon {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 8px;
  height: 8px;
}

.chat-header-titles {
  display: flex;
  flex-direction: column;
}

.chat-title {
  font-size: 13.5px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.3px;
}

.chat-subtitle {
  font-size: 10px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 1px;
}

.status-dot-green {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #00f5a0;
  box-shadow: 0 0 6px #00f5a0;
  display: inline-block;
}

.chat-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.chat-btn-action {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.chat-btn-action:hover {
  background: rgba(255, 59, 136, 0.2);
  border-color: rgba(255, 59, 136, 0.5);
  color: #ff3b88;
}

.chat-btn-action svg {
  pointer-events: none;
}

/* Chat Messages Scroll Area */
.rightbar-chat-messages {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-anchor: auto !important;
  scroll-behavior: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.rightbar-chat-messages::-webkit-scrollbar {
  width: 4px;
}

.rightbar-chat-messages::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 8px;
}

.rightbar-chat-messages::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 229, 255, 0.35);
}

/* ==========================================================================
   FLOWORK SOVEREIGN NATIVE CHAT DESIGN SYSTEM (Pure Cyber-Noir Sleek)
   ========================================================================== */

/* Base Chat Message Container */
.chat-msg {
  display: flex;
  flex-direction: column;
  width: 100%;
  animation: fadeIn 0.18s ease forwards;
}

/* User Message Bubble */
.chat-msg.user {
  align-items: flex-end;
  gap: 4px;
}

.chat-bubble.user {
  background: rgba(30, 41, 59, 0.45) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #f8fafc;
  padding: 8px 12px;
  border-radius: 12px 12px 2px 12px;
  max-width: 85%;
  font-size: 12px;
  line-height: 1.5;
  word-break: break-word;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: border-color 0.2s ease;
}

.chat-bubble.user:hover {
  border-color: rgba(255, 255, 255, 0.16) !important;
}

.chat-msg-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  padding: 2px 4px;
}

/* Unified Action Button Group (User Meta & Assistant Footer) */
.chat-msg-meta,
.chat-msg-footer {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.chat-msg-footer {
  margin-top: 4px;
  align-self: flex-start;
  padding: 2px 4px;
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.btn-msg-action {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted, #94a3b8);
  font-family: var(--font-mono, monospace);
  font-size: 10.5px;
  font-weight: 500;
  line-height: 1;
  padding: 4px 7px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  white-space: nowrap;
}

.btn-msg-action svg {
  flex-shrink: 0;
  opacity: 0.75;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.btn-msg-action:hover {
  background: rgba(0, 229, 255, 0.12);
  border-color: rgba(0, 229, 255, 0.28);
  color: #00e5ff;
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.18);
}

.btn-msg-action:hover svg {
  opacity: 1;
  transform: scale(1.08);
}

.btn-msg-action:active {
  transform: scale(0.96);
  background: rgba(0, 229, 255, 0.2);
}

.btn-msg-action.copied {
  color: #10b981 !important;
  border-color: rgba(16, 185, 129, 0.35) !important;
  background: rgba(16, 185, 129, 0.12) !important;
}

.btn-msg-action.copied svg {
  opacity: 1;
  stroke: #10b981;
}

/* User Prompt Specific Meta Bar */
.chat-msg.user .chat-msg-meta {
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid rgba(0, 229, 255, 0.12);
  border-radius: 8px;
  padding: 2px 6px;
}

.chat-msg.user .chat-msg-time {
  margin-right: 2px;
}

/* Assistant Message Feed */
.chat-msg.assistant {
  align-items: flex-start;
  gap: 6px;
  background: transparent;
  border: none;
  padding: 4px 0;
}

.chat-assistant-header {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  width: 100%;
  margin-bottom: 2px;
}

.chat-avatar-ai {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.2) 0%, rgba(139, 92, 246, 0.2) 100%);
  border: 1px solid rgba(236, 72, 153, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f472b6;
  flex-shrink: 0;
}

.chat-assistant-name {
  font-weight: 600;
  color: #f1f5f9;
  letter-spacing: 0.02em;
}

.chat-model-badge {
  font-size: 9.5px;
  color: #a78bfa;
  background: rgba(167, 139, 250, 0.1);
  padding: 1px 6px;
  border-radius: 9999px;
  border: 1px solid rgba(167, 139, 250, 0.25);
}

.chat-msg-time {
  font-size: 9.5px;
  color: var(--text-dim);
  margin-left: auto;
}

.chat-msg-content {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.chat-tools-area:empty { display: none !important; margin: 0 !important; }
.chat-tools-area,
.chat-thinking-area,
.chat-body-area {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow-x: hidden;
}

.chat-tools-area {
  margin-bottom: 0;
}

.chat-body-area {
  line-height: 1.65;
}

/* Code Snippet Card */
.chat-code-card {
  margin-top: 6px;
  margin-bottom: 6px;
  background: rgba(15, 23, 42, 0.5) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.code-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 10px;
  background: rgba(15, 23, 42, 0.7) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
}

.code-card-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono, monospace);
  font-size: 10px;
}

.code-card-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #38bdf8;
}

.code-card-lang {
  font-size: 9.5px;
  font-family: var(--font-mono, monospace);
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.code-card-loc {
  color: #64748b;
  font-size: 9px;
  font-weight: 500;
}

.code-card-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}

.code-card-run {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #00ff9d;
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 9.5px;
  font-family: var(--font-mono, monospace);
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s;
  text-shadow: 0 0 6px rgba(0, 255, 157, 0.4);
}

.code-card-run:hover {
  background: rgba(16, 185, 129, 0.3);
  border-color: #00ff9d;
  box-shadow: 0 0 10px rgba(0, 255, 157, 0.5);
  color: #ffffff;
}

.code-card-copy {
  background: rgba(0, 229, 255, 0.1);
  border: 1px solid rgba(0, 229, 255, 0.25);
  color: #38bdf8;
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 9.5px;
  font-family: var(--font-mono, monospace);
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s;
}

.code-card-copy:hover {
  background: rgba(0, 229, 255, 0.25);
  border-color: #00f0ff;
  color: #ffffff;
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.4);
}

.code-card-pre {
  margin: 0;
  padding: 8px 12px;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 10px;
  color: #cbd5e1;
  line-height: 1.5;
  overflow-x: auto;
}

/* Chat History Panel View */
.rightbar-history-view {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: rgba(14, 8, 22, 0.98);
  padding: 12px 14px;
}

.history-view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 10px;
}

.history-view-title {
  font-size: 12.5px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.3px;
}

.history-btn-back {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.history-btn-back:hover {
  background: rgba(0, 229, 255, 0.2);
  border-color: #00e5ff;
  color: #00e5ff;
}

.history-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.history-list::-webkit-scrollbar {
  width: 4px;
}

.history-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  min-height: 48px;
  box-sizing: border-box;
}

.history-item:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 92, 157, 0.3);
}

.history-item.active {
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.12) 0%, rgba(176, 66, 255, 0.16) 100%);
  border-color: rgba(0, 229, 255, 0.4);
}

.history-item.editing {
  background: rgba(15, 23, 42, 0.95);
  border-color: rgba(0, 229, 255, 0.6);
  box-shadow: 0 0 16px rgba(0, 229, 255, 0.15);
  cursor: default;
}

.history-item-left {
  display: flex;
  align-items: center;
  gap: 9px;
  overflow: hidden;
  flex: 1;
  min-width: 0;
}

.history-icon {
  font-size: 14px;
  flex-shrink: 0;
}

.history-meta {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex: 1;
  min-width: 0;
}

.history-name {
  font-size: 11.5px;
  font-weight: 700;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 210px;
  user-select: none;
  transition: color 0.15s ease;
}

.history-name:hover {
  color: #00e5ff;
}

.history-time {
  font-size: 9.5px;
  color: var(--text-dim);
}

.history-item-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  opacity: 0.6;
  transition: opacity 0.2s;
  flex-shrink: 0;
  margin-left: 8px;
}

.history-item:hover .history-item-actions {
  opacity: 1;
}

.history-item.editing .history-item-actions {
  display: none;
}

.history-item-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 14px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.history-item-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.history-item-rename:hover {
  color: #00e5ff;
  background: rgba(0, 229, 255, 0.15);
}

.history-item-del {
  font-size: 16px;
}

.history-item-del:hover {
  color: #ff3b88;
  background: rgba(255, 59, 136, 0.15);
}

/* History Inline Rename Box */
.history-rename-box {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
}

.history-rename-input {
  flex: 1;
  min-width: 0;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(0, 229, 255, 0.6);
  border-radius: 6px;
  color: #fff;
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 8px;
  outline: none;
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.2);
}

.history-rename-input:focus {
  border-color: #00e5ff;
  box-shadow: 0 0 14px rgba(0, 229, 255, 0.4);
}

.history-rename-btns {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.history-rename-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 5px;
  color: #e2e8f0;
  cursor: pointer;
  padding: 3px 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: bold;
  transition: all 0.2s ease;
}

.history-rename-save {
  color: #00e5ff;
}

.history-rename-save:hover {
  background: rgba(0, 229, 255, 0.25);
  border-color: #00e5ff;
}

.history-rename-cancel {
  color: #ff3b88;
}

.history-rename-cancel:hover {
  background: rgba(255, 59, 136, 0.25);
  border-color: #ff3b88;
}

/* ==========================================================================
   FLOWORK CHAT HEADER EXTENSIONS (Top Status Bar & Pinned Prompt)
   ========================================================================== */

/* Antigravity Top Status Bar (Active Subagents / Tasks Running) */
.fl-top-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 14px;
  background: rgba(0, 229, 255, 0.08);
  border-bottom: 1px solid rgba(0, 229, 255, 0.2);
  cursor: pointer;
  transition: all 0.2s ease;
  animation: fadeIn 0.2s ease;
  user-select: none;
}

.fl-top-status-bar:hover {
  background: rgba(0, 229, 255, 0.14);
}

.fl-top-status-left {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
}

.fl-top-status-text {
  font-size: 11px;
  font-family: var(--font-mono);
  font-weight: 600;
  color: #38bdf8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fl-top-status-view {
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--text-dim);
  transition: color 0.15s;
}

.fl-top-status-bar:hover .fl-top-status-view {
  color: #00e5ff;
}

/* Antigravity Sticky Pinned Prompt Bar (Active Turn) */
.fl-pinned-prompt-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: linear-gradient(180deg, rgba(22, 13, 36, 0.98) 0%, rgba(15, 9, 24, 0.95) 100%);
  border-bottom: 1px solid rgba(255, 92, 157, 0.25);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  position: sticky;
  top: 0;
  z-index: 15;
  animation: fadeIn 0.2s ease;
}

.fl-pinned-icon {
  font-size: 12px;
  flex-shrink: 0;
}

.fl-pinned-body {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex: 1;
}

.fl-pinned-label {
  font-size: 8.5px;
  font-weight: 800;
  font-family: var(--font-mono);
  color: #ff3b88;
  letter-spacing: 0.06em;
}

.fl-pinned-text {
  font-size: 11px;
  font-weight: 500;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fl-pinned-scroll-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  color: var(--text-dim);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  transition: all 0.2s;
  flex-shrink: 0;
}

.fl-pinned-scroll-btn:hover {
  background: rgba(255, 59, 136, 0.2);
  border-color: #ff3b88;
  color: #ffffff;
}

/* ==========================================================================
   FLOWORK MESSAGE QUEUE CARD (Queued messages during active generation)
   ========================================================================== */
.fl-queue-card {
  width: 100%;
  background: rgba(18, 12, 28, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 8px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
  animation: fadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  transition: all 0.2s ease;
}

.fl-queue-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.035);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  user-select: none;
}

.fl-queue-header-left {
  display: flex;
  align-items: center;
  gap: 7px;
  overflow: hidden;
}

.fl-queue-title {
  font-size: 11.5px;
  font-weight: 700;
  color: #f1f5f9;
  letter-spacing: -0.01em;
}

.fl-queue-count-badge {
  font-size: 9.5px;
  font-weight: 800;
  font-family: var(--font-mono);
  background: rgba(255, 59, 136, 0.2);
  color: #ff3b88;
  border: 1px solid rgba(255, 59, 136, 0.35);
  padding: 1px 6px;
  border-radius: 10px;
  line-height: 1.2;
}

.fl-queue-subtitle {
  font-size: 10.5px;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fl-queue-chevron-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px;
  border-radius: 4px;
  transition: all 0.15s ease;
}

.fl-queue-chevron-btn:hover {
  color: #f1f5f9;
  background: rgba(255, 255, 255, 0.08);
}

.fl-queue-card.collapsed .fl-queue-chevron-btn svg {
  transform: rotate(-90deg);
}

.fl-queue-card.collapsed .fl-queue-list {
  display: none !important;
}

.fl-queue-list {
  display: flex;
  flex-direction: column;
  max-height: 170px;
  overflow-y: auto;
}

.fl-queue-list::-webkit-scrollbar {
  width: 4px;
}

.fl-queue-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 4px;
}

.fl-queue-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: background 0.15s ease;
}

.fl-queue-row:last-child {
  border-bottom: none;
}

.fl-queue-row:hover {
  background: rgba(255, 255, 255, 0.03);
}

.fl-queue-row-text {
  font-size: 11.5px;
  color: #cbd5e1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.fl-queue-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.fl-queue-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 5px;
  color: var(--text-dim);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  font-size: 12px;
  transition: all 0.15s ease;
}

.fl-queue-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #f1f5f9;
}

.fl-queue-btn.btn-send-now:hover {
  background: rgba(0, 229, 255, 0.15);
  border-color: rgba(0, 229, 255, 0.4);
  color: #00e5ff;
}

.fl-queue-btn.btn-edit-queue:hover {
  background: rgba(167, 139, 250, 0.15);
  border-color: rgba(167, 139, 250, 0.4);
  color: #c084fc;
}

.fl-queue-btn.btn-delete-queue:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  color: #ef4444;
}

/* ==========================================================================
   FLOWORK CYBER HUD / FLOWORK TELEMETRY, STEPS, COMMANDS & TOOLS
   ========================================================================== */

/* Steps Toolbar (Bulk Expand / Collapse) */
.fl-tools-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 8px 5px 8px;
  margin: 3px 0 5px 0;
  border-radius: 6px;
  background: rgba(0, 229, 255, 0.03);
  border: 1px solid rgba(0, 229, 255, 0.12);
}

.fl-tools-count {
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: #94a3b8;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  letter-spacing: 0.02em;
}

.fl-tools-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #00e5ff;
  box-shadow: 0 0 6px #00e5ff;
}

.fl-tools-toggle-btn {
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid rgba(0, 229, 255, 0.25);
  color: #00e5ff;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.fl-tools-toggle-btn:hover {
  background: rgba(0, 229, 255, 0.22);
  border-color: #00e5ff;
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.35);
}

/* Shell Commands Accordion Group */
.fl-commands-group {
  width: 100%;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  margin: 2px 0 4px 0;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.fl-commands-group:hover {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(15, 23, 42, 0.55);
}

.fl-commands-summary {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  cursor: pointer;
  user-select: none;
  font-size: 10.5px;
  font-family: var(--font-mono);
  color: #cbd5e1;
  list-style: none;
}

.fl-commands-summary::-webkit-details-marker {
  display: none !important;
}

.fl-commands-chevron {
  font-size: 10px;
  font-weight: 700;
  color: #64748b;
  display: inline-block;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
  line-height: 1;
}

.fl-commands-group[open] .fl-commands-chevron {
  transform: rotate(90deg);
  color: #94a3b8;
}

.fl-commands-icon {
  color: #94a3b8;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.fl-commands-tag {
  display: none !important;
}

.fl-commands-label {
  font-weight: 500;
  color: #cbd5e1;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 10.5px;
}

.fl-commands-badge {
  font-size: 9.5px;
  font-weight: 500;
  padding: 1px 6px;
  border-radius: 4px;
  margin-left: auto;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.fl-commands-badge.running {
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.25);
}

.fl-commands-badge.done {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.fl-commands-list {
  padding: 3px 6px 5px 6px;
  background: rgba(3, 7, 18, 0.7);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* Individual Command Item */
.fl-cmd-item {
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: 1px solid rgba(255, 255, 255, 0.07);
  overflow: hidden;
  position: relative;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.fl-cmd-item:hover {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(15, 23, 42, 0.6);
}

.fl-cmd-item.is-running {
  border-color: rgba(56, 189, 248, 0.4);
}

.fl-cmd-item.is-completed-flash {
  border-color: rgba(16, 185, 129, 0.4) !important;
  transition: all 0.3s ease;
}

.fl-cmd-item.is-compact-pill {
  background: rgba(15, 23, 42, 0.35);
  border-color: rgba(255, 255, 255, 0.06);
}

.fl-cmd-item.is-compact-pill:hover {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(15, 23, 42, 0.55);
}

.fl-cmd-item.is-compact-pill:not([open]) .fl-cmd-item-body {
  max-height: 0;
  padding: 0 8px;
  opacity: 0;
  overflow: hidden;
}

.fl-cmd-item-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 7px;
  cursor: pointer;
  user-select: none;
  font-size: 10.5px;
  font-family: var(--font-mono);
  color: #cbd5e1;
  list-style: none;
}

.fl-cmd-item-header::-webkit-details-marker {
  display: none !important;
}

.fl-cmd-item-chevron {
  font-size: 9.5px;
  font-weight: 700;
  color: #64748b;
  transition: transform 0.15s ease;
  flex-shrink: 0;
}

.fl-cmd-item[open] .fl-cmd-item-chevron {
  transform: rotate(90deg);
  color: #94a3b8;
}

.fl-cmd-item-prompt {
  color: #64748b;
  font-weight: 700;
  user-select: none;
}

.fl-cmd-item-title {
  font-weight: 500;
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.fl-cmd-typed {
  color: #00e5ff;
  text-shadow: 0 0 8px rgba(0, 229, 255, 0.4);
}

.fl-cmd-cursor {
  display: inline-block;
  color: #00e5ff;
  margin-left: 2px;
  animation: flHackerBlink 0.5s infinite;
  font-weight: 700;
}

.fl-cmd-cursor.fade {
  opacity: 0;
  animation: none;
}

.fl-stream-live-cursor {
  display: inline-block;
  color: #00e5ff;
  margin-left: 3px;
  animation: flHackerBlink 0.45s infinite;
  font-weight: 700;
}

@keyframes flHackerBlink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0; transform: scale(0.8); }
}

.fl-cmd-item-ticker {
  display: none;
  align-items: center;
  gap: 5px;
  font-size: 9.5px;
  font-family: var(--font-mono);
  color: #00e5ff;
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid rgba(0, 229, 255, 0.22);
  padding: 1px 7px;
  border-radius: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 240px;
  margin-left: auto;
  margin-right: 6px;
}

.fl-cmd-item-ticker::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #00e5ff;
  box-shadow: 0 0 6px #00e5ff;
  animation: flTickerPulse 1.2s infinite ease-in-out;
  flex-shrink: 0;
}

@keyframes flTickerPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.3; transform: scale(0.7); }
}

.fl-cmd-item-body {
  padding: 6px 8px;
  background: rgba(3, 7, 18, 0.65);
  backdrop-filter: none saturate(180%);
  -webkit-backdrop-filter: none saturate(180%);
  border-top: 1px solid rgba(0, 229, 255, 0.12);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.fl-cmd-stdout-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-dim);
}

.fl-cmd-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #00e5ff;
  background: rgba(0, 229, 255, 0.1);
  border: 1px solid rgba(0, 229, 255, 0.3);
  padding: 1px 6px;
  border-radius: 4px;
  margin-left: 8px;
}

.fl-cmd-live-pulse {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #00e5ff;
  box-shadow: 0 0 6px #00e5ff;
  animation: flLivePulse 0.9s infinite ease-in-out;
}

@keyframes flLivePulse {
  0%, 100% { opacity: 1; transform: scale(1.1); }
  50% { opacity: 0.25; transform: scale(0.6); }
}

.fl-cmd-copy-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  font-size: 9px;
  font-family: var(--font-mono);
  padding: 1px 5px;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.fl-cmd-copy-btn:hover {
  background: rgba(0, 229, 255, 0.2);
  border-color: #00e5ff;
  color: #00e5ff;
}

.fl-cmd-copy-btn.copied {
  background: rgba(16, 185, 129, 0.2);
  border-color: #10b981;
  color: #34d399;
}

.fl-cmd-stdout {
  margin: 0;
  padding: 0;
  font-family: var(--font-mono);
  font-size: 9.5px;
  line-height: 1.45;
  color: #94a3b8;
  max-height: 180px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.fl-cmd-stdout.fl-cmd-live {
  color: #cbd5e1;
  border-left: 2px solid #38bdf8;
  padding-left: 6px;
  max-height: 240px;
  transition: border-color 0.2s ease;
}

.fl-cmd-empty {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim, #64748b);
  font-style: italic;
  padding: 3px 6px;
}

.fl-cmd-silent-success {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-style: normal;
  color: rgba(0, 255, 194, 0.85);
  background: rgba(0, 255, 194, 0.06);
  border: 1px solid rgba(0, 255, 194, 0.22);
  border-radius: 4px;
  padding: 4px 8px;
  margin: 3px 0;
  backdrop-filter: none !important;
}

.fl-cmd-silent-icon {
  color: #00ffc2;
  font-weight: 700;
  font-size: 10px;
}

.fl-cmd-silent-text {
  font-size: 10px;
  font-family: var(--font-mono);
  letter-spacing: 0.3px;
}

.fl-cmd-stderr-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 3px 8px;
  background: rgba(239, 68, 68, 0.08);
  border-top: 1px solid rgba(239, 68, 68, 0.2);
  border-bottom: 1px solid rgba(239, 68, 68, 0.15);
  font-size: 9px;
  font-family: var(--font-mono);
  color: #f87171;
  letter-spacing: 0.5px;
}

.fl-cmd-stderr {
  margin: 0;
  padding: 6px 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.4;
  color: #fca5a5;
  background: rgba(15, 23, 42, 0.4);
  white-space: pre-wrap;
  word-break: break-word;
}

/* Antigravity Stopped Generation Banner */
.fl-stopped-banner {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.28);
  color: #f87171;
  padding: 5px 10px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  margin-top: 6px;
}

.fl-stopped-icon {
  font-size: 10px;
}

/* Thought Process Card (Completed / Collapsible) */
.fl-thought-card {
  width: 100%;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  margin-bottom: 2px;
}

.fl-thought-card:hover {
  background: rgba(15, 23, 42, 0.55);
  border-color: rgba(255, 255, 255, 0.12);
}

.fl-thought-summary {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  cursor: pointer;
  user-select: none;
  font-size: 10.5px;
  font-family: var(--font-mono);
  color: #cbd5e1;
  list-style: none;
  min-width: 0;
  max-width: 100%;
  flex-wrap: wrap;
}

.fl-thought-summary::-webkit-details-marker {
  display: none !important;
}

.fl-thought-chevron {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  display: inline-block;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
  line-height: 1;
}

.fl-thought-card[open] .fl-thought-chevron {
  transform: rotate(90deg);
  color: #94a3b8;
}

.fl-thought-icon {
  flex-shrink: 0;
  color: #94a3b8;
  display: inline-flex;
  align-items: center;
}

.fl-thought-tag {
  display: none !important;
}

.fl-thought-label {
  font-weight: 500;
  color: #e2e8f0;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fl-thought-action {
  font-size: 9.5px;
  color: var(--text-dim);
  margin-left: auto;
  flex-shrink: 0;
}

.fl-thought-card[open] .fl-thought-action {
  display: none;
}

.fl-thought-content {
  padding: 8px 12px;
  background: rgba(3, 7, 18, 0.6);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-family: var(--font-mono);
  font-size: 10.5px;
  line-height: 1.5;
  color: #94a3b8;
  max-height: 220px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Tool Execution Cards */
.fl-tool-card {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  margin: 2px 0;
}

.fl-tool-card:hover {
  background: rgba(15, 23, 42, 0.6);
  border-color: rgba(255, 255, 255, 0.15);
}

.fl-tool-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  cursor: pointer;
  user-select: none;
  font-size: 10.5px;
  font-family: var(--font-mono);
  color: #cbd5e1;
  list-style: none;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.fl-tool-header::-webkit-details-marker {
  display: none !important;
}

.fl-tool-chevron {
  font-size: 10px;
  font-weight: 700;
  color: #64748b;
  display: inline-block;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
  line-height: 1;
}

.fl-tool-card[open] .fl-tool-chevron {
  transform: rotate(90deg);
  color: #94a3b8;
}

.fl-tool-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  flex-shrink: 0;
}

.fl-tool-tag {
  display: none !important;
}

.fl-tool-title {
  font-weight: 500;
  color: #cbd5e1;
  white-space: nowrap;
}

.fl-tool-cmd {
  font-family: var(--font-mono);
  font-size: 10px;
  color: #94a3b8;
  background: rgba(0, 0, 0, 0.3);
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  max-width: 170px;
}

.fl-tool-badge {
  font-size: 9.5px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
  margin-left: auto;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.fl-tool-badge.done {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.fl-tool-badge.running {
  background: rgba(0, 229, 255, 0.12);
  color: #00e5ff;
  border: 1px solid rgba(0, 229, 255, 0.3);
}

.fl-tool-spinner {
  width: 7px;
  height: 7px;
  border: 1.5px solid rgba(0, 229, 255, 0.3);
  border-top-color: #00e5ff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

.fl-tool-details {
  padding: 6px 8px;
  background: rgba(2, 6, 14, 0.85);
  border-top: 1px solid rgba(0, 229, 255, 0.1);
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.fl-tool-block {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.fl-tool-block-header {
  font-size: 9px;
  font-weight: 700;
  color: var(--text-dim);
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.fl-tool-code {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  padding: 5px 8px;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.45;
  color: #cbd5e1;
  max-height: 180px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Background Task Card */
.fl-task-card {
  width: 100%;
  border-radius: 6px;
  background: rgba(4, 12, 24, 0.6);
  border: 1px solid rgba(56, 189, 248, 0.2);
  overflow: hidden;
  margin: 3px 0;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.fl-task-card:hover {
  border-color: rgba(56, 189, 248, 0.4);
  background: rgba(56, 189, 248, 0.04);
}

.fl-task-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  cursor: pointer;
  user-select: none;
  font-size: 10.5px;
  font-family: var(--font-mono);
  color: #e2e8f0;
  list-style: none;
}

.fl-task-header::-webkit-details-marker {
  display: none !important;
}

.fl-task-card[open] .fl-tool-chevron {
  transform: rotate(90deg);
}

.fl-task-icon {
  color: #38bdf8;
  display: inline-flex;
  align-items: center;
}

.fl-task-tag {
  font-size: 9px;
  font-weight: 700;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 1px 5px;
  border-radius: 3px;
  letter-spacing: 0.04em;
}

.fl-task-title {
  color: #f1f5f9;
  font-weight: 500;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fl-task-body {
  padding: 6px 8px;
  background: rgba(2, 6, 14, 0.75);
  border-top: 1px solid rgba(56, 189, 248, 0.15);
}

/* Markdown Table Wrapper & Tactical HUD Styling */
.chat-table-wrapper {
  width: 100%;
  overflow-x: auto;
  margin: 10px 0;
  border-radius: 8px;
  border: 1px solid rgba(0, 229, 255, 0.28);
  background: rgba(3, 10, 24, 0.82);
  backdrop-filter: none !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), inset 0 0 10px rgba(0, 229, 255, 0.02);
}

.chat-table-hud-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 10px;
  background: rgba(0, 229, 255, 0.08);
  border-bottom: 1px solid rgba(0, 229, 255, 0.2);
  font-family: var(--font-mono, monospace);
  font-size: 10px;
}

.chat-table-hud-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.chat-table-hud-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #00f0ff;
  box-shadow: 0 0 6px #00f0ff;
}

.chat-table-hud-tag {
  color: #00f0ff;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-shadow: 0 0 6px rgba(0, 240, 255, 0.4);
}

.chat-table-hud-rows {
  color: #94a3b8;
  font-size: 9.5px;
}

.chat-table-hud-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}

.chat-table-hud-btn {
  background: rgba(0, 229, 255, 0.1);
  border: 1px solid rgba(0, 229, 255, 0.25);
  color: #38bdf8;
  border-radius: 4px;
  padding: 2px 7px;
  font-size: 9px;
  font-family: var(--font-mono, monospace);
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s;
}

.chat-table-hud-btn:hover {
  background: rgba(0, 229, 255, 0.25);
  color: #ffffff;
  border-color: #00f0ff;
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.4);
}

.chat-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11.5px;
  font-family: var(--font-sans, system-ui);
  color: #e2e8f0;
}

.chat-table thead {
  background: rgba(0, 229, 255, 0.06);
  border-bottom: 2px solid rgba(0, 229, 255, 0.35);
}

.chat-table th {
  padding: 8px 12px;
  font-family: var(--font-mono, monospace);
  font-size: 10px;
  font-weight: 700;
  color: #00e5ff;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
  text-shadow: 0 0 8px rgba(0, 240, 255, 0.4);
}

.chat-table td {
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  line-height: 1.45;
}

.chat-table tbody tr:nth-child(even) {
  background: rgba(0, 229, 255, 0.02);
}

.chat-table tbody tr:hover {
  background: rgba(0, 229, 255, 0.08);
}

.chat-cell-numeric {
  font-family: var(--font-mono, monospace);
  color: #38bdf8;
  font-weight: 600;
  text-shadow: 0 0 6px rgba(56, 189, 248, 0.3);
}

/* Callouts / Alerts */
.fl-callout {
  margin: 8px 0;
  padding: 8px 12px;
  border-radius: 6px;
  border-left: 3px solid #38bdf8;
  background: rgba(56, 189, 248, 0.06);
  font-size: 11px;
  line-height: 1.45;
}

.fl-callout-note {
  border-left-color: #38bdf8;
  background: rgba(56, 189, 248, 0.08);
}

.fl-callout-tip {
  border-left-color: #00ff9d;
  background: rgba(0, 255, 157, 0.08);
}

.fl-callout-important {
  border-left-color: #c084fc;
  background: rgba(192, 132, 252, 0.08);
}

.fl-callout-warning, .fl-callout-caution {
  border-left-color: #fbbf24;
  background: rgba(251, 191, 36, 0.08);
}

.fl-callout-tag {
  font-family: var(--font-mono, monospace);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: inherit;
  opacity: 0.95;
  margin-bottom: 3px;
  display: block;
}

/* Modern Markdown Structural Elements */
.chat-h1 {
  font-size: 13.5px;
  font-weight: 700;
  color: #f8fafc;
  margin: 10px 0 5px 0;
  padding: 0;
  border: none;
  background: transparent;
  letter-spacing: normal;
  text-shadow: none;
}

.chat-h2 {
  font-size: 13px;
  font-weight: 600;
  color: #e2e8f0;
  margin: 8px 0 4px 0;
  padding-bottom: 2px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  letter-spacing: normal;
  text-shadow: none;
}

.chat-h3 {
  font-size: 12.5px;
  font-weight: 600;
  color: #cbd5e1;
  margin: 8px 0 4px 0;
  text-shadow: none;
}

.chat-h4 {
  font-size: 12px;
  font-weight: 600;
  color: #94a3b8;
  margin: 6px 0 3px 0;
  padding: 0;
  border: none;
  background: transparent;
  letter-spacing: normal;
  text-shadow: none;
}

.chat-h5 {
  font-size: 11.5px;
  font-weight: 600;
  color: #94a3b8;
  margin: 6px 0 2px 0;
  letter-spacing: normal;
  text-shadow: none;
}
  color: #38bdf8;
  margin: 9px 0 3px 0;
  letter-spacing: 0.015em;
  text-shadow: 0 0 6px rgba(56, 189, 248, 0.4);
}

.chat-h6 {
  font-size: 11px;
  font-weight: 700;
  color: #a7f3d0;
  margin: 7px 0 2px 0;
  letter-spacing: 0.01em;
}

.chat-hr {
  border: none;
  border-top: 1px solid rgba(0, 229, 255, 0.2);
  margin: 10px 0;
}

.chat-inline-code {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.5px 5px;
  border-radius: 4px;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 11px;
  color: #e2e8f0;
  text-shadow: none;
  font-weight: 500;
  display: inline;
  vertical-align: baseline;
  box-shadow: none;
  word-break: break-word;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

/* Clean Minimalist Bold Typography */
.chat-strong {
  color: #f1f5f9;
  font-weight: 600;
  text-shadow: none;
  letter-spacing: normal;
}

/* Contextual Semantic Field Badges */
.chat-label-condition,
.chat-label-kondisi {
  color: #fb923c !important;
  background: rgba(251, 146, 60, 0.15) !important;
  border: 1px solid rgba(251, 146, 60, 0.45) !important;
  padding: 1px 7px !important;
  border-radius: 4px !important;
  text-shadow: 0 0 8px rgba(251, 146, 60, 0.6) !important;
  display: inline-block !important;
  margin: 1px 2px 1px 0 !important;
  font-size: 11.5px;
}

.chat-label-impact,
.chat-label-dampak {
  color: #f87171 !important;
  background: rgba(248, 113, 113, 0.15) !important;
  border: 1px solid rgba(248, 113, 113, 0.45) !important;
  padding: 1px 7px !important;
  border-radius: 4px !important;
  text-shadow: 0 0 8px rgba(248, 113, 113, 0.6) !important;
  display: inline-block !important;
  margin: 1px 2px 1px 0 !important;
  font-size: 11.5px;
}

.chat-label-solution,
.chat-label-solusi {
  color: #34d399 !important;
  background: rgba(52, 211, 153, 0.15) !important;
  border: 1px solid rgba(52, 211, 153, 0.45) !important;
  padding: 1px 7px !important;
  border-radius: 4px !important;
  text-shadow: 0 0 8px rgba(52, 211, 153, 0.6) !important;
  display: inline-block !important;
  margin: 1px 2px 1px 0 !important;
  font-size: 11.5px;
}

.chat-label-note,
.chat-label-catatan {
  color: #cbd5e1 !important;
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  padding: 1px 6px !important;
  border-radius: 4px !important;
  text-shadow: none !important;
  display: inline-block !important;
  margin: 1px 2px 1px 0 !important;
  font-size: 11px;
}

.chat-ul {
  margin: 6px 0 8px 18px;
  padding: 0;
  list-style-type: disc;
  max-width: calc(100% - 18px);
  box-sizing: border-box;
}

.chat-ul li, .chat-ol li {
  margin-bottom: 4px;
  line-height: 1.5;
  color: #cbd5e1;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.chat-ul li::marker {
  color: #00f0ff;
}

.chat-em {
  color: #cbd5e1;
  font-style: italic;
}

/* Bright Clickable Links in Chat */
.chat-link, .chat-body-area a {
  color: #00f0ff !important;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid rgba(0, 229, 255, 0.3);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer !important;
  pointer-events: auto !important;
  text-shadow: 0 0 8px rgba(0, 240, 255, 0.5);
  line-height: 1.35;
  vertical-align: baseline;
  max-width: 100%;
  box-sizing: border-box;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.chat-link:hover, .chat-body-area a:hover {
  background: rgba(0, 229, 255, 0.24);
  border-color: #00f0ff;
  color: #ffffff !important;
  text-shadow: 0 0 14px #00f0ff, 0 0 6px #ffffff;
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.4);
  transform: translateY(-1px);
}

.chat-link .chat-link-badge {
  font-size: 10px;
  opacity: 0.9;
  color: #38bdf8;
  transition: transform 0.2s;
}

.chat-link:hover .chat-link-badge {
  transform: translate(1px, -1px);
  color: #ffffff;
}

/* Tactical Status Badges in Chat Text */
.chat-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 6px;
  border-radius: 4px;
  font-family: var(--font-mono, monospace);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin: 0 2px;
  vertical-align: baseline;
}

.chat-badge .badge-dot {
  font-size: 8px;
}

.chat-badge-success {
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(16, 185, 129, 0.45);
  color: #00ff9d;
  text-shadow: 0 0 8px rgba(0, 255, 157, 0.5);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.2);
}

.chat-badge-danger {
  background: rgba(239, 68, 68, 0.16);
  border: 1px solid rgba(239, 68, 68, 0.5);
  color: #ff3366;
  text-shadow: 0 0 8px rgba(255, 51, 102, 0.6);
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.2);
}

.chat-badge-warning {
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(245, 158, 11, 0.45);
  color: #fbbf24;
  text-shadow: 0 0 8px rgba(251, 191, 36, 0.5);
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.2);
}

.chat-badge-info {
  background: rgba(0, 229, 255, 0.15);
  border: 1px solid rgba(0, 229, 255, 0.35);
  color: #00f0ff;
  text-shadow: 0 0 8px rgba(0, 240, 255, 0.5);
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.2);
}

.chat-ul, .chat-ol {
  margin: 8px 0 8px 18px;
  padding: 0;
  font-size: 11.5px;
  line-height: 1.65;
  color: #cbd5e1;
  max-width: calc(100% - 16px);
  box-sizing: border-box;
}

.chat-p {
  margin: 6px 0 8px 0;
  font-size: 11.5px;
  line-height: 1.65;
  color: #e2e8f0;
  max-width: 100%;
  word-break: break-word;
  overflow-wrap: anywhere;
}

/* ==========================================================================
   MR. FLOW AI HOLOGRAPHIC HERO CORE (EMPTY STATE VIEW) — STARK HUD
   ========================================================================== */
.fl-empty-hero {
  margin: auto 0;
  padding: 24px 14px 18px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  animation: flw-mrflow-fade-in 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  width: 100%;
  max-width: 440px;
  align-self: center;
  position: relative;
  z-index: 10;
}

@keyframes flw-mrflow-fade-in {
  from {
    opacity: 0;
    transform: translateY(-16px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* =============================================================================
   AGENT LOOPING FOCUS MODE: 3D MASCOT FOCUS & CHAT ISOLATION
   - When agent is looping: all chat messages are hidden so user focuses on mascot animation
   - Mascot hero appears front and center with active cognitive animation
   - After looping completes: mascot hides, all chat messages reappear
   ============================================================================= */

/* When messages exist in conversation: empty hero mascot is hidden so conversation is focal */
.rightbar-chat-messages.has-messages #chat-empty-hero {
  display: none !important;
}

/* While agent is looping: user messages and old history are hidden to focus 100% on looping animations */
.rightbar-chat-messages.agent-is-looping .chat-msg.user {
  display: none !important;
}

.rightbar-chat-messages.agent-is-looping .chat-msg:not(.chat-msg-active-turn) {
  display: none !important;
}

/* Inside active turn while looping: hide assistant header, body area, charts & footer so ONLY thinking & live tool animations show until chat ends */
.rightbar-chat-messages.agent-is-looping .chat-msg-active-turn .chat-assistant-header,
.rightbar-chat-messages.agent-is-looping .chat-msg-active-turn .chat-body-area,
.rightbar-chat-messages.agent-is-looping .chat-msg-active-turn .chat-msg-footer,
.rightbar-chat-messages.agent-is-looping .chat-chart-card {
  display: none !important;
}

/* When idle / looping finishes: all chat messages and headers return cleanly to view */
.rightbar-chat-messages:not(.agent-is-looping) .chat-msg {
  display: flex !important;
  contain: layout style;
}

.rightbar-chat-messages:not(.agent-is-looping) .chat-msg-active-turn .chat-assistant-header {
  display: flex !important;
}

.rightbar-chat-messages:not(.agent-is-looping) .chat-msg-active-turn .chat-body-area {
  display: block !important;
}

/* ==========================================================================
   MR. FLOW 3D MASCOT HERO STAGE & AUDIO DOCK (Chat Empty State)
   ========================================================================== */
.flw-chat-mascot-box {
  width: 100%;
  max-width: 380px;
  margin: 0 auto 6px auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.flw-chat-mascot-stage {
  width: 100%;
  height: 310px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none !important;
  box-shadow: none !important;
  overflow: visible;
  cursor: grab;
}

.flw-chat-mascot-stage:hover {
  border: none !important;
  box-shadow: none !important;
}

.flw-chat-mascot-stage:active {
  cursor: grabbing;
}

.flw-chat-mascot-canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
  outline: none;
}

.flw-mascot-voice-row {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.flw-mascot-voice-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 13px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: #38bdf8;
  background: rgba(14, 165, 233, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.3);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: none !important;
  user-select: none;
}

.flw-mascot-voice-btn:hover {
  background: rgba(14, 165, 233, 0.2);
  border-color: rgba(56, 189, 248, 0.6);
  color: #ffffff;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.3);
  transform: translateY(-1px);
}

.flw-mascot-voice-btn:active {
  transform: translateY(0);
}

.flw-mascot-voice-btn.is-speaking {
  background: rgba(0, 242, 254, 0.18);
  border-color: #00f2fe;
  color: #00f2fe;
  box-shadow: 0 0 16px rgba(0, 242, 254, 0.4);
}

.flw-voice-icon {
  font-size: 12px;
  line-height: 1;
}

.flw-voice-eq {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 10px;
  margin-left: 2px;
}

.flw-voice-eq .eq-bar {
  width: 2.5px;
  height: 4px;
  background: currentColor;
  border-radius: 1px;
  transition: height 0.15s ease;
}

.flw-mascot-voice-btn.is-speaking .flw-voice-eq .eq-bar:nth-child(1) {
  animation: flw-eq-bounce 0.6s infinite ease-in-out alternate;
}
.flw-mascot-voice-btn.is-speaking .flw-voice-eq .eq-bar:nth-child(2) {
  animation: flw-eq-bounce 0.75s infinite ease-in-out alternate 0.15s;
}
.flw-mascot-voice-btn.is-speaking .flw-voice-eq .eq-bar:nth-child(3) {
  animation: flw-eq-bounce 0.55s infinite ease-in-out alternate 0.25s;
}
.flw-mascot-voice-btn.is-speaking .flw-voice-eq .eq-bar:nth-child(4) {
  animation: flw-eq-bounce 0.7s infinite ease-in-out alternate 0.1s;
}

@keyframes flw-eq-bounce {
  0% { height: 3px; }
  100% { height: 11px; }
}

.flw-mascot-speech-bubble {
  margin-top: 10px;
  padding: 8px 14px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(0, 229, 255, 0.22);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  line-height: 1.45;
  color: #cbd5e1;
  text-align: left;
  backdrop-filter: none !important;
  position: relative;
}

.flw-mascot-speech-bubble::before {
  content: '';
  position: absolute;
  top: -5px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 8px;
  height: 8px;
  background: rgba(15, 23, 42, 0.75);
  border-left: 1px solid rgba(0, 229, 255, 0.22);
  border-top: 1px solid rgba(0, 229, 255, 0.22);
}

.flw-speech-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #00e5ff;
  box-shadow: 0 0 8px #00e5ff;
  flex-shrink: 0;
  animation: flw-pulse-glow 1.8s infinite ease-in-out;
}

@keyframes flw-pulse-glow {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 12px #00e5ff; }
}

.flw-speech-text {
  font-style: italic;
  color: #93c5fd;
}

/* MR. FLOW Title */
.flw-mrflow-title {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.2em;
  color: #ffffff;
  text-shadow: 0 0 12px rgba(0, 229, 255, 0.7), 0 0 24px rgba(0, 229, 255, 0.3);
}

/* MR. FLOW Status Bar */
.flw-mrflow-status {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: rgba(56, 189, 248, 0.85);
  text-shadow: 0 0 8px rgba(0, 229, 255, 0.3);
  display: flex;
  align-items: center;
  gap: 8px;
}

.flw-status-ping {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #00e5ff;
  box-shadow: 0 0 8px #00e5ff;
  animation: none !important;
}

/* Neural Equalizer Spectrum Bars */
.flw-cyber-bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 2.5px;
  height: 14px;
}

.flw-cyber-bar {
  width: 2.5px;
  background: #00e5ff;
  border-radius: 1px;
  box-shadow: 0 0 6px #00e5ff;
  animation: none !important;
}

.flw-cyber-bar.b1 { height: 4px; }
.flw-cyber-bar.b2 { height: 12px; }
.flw-cyber-bar.b3 { height: 7px; }
.flw-cyber-bar.b4 { height: 13px; }

/* Tactical HUD Corner Reticles */
.flw-hud-corners {
  position: absolute !important;
  inset: 0 !important;
  pointer-events: none !important;
  z-index: 5 !important;
}

.flw-hud-bracket {
  position: absolute !important;
  width: 24px !important;
  height: 24px !important;
  pointer-events: none !important;
}

.flw-hud-bracket.top-left {
  top: 12px !important;
  left: 16px !important;
  border-top: 2px solid rgba(0, 229, 255, 0.5) !important;
  border-left: 2px solid rgba(0, 229, 255, 0.5) !important;
  box-shadow: -2px -2px 10px rgba(0, 229, 255, 0.25) !important;
}

.flw-hud-bracket.top-right {
  top: 12px !important;
  right: 16px !important;
  border-top: 2px solid rgba(0, 229, 255, 0.5) !important;
  border-right: 2px solid rgba(0, 229, 255, 0.5) !important;
  box-shadow: 2px -2px 10px rgba(0, 229, 255, 0.25) !important;
}

.flw-hud-bracket.bottom-left {
  bottom: 12px !important;
  left: 16px !important;
  border-bottom: 2px solid rgba(0, 229, 255, 0.5) !important;
  border-left: 2px solid rgba(0, 229, 255, 0.5) !important;
  box-shadow: -2px 2px 10px rgba(0, 229, 255, 0.25) !important;
}

.flw-hud-bracket.bottom-right {
  bottom: 12px !important;
  right: 16px !important;
  border-bottom: 2px solid rgba(0, 229, 255, 0.5) !important;
  border-right: 2px solid rgba(0, 229, 255, 0.5) !important;
  box-shadow: 2px 2px 10px rgba(0, 229, 255, 0.25) !important;
}

.flw-hud-tag {
  position: absolute !important;
  font-family: var(--font-mono) !important;
  font-size: 8px !important;
  font-weight: 700 !important;
  letter-spacing: 0.14em !important;
  color: rgba(0, 229, 255, 0.6) !important;
  text-shadow: 0 0 8px rgba(0, 229, 255, 0.35) !important;
  white-space: nowrap !important;
  pointer-events: none !important;
}

.flw-hud-bracket.top-right .flw-hud-tag {
  top: -1px !important;
  right: 32px !important;
}

.flw-hud-bracket.bottom-left .flw-hud-tag {
  bottom: -1px !important;
  left: 32px !important;
}

/* Quick-Strike Action Chips */
.fl-hero-chips {
  display: flex;
  flex-direction: column;
  gap: 7px;
  width: 100%;
  margin-top: 4px;
}

.fl-chip-btn {
  background: rgba(0, 229, 255, 0.04);
  border: 1px solid rgba(0, 229, 255, 0.2);
  border-radius: 10px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  text-align: left;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  width: 100%;
}

.fl-chip-btn:hover {
  background: rgba(0, 229, 255, 0.14);
  border-color: rgba(0, 229, 255, 0.55);
  transform: translateY(-1px);
  box-shadow: 0 0 16px rgba(0, 229, 255, 0.25), inset 0 0 8px rgba(0, 229, 255, 0.1);
}

.fl-chip-icon {
  font-size: 14px;
  flex-shrink: 0;
}

.fl-chip-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
}

.fl-chip-label {
  font-size: 11.5px;
  font-weight: 600;
  color: #f1f5f9;
  letter-spacing: -0.01em;
}

.fl-chip-desc {
  font-size: 9.5px;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fl-chip-arrow {
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 700;
  transition: transform 0.15s ease, color 0.15s ease;
  flex-shrink: 0;
}

.fl-chip-btn:hover .fl-chip-arrow {
  color: #00e5ff;
  transform: translateX(2px);
}

/* ==========================================================================
   GLOBAL KEYFRAMES & UTILITIES
   ========================================================================== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes pulseDot {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.45;
    transform: scale(0.85);
  }
}

/* ========================================================================== */


/* Zero-box override for tools inside toolstream */
.fl-toolstream-body .fl-cmd-item,
.fl-toolstream-body .fl-tool-card {
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}



/* Chat Screenshot & Image Full Width (Matches Chat Width) */
.chat-media-card,
.chat-video-card,
.chat-audio-card {
  margin: 10px 0 !important;
  max-width: 100% !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.chat-media-preview {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  width: 100% !important;
  background: #05070f !important;
}

.chat-media-preview img {
  display: block !important;
  margin: 0 auto !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: 540px !important;
  object-fit: contain !important;
}

.chat-msg-attachments {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  justify-content: flex-start !important;
  align-items: center !important;
  margin: 4px 0 8px 0 !important;
  width: 100% !important;
}

.chat-msg-img-wrap {
  margin: 0 !important;
  max-width: 320px !important;
}

.chat-msg-content img,
.chat-body-area img,
.chat-bubble img {
  display: block;
  max-width: 100% !important;
  height: auto !important;
}
