/**
 * Qubic.id - Messages Panel & Header Notification Styles
 * Path: /assets/css/messages.css
 */

/* ==========================================================================
   1. Header Envelope Icon & Notification Badge
   ========================================================================== */
.qubic-msg-btn {
  height: 31px;
  min-width: 42px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #e2e8f0;
  position: relative;
  transition: all 0.2s ease-in-out;
  text-decoration: none;
  font-size: 0.95rem;
}

.qubic-msg-btn:hover {
  background: rgba(0, 229, 255, 0.15);
  border-color: #00e5ff;
  color: #00e5ff;
}

.qubic-settings-btn {
  height: 31px;
  min-width: 36px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #e2e8f0;
  position: relative;
  transition: all 0.2s ease-in-out;
  text-decoration: none;
  font-size: 0.95rem;
}

.qubic-settings-btn:hover {
  background: rgba(0, 229, 255, 0.15);
  border-color: #00e5ff;
  color: #00e5ff;
}

.qubic-msg-badge {
  font-size: 0.65rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 2px solid #080c14;
  box-shadow: 0 0 6px rgba(220, 53, 69, 0.6);
}

/* ==========================================================================
   2. Main Layout Container
   ========================================================================== */
.messages-page-wrapper {
  min-height: calc(100vh - 140px);
  padding: 1.5rem 0 3rem;
}

.messages-layout-card {
  background: #0b111e;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  height: auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   3. Universal Card Header & 3 Navigation Tabs
   ========================================================================== */
.messages-card-header {
  flex-shrink: 0;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: #080d17;
  display: flex;
  align-items: center;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 229, 255, 0.3) rgba(255, 255, 255, 0.04);
  -webkit-overflow-scrolling: touch;
}

.messages-card-header::-webkit-scrollbar {
  height: 4px;
}

.messages-card-header::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.03);
}

.messages-card-header::-webkit-scrollbar-thumb {
  background: rgba(0, 229, 255, 0.3);
  border-radius: 4px;
}

.messages-nav-tabs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 100%;
  width: max-content;
  flex-wrap: nowrap;
}

.messages-nav-btn {
  flex: 1 0 auto;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.55rem 1rem;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.messages-nav-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}

.messages-nav-btn.active {
  background: rgba(0, 229, 255, 0.12);
  border-color: rgba(0, 229, 255, 0.35);
  color: #00e5ff;
}

/* Card Body containing Panes */
.messages-card-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  position: relative;
}

.messages-tab-pane {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

#paneConversations {
  overflow-y: auto;
  padding: 0.75rem;
}

#paneChat {
  height: 100%;
}

#paneBlocked {
  overflow-y: auto;
  padding: 1.5rem;
}

.btn-new-message {
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.38rem 0.85rem;
  border-radius: 8px;
  background: linear-gradient(135deg, #00e5ff 0%, #0072ff 100%);
  color: #000000;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  transition: opacity 0.2s ease, transform 0.1s ease;
  width: auto;
  align-self: center;
  white-space: nowrap;
}

.btn-new-message:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  color: #000000;
}

.conversation-list {
  max-height: 65vh;
  min-height: 350px;
  overflow-y: auto;
  list-style: none;
  margin: 0;
  padding: 0.5rem;
}

.conversation-list::-webkit-scrollbar {
  width: 6px;
}

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

.conversation-item {
  padding: 0.85rem 1rem;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 0.35rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  border: 1px solid transparent;
  color: #cbd5e1;
  text-decoration: none;
}

.conversation-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #ffffff;
}

.conversation-item.active {
  background: rgba(0, 229, 255, 0.08);
  border-color: rgba(0, 229, 255, 0.25);
  color: #ffffff;
}

.conversation-avatar {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.2), rgba(0, 114, 255, 0.2));
  border: 1px solid rgba(0, 229, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #00e5ff;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.conversation-info {
  flex: 1;
  min-width: 0;
}

.conversation-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.2rem;
}

.conversation-partner {
  font-weight: 600;
  font-size: 0.9rem;
  color: #f1f5f9;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-time {
  font-size: 0.72rem;
  color: #64748b;
  flex-shrink: 0;
}

.conversation-preview {
  font-size: 0.8rem;
  color: #94a3b8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin: 0;
}

.conversation-item.unread .conversation-partner {
  color: #00e5ff;
  font-weight: 700;
}

.conversation-item.unread .conversation-preview {
  color: #ffffff;
  font-weight: 600;
}

.unread-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 10px;
  background: #00e5ff;
  color: #000000;
}

.conversation-empty {
  padding: 3rem 1.5rem;
  text-align: center;
  color: #64748b;
  font-size: 0.9rem;
}

/* ==========================================================================
   4. Right Chat Area
   ========================================================================== */
.messages-chat-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #0b111e;
  position: relative;
  min-width: 0;
  min-height: 0;
}

.chat-header {
  flex-shrink: 0;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(8, 13, 23, 0.6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.chat-partner-details {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}

.chat-partner-name {
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
}

.chat-partner-wallet {
  font-size: 0.75rem;
  color: #94a3b8;
  letter-spacing: 0.5px;
  word-break: break-all;
}

/* Message Feed */
.chat-messages-feed {
  height: 480px;
  min-height: 320px;
  max-height: 60vh;
  overflow-y: auto;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

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

.chat-messages-feed::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

.chat-empty-state {
  margin: auto;
  text-align: center;
  color: #64748b;
  max-width: 380px;
  padding: 2rem;
}

.chat-empty-icon {
  font-size: 3rem;
  color: rgba(0, 229, 255, 0.4);
  margin-bottom: 1rem;
}

/* Bubbles */
.msg-row {
  display: flex;
  flex-direction: column;
  max-width: 75%;
}

.msg-row.sent {
  align-self: flex-end;
  align-items: flex-end;
}

.msg-row.received {
  align-self: flex-start;
  align-items: flex-start;
}

.msg-bubble {
  padding: 0.75rem 1rem;
  border-radius: 12px;
  font-size: 0.875rem;
  line-height: 1.5;
  word-break: break-word;
  position: relative;
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.msg-row.sent .msg-bubble {
  background: linear-gradient(135deg, #0072ff 0%, #00b4d8 100%);
  color: #ffffff;
  border-bottom-right-radius: 3px;
  box-shadow: 0 4px 15px rgba(0, 114, 255, 0.25);
}

/* Pending state: distinctive amber background & dashed border */
.msg-row.sent.status-pending .msg-bubble {
  background: linear-gradient(135deg, rgba(180, 83, 9, 0.85) 0%, rgba(146, 64, 14, 0.95) 100%);
  color: #fffbeb;
  border: 1px dashed rgba(245, 158, 11, 0.55);
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.2);
}

/* Failed state: dark crimson/red background with alert border */
.msg-row.sent.status-failed .msg-bubble {
  background: linear-gradient(135deg, rgba(153, 27, 27, 0.85) 0%, rgba(127, 29, 29, 0.95) 100%);
  color: #fef2f2;
  border: 1px solid rgba(239, 68, 68, 0.5);
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.2);
}

/* Confirmed state (verified): vivid cyan/blue gradient */
.msg-row.sent.status-confirmed .msg-bubble {
  background: linear-gradient(135deg, #0072ff 0%, #00b4d8 100%);
  color: #ffffff;
  border: none;
  box-shadow: 0 4px 15px rgba(0, 114, 255, 0.25);
}

.msg-row.received .msg-bubble {
  background: #141c2e;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  border-bottom-left-radius: 3px;
}

.msg-meta-bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.35rem;
  font-size: 0.72rem;
  color: #64748b;
}

.msg-row.sent .msg-meta-bar {
  justify-content: flex-end;
}

.msg-explorer-link,
.msg-ardrive-link {
  color: #00e5ff;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: color 0.15s ease;
}

.msg-explorer-link:hover,
.msg-ardrive-link:hover {
  color: #67e8f9;
  text-decoration: underline;
}

.msg-cost-tag {
  color: #94a3b8;
}

.msg-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 500;
  line-height: 1.2;
}

.msg-status-confirmed {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.msg-status-pending {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.msg-status-failed {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.btn-recheck-tx {
  background: rgba(245, 158, 11, 0.2);
  color: #fef08a;
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: 3px;
  padding: 0 0.35rem;
  font-size: 0.65rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-recheck-tx:hover {
  background: rgba(245, 158, 11, 0.4);
  color: #fff;
}

/* Unconfirmed / Failed Messages Cleanup Notice */
.messages-cleanup-notice {
  font-size: 0.72rem;
  color: #64748b;
  text-align: center;
  padding: 0.4rem 0.8rem;
  margin: 0.25rem 0.75rem;
  background: rgba(15, 23, 42, 0.4);
  border: 1px dashed rgba(148, 163, 184, 0.15);
  border-radius: 6px;
}

/* ==========================================================================
   5. Composer / Input Section
   ========================================================================== */
.chat-composer-box {
  flex-shrink: 0;
  padding: 0.85rem 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(8, 13, 23, 0.85);
  position: relative;
  z-index: 2;
}

.chat-composer-box:empty {
  display: none !important;
  padding: 0;
  border: none;
}

/* Manual Receiver Input (For New Message) */
.receiver-input-group {
  margin-bottom: 0.85rem;
}

.receiver-input-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #94a3b8;
  margin-bottom: 0.35rem;
  display: flex;
  justify-content: space-between;
}

.receiver-input-field {
  background: #121927;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: #ffffff;
  font-family: monospace;
  font-size: 0.85rem;
  padding: 0.55rem 0.85rem;
  letter-spacing: 0.5px;
  width: 100%;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.receiver-input-field:focus {
  outline: none;
  border-color: #00e5ff;
  box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.15);
  background: #151d2d;
  color: #ffffff;
}

.receiver-input-field::placeholder {
  color: #475569;
}

.receiver-input-field.is-valid {
  border-color: #10b981;
}

.receiver-input-field.is-invalid {
  border-color: #ef4444;
}

/* Mesaj Textarea */
.message-textarea {
  background: #121927;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: #ffffff;
  font-size: 0.92rem;
  padding: 0.75rem 1rem;
  width: 100%;
  resize: none;
  min-height: 75px;
  max-height: 160px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.message-textarea:focus {
  outline: none;
  border-color: #00e5ff;
  box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.15);
  background: #151d2d;
  color: #ffffff;
}

.message-textarea::placeholder {
  color: #64748b;
}

/* Extra Transfer Amount Input */
.composer-extra-group {
  margin-top: 0.65rem;
  padding: 0.55rem 0.85rem;
  background: rgba(18, 25, 39, 0.5);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.composer-extra-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 200px;
  flex: 1;
}

.composer-extra-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #94a3b8;
  display: flex;
  align-items: center;
  margin: 0;
}

.composer-extra-hint {
  font-size: 0.8rem;
  color: #64748b;
  line-height: 1.3;
}

.composer-extra-input-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: #121927;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 0.3rem 0.65rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  flex-shrink: 0;
}

.composer-extra-input-wrap:focus-within {
  border-color: #00e5ff;
  box-shadow: 0 0 0 2px rgba(0, 229, 255, 0.15);
  background: #151d2d;
}

.composer-extra-input {
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 600;
  width: 120px;
  text-align: right;
  padding: 0;
  outline: none;
}

.composer-extra-input::placeholder {
  color: #475569;
}

.composer-extra-asset {
  font-size: 0.75rem;
  font-weight: 700;
  color: #00e5ff;
}

/* Composer Alt Bilgi ve Buton */
.composer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.75rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.composer-stats-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: #94a3b8;
  flex-wrap: wrap;
}

.composer-stat-item {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: rgba(255, 255, 255, 0.04);
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.composer-stat-highlight {
  color: #00e5ff;
  font-weight: 700;
}

.btn-send-message {
  padding: 0.55rem 1.4rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.88rem;
  background: linear-gradient(135deg, #00e5ff 0%, #0072ff 100%);
  color: #000000;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: opacity 0.2s ease, transform 0.1s ease;
}

.btn-send-message:hover:not(:disabled) {
  opacity: 0.9;
  transform: translateY(-1px);
  color: #000000;
}

.btn-send-message:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

/* Privacy & Public Data Notice */
.composer-privacy-notice {
  margin-top: 0.65rem;
  padding: 0.45rem 0.75rem;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.22);
  border-radius: 7px;
  font-size: 0.8rem;
  color: #cbd5e1;
  line-height: 1.4;
}

.composer-privacy-notice strong {
  color: #fbbf24;
}

/* Alert / Warning Boxes */
.messages-alert {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.messages-alert-warning {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.25);
  color: #f59e0b;
}

.messages-alert-danger {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #ef4444;
}

.messages-alert-success {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #10b981;
}

/* User Wallet Overview Card (Header of Messages Page) */
.user-overview-strip {
  background: #0b111e;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 0.85rem 1.25rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.user-strip-wallet {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.user-strip-avatar {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: linear-gradient(135deg, #00e5ff 0%, #0072ff 100%);
  color: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}

.user-strip-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.user-strip-title {
  font-size: 0.75rem;
  color: #94a3b8;
  margin: 0;
}

.user-strip-address {
  font-family: monospace;
  font-size: 0.85rem;
  font-weight: 600;
  color: #ffffff;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-strip-balances {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-left: auto;
}

.user-balance-block {
  text-align: right;
}

.user-balance-label {
  font-size: 0.72rem;
  color: #64748b;
  margin: 0;
}

.user-balance-value {
  font-size: 0.95rem;
  font-weight: 700;
  color: #00e5ff;
  margin: 0;
}

@media (max-width: 991.98px) {
  .messages-page-wrapper {
    padding: 0.75rem 0 1.5rem;
  }

  /* Layout Card on Mobile: Height expands naturally so composer & buttons are never clipped */
  .messages-layout-card {
    height: auto;
    min-height: 0;
    max-height: none;
    overflow: visible;
  }

  .messages-card-body {
    flex: none;
    min-height: 0;
    overflow: visible;
  }

  .messages-tab-pane {
    flex: none;
    min-height: 0;
    overflow: visible;
  }

  .messages-chat-area {
    overflow: visible;
  }

  /* Chat Messages Feed: Guaranteed height so messages are never squashed to 0 */
  .chat-messages-feed {
    height: 380px;
    min-height: 280px;
    max-height: 52vh;
    flex: none;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0.85rem;
    gap: 0.75rem;
  }

  /* Pane 1: Conversations List Mobile Scroll */
  #paneConversations {
    padding: 0.5rem;
    overflow: visible;
  }

  .conversation-list {
    max-height: 65vh;
    min-height: 300px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Pane 3: Blocked List Mobile Scroll */
  #paneBlocked {
    padding: 0.85rem;
    overflow: visible;
  }

  .blocked-list-pane {
    max-height: 65vh;
    min-height: 300px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Chat Composer Mobile Optimizations */
  .chat-composer-box {
    padding: 0.75rem 0.85rem;
  }

  .receiver-input-group {
    margin-bottom: 0.65rem;
  }

  .receiver-input-field {
    padding: 0.45rem 0.7rem;
    font-size: 0.8rem;
  }

  .message-textarea {
    min-height: 58px;
    padding: 0.55rem 0.75rem;
  }

  .composer-extra-group {
    margin-top: 0.45rem;
    padding: 0.4rem 0.65rem;
  }

  .composer-footer {
    margin-top: 0.5rem;
    gap: 0.5rem;
  }

  .composer-privacy-notice {
    margin-top: 0.45rem;
    padding: 0.4rem 0.65rem;
    font-size: 0.8rem;
  }

  .chat-block-banner {
    margin: 0.75rem;
    padding: 0.75rem 1rem;
  }

  .user-overview-strip {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.75rem 1rem;
    align-items: center;
    padding: 0.85rem 1rem;
  }

  .user-strip-wallet {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
  }

  .user-overview-strip .btn-new-message {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }

  .user-strip-balances {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    margin-left: 0;
    display: flex;
    justify-content: space-between;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 0.6rem;
  }

  .user-strip-balances .user-balance-block:first-child {
    text-align: left;
  }

  .user-strip-balances .user-balance-block:last-child {
    text-align: right;
  }
}

/* ==========================================================================
   10. Offcanvas Message Overview Card
   ========================================================================== */
.offcanvas-msg-card {
  border-radius: 12px !important;
  background: rgba(10, 16, 26, 0.7) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}

.offcanvas-msg-card .smaller {
  font-size: 0.72rem;
}

.offcanvas-msg-card .btn-xs {
  font-size: 0.75rem;
  line-height: 1.2;
  border-radius: 8px;
}

/* ==========================================================================
   11. Sidebar Tabs (Conversations & Block List) & Block Features
   ========================================================================== */

.messages-nav-btn.active#tabBlocked {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  color: #ef4444;
}

/* Blocked List in Sidebar */
.blocked-list-pane {
  max-height: 65vh;
  min-height: 350px;
  padding: 0.5rem;
  overflow-y: auto;
  flex: 1;
}

.blocked-list-pane .blocked-users-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.blocked-list-pane .blocked-user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.85rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  gap: 0.5rem;
  transition: border-color 0.2s ease;
}

.blocked-list-pane .blocked-user-row:hover {
  border-color: rgba(239, 68, 68, 0.25);
}

.blocked-user-info {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.blocked-user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.blocked-user-wallet {
  font-size: 0.8rem;
  color: #ffffff;
  font-weight: 500;
}

.btn-pane-unblock {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #22c55e;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.btn-pane-unblock:hover {
  background: #22c55e;
  border-color: #22c55e;
  color: #000000;
}

/* Blocked badge in conversation sidebar list */
.conversation-item.is-blocked {
  opacity: 0.75;
}

.blocked-badge {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.18rem 0.45rem;
  border-radius: 6px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #ef4444;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  white-space: nowrap;
}

/* Chat Header Action Buttons */
.chat-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.btn-chat-block,
.btn-chat-unblock {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.2s ease;
  cursor: pointer;
  border: 1px solid transparent;
}

.btn-chat-block {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

.btn-chat-block:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: #ffffff;
}

.btn-chat-unblock {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.35);
  color: #22c55e;
}

.btn-chat-unblock:hover {
  background: #22c55e;
  border-color: #22c55e;
  color: #000000;
}

/* Chat Block State Banners (Above Composer) */
.chat-block-banner {
  padding: 1rem 1.25rem;
  border-radius: 12px;
  margin: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.88rem;
  animation: fadeIn 0.2s ease-in-out;
}

.banner-blocked-by-partner {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}

.banner-blocked-by-partner i {
  font-size: 1.25rem;
  color: #ef4444;
}

.banner-partner-blocked {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

.banner-partner-blocked i {
  font-size: 1.25rem;
  color: #ef4444;
}

.btn-banner-unblock {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #22c55e;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn-banner-unblock:hover {
  background: #22c55e;
  border-color: #22c55e;
  color: #000000;
}