/* ==========================================================================
   MY NODE MAP — premium chat layer
   Loaded last: refines the map mini-chat, the shared emoji picker and
   file cards without changing panel geometry.
   ========================================================================== */

/* ---------- Map mini-chat shell (raised phone-case rim) ---------- */

.map-mini-chat {
  border: 1.5px solid rgba(42, 62, 52, 0.88);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(8, 16, 18, 0.96) 0%, rgba(4, 10, 12, 0.98) 55%, rgba(2, 6, 8, 0.99) 100%);
  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.48),
    0 6px 18px rgba(0, 0, 0, 0.22),
    0 0 0 1px rgba(120, 180, 140, 0.08),
    inset 0 1px 0 rgba(180, 220, 195, 0.1),
    inset 1px 0 0 rgba(120, 170, 140, 0.06),
    inset 0 -2px 0 rgba(0, 0, 0, 0.38),
    inset -2px 0 0 rgba(0, 0, 0, 0.28);
}

.map-mini-chat::before {
  content: "";
  position: absolute;
  inset: 1.5px;
  border-radius: 12px;
  pointer-events: none;
  z-index: 0;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    inset 0 0 0 1px rgba(100, 160, 120, 0.05);
  background: radial-gradient(130% 90% at 50% 0%, rgba(90, 140, 110, 0.03), transparent 74%);
}

.map-mini-chat > * {
  position: relative;
  z-index: 1;
}

/* ---------- Header (sketch: neat thin neon frame) ---------- */

.map-mini-chat .map-mini-chat-header {
  position: relative;
  flex-shrink: 0;
  padding: 8px 8px 0 !important;
  margin: 0;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  z-index: 4;
}

.map-mini-chat .map-mini-chat-header-inner {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(72, 108, 88, 0.42);
  border-radius: 11px;
  background:
    linear-gradient(rgba(90, 130, 100, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(90, 130, 100, 0.015) 1px, transparent 1px),
    linear-gradient(180deg, rgba(6, 12, 14, 0.98) 0%, rgba(3, 8, 10, 0.99) 100%);
  background-size: 18px 18px, 18px 18px, auto;
  box-shadow:
    0 8px 22px rgba(0, 0, 0, 0.32),
    0 1px 0 rgba(160, 200, 175, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    inset 0 -12px 24px rgba(0, 0, 0, 0.42);
  padding: 8px 30px 8px 8px;
  min-height: 0;
}

.map-mini-chat .map-mini-chat-header-inner::after {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: -1px;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(180, 255, 205, 0.55),
    transparent
  );
  box-shadow: 0 0 12px rgba(125, 252, 138, 0.45);
  z-index: 3;
}

.map-mini-chat-header-pixel {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.55;
  z-index: 0;
}

.map-mini-chat .map-mini-chat-close.ui-close,
.map-mini-chat #mapMiniChatClose {
  position: absolute !important;
  top: 6px !important;
  right: 6px !important;
  left: auto !important;
  bottom: auto !important;
  z-index: 60 !important;
  pointer-events: auto !important;
  width: 22px !important;
  height: 22px !important;
  min-width: 22px !important;
  min-height: 22px !important;
  margin: 0 !important;
  transform: none !important;
}

.map-mini-chat .map-mini-chat-head-row {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.map-mini-chat .map-mini-chat-peer {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 auto;
  min-width: 0;
  padding: 0;
}

.map-mini-chat .map-mini-chat-avatar,
.map-mini-chat--nodus .map-mini-chat-avatar,
.map-mini-chat .map-mini-chat-avatar.map-mini-chat-avatar {
  width: 64px !important;
  height: 64px !important;
  min-width: 64px !important;
  min-height: 64px !important;
  max-width: 64px !important;
  max-height: 64px !important;
  font-size: 20px !important;
  font-weight: 700;
  letter-spacing: 0.02em;
  border-radius: 14px !important;
  border: 1px solid rgba(125, 252, 138, 0.55) !important;
  box-sizing: border-box;
  background:
    radial-gradient(120% 120% at 30% 20%, rgba(125, 252, 138, 0.14), rgba(3, 10, 12, 0.95) 65%) !important;
  box-shadow:
    0 0 0 1px rgba(125, 252, 138, 0.08),
    0 0 14px rgba(125, 252, 138, 0.16) !important;
  overflow: hidden;
  flex-shrink: 0;
}

.map-mini-chat .map-mini-chat-peer-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  flex: 1 1 auto;
}

.map-mini-chat .map-mini-chat-name-row {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  max-width: 100%;
}

.map-mini-chat .map-mini-chat-name {
  display: block;
  font-size: 15px !important;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.15;
  color: #f4fff8;
  text-shadow: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.map-mini-chat .map-mini-chat-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  background: rgba(140, 150, 155, 0.55);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35);
}

.map-mini-chat .map-mini-chat-dot.is-online {
  background: #7dff95;
  box-shadow: 0 0 8px rgba(125, 252, 138, 0.75);
}

.map-mini-chat .map-mini-chat-presence {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 1.2;
  color: #7dff95;
}

.map-mini-chat .map-mini-chat-presence[hidden],
.map-mini-chat .map-mini-chat-dot[hidden] {
  display: none !important;
}

.map-mini-chat .map-mini-chat-status {
  display: flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  font-size: 10px !important;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.25;
  text-transform: none;
  color: rgba(220, 232, 226, 0.78);
  opacity: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.map-mini-chat .map-mini-chat-status i {
  color: #7dff95;
  font-size: 9px;
  flex-shrink: 0;
}

.map-mini-chat--nodus .map-mini-chat-status {
  font-size: 9px !important;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(170, 230, 190, 0.88);
}

.map-mini-chat .map-mini-chat-head-cluster {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 6px;
  flex: 0 0 auto;
  width: auto;
  min-width: 0;
  max-width: 52%;
  margin-left: auto;
  padding: 0;
}

.map-mini-chat .map-mini-chat-head-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  width: auto;
}

.map-mini-chat .map-mini-chat-call-ic,
.map-mini-chat .map-mini-chat-report,
.map-mini-chat .map-mini-chat-more {
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  border-radius: 8px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  border: 1px solid rgba(175, 220, 205, 0.18);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(0, 0, 0, 0.28));
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
  transition:
    transform 0.16s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.map-mini-chat .map-mini-chat-call-ic:hover,
.map-mini-chat .map-mini-chat-report:hover,
.map-mini-chat .map-mini-chat-more:hover {
  transform: translateY(-1px);
}

.map-mini-chat .map-mini-chat-call-ic--audio {
  color: #82ffa2;
  border-color: rgba(125, 252, 138, 0.34);
}

.map-mini-chat .map-mini-chat-call-ic--video {
  color: #79c8ff;
  border-color: rgba(90, 175, 255, 0.34);
}

.map-mini-chat .map-mini-chat-report {
  color: #ffd487;
  border-color: rgba(255, 205, 120, 0.28);
}

.map-mini-chat .map-mini-chat-more {
  color: rgba(230, 245, 238, 0.9);
}

.map-mini-chat .map-mini-chat-actions,
.map-mini-chat .map-mini-chat-map-actions,
.map-mini-chat .map-mini-chat-actions-maps {
  position: static;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 5px;
  width: 100%;
  max-width: 168px;
  margin: 0;
  justify-content: flex-end;
}

.map-mini-chat .map-mini-chat-arrow-btn {
  flex: 1 1 0;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  height: 26px;
  padding: 0 7px;
  border-radius: 999px;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
  border: 1px solid rgba(125, 252, 138, 0.32);
  background: rgba(0, 0, 0, 0.28);
  color: rgba(210, 255, 225, 0.92);
  box-shadow: none;
  transition:
    transform 0.16s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.map-mini-chat .map-mini-chat-arrow-btn i {
  font-size: 9px;
  color: #7dff95;
}

.map-mini-chat .map-mini-chat-arrow-btn:hover {
  transform: translateY(-1px);
}

.map-mini-chat .map-mini-chat-arrow-their {
  color: rgba(210, 255, 225, 0.92);
  border-color: rgba(125, 252, 138, 0.32);
}

.map-mini-chat .map-mini-chat-arrow-mine {
  color: rgba(255, 230, 190, 0.94);
  border-color: rgba(255, 205, 120, 0.34);
}

.map-mini-chat .map-mini-chat-arrow-mine i {
  color: #ffd487;
}

.map-mini-chat .map-mini-chat-arrow-glyph {
  display: none;
}

/* NoDUS map chat: clean header — avatar + title + voice tools */
.map-mini-chat--nodus .map-mini-chat-head-cluster {
  display: none !important;
}

.map-mini-chat--nodus .map-mini-chat-map-actions,
.map-mini-chat--nodus .map-mini-chat-actions-maps {
  display: none !important;
}

.map-mini-chat-nodus-tools {
  display: none;
  position: absolute;
  right: 7px;
  bottom: 5px;
  z-index: 8;
  align-items: center;
  gap: 4px;
  margin: 0;
  pointer-events: auto;
}

.map-mini-chat--nodus .map-mini-chat-nodus-tools:not([hidden]) {
  display: inline-flex;
}

.map-mini-chat--nodus .map-mini-chat-header-inner {
  padding-bottom: 28px;
}

.map-mini-chat .map-mini-chat-nodus-tools .map-mini-chat-call-ic,
.map-mini-chat .map-mini-chat-nodus-voice,
.map-mini-chat .map-mini-chat-nodus-stop {
  width: 20px !important;
  height: 20px !important;
  min-width: 20px !important;
  min-height: 20px !important;
  border-radius: 6px !important;
  font-size: 8px !important;
}

.map-mini-chat .map-mini-chat-nodus-voice.is-on {
  color: #82ffa2;
  border-color: rgba(125, 252, 138, 0.45);
}

.map-mini-chat .map-mini-chat-nodus-stop {
  color: #ffb4b4;
  border-color: rgba(255, 120, 140, 0.35);
}

#myPageViewMessages .mnm-ch-nodus-stop-btn {
  color: #ffb4b4 !important;
  border-color: rgba(255, 120, 140, 0.35) !important;
}

/* Message stream — inset scroll rail */
.map-mini-chat .map-mini-chat-msgs {
  --mnm-scroll-rail-inset: 14px;
  padding: 12px 10px 8px;
  margin-top: 4px;
  scrollbar-gutter: stable;
}

.map-mini-chat .map-mini-chat-msgs::-webkit-scrollbar-track {
  margin-block: 14px;
}

/* ---------- Message stream (bubbles) ---------- */

.map-mini-chat .map-mini-msg-who {
  font-size: 8px;
  letter-spacing: 0.18em;
  opacity: 0.7;
}

.map-mini-chat .map-mini-msg {
  min-width: 78px;
  padding: 9px 12px 7px;
  border-radius: 16px;
  box-shadow:
    0 6px 18px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.map-mini-chat .map-mini-msg--in {
  border-radius: 16px 16px 16px 5px;
  border-color: rgba(150, 255, 200, 0.2);
  background: linear-gradient(180deg, rgba(28, 44, 44, 0.92), rgba(14, 26, 28, 0.92));
}

.map-mini-chat .map-mini-msg--out {
  border-radius: 16px 16px 5px 16px;
  border-color: rgba(110, 190, 255, 0.32);
  background: linear-gradient(180deg, rgba(28, 68, 106, 0.92), rgba(16, 44, 74, 0.94));
  color: #eaf5ff;
}

.map-mini-chat .map-mini-msg-text {
  font-size: 12.5px;
  line-height: 1.42;
  letter-spacing: 0.005em;
}

.map-mini-chat .map-mini-msg-time {
  margin-top: 3px;
  font-size: 9px;
  letter-spacing: 0.06em;
  white-space: nowrap;
  opacity: 0.55;
}

.map-mini-chat .map-mini-msg-media {
  border-radius: 12px;
  margin-top: 6px;
}

/* ---------- Attachment toolbar ---------- */

.map-mini-chat .chat-rich-toolbar {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  padding: 8px 10px 4px;
  border-top: 1px solid rgba(125, 252, 138, 0.2);
  background: transparent;
}

.map-mini-chat .chat-rich-btn {
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  border-radius: 8px !important;
  border-color: rgba(255, 255, 255, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.015));
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.34),
    0 1px 0 rgba(255, 255, 255, 0.07) inset;
  transition:
    transform 0.16s ease,
    color 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.2s ease;
}

.map-mini-chat .chat-rich-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(125, 252, 138, 0.42);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.42), 0 0 14px rgba(125, 252, 138, 0.16);
}

.map-mini-chat .chat-rich-btn.is-emoji-open {
  color: #7dfc8a;
  border-color: rgba(125, 252, 138, 0.55);
  box-shadow: 0 0 16px rgba(125, 252, 138, 0.24);
}

/* Global rich btn fallback (other hosts) */
.chat-rich-btn {
  width: 31px;
  height: 31px;
  border-radius: 10px;
  border-color: rgba(255, 255, 255, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.015));
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.34),
    0 1px 0 rgba(255, 255, 255, 0.07) inset;
  transition:
    transform 0.16s ease,
    color 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.2s ease;
}

.chat-rich-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(125, 252, 138, 0.42);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.42), 0 0 14px rgba(125, 252, 138, 0.16);
}

.chat-rich-btn.is-emoji-open {
  color: #7dfc8a;
  border-color: rgba(125, 252, 138, 0.55);
  box-shadow: 0 0 16px rgba(125, 252, 138, 0.24);
}

/* ---------- Compose (sketch: 3 side squares + tall send) ---------- */

.map-mini-chat .map-mini-chat-compose {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 8px;
  padding: 8px 10px 10px;
  border-top: none;
  background: transparent;
}

.map-mini-chat .map-mini-chat-compose-side {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 5px;
  flex: 0 0 auto;
  align-self: stretch;
}

.map-mini-chat .map-mini-chat-compose-side .mnp-polish-icon-btn {
  width: 30px !important;
  height: 30px !important;
  min-width: 30px !important;
  min-height: 30px !important;
  margin: 0 !important;
  border-radius: 8px !important;
  font-size: 12px;
  color: rgba(255, 214, 120, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.015));
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.34),
    0 1px 0 rgba(255, 255, 255, 0.07) inset;
  transition:
    transform 0.16s ease,
    box-shadow 0.2s ease;
}

.map-mini-chat .map-mini-chat-compose-side .mnp-polish-icon-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4), 0 0 12px rgba(125, 252, 138, 0.14);
}

.map-mini-chat .map-mini-chat-az {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1;
  color: rgba(255, 214, 120, 0.95);
}

.map-mini-chat .map-mini-chat-compose .map-mini-chat-input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 76px !important;
  height: auto;
  border-radius: 16px !important;
  padding: 12px 14px !important;
  font-size: 12.5px;
  line-height: 1.45;
  border: 1px solid rgba(48, 68, 58, 0.72) !important;
  background:
    linear-gradient(180deg, rgba(4, 10, 12, 0.92) 0%, rgba(2, 6, 8, 0.96) 100%) !important;
  box-shadow:
    inset 0 2px 14px rgba(0, 0, 0, 0.48),
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 1px 0 rgba(120, 160, 130, 0.06);
  transition:
    border-color 0.18s ease,
    box-shadow 0.22s ease;
  resize: none;
  pointer-events: auto !important;
  cursor: text !important;
  position: relative;
  z-index: 4;
}

.map-mini-chat .map-mini-chat-compose .map-mini-chat-input:focus {
  border-color: rgba(100, 160, 120, 0.38) !important;
  box-shadow:
    inset 0 2px 14px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 0 0 2px rgba(90, 150, 110, 0.1);
  outline: none;
}

.map-mini-chat .map-mini-chat-compose .map-mini-chat-send {
  flex: 0 0 46px !important;
  width: 46px !important;
  min-width: 46px !important;
  min-height: 76px !important;
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px !important;
  padding: 0 !important;
  border: 1px solid rgba(125, 252, 138, 0.55) !important;
  color: #06140c !important;
  background:
    linear-gradient(180deg, #9dffb0 0%, #5ce878 45%, #2fb85a 100%) !important;
  box-shadow:
    0 0 18px rgba(125, 252, 138, 0.35),
    0 6px 16px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  font-size: 16px;
  text-shadow: none;
  transition:
    transform 0.16s ease,
    box-shadow 0.2s ease,
    filter 0.2s ease;
}

.map-mini-chat .map-mini-chat-compose .map-mini-chat-send:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow:
    0 0 22px rgba(125, 252, 138, 0.45),
    0 10px 22px rgba(0, 0, 0, 0.4);
}

.map-mini-chat .map-mini-chat-compose .map-mini-chat-send:active {
  transform: translateY(0);
  filter: brightness(0.96);
}

.map-mini-chat .map-mini-chat-compose .map-mini-chat-send i {
  color: #06140c;
}

/* ---------- Shared emoji picker ---------- */

.mnm-emoji-pop {
  position: fixed;
  z-index: 100060;
  width: min(340px, calc(100vw - 20px));
  max-height: min(392px, calc(100vh - 24px));
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  border: 1px solid rgba(140, 220, 190, 0.26);
  background:
    linear-gradient(180deg, rgba(14, 28, 30, 0.97), rgba(6, 13, 17, 0.98));
  box-shadow:
    0 30px 70px rgba(0, 0, 0, 0.66),
    0 1px 0 rgba(255, 255, 255, 0.07) inset;
  backdrop-filter: blur(22px) saturate(150%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  overflow: hidden;
  opacity: 0;
  transform: translateY(6px) scale(0.985);
  transition:
    opacity 0.16s ease,
    transform 0.18s cubic-bezier(0.2, 0.9, 0.3, 1);
}

.mnm-emoji-pop.is-in {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.mnm-emoji-head {
  flex: 0 0 auto;
  padding: 10px 12px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: linear-gradient(180deg, rgba(125, 252, 138, 0.06), rgba(255, 255, 255, 0));
}

.mnm-emoji-search {
  width: 100%;
  height: 34px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.4);
  color: #eaf6f0;
  font-family: inherit;
  font-size: 12px;
  letter-spacing: 0.02em;
  outline: none;
}

.mnm-emoji-search::placeholder {
  color: rgba(210, 240, 225, 0.42);
}

.mnm-emoji-search:focus {
  border-color: rgba(125, 252, 138, 0.45);
  box-shadow: 0 0 0 3px rgba(125, 252, 138, 0.1);
}

.mnm-emoji-grid {
  flex: 1 1 auto;
  min-height: 180px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(38px, 1fr));
  gap: 2px;
  padding: 8px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(125, 252, 138, 0.3) transparent;
}

.mnm-emoji-grid::-webkit-scrollbar {
  width: 6px;
}

.mnm-emoji-grid::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(125, 252, 138, 0.26);
}

.mnm-emoji-cell {
  height: 38px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  padding: 0;
  transition:
    background 0.14s ease,
    transform 0.12s ease;
}

.mnm-emoji-cell:hover {
  background: rgba(125, 252, 138, 0.14);
  transform: scale(1.14);
}

.mnm-emoji-cell:active {
  transform: scale(0.96);
}

.mnm-emoji-empty {
  grid-column: 1 / -1;
  padding: 26px 12px;
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: rgba(210, 240, 225, 0.5);
}

.mnm-emoji-tabs {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 6px 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(0, 0, 0, 0.2));
  overflow-x: auto;
  scrollbar-width: none;
}

.mnm-emoji-tabs::-webkit-scrollbar {
  display: none;
}

.mnm-emoji-tab {
  flex: 1 0 auto;
  min-width: 30px;
  height: 30px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: rgba(210, 240, 225, 0.55);
  font-size: 12.5px;
  cursor: pointer;
  transition:
    color 0.15s ease,
    background 0.15s ease;
}

.mnm-emoji-tab:hover {
  color: rgba(235, 255, 245, 0.9);
  background: rgba(255, 255, 255, 0.06);
}

.mnm-emoji-tab.is-active {
  color: #061410;
  background: linear-gradient(160deg, #9dffb0, #4fe6c0);
  box-shadow: 0 4px 12px rgba(79, 230, 192, 0.28);
}

/* ---------- File card ---------- */

.mnm-file-card {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: min(240px, 100%);
  max-width: 100%;
  margin-top: 6px;
  padding: 8px 10px;
  border-radius: 13px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(0, 0, 0, 0.22));
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.32);
}

.mnm-file-card.is-missing {
  opacity: 0.65;
}

.mnm-file-card-glyph {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: #061410;
  background: linear-gradient(160deg, #9dffb0, #4fe6c0);
  box-shadow: 0 4px 12px rgba(79, 230, 192, 0.24);
}

.mnm-file-card-body {
  flex: 1 1 auto;
  min-width: 0;
}

.mnm-file-card-name {
  font-size: 12px;
  font-weight: 650;
  line-height: 1.25;
  color: inherit;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mnm-file-card-meta {
  margin-top: 2px;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.62;
}

.mnm-file-card-dl {
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.3);
  color: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transition:
    transform 0.15s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.mnm-file-card-dl:hover {
  transform: translateY(-1px);
  border-color: rgba(125, 252, 138, 0.5);
  box-shadow: 0 0 14px rgba(125, 252, 138, 0.22);
}

@media (prefers-reduced-motion: reduce) {
  .mnm-emoji-pop,
  .mnm-emoji-cell,
  .chat-rich-btn,
  .map-mini-chat .map-mini-chat-send {
    transition: none;
  }
}

/* ---------- MY PAGE direct chat: sketch header (thin neon, unified) ---------- */

#myPageViewMessages .message-chat {
  position: relative;
  isolation: isolate;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(125, 252, 138, 0.38);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(6, 12, 14, 0.98), rgba(2, 8, 12, 0.99));
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.45);
}

#myPageViewMessages .message-chat-header,
#myPageViewMessages .message-chat-header.mnm-ch-head {
  position: relative;
  flex: 0 0 auto !important;
  min-height: 0 !important;
  height: auto !important;
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px !important;
  box-sizing: border-box;
  overflow: visible;
  border: 1px solid rgba(125, 252, 138, 0.55) !important;
  border-width: 1px !important;
  border-radius: 14px !important;
  margin: 8px 8px 0;
  background:
    linear-gradient(rgba(125, 252, 138, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(125, 252, 138, 0.025) 1px, transparent 1px),
    rgba(5, 14, 16, 0.96) !important;
  background-size: 18px 18px, 18px 18px, auto !important;
  box-shadow:
    0 0 14px rgba(125, 252, 138, 0.1),
    0 10px 22px rgba(0, 0, 0, 0.38),
    0 14px 28px rgba(125, 252, 138, 0.12),
    0 2px 0 rgba(190, 255, 210, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
}

#myPageViewMessages .message-chat-header.mnm-ch-head::after {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: -1px;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(180, 255, 205, 0.55),
    transparent
  );
  box-shadow: 0 0 12px rgba(125, 252, 138, 0.45);
  z-index: 2;
}

#myPageViewMessages .message-chat-header::before {
  display: none !important;
}

#myPageViewMessages .message-chat-header > * {
  position: relative;
  z-index: 1;
}

#myPageViewMessages .mnm-ch-id {
  flex: 1 1 auto;
  min-width: 0;
}

#myPageViewMessages .msg-chat-peer--with-av,
#myPageViewMessages .msg-chat-peer--nodus {
  align-items: center;
  gap: 12px;
}

#myPageViewMessages .msg-chat-peer-av-btn,
#myPageViewMessages .msg-chat-peer-avatar,
#myPageViewMessages .mnm-ch-av {
  width: 64px !important;
  height: 64px !important;
  min-width: 64px !important;
  min-height: 64px !important;
  border: 1px solid rgba(125, 252, 138, 0.55) !important;
  border-radius: 50%;
  box-shadow:
    0 0 0 1px rgba(125, 252, 138, 0.08),
    0 0 14px rgba(125, 252, 138, 0.16) !important;
}

#myPageViewMessages .mnm-ch-lines {
  gap: 3px;
}

#myPageViewMessages .mnm-ch-name-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

#myPageViewMessages .message-chat-header .msg-chat-peer-name,
#myPageViewMessages .mnm-ch-name {
  font-size: 16px !important;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.15;
  color: #f4fff8 !important;
  text-transform: none !important;
}

#myPageViewMessages .mnm-ch-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  background: rgba(140, 150, 155, 0.55);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35);
}

#myPageViewMessages .mnm-ch-dot.is-online {
  background: #7dff95;
  box-shadow: 0 0 8px rgba(125, 252, 138, 0.75);
}

#myPageViewMessages .mnm-ch-presence {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #7dff95;
  line-height: 1.2;
}

#myPageViewMessages .message-chat-header .msg-chat-peer-route,
#myPageViewMessages .mnm-ch-loc {
  display: flex !important;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  margin-top: 1px;
  font-size: 11px !important;
  line-height: 1.3;
  color: rgba(220, 232, 226, 0.78) !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#myPageViewMessages .mnm-ch-loc-pin {
  color: #7dff95;
  font-size: 10px;
  flex-shrink: 0;
}

#myPageViewMessages .msg-chat-encrypt-badge {
  color: rgba(125, 252, 138, 0.78);
}

#myPageViewMessages .mnm-ch-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 8px;
  flex: 0 0 auto;
  min-width: 0;
}

#myPageViewMessages .msg-chat-header-actions,
#myPageViewMessages .mnm-ch-tools {
  display: flex !important;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px !important;
  margin: 0 !important;
  grid-template-columns: none !important;
  grid-auto-rows: auto !important;
}

#myPageViewMessages .msg-chat-action-btn,
#myPageViewMessages .mnm-ch-ic {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  border-radius: 9px !important;
  border: 1px solid rgba(175, 220, 205, 0.18) !important;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(0, 0, 0, 0.28)) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28) !important;
  color: rgba(230, 245, 238, 0.9);
}

#myPageViewMessages .msg-chat-action-btn i {
  font-size: 12px !important;
}

#myPageViewMessages .msg-chat-call-audio-btn,
#myPageViewMessages .mnm-ch-ic--voice,
#myPageViewMessages .mnm-ch-ic--call {
  color: #82ffa2 !important;
  border-color: rgba(125, 252, 138, 0.34) !important;
}

#myPageViewMessages .msg-chat-call-video-btn,
#myPageViewMessages .mnm-ch-ic--video {
  color: #79c8ff !important;
  border-color: rgba(90, 175, 255, 0.34) !important;
}

#myPageViewMessages .msg-chat-report-btn,
#myPageViewMessages .mnm-ch-ic--flag,
#myPageViewMessages .msg-chat-archive-btn {
  color: #ffd487 !important;
  border-color: rgba(255, 205, 120, 0.28) !important;
}

#myPageViewMessages .mnm-ch-more-wrap {
  position: relative;
  display: inline-flex;
}

#myPageViewMessages .mnm-ch-more-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 40;
  min-width: 188px;
  padding: 6px;
  border-radius: 10px;
  border: 1px solid rgba(125, 252, 138, 0.28);
  background: rgba(6, 14, 16, 0.98);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5);
}

#myPageViewMessages .mnm-ch-more-menu[hidden] {
  display: none !important;
}

#myPageViewMessages .mnm-ch-more-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: rgba(230, 245, 238, 0.92);
  font-size: 12px;
  text-align: left;
  cursor: pointer;
}

#myPageViewMessages .mnm-ch-more-item:hover {
  background: rgba(125, 252, 138, 0.08);
}

#myPageViewMessages .mnm-ch-more-item--danger {
  color: #ffb4b4;
}

#myPageViewMessages .mnm-ch-maps {
  display: flex;
  gap: 6px;
  width: 100%;
  max-width: 168px;
}

#myPageViewMessages .mnm-ch-map-btn {
  flex: 1 1 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 0;
  height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid rgba(125, 252, 138, 0.32);
  background: rgba(0, 0, 0, 0.28);
  color: rgba(210, 255, 225, 0.92);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
}

#myPageViewMessages .mnm-ch-map-btn i {
  font-size: 9px;
  color: #7dff95;
}

#myPageViewMessages .mnm-ch-map-btn--mine {
  border-color: rgba(255, 205, 120, 0.34);
  color: rgba(255, 230, 190, 0.94);
}

#myPageViewMessages .mnm-ch-map-btn--mine i {
  color: #ffd487;
}

#myPageViewMessages .mnm-ch-head--nodus .mnm-ch-maps {
  display: none;
}

#myPageViewMessages .message-chat-log {
  flex: 1 1 auto;
  min-height: 0;
  padding: 18px 16px 14px;
  gap: 8px;
  background:
    linear-gradient(180deg, rgba(1, 8, 13, 0.38), transparent 16%),
    rgba(1, 8, 13, 0.2);
}

#myPageViewMessages .msg-row {
  margin-bottom: 8px;
}

#myPageViewMessages .msg-bubble {
  max-width: 84%;
  padding: 8px 11px 7px;
  border-radius: 15px;
  box-shadow:
    0 8px 22px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

#myPageViewMessages .msg-bubble-in {
  border-radius: 15px 15px 15px 5px;
  background: linear-gradient(180deg, rgba(27, 43, 44, 0.94), rgba(12, 24, 28, 0.95));
}

#myPageViewMessages .msg-bubble-out {
  border-radius: 15px 15px 5px 15px;
  border-color: rgba(92, 170, 240, 0.34);
  background: linear-gradient(180deg, rgba(27, 67, 103, 0.92), rgba(14, 41, 70, 0.95));
}

#myPageViewMessages .msg-bubble img,
#myPageViewMessages .msg-bubble video {
  display: block;
  max-width: 100%;
  max-height: min(52vh, 460px);
  object-fit: contain;
  border-radius: 11px;
}

#myPageViewMessages .message-chat-input {
  flex: 0 0 auto;
  margin: 0;
  padding: 9px 12px 10px;
  border-top: 1px solid rgba(125, 252, 138, 0.17);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.022), rgba(0, 0, 0, 0.16)),
    rgba(4, 12, 15, 0.96);
  box-shadow:
    0 -10px 26px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

#myPageViewMessages .msg-input-row {
  grid-template-columns: 42px minmax(0, 1fr) 48px;
  gap: 9px;
  align-items: stretch;
}

#myPageViewMessages .msg-input-cloud {
  min-height: 76px;
  padding: 7px 9px 6px;
  gap: 5px;
  border-radius: 15px;
  border-color: rgba(150, 210, 195, 0.14);
  background: rgba(0, 6, 10, 0.54);
}

#myPageViewMessages .message-chat-input .msg-cloud-actions {
  position: static;
  order: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
}

#myPageViewMessages .msg-cloud-actions-left {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

#myPageViewMessages .msg-quick-emoji-wrap {
  position: relative;
  flex-shrink: 0;
}

#myPageViewMessages .msg-quick-emoji-trigger {
  font-size: 15px;
  line-height: 1;
}

#myPageViewMessages .msg-quick-emoji-pop {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 24;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 6px;
  min-width: 36px;
  overflow-y: auto;
  overflow-x: hidden;
  border-radius: 12px;
  border: 1px solid rgba(125, 252, 138, 0.38);
  background: rgba(6, 14, 12, 0.96);
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(125, 252, 138, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

#myPageViewMessages .msg-quick-emoji-pop[hidden] {
  display: none !important;
}

#myPageViewMessages .msg-quick-emoji-pop-btn {
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition:
    transform 0.12s ease,
    background 0.12s ease;
}

#myPageViewMessages .msg-quick-emoji-pop-btn:hover {
  transform: scale(1.12);
  background: rgba(125, 252, 138, 0.14);
}

#myPageViewMessages .message-chat-input textarea#msgInput {
  order: unset;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 34px;
  max-height: 84px;
  padding: 7px 6px 5px;
  font-size: 12px;
  width: 100%;
}

#myPageViewMessages .msg-input-compose-row {
  order: 2;
  display: flex;
  align-items: flex-start;
  gap: 0;
  width: 100%;
  min-width: 0;
}

#myPageViewMessages .msg-text--emoji-lg {
  font-size: 52px !important;
}

#myPageViewMessages .msg-text--emoji-md {
  font-size: 40px !important;
}

#myPageViewMessages .msg-text--emoji-sm {
  font-size: 30px !important;
}

#myPageViewMessages .message-chat-input .msg-cloud-btn {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  color: rgba(190, 220, 210, 0.84);
  border-color: rgba(190, 220, 210, 0.14);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(0, 0, 0, 0.18));
}

#myPageViewMessages .msg-input-cloud-tools {
  order: 3;
  flex-wrap: nowrap;
  gap: 5px;
  padding: 0;
  overflow: hidden;
}

#myPageViewMessages .msg-polish-btn {
  min-width: 0;
  padding: 4px 7px;
  border-radius: 9px;
  font-size: 9px;
}

#myPageViewMessages .message-chat-input .chat-plus-btn,
#myPageViewMessages .msg-input-send {
  width: 42px;
  height: 100%;
  min-height: 76px;
  border-radius: 13px;
}

#myPageViewMessages .msg-input-send {
  width: 48px;
  color: #9dffd0;
  border-color: rgba(125, 252, 138, 0.48);
  background: linear-gradient(160deg, rgba(125, 252, 138, 0.18), rgba(58, 166, 255, 0.12));
  box-shadow: 0 0 18px rgba(125, 252, 138, 0.08);
}

#myPageViewMessages .msg-input-hint {
  display: none;
}

@media (max-width: 700px) {
  #myPageViewMessages .message-chat-header,
  #myPageViewMessages .message-chat-header.mnm-ch-head {
    margin: 4px 4px 0;
    gap: 6px;
    padding: 8px !important;
  }

  #myPageViewMessages .msg-chat-peer--with-av,
  #myPageViewMessages .msg-chat-peer--nodus {
    gap: 7px;
  }

  #myPageViewMessages .msg-chat-peer-avatar,
  #myPageViewMessages .msg-chat-peer-av-btn,
  #myPageViewMessages .mnm-ch-av {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    min-height: 42px !important;
  }

  #myPageViewMessages .message-chat-header .msg-chat-peer-name,
  #myPageViewMessages .mnm-ch-name {
    font-size: 12px !important;
  }

  #myPageViewMessages .mnm-ch-presence {
    font-size: 9px;
  }

  #myPageViewMessages .message-chat-header .msg-chat-peer-route,
  #myPageViewMessages .mnm-ch-loc {
    font-size: 8px !important;
  }

  #myPageViewMessages .msg-chat-encrypt-badge {
    display: none;
  }

  #myPageViewMessages .msg-chat-header-actions,
  #myPageViewMessages .mnm-ch-tools {
    gap: 4px !important;
  }

  #myPageViewMessages .msg-chat-action-btn,
  #myPageViewMessages .mnm-ch-ic {
    width: 26px !important;
    height: 26px !important;
    min-width: 26px !important;
    border-radius: 7px !important;
  }

  #myPageViewMessages .msg-chat-action-btn i {
    font-size: 10px !important;
  }

  #myPageViewMessages .mnm-ch-maps {
    max-width: 120px;
  }

  #myPageViewMessages .mnm-ch-map-btn {
    height: 24px;
    font-size: 7px;
    padding: 0 5px;
  }

  #myPageViewMessages .message-chat-log {
    padding: 8px 6px;
  }

  #myPageViewMessages .msg-bubble {
    max-width: 94%;
    padding: 6px 7px;
  }

  #myPageViewMessages .msg-meta {
    font-size: 7px;
  }

  #myPageViewMessages .msg-text {
    font-size: 9px;
  }

  #myPageViewMessages .message-chat-input {
    padding: 5px;
  }

  #myPageViewMessages .msg-input-row {
    grid-template-columns: 28px minmax(0, 1fr) 30px;
    gap: 4px;
  }

  #myPageViewMessages .msg-input-cloud {
    min-height: 58px;
    padding: 4px;
  }

  #myPageViewMessages .message-chat-input textarea#msgInput {
    min-height: 28px;
    padding: 4px;
    font-size: 9px;
  }

  #myPageViewMessages .message-chat-input .msg-cloud-actions {
    gap: 3px;
  }

  #myPageViewMessages .message-chat-input .msg-cloud-btn {
    width: 21px;
    height: 21px;
    font-size: 8px;
  }

  #myPageViewMessages .msg-input-cloud-tools {
    display: none;
  }

  #myPageViewMessages .message-chat-input .chat-plus-btn,
  #myPageViewMessages .msg-input-send {
    width: 28px;
    min-height: 58px;
    font-size: 10px;
  }

  #myPageViewMessages .msg-input-send {
    width: 30px;
  }
}

/* ---------- Portaled overflow menus (escape chat overflow:hidden) ---------- */

.mnm-ch-more-menu--portal,
.map-mini-chat-more-menu--portal {
  position: fixed !important;
  top: 0;
  left: 0;
  z-index: 16080 !important;
  min-width: 196px;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid rgba(125, 252, 138, 0.32);
  background: rgba(6, 14, 16, 0.98);
  box-shadow:
    0 16px 36px rgba(0, 0, 0, 0.55),
    0 0 18px rgba(125, 252, 138, 0.1);
}

.mnm-ch-more-menu--portal[hidden],
.map-mini-chat-more-menu--portal[hidden] {
  display: none !important;
}

.mnm-ch-more-menu--portal .mnm-ch-more-item,
.map-mini-chat-more-menu--portal .map-mini-chat-more-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 11px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: rgba(230, 245, 238, 0.94);
  font-size: 12px;
  text-align: left;
  cursor: pointer;
}

.mnm-ch-more-menu--portal .mnm-ch-more-item:hover,
.map-mini-chat-more-menu--portal .map-mini-chat-more-item:hover {
  background: rgba(125, 252, 138, 0.1);
}

.mnm-ch-more-menu--portal .mnm-ch-more-item--danger {
  color: #ffb4b4;
}

.map-mini-chat-more-wrap {
  position: relative;
  display: inline-flex;
}

/* ---------- Selection action bar (forward / delete) ---------- */

.chat-selection-bar {
  position: fixed;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 16070;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(125, 252, 138, 0.35);
  background: rgba(6, 14, 16, 0.96);
  box-shadow:
    0 14px 36px rgba(0, 0, 0, 0.55),
    0 0 20px rgba(125, 252, 138, 0.12);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  pointer-events: auto;
  animation: mnm-sel-bar-in 0.18s ease;
}

.chat-selection-bar[hidden] {
  display: none !important;
}

@keyframes mnm-sel-bar-in {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.chat-selection-bar-count {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: rgba(180, 255, 205, 0.9);
  padding: 0 6px 0 4px;
  white-space: nowrap;
}

.chat-selection-bar-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(125, 252, 138, 0.28);
  background: rgba(125, 252, 138, 0.1);
  color: #d8ffe8;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.chat-selection-bar-btn:hover {
  border-color: rgba(125, 252, 138, 0.5);
  background: rgba(125, 252, 138, 0.18);
}

.chat-selection-bar-btn--danger {
  border-color: rgba(255, 120, 140, 0.35);
  background: rgba(80, 16, 28, 0.35);
  color: #ffb4c0;
}

.chat-selection-bar-btn--ghost {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(220, 232, 226, 0.8);
}

/* ---------- Premium bubble polish ---------- */

.map-mini-chat .map-mini-msg,
#myPageViewMessages .msg-bubble {
  transition:
    transform 0.16s ease,
    box-shadow 0.2s ease,
    outline-color 0.16s ease;
}

.map-mini-chat .map-mini-msg:hover,
#myPageViewMessages .msg-bubble:hover {
  transform: translateY(-1px);
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.chat-friend-pick-pop {
  z-index: 16090 !important;
  border-color: rgba(125, 252, 138, 0.35) !important;
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.55),
    0 0 22px rgba(125, 252, 138, 0.12) !important;
}

.chat-friend-pick-item {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 10px;
}

.chat-friend-pick-av {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #d8ffe8;
  border: 1px solid rgba(125, 252, 138, 0.35);
  background: rgba(125, 252, 138, 0.1);
}

.chat-friend-pick-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.chat-forward-pop {
  z-index: 16085 !important;
  border-color: rgba(125, 252, 138, 0.35) !important;
}

/* =============================================================================
   2026-09-16 — map chat soft premium (closed dock + open mini-chat)
   Cabin chrome language. No layout rewrite. Red only for unread accents.
   ============================================================================= */

body:not(.tomato-mode) .map-mini-chat {
  border: 1px solid rgba(125, 252, 138, 0.28) !important;
  border-radius: 10px !important;
  background:
    linear-gradient(180deg, rgba(10, 18, 16, 0.94) 0%, rgba(5, 11, 10, 0.96) 100%) !important;
  box-shadow:
    0 10px 22px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
  backdrop-filter: blur(10px) saturate(1.05);
  -webkit-backdrop-filter: blur(10px) saturate(1.05);
}

body:not(.tomato-mode) .map-mini-chat::before {
  inset: 1px !important;
  border-radius: 9px !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.035),
    inset 0 0 0 1px rgba(125, 252, 138, 0.04) !important;
  background: radial-gradient(120% 70% at 50% 0%, rgba(125, 252, 138, 0.035), transparent 70%) !important;
}

/* Header plate — richer glass; equal L/T/B inset for tall avatar */
body:not(.tomato-mode) .map-mini-chat .map-mini-chat-header {
  padding: 7px 7px 0 !important;
}

body:not(.tomato-mode) .map-mini-chat .map-mini-chat-header-inner {
  --map-chat-av: 72px;
  border: 1px solid rgba(125, 252, 138, 0.26) !important;
  border-radius: 10px !important;
  background:
    radial-gradient(120% 95% at 0% 0%, rgba(58, 166, 255, 0.14), transparent 52%),
    radial-gradient(110% 90% at 100% 110%, rgba(125, 252, 138, 0.12), transparent 48%),
    repeating-linear-gradient(
      -18deg,
      transparent,
      transparent 10px,
      rgba(125, 252, 138, 0.028) 10px,
      rgba(125, 252, 138, 0.028) 11px
    ),
    linear-gradient(148deg, rgba(14, 28, 24, 0.96) 0%, rgba(7, 14, 18, 0.97) 48%, rgba(5, 14, 12, 0.95) 100%) !important;
  background-size: auto !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.055),
    inset 0 -10px 22px rgba(0, 0, 0, 0.28),
    0 6px 16px rgba(0, 0, 0, 0.26) !important;
  /* equal left / top / bottom inset around avatar */
  padding: 8px 30px 8px 8px !important;
  min-height: calc(var(--map-chat-av) + 16px) !important;
  max-height: calc(var(--map-chat-av) + 40px) !important;
  box-sizing: border-box !important;
}

body:not(.tomato-mode) .map-mini-chat .map-mini-chat-header-inner::after {
  opacity: 0.7 !important;
  box-shadow: 0 0 10px rgba(125, 252, 138, 0.28) !important;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(143, 211, 255, 0.28),
    rgba(125, 252, 138, 0.45),
    rgba(143, 211, 255, 0.28),
    transparent
  ) !important;
}

body:not(.tomato-mode) .map-mini-chat-header-pixel {
  opacity: 0.38 !important;
}

body:not(.tomato-mode) .map-mini-chat .map-mini-chat-header {
  flex: 0 0 auto !important;
  max-height: none !important;
}

body:not(.tomato-mode) .map-mini-chat .map-mini-chat-head-row {
  align-items: center !important;
  min-height: 0 !important;
  gap: 10px !important;
}

body:not(.tomato-mode) .map-mini-chat .map-mini-chat-peer {
  align-items: center !important;
  gap: 12px !important;
  min-width: 0 !important;
}

/* Avatar: tall in header (~full plate height) but HARD-capped — never inflate chat */
body:not(.tomato-mode) .map-mini-chat .map-mini-chat-avatar,
body:not(.tomato-mode) .map-mini-chat--nodus .map-mini-chat-avatar,
body:not(.tomato-mode) .map-mini-chat .map-mini-chat-avatar.map-mini-chat-avatar {
  --map-chat-av: 72px;
  flex: 0 0 var(--map-chat-av) !important;
  align-self: center !important;
  width: var(--map-chat-av) !important;
  height: var(--map-chat-av) !important;
  min-width: var(--map-chat-av) !important;
  min-height: var(--map-chat-av) !important;
  max-width: var(--map-chat-av) !important;
  max-height: var(--map-chat-av) !important;
  aspect-ratio: 1 / 1 !important;
  border-radius: 14px !important;
  border: 1px solid rgba(143, 211, 255, 0.82) !important;
  outline: none !important;
  outline-offset: 0 !important;
  background: #050708 !important;
  box-shadow:
    0 0 0 1px rgba(143, 211, 255, 0.12),
    0 0 14px rgba(58, 166, 255, 0.18) !important;
  overflow: hidden !important;
  font-size: 18px !important;
}

body:not(.tomato-mode) .map-mini-chat .map-mini-chat-avatar img,
body:not(.tomato-mode) .map-mini-chat .map-mini-chat-avatar .map-mini-chat-avatar-img {
  border-radius: 12px !important;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: cover !important;
  display: block !important;
  clip-path: none !important;
}

body:not(.tomato-mode) .map-mini-chat .map-mini-chat-peer-text {
  justify-content: center !important;
  gap: 5px !important;
  padding: 2px 0 2px 2px !important;
  min-height: 0 !important;
}

body:not(.tomato-mode) .map-mini-chat .map-mini-chat-name-row {
  gap: 8px !important;
  max-width: 100% !important;
}

body:not(.tomato-mode) .map-mini-chat .map-mini-chat-name {
  font-size: 15px !important;
  font-weight: 700 !important;
  letter-spacing: 0.035em !important;
  line-height: 1.2 !important;
  color: #f2fff8 !important;
  text-shadow: 0 0 18px rgba(125, 252, 138, 0.18) !important;
}

body:not(.tomato-mode) .map-mini-chat .map-mini-chat-dot {
  width: 7px !important;
  height: 7px !important;
}

body:not(.tomato-mode) .map-mini-chat .map-mini-chat-presence {
  font-size: 10px !important;
  font-weight: 650 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  color: rgba(125, 252, 138, 0.88) !important;
}

body:not(.tomato-mode) .map-mini-chat .map-mini-chat-status,
body:not(.tomato-mode) .map-mini-chat--nodus .map-mini-chat-status {
  font-size: 9px !important;
  font-weight: 550 !important;
  letter-spacing: 0.07em !important;
  line-height: 1.35 !important;
  color: rgba(175, 210, 190, 0.78) !important;
  text-transform: none !important;
  max-width: 100% !important;
  padding: 3px 0 0 !important;
  border-top: 1px solid rgba(125, 252, 138, 0.1) !important;
  margin-top: 1px !important;
}

body:not(.tomato-mode) .map-mini-chat--nodus .map-mini-chat-status {
  letter-spacing: 0.11em !important;
  text-transform: uppercase !important;
  color: rgba(170, 230, 190, 0.82) !important;
}

/* NoDUS: keep equal plate inset; tools float bottom-right over text column */
body:not(.tomato-mode) .map-mini-chat--nodus .map-mini-chat-header-inner {
  padding: 8px 30px 8px 8px !important;
  min-height: calc(var(--map-chat-av) + 16px) !important;
  max-height: calc(var(--map-chat-av) + 40px) !important;
}

body:not(.tomato-mode) .map-mini-chat--nodus .map-mini-chat-peer-text {
  padding-right: 58px !important;
}

body:not(.tomato-mode) .map-mini-chat--nodus .map-mini-chat-nodus-tools {
  right: 8px !important;
  bottom: 8px !important;
}

body:not(.tomato-mode) .map-mini-chat .map-mini-chat-nodus-tools .map-mini-chat-call-ic,
body:not(.tomato-mode) .map-mini-chat .map-mini-chat-nodus-voice,
body:not(.tomato-mode) .map-mini-chat .map-mini-chat-nodus-stop {
  width: 22px !important;
  height: 22px !important;
  min-width: 22px !important;
  min-height: 22px !important;
  border-radius: 6px !important;
  border: 1px solid rgba(125, 252, 138, 0.2) !important;
  background: rgba(8, 16, 12, 0.55) !important;
  box-shadow: none !important;
  font-size: 9px !important;
}

/* Bubbles — terminal, quieter */
body:not(.tomato-mode) .map-mini-chat .map-mini-msg {
  border-radius: 10px !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 2px 10px rgba(0, 0, 0, 0.22) !important;
  border: 1px solid rgba(125, 252, 138, 0.14) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

body:not(.tomato-mode) .map-mini-chat .map-mini-msg--in {
  border-radius: 10px 10px 10px 4px !important;
  border-color: rgba(125, 252, 138, 0.18) !important;
  background: linear-gradient(180deg, rgba(14, 24, 20, 0.92), rgba(8, 14, 12, 0.94)) !important;
}

body:not(.tomato-mode) .map-mini-chat .map-mini-msg--out {
  border-radius: 10px 10px 4px 10px !important;
  border-color: rgba(58, 166, 255, 0.28) !important;
  background: linear-gradient(180deg, rgba(16, 32, 40, 0.94), rgba(10, 20, 28, 0.96)) !important;
}

body:not(.tomato-mode) .map-mini-chat .map-mini-msg-time {
  font-size: 8px !important;
  opacity: 0.45 !important;
}

body:not(.tomato-mode) .map-mini-chat .map-mini-msg-who {
  font-size: 7.5px !important;
  letter-spacing: 0.14em !important;
  opacity: 0.55 !important;
}

/* Toolbar — one weight, Quick-like hover */
body:not(.tomato-mode) .map-mini-chat .chat-rich-toolbar {
  gap: 4px !important;
  padding: 6px 10px 2px !important;
  border-top: 1px solid rgba(125, 252, 138, 0.12) !important;
}

body:not(.tomato-mode) .map-mini-chat .chat-rich-btn,
body:not(.tomato-mode) .map-mini-chat .map-mini-chat-compose-side .mnp-polish-icon-btn {
  width: 26px !important;
  height: 26px !important;
  min-width: 26px !important;
  min-height: 26px !important;
  border-radius: 7px !important;
  border: 1px solid rgba(125, 252, 138, 0.16) !important;
  background: rgba(8, 16, 12, 0.55) !important;
  box-shadow: none !important;
  color: rgba(200, 220, 210, 0.82) !important;
}

body:not(.tomato-mode) .map-mini-chat .chat-rich-btn:hover,
body:not(.tomato-mode) .map-mini-chat .map-mini-chat-compose-side .mnp-polish-icon-btn:hover {
  border-color: rgba(125, 252, 138, 0.4) !important;
  box-shadow: 0 0 10px rgba(125, 252, 138, 0.14) !important;
  color: rgba(220, 255, 230, 0.95) !important;
  transform: none !important;
}

body:not(.tomato-mode) .map-mini-chat .map-mini-chat-compose-side .mnp-polish-icon-btn,
body:not(.tomato-mode) .map-mini-chat .map-mini-chat-az {
  color: rgba(200, 220, 210, 0.85) !important;
}

/* Compose — cabin radius; send stays green accent, aligned height */
body:not(.tomato-mode) .map-mini-chat .map-mini-chat-compose {
  gap: 7px !important;
  padding: 7px 9px 9px !important;
}

body:not(.tomato-mode) .map-mini-chat .map-mini-chat-compose .map-mini-chat-input {
  min-height: 64px !important;
  border-radius: 9px !important;
  padding: 10px 12px !important;
  border: 1px solid rgba(125, 252, 138, 0.18) !important;
  background: rgba(4, 10, 8, 0.9) !important;
  box-shadow: inset 0 1px 8px rgba(0, 0, 0, 0.35) !important;
  font-size: 12px !important;
}

body:not(.tomato-mode) .map-mini-chat .map-mini-chat-compose .map-mini-chat-input::placeholder {
  color: rgba(150, 175, 160, 0.45) !important;
}

body:not(.tomato-mode) .map-mini-chat .map-mini-chat-compose .map-mini-chat-input:focus {
  border-color: rgba(125, 252, 138, 0.38) !important;
  box-shadow:
    inset 0 1px 8px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(125, 252, 138, 0.1) !important;
}

body:not(.tomato-mode) .map-mini-chat .map-mini-chat-compose .map-mini-chat-send {
  flex: 0 0 40px !important;
  width: 40px !important;
  min-width: 40px !important;
  min-height: 64px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(125, 252, 138, 0.55) !important;
  font-size: 14px !important;
}

/* ---------- Closed dock ---------- */
body:not(.tomato-mode) .map-chat-dock {
  border: 1px solid rgba(125, 252, 138, 0.24) !important;
  border-radius: 10px !important;
  background: rgba(8, 16, 14, 0.78) !important;
  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.36),
    inset 0 1px 0 rgba(255, 255, 255, 0.035) !important;
  backdrop-filter: blur(10px) saturate(1.05) !important;
  -webkit-backdrop-filter: blur(10px) saturate(1.05) !important;
  max-height: min(42vh, 320px) !important;
}

body:not(.tomato-mode) .map-chat-dock-head {
  padding: 7px 9px !important;
  min-height: 40px !important;
  border-bottom: 1px solid rgba(125, 252, 138, 0.12) !important;
  letter-spacing: 0.1em !important;
  font-size: 10px !important;
  font-weight: 550 !important;
  color: rgba(170, 210, 185, 0.9) !important;
}

body:not(.tomato-mode) .map-chat-dock-badge {
  position: relative !important;
  min-width: 18px !important;
  height: 18px !important;
  padding: 0 6px !important;
  font-size: 9px !important;
  font-weight: 750 !important;
  font-variant-numeric: tabular-nums !important;
  letter-spacing: 0.02em !important;
  line-height: 1 !important;
  border-radius: 999px !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  background: linear-gradient(160deg, rgba(90, 210, 140, 0.95), rgba(40, 140, 95, 0.92)) !important;
  color: #04120a !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 0 10px rgba(125, 252, 138, 0.22) !important;
}

body:not(.tomato-mode) .map-chat-dock-badge--alert {
  background: linear-gradient(150deg, #ff5a78 0%, #ff4060 45%, #ff8a4a 100%) !important;
  color: #fff !important;
  border-color: rgba(255, 220, 210, 0.28) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 0 12px rgba(255, 64, 96, 0.45) !important;
  animation: none !important;
}

body:not(.tomato-mode) .map-chat-dock-badge--clear {
  background: linear-gradient(160deg, rgba(90, 210, 140, 0.95), rgba(40, 140, 95, 0.92)) !important;
  color: #04120a !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 0 10px rgba(125, 252, 138, 0.22) !important;
}

body:not(.tomato-mode) .map-chat-dock-collapse {
  width: 24px !important;
  height: 24px !important;
  border-radius: 6px !important;
  border: 1px solid rgba(125, 252, 138, 0.18) !important;
  background: rgba(8, 16, 12, 0.5) !important;
}

body:not(.tomato-mode) .map-chat-dock-collapse i {
  transition: transform 0.22s ease !important;
  font-size: 10px !important;
}

body:not(.tomato-mode) .map-chat-dock.map-chat-dock--collapsed .map-chat-dock-list {
  max-height: 78px !important;
  padding-bottom: 2px !important;
}

body:not(.tomato-mode) .map-chat-dock.map-chat-dock--collapsed .map-chat-dock-row--nodus {
  min-height: 58px !important;
  padding: 6px 8px !important;
  padding-bottom: 6px !important;
}

body:not(.tomato-mode) .map-chat-dock-row {
  border-radius: 8px !important;
  border: 1px solid rgba(125, 252, 138, 0.1) !important;
  background: rgba(255, 255, 255, 0.025) !important;
  padding: 7px 8px !important;
}

body:not(.tomato-mode) .map-chat-dock-row:hover {
  border-color: rgba(125, 252, 138, 0.28) !important;
  box-shadow: inset 0 0 0 1px rgba(125, 252, 138, 0.06) !important;
  transform: none !important;
}

body:not(.tomato-mode) .map-chat-dock-av,
body:not(.tomato-mode) .map-chat-dock-av.friend-av--clickable {
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  min-height: 36px !important;
  border-radius: 10px !important;
  border: 1px solid rgba(143, 211, 255, 0.55) !important;
  box-shadow: none !important;
  overflow: hidden !important;
}

body:not(.tomato-mode) .map-chat-dock-av img {
  border-radius: 9px !important;
  object-fit: cover !important;
  clip-path: none !important;
}

body:not(.tomato-mode) .map-chat-dock-name {
  font-size: 11.5px !important;
  font-weight: 600 !important;
}

body:not(.tomato-mode) .map-chat-dock-counts-new {
  color: #ffe27a !important;
  font-weight: 700 !important;
}

body:not(.tomato-mode) .map-chat-dock-snippet {
  -webkit-line-clamp: 1 !important;
  font-size: 10px !important;
  color: rgba(150, 175, 165, 0.72) !important;
}

body:not(.tomato-mode) .map-chat-dock-see-all {
  margin: 4px 6px 7px !important;
  padding: 6px 10px !important;
  border-radius: 8px !important;
  border: 1px solid rgba(125, 252, 138, 0.2) !important;
  background: rgba(8, 16, 12, 0.5) !important;
  color: rgba(200, 225, 210, 0.9) !important;
  font-size: 9.5px !important;
  letter-spacing: 0.1em !important;
  box-shadow: none !important;
}

body:not(.tomato-mode) .map-chat-dock-see-all:hover,
body:not(.tomato-mode) .map-chat-dock-see-all:focus-visible {
  border-color: rgba(125, 252, 138, 0.4) !important;
  background: rgba(125, 252, 138, 0.08) !important;
  color: rgba(230, 255, 240, 0.96) !important;
}
