/* ==========================================================================
   DealNology Escrow Chat System - Executive Theme & Fixed Sticky Layout
   Primary Brand: #630290 (Deep Purple), Secondary: #5E3AEE / #7B1FA2
   ========================================================================== */

:root {
  --dn-primary: #630290;
  --dn-primary-dark: #4a016d;
  --dn-primary-light: #7b1fa2;
  --dn-accent: #5E3AEE;
  --dn-bubble-out: linear-gradient(135deg, #630290 0%, #7b1fa2 100%);
  --dn-bubble-in: #FFFFFF;
  --dn-bubble-helper: #FAF5FF;
  --dn-border-helper: #630290;
  --dn-bg-sidebar: #F8FAFC;
  --dn-bg-window: #FAF9FC;
  --dn-text-main: #0F172A;
  --dn-text-muted: #64748B;
  --dn-border-light: #E2E8F0;
  --dn-success: #10B981;
  --dn-warning: #F59E0B;
}

/* 1. Remove theme breadcrumb & page title on Chat Room so chat is pulled right to top */
.page-template-chat-page .haru-page-title,
.page-template-chat-page .haru-page-title__content,
.page-template-chat-page .haru-page-title__breadcrumbs,
.page-template-chat-page .haru-breadcrumb,
.page-template-chat-page .haru-page-title-wrapper,
.page-template-chat-page .page-title,
.page-template-chat-page .entry-title,
.page-template-chat-page .entry-header,
.page-template-chat-page .breadcrumbs,
.dn-chat-active-page .entry-title,
.dn-chat-active-page .haru-page-title {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  max-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
  visibility: hidden !important;
  opacity: 0 !important;
}

#haru-content-main,
.haru-page,
.page-content-wrap,
.page-content,
.entry-content,
.post-13232 {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Prevent outer page scrolling while scrolling inside chat container */
body.page-template-default #dealnology-chat-root,
#dealnology-chat-root {
  max-width: 1140px;
  margin: 8px auto 26px auto !important;
  height: 740px; /* Fixed desktop height - eliminates endless page stretch */
  max-height: calc(100vh - 85px);
  min-height: 520px;
  display: flex;
  flex-direction: column;
  background: #FFFFFF;
  border-radius: 16px;
  border: 1px solid var(--dn-border-light);
  box-shadow: 0 12px 32px -4px rgba(99, 2, 144, 0.08), 0 4px 12px rgba(0, 0, 0, 0.03);
  overflow: hidden;
  position: relative;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  box-sizing: border-box;
}

#dealnology-chat-root * {
  box-sizing: border-box;
}

/* ==========================================================================
   Chat Header (Clean, Professional DealNology Top Bar)
   ========================================================================== */
.dl-chat-header {
  background: linear-gradient(135deg, var(--dn-primary) 0%, var(--dn-primary-dark) 100%);
  color: #FFFFFF;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 2px 8px rgba(99, 2, 144, 0.18);
  z-index: 10;
}

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

.dl-chat-title {
  font-size: 16.5px;
  font-weight: 700;
  letter-spacing: -0.2px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #FFFFFF;
}

.dl-chat-title .dl-brand-badge {
  display: none !important;
}

.dl-top-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.18);
  color: #FFFFFF !important;
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  text-decoration: none !important;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  line-height: 1.2;
}

.dl-top-back-btn:hover {
  background: rgba(255, 255, 255, 0.32);
  border-color: rgba(255, 255, 255, 0.55);
  color: #FFFFFF !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transform: translateX(-2px);
}

.dl-top-back-btn svg {
  display: block;
  transition: transform 0.2s ease;
}

.dl-top-back-btn:hover svg {
  transform: translateX(-2px);
}

.dl-chat-sub {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.82);
  margin-top: 1px;
}

/* ==========================================================================
   Chat Layout Split (Sidebar + Active Chat Window)
   ========================================================================== */
.dl-chat-wrap {
  flex: 1;
  display: flex;
  height: calc(100% - 56px);
  overflow: hidden;
  background: #FFFFFF;
  position: relative;
}

/* Sidebar (Left Room List) */
.dl-chat-list {
  width: 320px;
  flex-shrink: 0;
  background: var(--dn-bg-sidebar);
  border-right: 1px solid var(--dn-border-light);
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

/* Search Box in Sidebar */
.dl-search-wrap {
  padding: 12px 14px;
  border-bottom: 1px solid var(--dn-border-light);
  background: #FFFFFF;
  flex-shrink: 0;
}

.dl-search-box {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.dl-search-svg {
  position: absolute;
  left: 11px;
  pointer-events: none;
  stroke: #94A3B8;
  display: block;
}

.dl-search-input {
  width: 100%;
  padding: 9px 12px 9px 34px !important;
  border-radius: 10px;
  border: 1px solid var(--dn-border-light);
  outline: none;
  font-size: 13px;
  background: #F1F5F9;
  color: var(--dn-text-main);
  transition: all 0.2s ease;
}

.dl-search-input:focus {
  background: #FFFFFF;
  border-color: var(--dn-primary);
  box-shadow: 0 0 0 3px rgba(99, 2, 144, 0.1);
}

/* Room Items Container */
.dl-room-list {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dl-room-list::-webkit-scrollbar {
  width: 5px;
}

.dl-room-list::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 4px;
}

/* Individual Room Card (Sleek WhatsApp / Telegram Style Row) */
.dl-room {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 10px 14px !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  background: #FFFFFF !important;
  border-bottom: 1px solid #F1F5F9 !important;
  border-left: 3px solid transparent !important;
  margin: 2px 6px !important;
  transition: all 0.15s ease !important;
  position: relative !important;
}

.dl-room:hover {
  background: #F8FAFC !important;
}

.dl-room.active {
  background: #FAF5FF !important;
  border-left: 3px solid var(--dn-primary) !important;
}

/* User Circular Avatar & Online Indicator */
.dl-avatar-wrap,
.room-avatar-wrap,
.avatar-wrap {
  position: relative !important;
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  max-width: 44px !important;
  flex-shrink: 0 !important;
}

.dl-room-avatar,
.room-avatar,
.dl-avatar-wrap img,
.avatar-wrap img,
#dealnology-chat-root img.avatar {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  max-width: 44px !important;
  min-height: 44px !important;
  max-height: 44px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  display: block !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}

.dl-avatar-initials,
.room-avatar-fallback,
.avatar-wrap .initials {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  max-width: 44px !important;
  min-height: 44px !important;
  max-height: 44px !important;
  border-radius: 50% !important;
  background: linear-gradient(135deg, #630290 0%, #8A2BE2 100%) !important;
  color: #FFFFFF !important;
  font-weight: 700 !important;
  font-size: 14px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-transform: uppercase !important;
  box-shadow: 0 2px 5px rgba(99, 2, 144, 0.2) !important;
}

/* Online / Offline Dot Indicator */
.status-dot {
  position: absolute !important;
  bottom: 0 !important;
  right: 0 !important;
  width: 12px !important;
  height: 12px !important;
  border-radius: 50% !important;
  border: 2px solid #FFFFFF !important;
}

.status-dot.online {
  background-color: var(--dn-success) !important;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2) !important;
}

.status-dot.offline {
  background-color: #94A3B8 !important;
}

.room-text {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.room-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.room-title {
  font-weight: 600;
  font-size: 13.5px;
  color: var(--dn-text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.room-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 3px;
}

.room-order {
  font-size: 11.5px;
  color: var(--dn-text-muted);
  font-weight: 500;
}

.room-role-tag {
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

.room-role-tag.buyer {
  background: #E0E7FF;
  color: #3730A3;
}

.room-role-tag.seller {
  background: #F3E8FF;
  color: #6B21A8;
}

/* Clean Green Right Tick Badge for Confirmed Deals */
.badge.ok-tick {
  background: #10B981 !important;
  color: #FFFFFF !important;
  border-radius: 50% !important;
  width: 18px !important;
  height: 18px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  box-shadow: 0 1px 4px rgba(16, 185, 129, 0.35) !important;
}

.badge.locked {
  background: #64748B !important;
  color: #FFFFFF !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  padding: 2px 7px !important;
  border-radius: 999px !important;
}

.badge.closing-soon {
  background: #D97706 !important;
  color: #FFFFFF !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  padding: 2px 7px !important;
  border-radius: 999px !important;
}

/* ==========================================================================
   Chat Window (Active Conversation Pane)
   ========================================================================== */
.dl-chat-window {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #FFFFFF;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  position: relative;
}

/* Active Conversation Header */
.dl-window-header {
  padding: 12px 18px;
  background: #FFFFFF;
  border-bottom: 1px solid var(--dn-border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.dl-partner-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dl-back-btn,
.dl-mobile-chatlist-header {
  display: none !important;
}

.dl-partner-name-wrap {
  display: flex;
  flex-direction: column;
}

.dl-partner-name {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--dn-text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

.dl-partner-status {
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 1px;
}

.dl-partner-status.online {
  color: var(--dn-success);
  font-weight: 600;
}

.dl-partner-status.offline {
  color: var(--dn-text-muted);
}

.dl-status-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--dn-success);
  display: inline-block;
  animation: pulse-dot 1.8s infinite;
}

@keyframes pulse-dot {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.dl-order-pill {
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
  padding: 4px 10px;
  border-radius: 6px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Messages Scroll Container */
.dl-messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 18px 20px;
  background: var(--dn-bg-window);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

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

.dl-messages::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 6px;
}

/* ==========================================================================
   Chat Message Bubbles
   ========================================================================== */
.msg {
  display: flex;
  width: 100%;
  margin-bottom: 2px;
}

.msg .msg-body {
  max-width: 75%;
  border-radius: 14px;
  padding: 10px 14px;
  font-size: 13.5px;
  line-height: 1.5;
  word-break: break-word;
  position: relative;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

/* Received Message (Left) */
.msg-in {
  justify-content: flex-start;
}

.msg-in .msg-body {
  background: #FFFFFF;
  color: var(--dn-text-main);
  border: 1px solid var(--dn-border-light);
  border-bottom-left-radius: 4px;
}

.msg-in .msg-meta {
  font-size: 11px;
  color: var(--dn-text-muted);
  margin-top: 4px;
}

/* Sent Message (Right) */
.msg-out {
  justify-content: flex-end;
}

.msg-out .msg-body {
  background: var(--dn-bubble-out);
  color: #FFFFFF;
  border-bottom-right-radius: 4px;
  box-shadow: 0 3px 10px rgba(99, 2, 144, 0.18);
}

.msg-out .msg-meta {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.85);
  margin-top: 4px;
  text-align: right;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

/* Message Ticks (Single Tick, Double Grey Tick, Double Sky-Blue Tick) */
.dl-msg-tick {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  line-height: 1;
  margin-left: 3px;
}

.dl-tick-svg {
  display: block;
}

/* Helper Message */
.msg-helper {
  justify-content: center !important;
  margin: 12px 0;
}

.msg-helper .msg-body {
  max-width: 86% !important;
  background: var(--dn-bubble-helper) !important;
  border: 1.5px solid var(--dn-primary) !important;
  border-radius: 14px !important;
  padding: 14px 18px !important;
  box-shadow: 0 4px 16px rgba(99, 2, 144, 0.12) !important;
  color: #2D0A4E !important;
}

.helper-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px dashed rgba(99, 2, 144, 0.25);
  padding-bottom: 6px;
  margin-bottom: 8px;
}

.helper-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--dn-primary);
}

.helper-badge-tag {
  background: var(--dn-primary);
  color: #FFFFFF;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
}

.helper-meta {
  font-size: 11px;
  color: var(--dn-primary);
  opacity: 0.8;
}

/* System Milestone */
.msg-system {
  margin: 10px auto;
  padding: 10px 18px;
  max-width: 84%;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: #1E40AF;
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  border-radius: 10px;
}

/* ==========================================================================
   Images & Document Files in Chat (Refined: Larger Image + Circular Icon Button)
   ========================================================================== */
.dl-chat-image-wrap {
  position: relative;
  display: inline-block;
  margin-top: 6px;
  border-radius: 14px;
  overflow: hidden;
  max-width: 500px;
  max-height: 440px;
  background: rgba(0, 0, 0, 0.05);
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.dl-chat-image {
  display: block;
  max-width: 500px;
  max-height: 440px;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 14px;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
}

.dl-chat-image:hover {
  transform: scale(1.015);
  opacity: 0.98;
}

.dl-img-download-btn {
  position: absolute;
  bottom: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.76);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #FFFFFF !important;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none !important;
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.32);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 10;
  padding: 0 !important;
}

.dl-img-download-btn:hover {
  background: #630290;
  border-color: rgba(255, 255, 255, 0.55);
  transform: scale(1.1);
  box-shadow: 0 5px 16px rgba(99, 2, 144, 0.45);
}

.dl-img-download-btn .dl-dl-svg {
  display: block;
  stroke: #FFFFFF;
  width: 17px;
  height: 17px;
}

/* File Attachment Cards */
.dl-file-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #FFFFFF;
  border: 1.5px solid var(--dn-border-light);
  border-radius: 12px;
  padding: 10px 12px;
  width: 100%;
  min-width: 250px;
  max-width: 340px;
  margin: 4px 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.msg-out .dl-file-card {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: none;
}

.dl-file-icon-badge {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.dl-file-icon-badge.dl-file-archive {
  background: #FEF3C7;
  color: #D97706;
}

.dl-file-icon-badge.dl-file-pdf {
  background: #FEE2E2;
  color: #DC2626;
}

.dl-file-icon-badge.dl-file-doc {
  background: #DBEAFE;
  color: #2563EB;
}

.dl-file-icon-badge.dl-file-generic {
  background: #F1F5F9;
  color: #64748B;
}

.dl-file-icon-badge svg {
  display: block;
  stroke: currentColor;
}

.dl-badge-ext {
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.5px;
  margin-top: 1px;
  text-transform: uppercase;
  line-height: 1;
}

.dl-file-details {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.dl-file-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--dn-text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: normal;
}

.msg-out .dl-file-title {
  color: #FFFFFF;
}

.dl-file-subtitle {
  font-size: 11px;
  color: var(--dn-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: normal;
}

.msg-out .dl-file-subtitle {
  color: rgba(255, 255, 255, 0.85);
}

.dl-file-btn {
  background: var(--dn-primary);
  color: #FFFFFF !important;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.18s ease;
  flex-shrink: 0;
  white-space: nowrap;
  border: none;
}

.msg-out .dl-file-btn {
  background: #FFFFFF;
  color: var(--dn-primary) !important;
}

.dl-file-btn:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

.dl-file-btn .dl-dl-svg {
  display: block;
  stroke: currentColor;
}

.dl-attachment-caption {
  font-size: 13px;
  margin-top: 6px;
  line-height: 1.4;
}

/* Lightbox Modal */
.dl-lightbox-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(5px);
  z-index: 999999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.dl-lightbox-modal.active {
  display: flex;
}

.dl-lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.dl-lightbox-img {
  max-width: 100%;
  max-height: 82vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}

.dl-lightbox-close {
  position: absolute;
  top: -42px;
  right: 0;
  background: rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   Chat Send Form & Modern Input Bar (Sticky Bottom)
   ========================================================================== */
.dl-send-form {
  display: flex;
  flex-direction: column;
  padding: 10px 16px 14px 16px;
  border-top: 1px solid var(--dn-border-light);
  background: #FFFFFF;
  gap: 8px;
  flex-shrink: 0;
  position: relative;
  z-index: 5;
}

.dl-helper-admin-bar {
  padding: 6px 12px;
  background: #FAF5FF;
  border: 1px solid #E9D5FF;
  border-radius: 8px;
  font-size: 12px;
  color: #581C87;
}

/* Attachment Preview Pill */
.dl-attachment-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #FAF5FF;
  border: 1px solid #E9D5FF;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12.5px;
  color: var(--dn-primary);
  width: fit-content;
  max-width: 100%;
}

.dl-preview-name {
  font-weight: 600;
  max-width: 260px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dl-preview-remove {
  background: none;
  border: none;
  color: #94A3B8;
  cursor: pointer;
  padding: 2px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.15s ease;
}

.dl-preview-remove:hover {
  color: #DC2626;
  background: rgba(220, 38, 38, 0.08);
}

.dl-preview-remove svg {
  display: block;
  stroke: currentColor;
}

.dl-preview-svg {
  display: block;
  stroke: var(--dn-primary);
}

.dl-nav-svg {
  display: block;
  stroke: currentColor;
}

.dl-back-btn .dl-nav-svg {
  margin-right: 3px;
}

.dl-exit-chat-btn .dl-nav-svg {
  margin-right: 3px;
}

/* Modern Unified Input Container */
.dl-input-container {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #F8FAFC;
  border: 1.5px solid var(--dn-border-light);
  border-radius: 24px;
  padding: 6px 10px 6px 12px;
  transition: all 0.2s ease;
}

.dl-input-container:focus-within {
  border-color: var(--dn-primary);
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(99, 2, 144, 0.1);
}

.dl-input-tools {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0;
}

.dl-tool-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s ease;
  padding: 0;
  color: #64748B;
}

.dl-tool-btn:hover {
  background: #F3E8FF;
  color: var(--dn-primary);
  transform: translateY(-1px);
}

.dl-tool-btn:active {
  transform: scale(0.95);
}

.dl-tool-svg {
  display: block;
  stroke: currentColor;
}

.dl-text-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
}

#dl-message-input {
  width: 100%;
  min-height: 36px;
  height: 36px;
  max-height: 100px;
  padding: 8px 6px;
  border: none;
  outline: none;
  background: transparent;
  font-size: 14px;
  line-height: 20px;
  color: var(--dn-text-main);
  resize: none;
  font-family: inherit;
  box-sizing: border-box;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

#dl-message-input::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

#dl-message-input:disabled {
  background: transparent;
  cursor: not-allowed;
  opacity: 0.6;
}

.dl-input-send-tools {
  display: flex;
  align-items: center;
  padding: 0;
}

.dl-send-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--dn-primary) 0%, var(--dn-primary-light) 100%);
  color: #FFFFFF;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(99, 2, 144, 0.28);
  transition: all 0.2s ease;
  padding: 0;
}

.dl-send-icon-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(99, 2, 144, 0.38);
}

.dl-send-icon-btn:active {
  transform: scale(0.95);
}

.dl-send-icon-btn .send-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.dl-send-icon-btn .dl-send-svg {
  display: block;
  margin-left: 2px;
  stroke: #FFFFFF;
}

.dl-send-icon-btn .dl-spinner-svg {
  display: block;
  animation: dl-spin 0.8s linear infinite;
}

@keyframes dl-spin {
  100% {
    transform: rotate(360deg);
  }
}

/* Floating Rich Emoji Palette */
.dl-emoji-palette {
  position: absolute;
  bottom: 74px;
  left: 20px;
  width: 290px;
  background: #FFFFFF;
  border: 1px solid var(--dn-border-light);
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.14);
  z-index: 99;
  padding: 10px 12px;
}

.dl-emoji-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
  color: #64748B;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid #F1F5F9;
}

#dl-emoji-close {
  background: none;
  border: none;
  cursor: pointer;
  color: #94A3B8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px;
  border-radius: 4px;
  transition: all 0.15s ease;
}

#dl-emoji-close:hover {
  color: #1E293B;
  background: #F1F5F9;
}

#dl-emoji-close svg {
  display: block;
  stroke: currentColor;
}

.dl-emoji-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.dl-em-item {
  background: none;
  border: none;
  font-size: 19px;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: background 0.15s, transform 0.15s;
}

.dl-em-item:hover {
  background: #FAF5FF;
  transform: scale(1.18);
}

/* Buyer Confirm Button */
.dl-buyer-confirm-row {
  margin-top: 4px;
  text-align: center;
}

.dl-confirm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  padding: 0 20px;
  border: none;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--dn-primary) 0%, var(--dn-primary-light) 100%);
  color: #FFFFFF;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(99, 2, 144, 0.22);
  font-weight: 600;
  font-size: 13px;
}

/* Locked Banner */
.dl-locked-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #FEF2F2;
  border: 1px solid #FCA5A5;
  border-radius: 10px;
  padding: 12px 16px;
  margin-top: 6px;
}

.dl-locked-icon {
  font-size: 22px;
  flex-shrink: 0;
}

.dl-locked-text strong {
  font-size: 13.5px;
  color: #991B1B;
  display: block;
  margin-bottom: 2px;
}

.dl-locked-text p {
  margin: 0;
  font-size: 12px;
  color: #B91C1C;
  line-height: 1.45;
}

/* ==========================================================================
   Mobile Responsive Styling - Streamlined & Clutter-Free
   ========================================================================== */
.dl-back-btn {
  display: none !important;
  background: none !important;
  border: none !important;
  color: var(--dn-primary) !important;
  font-size: 18px !important;
  font-weight: 700 !important;
  cursor: pointer;
  padding: 0 !important;
  margin: 0 8px 0 0 !important;
}

@media (max-width: 768px) {
  /* Eliminate bulky purple header on mobile completely (removes ghich-pich) */
  .dl-chat-header {
    display: none !important;
  }

  #dealnology-chat-root {
    border-radius: 0 !important;
    border: none !important;
    max-width: 100% !important;
    margin: 0 !important;
    height: calc(100dvh - 70px) !important;
    max-height: calc(100dvh - 70px) !important;
    min-height: 480px !important;
    box-shadow: none !important;
  }

  body.admin-bar #dealnology-chat-root {
    height: calc(100dvh - 116px) !important;
    max-height: calc(100dvh - 116px) !important;
  }

  .dl-chat-wrap {
    height: 100% !important;
    position: relative;
  }

  .dl-chat-list,
  .dl-chat-window {
    width: 100%;
    height: 100%;
  }

  .dl-chat-list {
    position: relative;
    z-index: 1;
  }

  .dl-chat-window {
    position: absolute;
    inset: 0;
    transform: translateX(100%);
    background: #FFFFFF;
    z-index: 2;
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  }

  #dealnology-chat-root.mobile-chat-open .dl-chat-window {
    transform: translateX(0);
  }

  /* Mobile Chat List Header */
  .dl-mobile-chatlist-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 10px 14px !important;
    background: #FAF5FF !important;
    border-bottom: 1px solid #E9D5FF !important;
  }

  .dl-exit-chat-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    color: #630290 !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    padding: 5px 10px !important;
    border-radius: 6px !important;
    background: #FFFFFF !important;
    border: 1px solid #E9D5FF !important;
    box-shadow: 0 1px 3px rgba(99, 2, 144, 0.08) !important;
  }

  .dl-mobile-chatlist-title {
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #2D0A4E !important;
  }

  .dl-marketplace-link {
    font-size: 12.5px !important;
    font-weight: 600 !important;
    color: #630290 !important;
    text-decoration: none !important;
  }

  /* Back button in Chat Window Header */
  .dl-back-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    padding: 6px 10px !important;
    border-radius: 20px !important;
    background: #FAF5FF !important;
    border: 1px solid #E9D5FF !important;
    color: #630290 !important;
    font-weight: 700 !important;
    font-size: 12.5px !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
    margin: 0 !important;
    transition: all 0.18s ease !important;
    outline: none !important;
  }

  .dl-back-btn:hover {
    background: #630290 !important;
    color: #FFFFFF !important;
  }

  .dl-back-arrow {
    font-size: 15px !important;
    line-height: 1 !important;
    font-weight: 800 !important;
  }

  .dl-back-text {
    font-size: 12px !important;
    font-weight: 700 !important;
  }

  /* Fixed, perfectly aligned header on mobile */
  .dl-window-header {
    min-height: 56px !important;
    height: auto !important;
    max-height: none !important;
    padding: 8px 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    box-sizing: border-box !important;
  }

  .dl-partner-info {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex: 1 !important;
    min-width: 0 !important;
  }

  .dl-partner-name-wrap {
    flex: 1 !important;
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
  }

  .dl-partner-name {
    font-size: 14px !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    line-height: 1.2 !important;
    margin: 0 !important;
  }

  .dl-partner-status {
    font-size: 11.5px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    line-height: 1.2 !important;
    margin-top: 2px !important;
  }

  .dl-header-actions {
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
  }

  .dl-order-pill {
    font-size: 11.5px !important;
    font-weight: 700 !important;
    padding: 4px 8px !important;
    border-radius: 6px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }

  .msg .msg-body {
    max-width: 88%;
  }

  .dl-emoji-palette {
    width: calc(100% - 32px);
    left: 16px;
    right: 16px;
  }

  .dl-send-form {
    padding: 8px 10px !important;
  }

  .dl-input-container {
    padding: 4px 6px 4px 8px !important;
    gap: 5px !important;
    align-items: center !important;
    border-radius: 24px !important;
  }

  .dl-input-tools {
    display: flex !important;
    align-items: center !important;
    gap: 2px !important;
    padding: 0 !important;
  }

  #dealnology-chat-root button.dl-tool-btn,
  #dealnology-chat-root .dl-tool-btn {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    max-width: 32px !important;
    font-size: 15px !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  #dealnology-chat-root button#dl-send-btn,
  #dealnology-chat-root .dl-send-icon-btn {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    max-width: 36px !important;
    font-size: 14px !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  #dl-message-input {
    min-height: 36px !important;
    height: 36px !important;
    max-height: 90px !important;
    padding: 8px 6px !important;
    font-size: 13.5px !important;
    line-height: 20px !important;
    overflow-y: hidden !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
  }

  #dl-message-input::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
  }
}

@media (max-width: 480px) {
  #dealnology-chat-root button.dl-tool-btn,
  #dealnology-chat-root .dl-tool-btn {
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    max-width: 30px !important;
    font-size: 14px !important;
  }
  #dealnology-chat-root button#dl-send-btn,
  #dealnology-chat-root .dl-send-icon-btn {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    max-width: 34px !important;
    font-size: 13px !important;
  }
  .dl-send-form {
    padding: 6px 8px !important;
  }
  .dl-input-container {
    padding: 3px 5px 3px 6px !important;
    gap: 3px !important;
  }
}

/* ==========================================================================
   HIGH-SPECIFICITY THEME RESETS (Immune to Haru Global Button & Form CSS)
   ========================================================================== */
#dealnology-chat-root button.dl-tool-btn,
#dealnology-chat-root .dl-tool-btn {
  background: #F8FAFC !important;
  color: #334155 !important;
  border: 1.5px solid #E2E8F0 !important;
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  max-width: 36px !important;
  border-radius: 50% !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 16px !important;
  padding: 0 !important;
  margin: 0 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
  outline: none !important;
  transition: all 0.18s ease !important;
}

#dealnology-chat-root button.dl-tool-btn:hover,
#dealnology-chat-root .dl-tool-btn:hover {
  background: #EDE9FE !important;
  color: #630290 !important;
  border-color: #C4B5FD !important;
  transform: translateY(-1px) scale(1.06) !important;
  box-shadow: 0 3px 8px rgba(99, 2, 144, 0.15) !important;
}

#dealnology-chat-root button#dl-send-btn,
#dealnology-chat-root .dl-send-icon-btn {
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  max-width: 40px !important;
  border-radius: 50% !important;
  border: none !important;
  background: linear-gradient(135deg, #630290 0%, #8A2BE2 100%) !important;
  color: #FFFFFF !important;
  box-shadow: 0 3px 10px rgba(99, 2, 144, 0.3) !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  margin: 0 !important;
  font-size: 15px !important;
  outline: none !important;
  transition: all 0.18s ease !important;
}

#dealnology-chat-root button#dl-send-btn:hover,
#dealnology-chat-root .dl-send-icon-btn:hover {
  transform: translateY(-1px) scale(1.05) !important;
  box-shadow: 0 5px 14px rgba(99, 2, 144, 0.4) !important;
}

#dealnology-chat-root button#dl-send-btn:disabled,
#dealnology-chat-root .dl-send-icon-btn:disabled {
  opacity: 0.65 !important;
  cursor: not-allowed !important;
  transform: none !important;
}

#dealnology-chat-root button.dl-em-item,
#dealnology-chat-root .dl-em-item {
  background: transparent !important;
  border: 1px solid transparent !important;
  box-shadow: none !important;
  font-size: 21px !important;
  cursor: pointer !important;
  padding: 6px !important;
  margin: 0 !important;
  border-radius: 8px !important;
  line-height: 1 !important;
  color: inherit !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: background 0.15s, transform 0.15s !important;
}

#dealnology-chat-root button.dl-em-item:hover,
#dealnology-chat-root .dl-em-item:hover {
  background: #FAF5FF !important;
  border-color: #E9D5FF !important;
  transform: scale(1.22) !important;
}

#dealnology-chat-root button#dl-emoji-close,
#dealnology-chat-root #dl-emoji-close {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  font-size: 18px !important;
  color: #94A3B8 !important;
  padding: 0 4px !important;
  cursor: pointer !important;
  line-height: 1 !important;
}

#dealnology-chat-root button#dl-preview-remove,
#dealnology-chat-root #dl-preview-remove {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  color: #94A3B8 !important;
  font-size: 16px !important;
  padding: 0 4px !important;
  cursor: pointer !important;
  line-height: 1 !important;
}

#dealnology-chat-root .room-meta-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  margin-top: 4px !important;
  gap: 6px !important;
  width: 100% !important;
}

#dealnology-chat-root .room-meta-row > div {
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
  flex-shrink: 0 !important;
  white-space: nowrap !important;
}

#dealnology-chat-root .room-role-tag,
#dealnology-chat-root .badge {
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1.2 !important;
}

#dealnology-chat-root .badge.ok-tick {
  background: #10B981 !important;
  color: #FFFFFF !important;
  border-radius: 50% !important;
  width: 18px !important;
  height: 18px !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  box-shadow: 0 1px 4px rgba(16, 185, 129, 0.4) !important;
}

/* Suppress external floating widget that blocks chat input and send button */
.gsb-buttons,
#gsb-buttons-14320 {
  display: none !important;
}



/* ─────────────────────────────────────────────────────────────────────────────
   DEALNOLOGY BUYER TRUST PILL & REPUTATION CARD STYLES
   ───────────────────────────────────────────────────────────────────────────── */
.dl-partner-name-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.dl-buyer-trust-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
  color: #92400E;
  border: 1px solid #F59E0B;
  border-radius: 9999px;
  padding: 3px 10px;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 4px rgba(245, 158, 11, 0.25);
  letter-spacing: 0.1px;
}

.dl-buyer-trust-pill:hover {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 3px 8px rgba(245, 158, 11, 0.35);
  background: linear-gradient(135deg, #FDE68A 0%, #FCD34D 100%);
}

.dl-buyer-trust-pill.tier-vip {
  background: linear-gradient(135deg, #FAF5FF 0%, #F3E8FF 50%, #FEF3C7 100%);
  color: #6B21A8;
  border: 1px solid #C084FC;
  box-shadow: 0 1px 5px rgba(168, 85, 247, 0.25);
}

.dl-buyer-trust-pill.tier-vip:hover {
  border-color: #A855F7;
  box-shadow: 0 3px 10px rgba(168, 85, 247, 0.35);
}

/* Trust Modal Overlay */
.dl-trust-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 9999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.dl-trust-modal-card {
  background: #FFFFFF;
  border-radius: 20px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  animation: dlModalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
}

@keyframes dlModalPop {
  0% { opacity: 0; transform: scale(0.92) translateY(8px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

.dl-trust-modal-header {
  padding: 18px 20px;
  background: linear-gradient(135deg, #630290 0%, #8A13B8 100%);
  display: flex;
  align-items: center;
  gap: 12px;
  color: #FFFFFF;
  position: relative;
}

.dl-trust-badge-crown {
  font-size: 26px;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.dl-trust-modal-title-wrap {
  flex: 1;
}

.dl-trust-title {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  color: #FFFFFF !important;
  line-height: 1.2;
}

.dl-trust-subtitle {
  font-size: 11.5px;
  color: #E9D5FF;
  font-weight: 500;
}

.dl-trust-modal-close {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #FFFFFF;
  font-size: 20px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.dl-trust-modal-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

.dl-trust-user-banner {
  padding: 14px 20px;
  background: #FAF5FF;
  border-bottom: 1px solid #F3E8FF;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dl-trust-buyer-name {
  font-size: 15px;
  font-weight: 700;
  color: #1E293B;
}

.dl-trust-verified-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  color: #059669;
  background: #D1FAE5;
  padding: 3px 8px;
  border-radius: 6px;
}

.dl-trust-stats-grid {
  padding: 18px 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.dl-trust-stat-box {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
}

.dl-stat-label {
  font-size: 11px;
  font-weight: 600;
  color: #64748B;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.dl-stat-val {
  font-size: 15px;
  font-weight: 800;
  color: #0F172A;
  line-height: 1.2;
}

.dl-stat-val.text-purple { color: #7C3AED; }
.dl-stat-val.text-green { color: #059669; }
.dl-stat-val.text-gold { color: #B45309; }
.dl-stat-val.text-blue { color: #2563EB; }

.dl-stat-hint {
  font-size: 10.5px;
  color: #94A3B8;
  margin-top: 3px;
  font-weight: 500;
}

.dl-trust-guarantee {
  margin: 0 20px 16px 20px;
  padding: 12px 14px;
  background: #ECFDF5;
  border: 1px solid #A7F3D0;
  border-radius: 12px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.dl-guarantee-icon {
  font-size: 20px;
  line-height: 1.2;
}

.dl-guarantee-text {
  font-size: 12px;
  color: #065F46;
  line-height: 1.45;
}

.dl-trust-footer {
  padding: 14px 20px 18px 20px;
  border-top: 1px solid #F1F5F9;
  text-align: center;
}

.dl-trust-done-btn {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, #630290 0%, #8A13B8 100%);
  color: #FFFFFF;
  border: none;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(99, 2, 144, 0.25);
}

.dl-trust-done-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(99, 2, 144, 0.35);
}

@media (max-width: 600px) {
  .dl-buyer-trust-pill {
    font-size: 10.5px;
    padding: 2px 8px;
  }
  .dl-trust-stats-grid {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 14px 16px;
  }
}

/* ─────────────────────────────────────────────────────────────────────────────
   SIDEBAR ROOM VIP BADGE & CHAT STREAM TRUST BANNER
   ───────────────────────────────────────────────────────────────────────────── */
.dl-room-vip-badge {
  display: inline-flex !important;
  align-items: center !important;
  gap: 3px !important;
  background: linear-gradient(135deg, #FAF5FF 0%, #FEF3C7 100%) !important;
  color: #7E22CE !important;
  border: 1px solid #D8B4FE !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  padding: 1px 7px !important;
  border-radius: 9999px !important;
  line-height: 1.2 !important;
  flex-shrink: 0 !important;
  box-shadow: 0 1px 3px rgba(126, 34, 206, 0.15) !important;
  margin-left: 6px !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}

.dl-room-vip-badge:hover {
  background: linear-gradient(135deg, #F3E8FF 0%, #FDE68A 100%) !important;
  border-color: #A855F7 !important;
  transform: translateY(-1px) scale(1.03) !important;
}

.dl-chat-trust-banner {
  margin: 12px 16px 16px 16px !important;
  padding: 10px 14px !important;
  background: linear-gradient(135deg, #FAF5FF 0%, #F5F3FF 100%) !important;
  border: 1px solid #DDD6FE !important;
  border-radius: 12px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.08) !important;
}

.dl-chat-trust-banner-left {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  flex: 1 !important;
  min-width: 0 !important;
}

.dl-chat-trust-badge {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%) !important;
  color: #92400E !important;
  border: 1px solid #F59E0B !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  padding: 2px 8px !important;
  border-radius: 9999px !important;
  white-space: nowrap !important;
  letter-spacing: 0.3px !important;
  flex-shrink: 0 !important;
}

.dl-chat-trust-text {
  font-size: 12.5px !important;
  color: #334155 !important;
  line-height: 1.35 !important;
}

.dl-chat-trust-text strong {
  color: #1E293B !important;
}

.dl-trust-banner-view-btn {
  background: #630290 !important;
  color: #FFFFFF !important;
  border: none !important;
  border-radius: 8px !important;
  padding: 6px 14px !important;
  font-size: 11.5px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  transition: all 0.2s ease !important;
  flex-shrink: 0 !important;
}

.dl-trust-banner-view-btn:hover {
  background: #7E22CE !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 2px 6px rgba(126, 34, 206, 0.25) !important;
}

@media (max-width: 600px) {
  .dl-chat-trust-banner {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 8px !important;
    margin: 8px 10px 12px 10px !important;
  }
  .dl-chat-trust-banner-left {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 6px !important;
  }
}

.dl-pill-text-short {
  display: none;
}
.dl-pill-text-full {
  display: inline;
}

@media (max-width: 600px) {
  .dl-pill-text-full {
    display: none !important;
  }
  .dl-pill-text-short {
    display: inline !important;
  }
  .dl-partner-name-row {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 2px !important;
  }
  .dl-partner-name {
    font-size: 13.5px !important;
    line-height: 1.2 !important;
  }
  .dl-buyer-trust-pill {
    padding: 1px 7px !important;
    font-size: 10.5px !important;
    border-radius: 9999px !important;
    line-height: 1.2 !important;
  }
}


/* ─────────────────────────────────────────────────────────────────────────────
   MOBILE RESPONSIVE HEADER CLEANUP
   ───────────────────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .dl-partner-name-row {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 2px !important;
  }
  .dl-partner-name {
    font-size: 14px !important;
    line-height: 1.2 !important;
    max-width: 100% !important;
  }
  .dl-buyer-trust-pill {
    padding: 2px 8px !important;
    font-size: 10.5px !important;
    border-radius: 9999px !important;
    margin: 0 !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
  }
  .dl-buyer-trust-pill .dl-pill-text-full {
    display: none !important;
  }
  .dl-buyer-trust-pill .dl-pill-text-short {
    display: inline !important;
  }
}


@media (max-width: 768px) {
  .dl-chat-image-wrap {
    max-width: 100% !important;
    max-height: 360px !important;
  }
  .dl-chat-image {
    max-width: 100% !important;
    max-height: 360px !important;
  }
  .dl-img-download-btn {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
    bottom: 8px !important;
    right: 8px !important;
  }
  .dl-img-download-btn .dl-dl-svg {
    width: 15px !important;
    height: 15px !important;
  }
}


/* ─────────────────────────────────────────────────────────────────────────────
   EXECUTIVE SLEEK VIP BUYER BADGE (PROPORTIONAL & PROFESSIONAL)
   ───────────────────────────────────────────────────────────────────────────── */
.dl-partner-name-row {
  display: inline-flex !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  gap: 6px !important;
}

.dl-partner-name {
  font-size: 15px !important;
  font-weight: 700 !important;
  color: #0F172A !important;
  line-height: 1.2 !important;
  margin: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
}

.dl-buyer-trust-pill,
span.dl-buyer-trust-pill,
button.dl-buyer-trust-pill {
  all: unset !important;
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  height: 22px !important;
  min-height: 22px !important;
  max-height: 22px !important;
  line-height: 20px !important;
  padding: 0 9px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
  border-radius: 9999px !important;
  cursor: pointer !important;
  background: linear-gradient(135deg, #FAF5FF 0%, #F5E8FF 55%, #FEF3C7 100%) !important;
  color: #6B21A8 !important;
  border: 1px solid #D8B4FE !important;
  box-shadow: 0 1px 3px rgba(107, 33, 168, 0.12) !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  margin: 0 0 0 4px !important;
  vertical-align: middle !important;
  white-space: nowrap !important;
  letter-spacing: 0.15px !important;
  user-select: none !important;
  -webkit-user-select: none !important;
}

.dl-buyer-trust-pill:hover,
span.dl-buyer-trust-pill:hover,
button.dl-buyer-trust-pill:hover {
  background: linear-gradient(135deg, #F3E8FF 0%, #EDE9FE 50%, #FDE68A 100%) !important;
  border-color: #A855F7 !important;
  box-shadow: 0 2px 8px rgba(168, 85, 247, 0.25) !important;
  transform: translateY(-1px) scale(1.02) !important;
  color: #581C87 !important;
}

.dl-buyer-trust-pill:active,
span.dl-buyer-trust-pill:active {
  transform: scale(0.98) !important;
}

@media (max-width: 600px) {
  .dl-buyer-trust-pill,
  span.dl-buyer-trust-pill {
    height: 20px !important;
    min-height: 20px !important;
    max-height: 20px !important;
    line-height: 18px !important;
    padding: 0 7px !important;
    font-size: 10px !important;
  }
}


/* ─────────────────────────────────────────────────────────────────────────────
   MOBILE HEADER: ARROW ONLY, NAME + STATUS VERTICAL, VIP PILL ON RIGHT
   ───────────────────────────────────────────────────────────────────────────── */
.dl-desktop-trust-wrap {
  display: inline-flex;
  align-items: center;
}

.dl-desktop-order-wrap {
  display: inline-flex;
  align-items: center;
}

.dl-mobile-trust-wrap {
  display: none;
}

@media (max-width: 768px) {
  .dl-window-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 10px 14px !important;
    min-height: 58px !important;
    gap: 10px !important;
  }

  /* Back Button: Arrow Icon ONLY */
  .dl-back-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    background: #FAF5FF !important;
    border: 1px solid #E9D5FF !important;
    color: #630290 !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
    transition: all 0.2s ease !important;
    margin: 0 !important;
  }

  .dl-back-btn:hover,
  .dl-back-btn:active {
    background: #630290 !important;
    color: #FFFFFF !important;
    border-color: #630290 !important;
  }

  .dl-back-btn .dl-nav-svg {
    width: 18px !important;
    height: 18px !important;
    stroke: currentColor !important;
    display: block !important;
    margin: 0 !important;
  }

  .dl-back-text {
    display: none !important;
  }

  /* Name & Status stacked vertically in center */
  .dl-partner-info {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    flex: 1 !important;
    min-width: 0 !important;
  }

  .dl-partner-name-wrap {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    flex: 1 !important;
    min-width: 0 !important;
  }

  .dl-partner-name-row {
    display: block !important;
  }

  .dl-partner-name {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #0F172A !important;
    line-height: 1.25 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    margin: 0 !important;
  }

  .dl-partner-status {
    font-size: 11.5px !important;
    color: #64748B !important;
    margin-top: 2px !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  /* Right Header Action: VIP Buyer Badge replaces Order # */
  .dl-desktop-trust-wrap {
    display: none !important;
  }

  .dl-desktop-order-wrap {
    display: none !important;
  }

  .dl-mobile-trust-wrap {
    display: inline-flex !important;
    align-items: center !important;
    flex-shrink: 0 !important;
  }

  .dl-mobile-trust-wrap .dl-buyer-trust-pill {
    display: inline-flex !important;
    align-items: center !important;
    height: 26px !important;
    min-height: 26px !important;
    max-height: 26px !important;
    line-height: 24px !important;
    padding: 0 10px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    border-radius: 9999px !important;
    margin: 0 !important;
    white-space: nowrap !important;
  }

  .dl-mobile-trust-wrap .dl-buyer-trust-pill .dl-pill-text-full {
    display: none !important;
  }

  .dl-mobile-trust-wrap .dl-buyer-trust-pill .dl-pill-text-short {
    display: inline !important;
  }
}



/* ─────────────────────────────────────────────────────────────────────────────
   FINTECH EXECUTIVE VIP BUYER MODAL (AIRTIGHT OVERRIDES)
   ───────────────────────────────────────────────────────────────────────────── */
.dl-trust-modal-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  background: rgba(15, 23, 42, 0.75) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  z-index: 99999999 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 16px !important;
}

.dl-trust-modal-card {
  position: relative !important;
  background: #FFFFFF !important;
  border-radius: 22px !important;
  width: 100% !important;
  max-width: 360px !important;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1) !important;
  overflow: hidden !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
  animation: dlModalPop 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.dl-trust-modal-close,
button.dl-trust-modal-close {
  all: unset !important;
  position: absolute !important;
  top: 14px !important;
  right: 14px !important;
  z-index: 20 !important;
  box-sizing: border-box !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 30px !important;
  height: 30px !important;
  min-width: 30px !important;
  min-height: 30px !important;
  max-width: 30px !important;
  max-height: 30px !important;
  border-radius: 50% !important;
  background: rgba(255, 255, 255, 0.15) !important;
  color: #FFFFFF !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  padding: 0 !important;
  border: none !important;
}

.dl-trust-modal-close:hover,
button.dl-trust-modal-close:hover {
  background: rgba(255, 255, 255, 0.3) !important;
  transform: scale(1.08) !important;
}

.dl-trust-modal-close svg {
  display: block !important;
  stroke: #FFFFFF !important;
}

.dl-trust-modal-header {
  display: block !important;
  padding: 18px 18px 18px 18px !important;
  background: linear-gradient(145deg, #1E0B36 0%, #3B0764 55%, #581C87 100%) !important;
  color: #FFFFFF !important;
  position: relative !important;
  border-bottom: none !important;
}

.dl-trust-header-top {
  display: flex !important;
  align-items: center !important;
  margin-bottom: 12px !important;
  padding-right: 36px !important;
}

.dl-trust-verified-pill {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  background: rgba(16, 185, 129, 0.2) !important;
  border: 1px solid rgba(16, 185, 129, 0.45) !important;
  color: #34D399 !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  letter-spacing: 0.6px !important;
  padding: 3px 9px !important;
  border-radius: 9999px !important;
  text-transform: uppercase !important;
  white-space: nowrap !important;
}

.dl-trust-buyer-hero {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
}

.dl-trust-avatar-wrap {
  position: relative !important;
  flex-shrink: 0 !important;
}

.dl-trust-avatar-initials {
  width: 48px !important;
  height: 48px !important;
  border-radius: 50% !important;
  background: linear-gradient(135deg, #7C3AED 0%, #A855F7 100%) !important;
  color: #FFFFFF !important;
  font-size: 20px !important;
  font-weight: 800 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35) !important;
  border: 2px solid rgba(255, 255, 255, 0.3) !important;
}

.dl-trust-avatar-crown {
  position: absolute !important;
  bottom: -4px !important;
  right: -4px !important;
  font-size: 14px !important;
  line-height: 1 !important;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5)) !important;
}

.dl-trust-hero-info {
  flex: 1 !important;
  min-width: 0 !important;
}

.dl-trust-hero-name-row {
  display: flex !important;
  align-items: center !important;
  gap: 7px !important;
  flex-wrap: wrap !important;
}

.dl-trust-hero-name {
  margin: 0 !important;
  font-size: 17px !important;
  font-weight: 800 !important;
  color: #FFFFFF !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
}

.dl-trust-vip-tag {
  background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%) !important;
  color: #92400E !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  padding: 2px 7px !important;
  border-radius: 9999px !important;
  border: 1px solid #F59E0B !important;
  white-space: nowrap !important;
  display: inline-flex !important;
  align-items: center !important;
  line-height: 1.2 !important;
}

.dl-trust-hero-subtitle {
  font-size: 11px !important;
  color: #DDD6FE !important;
  margin-top: 3px !important;
  font-weight: 500 !important;
  line-height: 1.3 !important;
}

/* Modal Body */
.dl-trust-modal-body {
  padding: 16px 18px 18px 18px !important;
  background: #FFFFFF !important;
}

.dl-trust-metrics-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 10px !important;
  margin-bottom: 14px !important;
}

.dl-metric-tile {
  background: #F8FAFC !important;
  border: 1px solid #E2E8F0 !important;
  border-radius: 12px !important;
  padding: 10px 12px !important;
  display: flex !important;
  flex-direction: column !important;
}

.dl-metric-label {
  font-size: 9.5px !important;
  font-weight: 700 !important;
  color: #64748B !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
}

.dl-metric-num {
  font-size: 14.5px !important;
  font-weight: 800 !important;
  color: #0F172A !important;
  margin: 3px 0 1px 0 !important;
  line-height: 1.2 !important;
}

.dl-metric-num.text-gold { color: #B45309 !important; }
.dl-metric-num.text-green { color: #059669 !important; }
.dl-metric-num.text-purple { color: #6D28D9 !important; }

.dl-metric-sub {
  font-size: 10px !important;
  color: #94A3B8 !important;
  font-weight: 500 !important;
}

.dl-trust-assurance-card {
  background: #F0FDF4 !important;
  border: 1px solid #BBF7D0 !important;
  border-radius: 12px !important;
  padding: 12px 14px !important;
  margin-bottom: 16px !important;
}

.dl-assurance-header {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  font-size: 12px !important;
  color: #166534 !important;
  font-weight: 700 !important;
  margin-bottom: 8px !important;
}

.dl-assurance-shield {
  font-size: 14px !important;
}

.dl-assurance-points {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
}

.dl-assurance-item {
  display: flex !important;
  align-items: flex-start !important;
  gap: 7px !important;
  font-size: 11.5px !important;
  color: #14532D !important;
  line-height: 1.35 !important;
}

.dl-assurance-item svg {
  flex-shrink: 0 !important;
  margin-top: 2px !important;
}

.dl-trust-action-btn,
button.dl-trust-action-btn {
  all: unset !important;
  box-sizing: border-box !important;
  width: 100% !important;
  height: 42px !important;
  min-height: 42px !important;
  max-height: 42px !important;
  line-height: 42px !important;
  border-radius: 9999px !important;
  background: linear-gradient(135deg, #630290 0%, #7E22CE 100%) !important;
  color: #FFFFFF !important;
  font-size: 13.5px !important;
  font-weight: 700 !important;
  text-align: center !important;
  cursor: pointer !important;
  box-shadow: 0 4px 14px rgba(99, 2, 144, 0.28) !important;
  transition: all 0.2s ease !important;
  display: block !important;
  padding: 0 !important;
}

.dl-trust-action-btn:hover,
button.dl-trust-action-btn:hover {
  background: linear-gradient(135deg, #7E22CE 0%, #9333EA 100%) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 18px rgba(99, 2, 144, 0.38) !important;
}
