/* Global DM widget (GLOBAL_DM_WIDGET_PLAN.md Phase 2/5) - the sitewide
   "Open DMs" trigger + flyout panel (includes/dms.php's
   renderDmGlobalWidgetHtml()). Fixed-position by default: this codebase has
   no shared header/layout partial (every page duplicates its own <header>
   markup, see that function's own comment), so a widget appearing
   identically on ~19 different pages can't depend on sitting inside any one
   page's header structure. z-index 150 sits above the sticky profile/chats
   header (.header-with-actions, z-index 50 in profile.css) but below every
   modal overlay in vibe-content.css (200-270) so a report modal or confirm
   dialog still covers it if both are ever open at once.

   .vibez-dm-widget-inline (below) is the exception - a page whose OWN
   header is sticky and wants the widget genuinely laid out inside that bar
   (friends_feed.php/groups_feed.php's header-rating slot) instead of a
   second floating element landing in the same spot.

   Internals (list rows, avatars, accept/decline, the expanded thread box's
   log/bubbles/composer) reuse css/chats.css's existing .vibez-chat-dm-mini-*
   rules as-is - only the trigger, badge, and panel shell are new here. */

.vibez-dm-widget {
  position: fixed;
  top: 14px;
  right: 16px;
  z-index: 150;
}

/* Lays out as a normal flex child of its own header instead of a viewport-
   pinned overlay - the ancestor header being position:sticky is what keeps
   it pinned on scroll, same end result without a second independently-
   positioned element. Panel/badge positioning (position:absolute, below)
   is unaffected - they still anchor to this div either way. */
.vibez-dm-widget-inline {
  position: relative;
  top: auto;
  right: auto;
  z-index: auto;
}

.vibez-dm-widget-trigger {
  position: relative;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(var(--void-rgb), 0.85);
  border: 1px solid var(--glass-brd);
  color: var(--ink);
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: border-color 0.15s ease, color 0.15s ease;
}
.vibez-dm-widget-trigger:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

.vibez-dm-widget-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 9px;
  background: var(--pink);
  color: var(--void);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 17px;
  text-align: center;
  box-shadow: 0 0 0 2px var(--void);
}
.vibez-dm-widget-badge[hidden] {
  display: none;
}

/* Fixed height (not max-height) in both list and thread mode - the thread
   box's own internal flex chain (.vibez-chat-dm-mini-thread -> ...-log,
   css/chats.css) needs a bounded ancestor height to size its scrollable log
   against, same min-height:0 chain gotcha that file's full-shell comment
   documents. The list only ever needs overflow-y:auto (below) since a
   short list just leaves empty space, but the thread genuinely needs the
   fixed height to not grow past the viewport. */
.vibez-dm-widget-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 320px;
  max-width: calc(100vw - 32px);
  height: min(480px, calc(100vh - 90px));
  display: flex;
  flex-direction: column;
  background: rgba(var(--void-rgb), 0.97);
  border: 1px solid var(--glass-brd);
  border-radius: 12px;
  padding: 0.7rem 0.75rem 0.8rem;
  box-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.65);
}
.vibez-dm-widget-panel[hidden] {
  display: none;
}

.vibez-dm-widget-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}
.vibez-dm-widget-panel-header h4 {
  font-size: 0.85em;
  color: var(--ink);
  margin: 0;
}

/* "A plain square box running across the width" - deliberately flat/square
   (no border-radius) against the rounded trigger/panel/list-row shapes
   elsewhere in this file, full width of the panel's own padding box. */
.vibez-dm-widget-search {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 0.5rem;
  padding: 0.4rem 0.55rem;
  border-radius: 0;
  border: 1px solid var(--glass-brd);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.85em;
}
.vibez-dm-widget-search::placeholder {
  color: var(--ink-dim);
}
.vibez-dm-widget-search:focus {
  outline: none;
  border-color: var(--cyan);
}

.vibez-dm-widget-panel-close {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 1px solid var(--glass-brd);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink-dim);
  font-size: 0.85em;
  line-height: 1;
  cursor: pointer;
}
.vibez-dm-widget-panel-close:hover {
  border-color: var(--danger, #ff4d4d);
  color: var(--danger, #ff4d4d);
}

/* overscroll-behavior-y:contain - same fix vibe-content.css's .vibez-chat-
   log already has and explains in its own comment: this list floats over
   the page (the widget is a fixed-position overlay, not inside a full-
   viewport app shell like dm_thread.php), so without this, scrolling past
   this list's own top/bottom chains straight into scrolling the page
   behind it instead of just stopping. */
#vibezDmWidgetList {
  overflow-y: auto;
  min-height: 0;
  overscroll-behavior-y: contain;
}

#vibezDmWidgetThread {
  min-height: 0;
}

@media (max-width: 480px) {
  .vibez-dm-widget {
    top: 10px;
    right: 10px;
  }
  .vibez-dm-widget-panel {
    width: calc(100vw - 20px);
  }
}

/* Message Seller form on item_view.php */
.mkt-msg-seller { margin-top: 1rem; display: flex; flex-direction: column; gap: 0.5rem; }
.mkt-msg-seller label { font-weight: 600; }
.mkt-msg-seller textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--glass-brd);
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.95em;
  resize: vertical;
}
.mkt-msg-seller textarea:focus { outline: none; border-color: var(--cyan); }

/* Report This Listing (item_view.php) */
.mkt-report { margin: 0.75rem 0 0; }
.mkt-report-btn { display: inline-block; cursor: pointer; list-style: none; padding: 0.45rem 0.9rem; border: 1px solid var(--glass-brd); border-radius: 8px; color: var(--ink-dim); font-size: 0.85em; }
.mkt-report-btn::-webkit-details-marker { display: none; }
.mkt-report-btn:hover { border-color: var(--danger, #ff4d4d); color: var(--danger, #ff4d4d); }
.mkt-report-form { display: flex; flex-direction: column; gap: 0.7rem; margin-top: 0.8rem; max-width: 520px; }
.mkt-report-form label { display: flex; flex-direction: column; gap: 4px; font-size: 0.85em; }
.mkt-report-form select, .mkt-report-form textarea { padding: 0.6rem 0.75rem; border-radius: 8px; border: 1px solid var(--glass-brd); background: rgba(255,255,255,.05); color: var(--ink); font: inherit; }
.mkt-report-msg { margin: 0.6rem 0 0; font-size: 0.9em; }
.mkt-report-msg.ok { color: #3dffb0; }
.mkt-report-msg.err { color: var(--danger, #ff4d4d); }

/* ---- Vibezmart tab + item card (marketplace item DMs) ---- */
.vibez-dm-widget-tabs {
  position: relative;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid var(--glass-brd);
}
/* Scrolls sideways when the tabs don't fit (narrow viewport / long translations); js/dm-widget.js toggles .can-left / .can-right. */
.vibez-dm-widget-tabs-scroll {
  display: flex;
  gap: 0.25rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.vibez-dm-widget-tabs-scroll::-webkit-scrollbar { display: none; }
.vibez-dm-widget-tabs-scroll .vibez-dm-widget-tab { flex: 1 0 auto; white-space: nowrap; }
.vibez-dm-widget-tabs-arrow {
  display: none;
  position: absolute;
  top: 0;
  bottom: 2px;
  width: 24px;
  padding: 0;
  border: 0;
  color: var(--ink);
  font-size: 1.1em;
  line-height: 1;
  cursor: pointer;
  z-index: 1;
}
.vibez-dm-widget-tabs-arrow-left { left: 0; background: linear-gradient(90deg, rgba(var(--void-rgb), 0.97) 55%, transparent); }
.vibez-dm-widget-tabs-arrow-right { right: 0; background: linear-gradient(270deg, rgba(var(--void-rgb), 0.97) 55%, transparent); }
.vibez-dm-widget-tabs.can-left .vibez-dm-widget-tabs-arrow-left,
.vibez-dm-widget-tabs.can-right .vibez-dm-widget-tabs-arrow-right { display: block; }
.vibez-dm-widget-tabs-arrow:hover { color: var(--cyan); }
.vibez-dm-widget-search[hidden],
.vibez-dm-widget-tabs[hidden],
#vibezDmWidgetItemList[hidden] { display: none; }
.vibez-dm-widget-tab {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.4rem 0.5rem;
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--ink-dim);
  font-family: inherit;
  font-size: 0.8em;
  cursor: pointer;
}
.vibez-dm-widget-tab:hover { color: var(--ink); }
.vibez-dm-widget-tab.active {
  color: var(--ink);
  border-bottom-color: var(--cyan);
}
.vibez-dm-widget-tab-badge {
  min-width: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--danger, #ff4d4d);
  color: #fff;
  font-size: 0.75em;
  line-height: 16px;
  text-align: center;
}
.vibez-dm-widget-tab-badge[hidden] { display: none; }

#vibezDmWidgetItemList {
  overflow-y: auto;
  min-height: 0;
  overscroll-behavior-y: contain;
}
.vibez-dm-item-row-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  text-align: left;
}
.vibez-dm-item-row-title {
  font-size: 0.75em;
  color: var(--ink-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vibez-dm-thread-delete {
  margin-left: auto;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  border: 1px solid var(--glass-brd);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink-dim);
  font-family: inherit;
  font-size: 0.75em;
  cursor: pointer;
}
.vibez-dm-thread-delete:hover {
  border-color: var(--danger, #ff4d4d);
  color: var(--danger, #ff4d4d);
}
.vibez-dm-thread-delete[hidden] { display: none; }
.vibez-chat-dm-mini-thread-header { display: flex; align-items: center; }

.vibez-dm-item-slot:empty { display: none; }
.vibez-dm-item-card {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  margin: 0.4rem 0;
  padding: 0.45rem;
  border: 1px solid var(--glass-brd);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
  text-decoration: none;
}
a.vibez-dm-item-card:hover { border-color: var(--cyan); }
.vibez-dm-item-card-photo {
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  border-radius: 6px;
  background-size: cover;
  background-position: center;
  background-color: rgba(255, 255, 255, 0.08);
}
.vibez-dm-item-card-nophoto {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4em;
}
.vibez-dm-item-card-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 1px;
}
.vibez-dm-item-card-label {
  font-size: 0.65em;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cyan);
}
.vibez-dm-item-card-title {
  font-size: 0.85em;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vibez-dm-item-card-price { font-size: 0.8em; color: var(--ink-dim); }
.vibez-dm-item-card-flag { font-size: 0.7em; color: var(--danger, #ff4d4d); }
.vibez-dm-item-card-gone { opacity: 0.7; }

/* Block confirmation modal (js/dm-widget.js openBlockModal) - fixed + inset:0
   + flex-center so it sits in the middle of the CURRENT viewport. z-index
   300 clears the widget (150) and the shared modal overlays (200-270). */
.vibez-dmblock-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(var(--void-rgb, 0, 0, 0), 0.75);
  backdrop-filter: blur(4px);
  padding: 1.5rem;
}
.vibez-dmblock-modal {
  width: 100%;
  max-width: 380px;
  background: var(--void-2, #14141c);
  border: 1px solid var(--glass-brd, rgba(255, 255, 255, 0.15));
  border-radius: 16px;
  box-shadow: 0 24px 70px -24px rgba(0, 0, 0, 0.7);
  padding: 1.5rem;
  color: var(--ink, #fff);
}
.vibez-dmblock-title {
  margin: 0 0 0.6rem;
  font-size: 1.1em;
  overflow-wrap: anywhere;
}
.vibez-dmblock-text {
  margin: 0 0 1.1rem;
  font-size: 0.92em;
  line-height: 1.5;
}
.vibez-dmblock-error {
  margin: 0 0 1rem;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid #ef4444;
  color: #fecaca;
  font-size: 0.88em;
}
.vibez-dmblock-error[hidden] { display: none; }
.vibez-dmblock-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
}
.vibez-dmblock-actions button {
  cursor: pointer;
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--glass-brd, rgba(255, 255, 255, 0.25));
  background: transparent;
  color: inherit;
  font: inherit;
}
.vibez-dmblock-actions button:disabled { opacity: 0.6; cursor: default; }
.vibez-dmblock-actions .vibez-dmblock-ok {
  background: #ef4444;
  border-color: #ef4444;
  color: #fff;
}
.vibez-dmblock-actions .vibez-dmblock-ok:hover:not(:disabled) {
  background: #dc2626;
  border-color: #dc2626;
}

/* Hidden achievement "You Found Me" (js/dm-widget.js). The egg is a normal-looking period; the oversized hit area is cancelled out by the
   negative margin so layout is untouched. The only tell is a very faint flicker every ~20s, easy to miss. */
.vbz-egg { padding: 0.45em; margin: -0.45em; border-radius: 50%; animation: vbzEggTwinkle 20s infinite; }
.vbz-egg-hit { animation: vbzEggHit 0.65s ease-out forwards; }
@keyframes vbzEggTwinkle { 0%, 96% { text-shadow: none; opacity: 1; } 98% { text-shadow: 0 0 4px currentColor; opacity: 0.55; } 100% { text-shadow: none; opacity: 1; } }
@keyframes vbzEggHit { 0% { transform: scale(1); } 30% { transform: scale(3); color: #ff4da6; } 100% { transform: scale(0.2); opacity: 0; } }
.vbz-egg-toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 100000; padding: 12px 22px; border-radius: 999px; color: #fff; font-weight: 700; background: linear-gradient(120deg, #6a2bd9, #ff4da6); box-shadow: 0 6px 24px rgba(106, 43, 217, 0.5); transition: opacity 0.7s, transform 0.7s; }
.vbz-egg-toast-out { opacity: 0; transform: translateX(-50%) translateY(14px); }

/* Hidden achievement "30 Lives" (js/dm-widget.js): Konami-code celebration. */
.vbz-konami-toast { background: linear-gradient(120deg, #ff3b3b, #ffb13b, #3bff6a, #3b9bff, #b13bff); }
.vbz-konami-bit { position: fixed; top: -40px; z-index: 99999; pointer-events: none; animation: vbzKonamiFall 2.6s ease-in forwards; }
@keyframes vbzKonamiFall { to { transform: translateY(110vh) rotate(540deg); opacity: 0.2; } }

/* Secret badge reveal (js/dm-widget.js): question marks spout up the whole page. */
.vbz-q-layer { position: fixed; inset: 0; z-index: 100000; pointer-events: none; overflow: hidden; }
.vbz-q { position: absolute; bottom: -80px; font-weight: 900; font-family: Georgia, serif; text-shadow: 0 0 10px rgba(185, 140, 255, 0.9); opacity: 0; animation: vbzQSpout var(--dur) cubic-bezier(0.2, 0.7, 0.3, 1) var(--delay) forwards; }
@keyframes vbzQSpout { 0% { transform: translate(0, 0) rotate(0) scale(0.4); opacity: 0; } 12% { opacity: 1; } 100% { transform: translate(var(--dx), -118vh) rotate(var(--rot)) scale(1.4); opacity: 0; } }
.vbz-q-big { position: absolute; top: 42%; left: 50%; transform: translate(-50%, -50%); font-size: clamp(64px, 18vw, 200px); font-weight: 900; color: #e8d9ff; letter-spacing: 0.15em; text-shadow: 0 0 30px #9b5cff, 0 0 80px #6a2bd9; opacity: 0; animation: vbzQBig 3.2s ease-in-out 0.3s forwards; }
@keyframes vbzQBig { 0% { opacity: 0; transform: translate(-50%, -50%) scale(0.5); } 30% { opacity: 0.95; transform: translate(-50%, -50%) scale(1.05); } 100% { opacity: 0; transform: translate(-50%, -50%) scale(1.5); } }
.vbz-q-love .vbz-q { text-shadow: 0 0 12px rgba(255, 105, 180, 0.85); }
.vbz-q-love .vbz-q-big { color: #ff4f8b; text-shadow: 0 0 30px #ff2e7a, 0 0 80px #8a0f45; }
.vbz-q-rage .vbz-q { text-shadow: 0 0 12px rgba(255, 40, 40, 0.85); }
.vbz-q-rage .vbz-q-big { color: #ff3b30; text-shadow: 0 0 30px #ff1a1a, 0 0 80px #7a0000; letter-spacing: 0.05em; }
.vbz-q-therapy .vbz-q { text-shadow: 0 0 12px rgba(201, 182, 255, 0.85); }
.vbz-q-therapy .vbz-q-big { color: #ffd9e8; text-shadow: 0 0 30px #c9b6ff, 0 0 80px #5a3a7a; letter-spacing: 0.05em; }
.vbz-q-twist .vbz-q { text-shadow: 0 0 12px rgba(25, 195, 177, 0.85); animation-timing-function: ease-in-out; }
.vbz-q-twist .vbz-q-big { color: #e0d4ff; text-shadow: 0 0 30px #6a2bd9, 0 0 80px #0e6e63; letter-spacing: 0.05em; }
.vbz-q-spooky .vbz-q { text-shadow: 0 0 12px rgba(255, 140, 40, 0.85); }
.vbz-q-spooky .vbz-q-big { color: #ff9a3c; text-shadow: 0 0 30px #ff7a1a, 0 0 80px #4b1d6e; letter-spacing: 0.05em; }
.vbz-q-overlord .vbz-q { text-shadow: 0 0 12px rgba(255, 213, 74, 0.85); }
.vbz-q-overlord .vbz-q-big { color: #ffe27a; text-shadow: 0 0 30px #ffb300, 0 0 80px #7a4a00; letter-spacing: 0.05em; }
/* Whisper Network: shush faces drifting up through a slow fog bank. The fog is two blurred pseudo-layers on the effect layer itself. */
.vbz-q-butterfly .vbz-q { text-shadow: 0 0 12px rgba(120, 190, 255, 0.85); animation-timing-function: ease-in-out; }
.vbz-q-butterfly .vbz-q-big { color: #bfe3ff; text-shadow: 0 0 30px #3aa0ff, 0 0 80px #6a2bd9; letter-spacing: 0.05em; }
.vbz-q-question .vbz-q { text-shadow: 0 0 12px rgba(255, 90, 90, 0.85); }
.vbz-q-question .vbz-q-big { color: #ff6b6b; text-shadow: 0 0 30px #ff2d2d, 0 0 80px #7a0000; letter-spacing: 0.05em; }
.vbz-q-newyear .vbz-q { text-shadow: 0 0 12px rgba(255, 215, 90, 0.9); }
.vbz-q-newyear .vbz-q-big { color: #ffe27a; text-shadow: 0 0 30px #ffb300, 0 0 80px #3b1a78; letter-spacing: 0.05em; }
.vbz-q-gobble .vbz-q { text-shadow: 0 0 12px rgba(230, 130, 40, 0.85); }
.vbz-q-gobble .vbz-q-big { color: #ffb066; text-shadow: 0 0 30px #d9691a, 0 0 80px #5a2a05; letter-spacing: 0.05em; }
.vbz-q-birthday .vbz-q { text-shadow: 0 0 12px rgba(255, 120, 190, 0.85); }
.vbz-q-birthday .vbz-q-big { color: #ff9ad0; text-shadow: 0 0 30px #ff4fa6, 0 0 80px #6a2bd9; letter-spacing: 0.05em; }
.vbz-q-snow .vbz-q { text-shadow: 0 0 12px rgba(190, 225, 255, 0.95); animation-timing-function: ease-in-out; }
.vbz-q-snow .vbz-q-big { color: #e8f4ff; text-shadow: 0 0 30px #7ec3ff, 0 0 80px #2a4a7a; letter-spacing: 0.05em; }
.vbz-q-mirror .vbz-q { text-shadow: 0 0 12px rgba(200, 230, 255, 0.95); }
.vbz-q-mirror .vbz-q-big { color: #e8f6ff; text-shadow: 0 0 30px #8fd3ff, 0 0 80px #3a5a9a; letter-spacing: 0.05em; }
.vbz-q-change .vbz-q { text-shadow: 0 0 12px rgba(120, 255, 170, 0.85); animation-timing-function: ease-in-out; }
.vbz-q-change .vbz-q-big { color: #b8ffd0; text-shadow: 0 0 30px #19c36a, 0 0 80px #6a2bd9; letter-spacing: 0.05em; }
.vbz-q-hype .vbz-q { text-shadow: 0 0 12px rgba(255, 190, 60, 0.9); }
.vbz-q-hype .vbz-q-big { color: #ffd84a; text-shadow: 0 0 30px #ff9a00, 0 0 80px #b30060; letter-spacing: 0.05em; }
.vbz-q-whisper .vbz-q { text-shadow: 0 0 12px rgba(200, 215, 240, 0.9); }
.vbz-q-whisper .vbz-q-big { color: #eef3fb; text-shadow: 0 0 30px #9fb4d8, 0 0 80px #4a5d80; letter-spacing: 0.05em; }
.vbz-q-whisper::before, .vbz-q-whisper::after {
  content: ''; position: absolute; inset: -20% -30%; pointer-events: none; opacity: 0; filter: blur(28px);
  background:
    radial-gradient(ellipse at 20% 62%, rgba(226, 234, 247, 0.6), transparent 56%),
    radial-gradient(ellipse at 72% 42%, rgba(206, 220, 240, 0.55), transparent 52%),
    radial-gradient(ellipse at 46% 88%, rgba(232, 238, 248, 0.5), transparent 56%);
  animation: vbzFogDrift 8s ease-in-out forwards;
}
.vbz-q-whisper::after { animation-direction: reverse; animation-delay: 0.6s; transform: scaleX(-1); }
:root[data-theme="light"] .vbz-q-whisper::before, :root[data-theme="light"] .vbz-q-whisper::after {
  background:
    radial-gradient(ellipse at 20% 62%, rgba(110, 125, 150, 0.4), transparent 56%),
    radial-gradient(ellipse at 72% 42%, rgba(130, 145, 170, 0.35), transparent 52%),
    radial-gradient(ellipse at 46% 88%, rgba(120, 135, 160, 0.35), transparent 56%);
}
@keyframes vbzFogDrift { 0% { opacity: 0; translate: -8% 0; scale: 1; } 25% { opacity: 0.9; } 75% { opacity: 0.8; } 100% { opacity: 0; translate: 8% 0; scale: 1.15; } }
.vbz-q-owl .vbz-q { text-shadow: 0 0 12px rgba(255, 224, 140, 0.9); }
.vbz-q-owl .vbz-q-big { color: #fff3c9; text-shadow: 0 0 30px #ffd166, 0 0 80px #5a3a1c; letter-spacing: 0.05em; }

/* ---------- Group DMs (dm_groups.php / dm_group.php, js/dm-group.js) ---------- */
.dm-group-widget-link {
  text-decoration: none;
  color: inherit;
  margin-bottom: 0.4rem;
}
.dm-group-widget-link:hover { border-color: var(--cyan); }
.dm-group-widget-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}
.dm-group-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-right: 0.25rem;
}
.dm-group-picked { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 0.5rem; }
.dm-group-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.15rem 0.2rem 0.15rem 0.6rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--glass-brd);
  font-size: 0.85em;
}
.dm-group-chip button {
  all: unset;
  cursor: pointer;
  width: 1.2rem;
  height: 1.2rem;
  line-height: 1.2rem;
  text-align: center;
  border-radius: 50%;
}
.dm-group-chip button:hover { background: rgba(255, 255, 255, 0.15); }
.dm-group-candidates {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  max-height: 200px;
  overflow-y: auto;
  margin-bottom: 0.6rem;
}
.dm-group-cand {
  all: unset;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.5rem;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid transparent;
}
.dm-group-cand:hover,
.dm-group-cand:focus-visible { background: rgba(255, 255, 255, 0.06); border-color: var(--glass-brd); }
.dm-group-cand small { opacity: 0.6; }
.dm-group-list { display: flex; flex-direction: column; gap: 0.4rem; }
.dm-group-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.8rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-brd);
  text-decoration: none;
  color: inherit;
}
.dm-group-row:hover { border-color: var(--cyan); }
.dm-group-row-icon { font-size: 1.3rem; }
.dm-group-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dm-group-row-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-group-row-sub { font-size: 0.8em; opacity: 0.65; }
.dm-group-role {
  display: inline-block;
  padding: 0.05rem 0.45rem;
  border-radius: 999px;
  font-size: 0.7em;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border: 1px solid var(--glass-brd);
  vertical-align: middle;
}
.dm-group-role-owner { background: rgba(255, 200, 60, 0.18); color: #ffd25e; border-color: rgba(255, 200, 60, 0.4); }
.dm-group-role-admin { background: rgba(120, 180, 255, 0.16); color: #8fc1ff; border-color: rgba(120, 180, 255, 0.4); }
body.chats-shell .dm-group-layout .vibez-chat-main { max-width: none; }
.dm-group-side {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  overflow-y: auto;
  min-width: 240px;
}
.dm-group-side-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.dm-group-side-head h3 { margin: 0; font-size: 1em; }
.dm-group-small-btn { padding: 0.3rem 0.7rem; font-size: 0.8em; }
.dm-group-addbox { display: flex; flex-direction: column; gap: 0.4rem; }
.dm-group-addbox input { width: 100%; box-sizing: border-box; }
.dm-group-members { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.35rem; }
.dm-group-member {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.45rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-brd);
}
.dm-group-member-avatar { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.dm-group-member-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: inherit; text-decoration: none; font-weight: 600; }
.dm-group-member-actions { display: flex; flex-wrap: wrap; gap: 0.25rem; width: 100%; }
.dm-group-act {
  all: unset;
  box-sizing: border-box;
  cursor: pointer;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72em;
  border: 1px solid var(--glass-brd);
  background: rgba(255, 255, 255, 0.05);
}
.dm-group-act:hover,
.dm-group-act:focus-visible { background: rgba(255, 255, 255, 0.12); }
.dm-group-act-danger:hover,
.dm-group-act.dm-group-act-danger:focus-visible,
.button.dm-group-act-danger:hover { border-color: var(--danger, #ff4d4d); color: var(--danger, #ff4d4d); }
.dm-group-tools { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.3rem; }
.dm-group-owner-note { font-size: 0.75em; margin: 0; }
.dm-group-system {
  text-align: center;
  font-size: 0.78em;
  opacity: 0.65;
  padding: 0.25rem 0.5rem;
}
@media (max-width: 820px) {
  body.chats-shell .dm-group-side { height: 260px; min-width: 0; }
}

/* ---- Widget Groups tab + in-widget "Start a group chat" form ---- */
#vibezDmWidgetGroupList {
  overflow-y: auto;
  min-height: 0;
  overscroll-behavior-y: contain;
}
#vibezDmWidgetGroupList[hidden],
.dmg-view[hidden] { display: none; }
.dm-group-widget-link { margin-bottom: 0.35rem; }
button.dm-group-widget-new {
  all: unset;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  width: 100%;
  margin-bottom: 0.5rem;
  padding: 0.4rem 0.55rem;
  border-radius: 8px;
  border: 1px dashed var(--glass-brd);
  color: var(--cyan);
  font-size: 0.85em;
  font-weight: 600;
  cursor: pointer;
}
button.dm-group-widget-new:hover,
button.dm-group-widget-new:focus-visible { border-color: var(--cyan); background: rgba(255, 255, 255, 0.05); }
.dmg-create-form { display: flex; flex-direction: column; gap: 0.35rem; }
.dmg-create-head { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.2rem; }
.dmg-create-head h5 { margin: 0; font-size: 0.95em; color: var(--ink); }
.dmg-create-back {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 1px solid var(--glass-brd);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink-dim);
  font-size: 0.85em;
  line-height: 1;
  cursor: pointer;
}
.dmg-create-back:hover { color: var(--ink); border-color: var(--cyan); }
.dmg-create-back[hidden] { display: none; }
.dmg-label { font-size: 0.75em; font-weight: 600; color: var(--ink-dim); text-transform: uppercase; letter-spacing: 0.04em; }
.dmg-create-form .vibez-dm-widget-search { margin-bottom: 0.15rem; border-radius: 8px; }
.dmg-btn {
  padding: 0.5rem 0.8rem;
  border-radius: 8px;
  border: 1px solid var(--cyan);
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.85em;
  font-weight: 700;
  cursor: pointer;
}
.dmg-btn:hover,
.dmg-btn:focus-visible { background: rgba(255, 255, 255, 0.12); }
.dmg-btn:disabled { opacity: 0.5; cursor: default; }
.dmg-create-note { margin: 0; font-size: 0.72em; color: var(--ink-dim); }
.dmg-error { margin: 0; font-size: 0.8em; color: var(--danger, #ff4d4d); }
.dmg-error[hidden] { display: none; }
.dm-group-page-create { padding: 0.9rem 1rem; border-radius: 12px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--glass-brd); }

/* ---- Pending group invites (Groups tab + dm_groups.php) ---- */
.dmg-invites { display: flex; flex-direction: column; gap: 0.35rem; margin-bottom: 0.6rem; }
.dmg-invite {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.5rem 0.6rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--cyan);
}
.dmg-invite-text { display: flex; flex-direction: column; min-width: 0; font-size: 0.85em; color: var(--ink); }
.dmg-invite-text strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dmg-invite-text span { font-size: 0.85em; color: var(--ink-dim); }
.dmg-invite-actions { display: flex; gap: 0.4rem; }
.dmg-btn-small { padding: 0.3rem 0.7rem; font-size: 0.8em; }
.dmg-btn-quiet { border-color: var(--glass-brd); font-weight: 600; color: var(--ink-dim); }
.dmg-btn-quiet:hover { border-color: var(--danger, #ff4d4d); color: var(--danger, #ff4d4d); }
.dm-group-page-invites:empty { display: none; }

/* Video call button in the mini-thread header (js/dm-widget.js -> js/dm-call.js) */
.vibez-dm-thread-call {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  border: 1px solid var(--glass-brd);
  background: rgba(255, 255, 255, 0.04);
  color: var(--cyan);
  cursor: pointer;
}
.vibez-dm-thread-call:hover,
.vibez-dm-thread-call:focus-visible { border-color: var(--cyan); background: rgba(255, 255, 255, 0.1); }
.vibez-dm-thread-call[hidden] { display: none; }
.vibez-dm-thread-call ~ .vibez-dm-thread-delete { margin-left: 0.3rem; }
/* video + voice sit together: only the first visible call button is pushed to the right edge */
.vibez-dm-thread-call:not([hidden]) ~ .vibez-dm-thread-call:not([hidden]) { margin-left: 0.3rem; }

/* Group chat inside the widget mini thread */
.dm-group-mini-sender { font-weight: 600; color: var(--ink); }
.vibez-chat-dm-mini-log .dm-group-system { font-size: 0.72em; padding: 0.15rem 0.3rem; }
a.vibez-dm-thread-members { text-decoration: none; }
a.vibez-dm-thread-members ~ .vibez-dm-thread-delete { margin-left: 0.3rem; }

/* ---- DM extras (includes/dm_extras.php + js/dm-extras.js): links, link preview cards, replies, likes. Used by dm_thread.php, dm_group.php and the widget thread. ---- */
.dm-msg-link { color: var(--cyan, #2be3ff); text-decoration: underline; word-break: break-all; }
.dm-msg-link:hover { text-decoration: none; }

.dm-link-preview {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
  margin-top: 0.35rem;
  max-width: 340px;
  border: 1px solid var(--glass-brd);
  border-left: 3px solid var(--cyan, #2be3ff);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: inherit;
  text-decoration: none;
  overflow: hidden;
}
.dm-link-preview:hover { background: rgba(255, 255, 255, 0.09); }
.dm-link-preview-img { flex: none; width: 72px; min-height: 72px; object-fit: cover; display: block; background: rgba(255, 255, 255, 0.06); }
.dm-link-preview-img-icon { object-fit: contain; padding: 12px; box-sizing: border-box; }
.dm-link-preview-img-default { display: flex; align-items: center; justify-content: center; }
.dm-link-preview-img-default img { width: 32px; height: 32px; object-fit: contain; }
.dm-link-preview-body { display: flex; flex-direction: column; justify-content: center; gap: 0.1rem; min-width: 0; padding: 0.35rem 0.5rem 0.35rem 0; }
.dm-link-preview-site { font-size: 0.68em; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dm-link-preview-title { font-size: 0.82em; font-weight: 700; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dm-link-preview-desc { font-size: 0.72em; color: var(--ink-dim); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vibez-chat-dm-mini-bubble .dm-link-preview { max-width: 100%; }
.vibez-chat-dm-mini-bubble .dm-link-preview-img { width: 56px; min-height: 56px; }

.dm-reply-quote {
  display: block;
  width: 100%;
  margin: 0 0 0.3rem;
  padding: 0.2rem 0.45rem;
  border: 0;
  border-left: 3px solid var(--cyan, #2be3ff);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.18);
  color: inherit;
  font: inherit;
  font-size: 0.78em;
  text-align: left;
  cursor: pointer;
}
.dm-reply-quote:hover { background: rgba(0, 0, 0, 0.28); }
.dm-reply-quote-gone { cursor: default; font-style: italic; opacity: 0.7; }
.dm-reply-quote-gone:hover { background: rgba(0, 0, 0, 0.18); }
.dm-reply-quote-name { display: block; font-weight: 700; color: var(--cyan, #2be3ff); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dm-reply-quote-text { display: block; opacity: 0.85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.dm-msg-foot { display: flex; align-items: center; gap: 0.7rem; margin-top: 0.3rem; }
.dm-msg-foot-mini { margin-top: 0; padding: 0 0.2rem; gap: 0.5rem; }
.vibez-chat-dm-mini-message-own .dm-msg-foot-mini { justify-content: flex-end; }
.dm-like-btn, .dm-reply-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.1rem 0.2rem;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--ink-dim);
  font: inherit;
  font-size: 0.72em;
  line-height: 1;
  cursor: pointer;
  opacity: 0.75;
}
.dm-like-btn:hover, .dm-reply-btn:hover, .dm-like-btn:focus-visible, .dm-reply-btn:focus-visible { opacity: 1; background: rgba(255, 255, 255, 0.1); }
.dm-like-btn.dm-liked { color: #ff4d8d; opacity: 1; }
.dm-like-btn:disabled { cursor: default; }
.dm-like-count:empty { display: none; }

.dm-reply-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.4rem;
  padding: 0.3rem 0.4rem 0.3rem 0.55rem;
  border: 1px solid var(--glass-brd);
  border-left: 3px solid var(--cyan, #2be3ff);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.75em;
}
.dm-reply-bar-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dm-reply-bar-name { font-weight: 700; color: var(--cyan, #2be3ff); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dm-reply-bar-text { color: var(--ink-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dm-reply-bar-cancel { flex: none; width: 22px; height: 22px; border: 0; border-radius: 6px; background: none; color: var(--ink-dim); font-size: 1.1rem; line-height: 1; cursor: pointer; }
.dm-reply-bar-cancel:hover { background: rgba(255, 255, 255, 0.12); color: inherit; }

@keyframes dmJumpFlash { 0%, 60% { box-shadow: 0 0 0 2px var(--cyan, #2be3ff); } 100% { box-shadow: 0 0 0 2px transparent; } }
.dm-jump-flash { animation: dmJumpFlash 1.6s ease-out; border-radius: 10px; }

/* A link posted on its own renders as just the preview card - the colored bubble drops away (the name/time row and like/reply stay). */
.vibez-chat-bubble.dm-bubble-bare { background: none !important; border: 0 !important; box-shadow: none !important; padding-left: 0 !important; padding-right: 0 !important; }

/* ============================================================================================================================
   DM message card (full thread, group thread and the widget's compact thread) - matches site_assets/dm_message_design.jpg:
     name (other people only) on the left and a ⋯ menu on the right, both ABOVE the box;
     date/time stamp, text and picture INSIDE the box;
     a heart circle straddling the bottom-left corner (like count joins it);
     a "seen" circle (the reader's avatar) straddling the bottom-right corner of the newest message the other side has read.
   Scoped to .dm-card / .dm-card-mini so chat-room bubbles (which share .vibez-chat-message) are untouched.
   ============================================================================================================================ */
.vibez-chat-message.dm-card { align-items: flex-start; margin-bottom: 0.95rem; }
.dm-card-col { min-width: 0; max-width: 78%; display: flex; flex-direction: column; align-items: flex-start; }
.vibez-chat-message-own .dm-card-col { align-items: flex-end; }
.dm-card-col-mini { max-width: 88%; }
.vibez-chat-dm-mini-message-own .dm-card-col-mini { align-items: flex-end; }

.dm-card-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; width: 100%; min-height: 1.15rem; padding: 0 0.2rem; box-sizing: border-box; }
.vibez-chat-message-own .dm-card-head,
.vibez-chat-dm-mini-message-own .dm-card-head { justify-content: flex-end; }
.dm-card-head .vibez-chat-username { font-weight: 700; font-size: 0.78em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-card-name { font-weight: 700; font-size: 0.68em; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-card-head .vibez-post-menu { position: relative; margin-left: auto; align-self: center; }
.dm-card-head .vibez-post-menu-toggle { padding: 0 0.3rem; font-size: 1.05rem; line-height: 1; opacity: 0.7; }
.dm-card-head .vibez-post-menu-toggle:hover,
.dm-card-head .vibez-post-menu-toggle:focus-visible { opacity: 1; }

.dm-card-bubble { position: relative; min-width: 8.5rem; max-width: 100%; box-sizing: border-box; }
.dm-card-mini .vibez-chat-dm-mini-bubble.dm-card-bubble { max-width: 100%; min-width: 7.2rem; }
.dm-card-mini { margin-bottom: 0.85rem; }
.dm-card-time { font-size: 0.68em; color: var(--ink-dim); margin-bottom: 0.35rem; white-space: nowrap; }
.dm-card-mini .dm-card-time { font-size: 0.82em; margin-bottom: 0.25rem; }
.vibez-chat-dm-mini-bubble.dm-bubble-bare { background: none !important; border: 0 !important; box-shadow: none !important; padding-left: 0 !important; padding-right: 0 !important; }

/* heart: bare icon on the bottom-left corner. Empty = not liked, pink outline = liked by the other side only, pink filled = liked by you.
   The bubble keeps extra bottom padding so the heart never sits on top of text or a picture. Count only shows in group threads. */
.dm-card-bubble { padding-bottom: 0.85rem; }
.dm-like-btn.dm-corner-heart {
  position: absolute;
  left: -7px;
  bottom: -9px;
  z-index: 2;
  width: auto;
  min-width: 0;
  height: auto;
  padding: 0;
  gap: 2px;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  color: var(--ink-dim);
  opacity: 1;
  font-size: 0.66rem;
  line-height: 1;
}
.dm-like-btn.dm-corner-heart svg { width: 16px; height: 16px; }
.dm-like-btn.dm-corner-heart:hover,
.dm-like-btn.dm-corner-heart:focus-visible { background: none; color: var(--ink); }
/* the empty / not-liked-by-you heart is filled with the DM widget panel's background color; only the outline shows */
.dm-like-btn.dm-corner-heart:not(.dm-liked) svg { fill: rgba(var(--void-rgb), 0.97); }
/* red bubble (js/dm-extras.js adds .dm-bubble-red): black outline on every heart, and the empty one is filled white so it still reads */
.dm-bubble-red .dm-like-btn.dm-corner-heart svg { stroke: #000; }
.dm-bubble-red .dm-like-btn.dm-corner-heart:not(.dm-liked) svg { fill: #fff; }
.dm-card[data-dm-scope="direct"] .dm-corner-heart .dm-like-count,
.dm-card-mini[data-dm-scope="direct"] .dm-corner-heart .dm-like-count { display: none; }

/* seen circle: bottom-right corner */
.dm-seen {
  position: absolute;
  right: -7px;
  bottom: -9px;
  z-index: 2;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(var(--void-rgb), 0.97);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
  background: rgba(var(--void-rgb), 0.97);
}
.dm-seen img { display: block; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.dm-seen b { position: absolute; right: -7px; top: -8px; min-width: 14px; height: 14px; padding: 0 3px; box-sizing: border-box; border-radius: 7px; background: var(--cyan, #2be3ff); color: #06222a; font-size: 0.58rem; font-weight: 800; line-height: 14px; text-align: center; }

/* the corner icons hang slightly outside the bubble: give the scrolling logs a little side room so no horizontal scrollbar appears */
.vibez-chat-dm-mini-log { padding-left: 0.9rem; padding-right: 0.9rem; overflow-x: hidden; }

/* widget ⋯ menu */
.dm-mini-menu { position: relative; margin-left: auto; }
.dm-mini-menu-toggle { background: none; border: 0; color: var(--ink-dim); font-size: 1rem; line-height: 1; padding: 0 0.25rem; cursor: pointer; opacity: 0.7; }
.dm-mini-menu-toggle:hover,
.dm-mini-menu-toggle:focus-visible { opacity: 1; color: var(--ink); }
.dm-mini-menu-list { position: fixed; z-index: 100001; min-width: 120px; padding: 0.3rem; display: flex; flex-direction: column; gap: 0.1rem; border: 1px solid var(--glass-brd); border-radius: 10px; background: rgba(var(--void-rgb), 0.98); box-shadow: 0 8px 22px -6px rgba(0, 0, 0, 0.65); }
.dm-mini-menu-list[hidden] { display: none; }
.dm-mini-menu-item,
.dm-mini-menu-item.vibez-chat-dm-mini-report { display: block; width: 100%; text-align: left; padding: 0.4rem 0.6rem; border: 0; border-radius: 7px; background: none; color: var(--ink); font: inherit; font-size: 0.8rem; line-height: 1.2; opacity: 1; cursor: pointer; white-space: nowrap; }
.dm-mini-menu-item:hover,
.dm-mini-menu-item:focus-visible { background: rgba(255, 255, 255, 0.1); }
.dm-mini-menu-danger,
.dm-mini-menu-item.dm-mini-menu-danger.vibez-chat-dm-mini-report { color: var(--danger, #ff6b6b); }
.vibez-chat-message.dm-card { padding-right: 9px; box-sizing: border-box; }

/* reactions: the corner button shows the chosen emoji (or the generic empty smiley); a small picker offers the six choices */
.dm-react-face { display: inline-flex; align-items: center; justify-content: center; font-size: 15px; line-height: 1; }
.dm-react-face svg { width: 16px; height: 16px; }
.dm-react-btn .dm-react-face { filter: drop-shadow(0 0 1.5px rgba(0, 0, 0, 0.55)); }
.dm-react-picker { position: fixed; z-index: 100002; display: flex; gap: 0.15rem; padding: 0.3rem 0.4rem; border: 1px solid var(--glass-brd); border-radius: 999px; background: rgba(var(--void-rgb), 0.98); box-shadow: 0 8px 22px -6px rgba(0, 0, 0, 0.65); }
.dm-react-picker[hidden] { display: none; }
.dm-react-opt { width: 34px; height: 34px; border: 0; border-radius: 50%; background: none; font-size: 21px; line-height: 1; cursor: pointer; transition: transform 0.12s; }
.dm-react-opt:hover, .dm-react-opt:focus-visible { transform: scale(1.25); background: rgba(255, 255, 255, 0.1); }
.dm-react-opt-on { background: rgba(255, 255, 255, 0.16); }

/* ---- DM composer layout: message box + Send on one row, attach (own gradient icon) and emoji underneath ---- */
.vibez-chat-dm-mini-form,
#dmThreadForm {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  align-items: end;
  column-gap: 0.4rem;
  row-gap: 0.25rem;
}
.vibez-chat-dm-mini-form textarea,
#dmThreadForm textarea { grid-column: 1 / 4; grid-row: 1; min-width: 0; }
.vibez-chat-dm-mini-form button[type="submit"],
#dmThreadForm button[type="submit"] { grid-column: 4; grid-row: 1; align-self: end; }
.vibez-chat-dm-mini-attach-btn,
#dmThreadForm .vibez-chat-dm-attach-btn { grid-column: 1; grid-row: 2; display: inline-flex; align-items: center; justify-content: center; }
.vibez-chat-dm-mini-gif-btn,
#dmThreadForm .vibez-chat-dm-gif-btn { grid-column: 2; grid-row: 2; display: inline-flex; align-items: center; justify-content: center; }
.vibez-chat-dm-mini-form .vep-field-btn,
#dmThreadForm .vep-field-btn { grid-column: 3; grid-row: 2; justify-self: start; align-self: center; margin: 0; }
/* with no GIF button (no KLIPY key) the emoji button takes the second slot */
.vibez-chat-dm-mini-form:not(:has(.vibez-chat-dm-mini-gif-btn)) .vep-field-btn,
#dmThreadForm:not(:has(.vibez-chat-dm-gif-btn)) .vep-field-btn { grid-column: 2; }
.vibez-chat-dm-mini-form .vibez-icon-btn,
.vibez-chat-dm-mini-gif-btn { width: 28px; height: 28px; padding: 0; border-radius: 50%; color: inherit; opacity: 1; }
.vibez-chat-dm-mini-form .vibez-icon-btn svg { width: 15px; height: 15px; }
#dmThreadForm .vibez-chat-dm-attach-btn.vibez-icon-btn,
#dmThreadForm .vibez-chat-dm-gif-btn.vibez-icon-btn,
#dmThreadForm .dm-emoji-btn { width: 36px; height: 36px; padding: 0; border-radius: 50%; color: inherit; opacity: 1; }
#dmThreadForm .vibez-icon-btn svg { width: 19px; height: 19px; }
.dm-emoji-btn { align-self: center; }

/* ---- GIF in DMs: bubble image + compact KLIPY picker panel (widget pages may not load vibe-content.css) ---- */
.vibez-dm-gif { display: block; max-width: 100%; height: auto; max-height: 260px; }
.vibez-dm-widget .vibez-dm-gif, .dm-card-mini .vibez-dm-gif { max-height: 150px; }
.vibez-dm-widget .vibez-gif-panel { margin: 0; padding: 0.4rem; border-radius: 10px; border: 1px solid rgba(255,255,255,0.18); background: rgba(var(--void-rgb), 0.97); color: inherit; }
.vibez-dm-widget .vibez-gif-panel[hidden] { display: none; }
.vibez-dm-widget .vibez-gif-panel-head { display: flex; gap: 0.3rem; align-items: center; }
.vibez-dm-widget .vibez-gif-search { flex: 1; min-width: 0; padding: 0.3rem 0.6rem; border-radius: 999px; border: 1px solid rgba(255,255,255,0.18); background: rgba(255,255,255,0.92); color: #111; font: inherit; font-size: 0.8rem; }
.vibez-dm-widget .vibez-gif-close { border: none; background: transparent; color: inherit; font-size: 1.2rem; line-height: 1; cursor: pointer; padding: 0 0.25rem; }
.vibez-dm-widget .vibez-gif-status { margin: 0.3rem 0.1rem; font-size: 0.72rem; opacity: 0.8; }
.vibez-dm-widget .vibez-gif-status[hidden] { display: none; }
.vibez-dm-widget .vibez-gif-results { display: flex; gap: 0.3rem; align-items: flex-start; max-height: 170px; overflow-y: auto; }
.vibez-dm-widget .vibez-gif-col { flex: 1; min-width: 0; }
.vibez-dm-widget .vibez-gif-item { display: block; width: 100%; margin: 0 0 0.3rem; padding: 0; border: none; border-radius: 6px; background: rgba(0,0,0,0.2); cursor: pointer; overflow: hidden; }
.vibez-dm-widget .vibez-gif-item img { display: block; width: 100%; height: auto; }
.vibez-dm-widget .vibez-gif-item:hover, .vibez-dm-widget .vibez-gif-item:focus-visible { outline: 2px solid currentColor; }
.vibez-dm-widget .vibez-gif-foot { display: flex; justify-content: space-between; align-items: center; gap: 0.4rem; margin-top: 0.2rem; }
.vibez-dm-widget .vibez-gif-more { border: 1px solid rgba(255,255,255,0.25); background: transparent; color: inherit; border-radius: 999px; padding: 0.15rem 0.6rem; cursor: pointer; font: inherit; font-size: 0.72rem; }
.vibez-dm-widget .vibez-gif-more[hidden] { display: none; }
.vibez-dm-widget .vibez-gif-credit { margin-left: auto; font-size: 0.65rem; opacity: 0.7; color: inherit; text-decoration: none; }

/* ---- Group members & settings, inside the widget thread ---- */
.dmw-members { display: none; }
.dmw-members-open > .dmw-members { display: block; flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 0.4rem 0.2rem; }
.dmw-members-open > :not(.dmw-members):not(.vibez-chat-dm-mini-thread-header) { display: none !important; }
.dmw-members-head { display: flex; align-items: center; gap: 0.4rem; margin-bottom: 0.4rem; }
.dmw-members-back { border: none; background: transparent; color: inherit; font-size: 1.1rem; line-height: 1; cursor: pointer; padding: 0.1rem 0.35rem; border-radius: 6px; }
.dmw-members-back:hover { background: rgba(255,255,255,0.12); }
.dmw-members-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dmw-members .dm-group-tools { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.5rem; }

/* ---- Chat info panel ("i" in a 1:1 thread header), typing line - 2026-10-18 ---- */
.vibez-chat-dm-mini-thread { position: relative; }
.dm-typing-line { display: block; font-size: 0.68rem; font-weight: 500; color: var(--cyan, #2be3ff); line-height: 1.1; }
.dm-info-panel { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; background: rgba(var(--void-rgb, 10, 7, 20), 0.99); overflow: hidden; }
.dm-info-head { display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--glass-brd); }
.dm-info-back { border: 0; background: none; color: var(--ink); font-size: 1.1rem; cursor: pointer; padding: 0 0.3rem; }
.dm-info-body { flex: 1; overflow-y: auto; padding: 0.6rem; display: flex; flex-direction: column; gap: 0.5rem; }
.dm-info-who { color: var(--ink-dim); font-size: 0.8rem; }
.dm-info-row { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; width: 100%; box-sizing: border-box; padding: 0.55rem 0.7rem; border: 1px solid var(--glass-brd); border-radius: 10px; background: rgba(255, 255, 255, 0.04); color: var(--ink); font: inherit; font-size: 0.82rem; text-align: left; text-decoration: none; cursor: pointer; }
.dm-info-row small { display: block; color: var(--ink-dim); font-size: 0.7rem; font-weight: 400; margin-top: 0.15rem; }
.dm-info-row-text { display: block; }
.dm-info-nick { display: block; cursor: default; }
.dm-info-nick label { display: block; margin-bottom: 0.4rem; }
.dm-info-nick-line { display: flex; gap: 0.4rem; }
.dm-info-nick-line input { flex: 1; min-width: 0; padding: 0.4rem 0.55rem; border-radius: 8px; border: 1px solid var(--glass-brd); background: rgba(255, 255, 255, 0.05); color: var(--ink); font: inherit; }
.dm-info-toggle { cursor: pointer; }
.dm-info-danger { color: var(--danger, #ff4d4d); }
.dm-info-media { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.dm-info-media[hidden] { display: none; }
.dm-info-thumb { position: relative; display: block; aspect-ratio: 1; overflow: hidden; border-radius: 8px; background: rgba(255, 255, 255, 0.06); }
.dm-info-thumb img, .dm-info-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.dm-info-thumb i { position: absolute; right: 4px; bottom: 4px; font-style: normal; font-size: 0.7rem; background: rgba(0, 0, 0, 0.6); border-radius: 4px; padding: 0 4px; color: #fff; }
.dm-info-more, .dm-info-empty { grid-column: 1 / -1; }
.dm-info-empty { color: var(--ink-dim); font-size: 0.78rem; text-align: center; }

/* "New" tag beside a name in the widget's Messages list when that conversation has unread messages. */
.vibez-dm-new-tag {
  flex: 0 0 auto;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--danger, #ff4d4d);
  color: #fff;
  font-size: 0.7em;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: .02em;
  text-transform: uppercase;
}
