/* MoneyVersations Community — unified icon-only engagement row. */
.post-actions{display:flex;align-items:center;flex-wrap:nowrap;gap:clamp(12px,2.5vw,22px);width:100%;min-width:0;margin-top:12px;padding-top:8px;border-top:1px solid #edf0f4}
.post-actions>form,.post-actions>.post-action-form,.post-actions>.mv-bookmark-form{display:inline-flex;align-items:center;flex:0 0 auto;min-width:0;margin:0}
.post-actions .post-action,.post-actions .post-action-form button,.post-actions .mv-bookmark-button{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-width:0;min-height:34px;padding:4px 2px;border:0;border-radius:8px;background:transparent;color:#66758a;font:inherit;font-size:.94rem;font-weight:650;line-height:1;text-decoration:none;cursor:pointer;white-space:nowrap}
.post-actions .post-action:hover,.post-actions .post-action-form button:hover,.post-actions .mv-bookmark-button:hover{background:#f2f5f9;color:#243b5a}
.post-actions .mv-icon-count svg,.post-actions .mv-bookmark-button svg,.mv-comment-tools .mv-heart-icon{display:block;width:20px;height:20px;flex:0 0 20px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.post-actions .mv-icon-count>span,.mv-comment-tools .mv-icon-count>span{font-variant-numeric:tabular-nums}
.post-actions .post-action-form button.is-active,.mv-comment-tools .mv-comment-like-form button.is-active{color:#e12d48}
.post-actions .post-action-form button.is-active .mv-heart-icon,.mv-comment-tools .mv-comment-like-form button.is-active .mv-heart-icon{fill:currentColor;stroke:currentColor}
.post-actions .mv-comment-icon{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.post-actions .mv-share-icon{width:20px;height:20px;flex:0 0 20px}
.post-actions .mv-action-bookmark{margin-left:0}
.post-actions .mv-bookmark-button.is-saved{color:#17845d;background:transparent}
.post-actions .mv-bookmark-button.is-saved svg{fill:currentColor;stroke:currentColor}
.mv-comment-tools .mv-comment-like-form{display:inline-flex;align-items:center;margin:0}
.mv-comment-tools .mv-comment-like-form button.mv-icon-count{display:inline-flex;align-items:center;gap:5px;min-height:28px;padding:0;border:0;background:transparent;color:#66758a;font:inherit;font-size:.9rem;font-weight:650;line-height:1;cursor:pointer}
.mv-comment-tools .mv-comment-like-form button.is-active{color:#e12d48}
.mv-comment-tools .mv-comment-like-form button.is-active .mv-heart-icon{fill:currentColor;stroke:currentColor}
.mv-comment-tools .mv-comment-like-form .mv-heart-icon{width:18px;height:18px;flex-basis:18px}
.mv-comment-tools .mv-comment-like-form button:disabled,.post-actions button:disabled{opacity:.65;cursor:wait}
@media(max-width:560px){.post-actions{gap:clamp(10px,4vw,18px);margin-top:9px;padding-top:6px;justify-content:flex-start}.post-actions .post-action,.post-actions .post-action-form button,.post-actions .mv-bookmark-button{min-height:32px;gap:4px;font-size:.9rem}.post-actions .mv-icon-count svg,.post-actions .mv-bookmark-button svg{width:19px;height:19px;flex-basis:19px}}
@media(max-width:360px){.post-actions{gap:9px}.post-actions .post-action,.post-actions .post-action-form button,.post-actions .mv-bookmark-button{font-size:.85rem}}


/* Floating comments dialog and nested reply toggles */
.comments-area { display: none; }
.mv-comments-overlay[hidden] { display: none !important; }
.mv-comments-overlay {
  position: fixed; inset: 0; z-index: 5000; display: flex; align-items: center;
  justify-content: center; padding: 20px; background: rgba(12, 22, 40, .58);
  backdrop-filter: blur(3px);
}
.mv-comments-dialog {
  display: flex; flex-direction: column; width: min(680px, 100%); max-height: min(88dvh, 900px);
  background: #fff; color: #15243b; border: 1px solid #e4e9f0; border-radius: 20px;
  overflow: hidden; box-shadow: 0 24px 80px rgba(5, 18, 38, .28);
}
.mv-comments-header {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 14px;
  padding: 17px 20px 13px; border-bottom: 1px solid #e9edf3; background: #fff; flex: 0 0 auto;
}
.mv-comments-heading { min-width: 0; }
.mv-comments-heading h2 { margin: 0 0 9px; font-size: 1.15rem; line-height: 1.2; font-weight: 750; }
.mv-engagement-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; color: #6a7789; font-size: .88rem; }
.mv-engagement-summary span { display: inline-flex; align-items: center; gap: 5px; }
.mv-engagement-summary svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mv-engagement-summary span:first-child svg { color: #e12d48; }
.mv-comments-close { flex: 0 0 36px; width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: #f0f3f7; color: #536176; font-size: 27px; line-height: 1; cursor: pointer; }
.mv-comments-modal-body { overflow-y: auto; overscroll-behavior: contain; min-height: 0; flex: 1 1 auto; padding: 12px 18px 0; }
.mv-comments-modal-body .comments-area { display: block; }
.mv-comments-modal-body .comment-list { display: block; }
.mv-comments-modal-body .comment-form { position: sticky; bottom: 0; z-index: 2; display: flex; align-items: flex-end; gap: 8px; margin: 12px -18px 0; padding: 12px 18px max(12px, env(safe-area-inset-bottom)); background: rgba(255,255,255,.97); border-top: 1px solid #e9edf3; }
.mv-comments-modal-body .comment-form textarea { flex: 1 1 auto; min-width: 0; min-height: 42px; max-height: 120px; resize: vertical; border-radius: 22px; padding: 11px 15px; }
.mv-comments-modal-body .comment-form .button { flex: 0 0 auto; }
body.mv-comments-open { overflow: hidden; }
.mv-view-replies { display: inline-flex; align-items: center; margin: 6px 0 5px 10px; padding: 3px 0; border: 0; background: transparent; color: #32649b; font-size: .88rem; font-weight: 700; cursor: pointer; }
.mv-view-replies:hover { text-decoration: underline; }
.mv-comment-children[hidden] { display: none !important; }
.mv-comment-children { margin-top: 5px; }
@media (max-width: 640px) {
  .mv-comments-overlay { align-items: stretch; justify-content: stretch; padding: 0; }
  .mv-comments-dialog { width: 100%; max-width: none; height: 100dvh; max-height: 100dvh; border: 0; border-radius: 0; }
  .mv-comments-header { padding: 14px 15px 11px; padding-top: max(14px, env(safe-area-inset-top)); }
  .mv-comments-modal-body { padding: 9px 12px 0; }
  .mv-comments-modal-body .comment-form { margin-left: -12px; margin-right: -12px; padding-left: 12px; padding-right: 12px; }
  .mv-comments-modal-body .mv-comment { padding: 10px; }
  .mv-comments-modal-body .mv-comment-children { margin-left: 7px; padding-left: 7px; }
}


/* Mobile comments polish: anchor each action menu to its own comment card. */
.mv-comments-modal-body .mv-comment {
  position: relative;
  min-width: 0;
  overflow-wrap: anywhere;
}
.mv-comments-modal-body .mv-comment > .mv-item-head {
  min-width: 0;
  padding-right: 30px;
}
.mv-comments-modal-body .mv-comment > .mv-menu {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 5;
  margin: 0;
}
.mv-comments-modal-body .mv-comment > .mv-menu > summary {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 50%;
  cursor: pointer;
  list-style: none;
}
.mv-comments-modal-body .mv-comment > .mv-menu > summary::-webkit-details-marker {
  display: none;
}
.mv-comments-modal-body .mv-comment > .mv-menu[open] .mv-menu-panel {
  position: absolute;
  top: 30px;
  right: 0;
  z-index: 6;
  min-width: 170px;
}

/* Keep each reply toggle and its replies together in the parent comment. */
.mv-comments-modal-body .mv-comment > .mv-view-replies {
  display: flex;
  width: fit-content;
  max-width: 100%;
  position: relative;
  z-index: 1;
  margin: 7px 0 4px 10px;
  clear: both;
}
.mv-comments-modal-body .mv-comment > .mv-comment-children {
  display: block;
  width: auto;
  min-width: 0;
  margin: 4px 0 2px 10px;
  padding-left: 10px;
  border-left: 2px solid #e7edf4;
}
.mv-comments-modal-body .mv-comment > .mv-comment-children[hidden] {
  display: none !important;
}
.mv-comments-modal-body .mv-comment-children > .mv-comment {
  margin-top: 8px;
}

/* Keep the composer input and submit button aligned on one row on phones. */
.mv-comments-modal-body .comment-form {
  display: flex;
  flex-direction: row;
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.mv-comments-modal-body .comment-form textarea {
  display: block;
  flex: 1 1 0%;
  width: 0;
  min-width: 0;
  box-sizing: border-box;
  margin: 0;
  line-height: 1.35;
}
.mv-comments-modal-body .comment-form .button {
  flex: 0 0 auto;
  align-self: center;
  white-space: nowrap;
  min-height: 42px;
  margin: 0;
}
@media (max-width: 640px) {
  .mv-comments-modal-body .comment-form {
    gap: 7px;
    padding-left: 12px;
    padding-right: 12px;
  }
  .mv-comments-modal-body .comment-form textarea {
    font-size: 16px; /* Prevent iOS Safari from zooming when the user taps to type. */
  }
  .mv-comments-modal-body .comment-form .button {
    padding: 10px 13px;
    font-size: .9rem;
  }
  .mv-comments-modal-body .mv-comment > .mv-menu {
    top: 6px;
    right: 6px;
  }
  .mv-comments-modal-body .mv-comment > .mv-item-head {
    padding-right: 27px;
  }
}


/* Final mobile modal composer behavior: pinned to the bottom, single-row controls. */
.mv-comments-dialog {
  min-height: 0;
}
.mv-comments-modal-body {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.mv-comments-modal-body > .comments-area {
  display: flex !important;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
}
.mv-comments-modal-body > .comments-area > .comment-list {
  flex: 1 1 auto;
  min-height: 0;
}
.mv-comments-modal-body > .comments-area > .comment-form {
  position: sticky;
  bottom: 0;
  z-index: 20;
  display: flex;
  flex: 0 0 auto;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  width: calc(100% + 24px);
  box-sizing: border-box;
  margin: auto -12px 0;
  padding: 12px 12px max(12px, env(safe-area-inset-bottom));
  background: #fff;
  border-top: 1px solid #e9edf3;
  box-shadow: 0 -6px 18px rgba(21, 36, 59, .05);
}
.mv-comments-modal-body > .comments-area > .comment-form > textarea {
  flex: 1 1 0%;
  width: 0;
  min-width: 0;
  min-height: 44px;
  max-height: 96px;
  margin: 0;
  box-sizing: border-box;
  resize: none;
  font-size: 16px;
}
.mv-comments-modal-body > .comments-area > .comment-form > .button {
  flex: 0 0 auto;
  align-self: center;
  min-height: 44px;
  margin: 0;
  padding: 10px 14px;
  white-space: nowrap;
}
@media (max-width: 640px) {
  .mv-comments-modal-body {
    padding-bottom: 0;
  }
  .mv-comments-modal-body > .comments-area > .comment-form {
    width: calc(100% + 24px);
    gap: 7px;
  }
}


/* Prevent comments/replies from scrolling underneath the pinned composer.
   The comment list is now the scrolling region; the composer remains outside it. */
.mv-comments-modal-body {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.mv-comments-modal-body > .comments-area {
  display: flex !important;
  flex: 1 1 auto;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}
.mv-comments-modal-body > .comments-area > .comment-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  padding-bottom: 16px;
  -webkit-overflow-scrolling: touch;
}
.mv-comments-modal-body > .comments-area > .comment-form {
  position: relative;
  inset: auto;
  flex: 0 0 auto;
  margin-top: 0;
}

/* Correct comment/reply action-menu placement on desktop and mobile. */
.mv-comments-modal-body .mv-comment {
  position: relative;
  overflow: visible;
}
.mv-comments-modal-body .mv-comment > .mv-item-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding-right: 42px;
}
.mv-comments-modal-body .mv-comment > .mv-item-head .mv-item-head-main {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 10px;
  min-width: 0;
  max-width: 100%;
}
.mv-comments-modal-body .mv-comment > .mv-item-head small {
  display: inline;
}
.mv-comments-modal-body .mv-comment > .mv-menu {
  position: absolute;
  top: 9px;
  right: 10px;
  z-index: 30;
  width: 30px;
  margin: 0;
}
.mv-comments-modal-body .mv-comment > .mv-menu > summary {
  width: 30px;
  height: 30px;
  padding: 0;
  box-sizing: border-box;
}
.mv-comments-modal-body .mv-comment > .mv-menu > .mv-menu-panel,
.mv-comments-modal-body .mv-comment > .mv-menu[open] > .mv-menu-panel {
  position: absolute;
  top: 34px;
  right: 0;
  left: auto;
  z-index: 999;
  display: block;
  width: 220px;
  min-width: 190px;
  max-width: calc(100vw - 64px);
  box-sizing: border-box;
  padding: 7px;
  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
  background: #fff;
  border: 1px solid #e5eaf0;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(15,30,55,.2);
}
.mv-comments-modal-body .mv-comment > .mv-menu .mv-menu-panel button,
.mv-comments-modal-body .mv-comment > .mv-menu .mv-menu-panel a {
  display: flex;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  align-items: center;
  justify-content: flex-start;
  gap: 9px;
  padding: 10px 11px;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
  text-align: left;
  line-height: 1.35;
}
.mv-comments-modal-body .mv-comment > .mv-menu .mv-menu-panel form {
  display: block;
  width: 100%;
  min-width: 0;
}
.mv-comments-modal-body .mv-comment > .mv-menu .mv-menu-panel form button {
  width: 100%;
}
@media (max-width: 640px) {
  .mv-comments-modal-body .mv-comment > .mv-item-head {
    align-items: flex-start;
    padding-right: 40px;
  }
  .mv-comments-modal-body .mv-comment > .mv-item-head .mv-item-head-main {
    align-items: baseline;
    gap: 4px 8px;
  }
  .mv-comments-modal-body .mv-comment > .mv-menu {
    top: 8px;
    right: 8px;
  }
  .mv-comments-modal-body .mv-comment > .mv-menu > .mv-menu-panel,
  .mv-comments-modal-body .mv-comment > .mv-menu[open] > .mv-menu-panel {
    width: 210px;
    min-width: 180px;
    max-width: calc(100vw - 52px);
  }
}

/* FINAL OVERRIDES: preserve the comment content flow and prevent narrow vertical menus. */
.mv-comments-modal-body .mv-comment,
.mv-comments-modal-body .mv-comment-children > .mv-comment {
  box-sizing: border-box !important;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: visible !important;
  overflow-wrap: break-word !important;
  word-break: normal !important;
}
.mv-comments-modal-body .mv-comment > .mv-item-head {
  display: block !important;
  position: relative;
  width: 100%;
  min-width: 0;
  padding: 0 !important;
}
.mv-comments-modal-body .mv-comment > .mv-item-head > .mv-item-head-main {
  display: block !important;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding: 0 !important;
}
.mv-comments-modal-body .mv-comment .comment-meta {
  display: flex !important;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 8px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding-right: 42px;
}
.mv-comments-modal-body .mv-comment .comment-meta > small {
  min-width: 0;
  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
}
.mv-comments-modal-body .mv-comment .mv-comment-text,
.mv-comments-modal-body .mv-comment .mv-comment-tools {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
}
.mv-comments-modal-body .mv-comment > .mv-menu {
  position: absolute !important;
  top: 0 !important;
  right: 0 !important;
  left: auto !important;
  z-index: 100 !important;
  width: 30px !important;
  min-width: 30px !important;
  max-width: 30px !important;
  margin: 0 !important;
}
.mv-comments-modal-body .mv-comment > .mv-menu > summary {
  display: flex !important;
  width: 30px !important;
  min-width: 30px !important;
  height: 30px !important;
  align-items: center;
  justify-content: center;
  white-space: nowrap !important;
}
.mv-comments-modal-body .mv-comment > .mv-menu > .mv-menu-panel,
.mv-comments-modal-body .mv-comment > .mv-menu[open] > .mv-menu-panel {
  position: fixed !important;
  top: auto !important;
  right: 12px !important;
  left: auto !important;
  z-index: 10000 !important;
  display: block !important;
  width: 220px !important;
  min-width: 220px !important;
  max-width: calc(100vw - 24px) !important;
  height: auto !important;
  max-height: min(60vh, 360px);
  overflow-y: auto;
  box-sizing: border-box !important;
  padding: 6px !important;
  white-space: normal !important;
  overflow-wrap: normal !important;
  word-break: normal !important;
  background: #fff !important;
  color: #172033 !important;
  border: 1px solid #e5eaf0 !important;
  border-radius: 12px !important;
  box-shadow: 0 10px 30px rgba(15,30,55,.22) !important;
}
.mv-comments-modal-body .mv-comment > .mv-menu .mv-menu-panel a,
.mv-comments-modal-body .mv-comment > .mv-menu .mv-menu-panel button,
.mv-comments-modal-body .mv-comment > .mv-menu .mv-menu-panel form,
.mv-comments-modal-body .mv-comment > .mv-menu .mv-menu-panel form button {
  display: flex !important;
  width: 100% !important;
  min-width: 0 !important;
  height: auto !important;
  min-height: 40px;
  box-sizing: border-box !important;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 10px 12px !important;
  white-space: normal !important;
  overflow-wrap: break-word !important;
  word-break: normal !important;
  text-align: left !important;
  line-height: 1.35 !important;
}
.mv-comments-modal-body .mv-comment-children {
  width: auto;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
@media (max-width: 640px) {
  .mv-comments-modal-body .mv-comment-children > .mv-comment {
    width: 100%;
    max-width: 100%;
  }
}


/* Definitive comment action placement: the menu is a sibling of .mv-item-head,
   so anchor it to the full comment card, not to the like/reply tools row. */
.mv-comments-modal-body .comment-list .mv-comment {
  position: relative !important;
}
.mv-comments-modal-body .comment-list .mv-comment > .mv-item-head {
  position: static !important;
  display: block !important;
  width: 100% !important;
  padding: 0 42px 0 0 !important;
  box-sizing: border-box !important;
}
.mv-comments-modal-body .comment-list .mv-comment > .mv-menu {
  position: absolute !important;
  top: 8px !important;
  right: 8px !important;
  bottom: auto !important;
  left: auto !important;
  float: none !important;
  display: block !important;
  width: 30px !important;
  height: 30px !important;
  margin: 0 !important;
  padding: 0 !important;
  transform: none !important;
  z-index: 100 !important;
}
.mv-comments-modal-body .comment-list .mv-comment > .mv-menu > summary {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 30px !important;
  height: 30px !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1 !important;
  list-style: none !important;
  cursor: pointer;
}
.mv-comments-modal-body .comment-list .mv-comment > .mv-menu > summary::-webkit-details-marker {
  display: none !important;
}
.mv-comments-modal-body .comment-list .mv-comment > .mv-menu > .mv-menu-panel {
  position: fixed !important;
  top: auto !important;
  right: 12px !important;
  left: auto !important;
  bottom: auto !important;
  width: 220px !important;
  min-width: 220px !important;
  max-width: calc(100vw - 24px) !important;
  height: auto !important;
  z-index: 10000 !important;
}
@media (max-width: 640px) {
  .mv-comments-modal-body .comment-list .mv-comment > .mv-menu {
    top: 8px !important;
    right: 8px !important;
  }
}

/* Structural fix: comment action menu now lives inside .mv-item-head. */
.mv-comments-modal-body .comment-list .mv-comment > .mv-item-head {
  position: relative !important;
  display: block !important;
  width: 100% !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}
.mv-comments-modal-body .comment-list .mv-comment > .mv-item-head > .mv-item-head-main {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  padding-right: 38px !important;
  box-sizing: border-box !important;
}
.mv-comments-modal-body .comment-list .mv-comment > .mv-item-head > .mv-menu {
  position: absolute !important;
  display: block !important;
  top: 0 !important;
  right: 0 !important;
  bottom: auto !important;
  left: auto !important;
  width: 30px !important;
  height: 30px !important;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
  transform: none !important;
  z-index: 101 !important;
}
.mv-comments-modal-body .comment-list .mv-comment > .mv-item-head > .mv-menu > summary {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 30px !important;
  height: 30px !important;
  padding: 0 !important;
  margin: 0 !important;
  line-height: 1 !important;
  list-style: none !important;
  white-space: nowrap !important;
  cursor: pointer;
}
.mv-comments-modal-body .comment-list .mv-comment > .mv-item-head > .mv-menu > summary::-webkit-details-marker { display: none !important; }
.mv-comments-modal-body .comment-list .mv-comment > .mv-item-head > .mv-menu > .mv-menu-panel,
.mv-comments-modal-body .comment-list .mv-comment > .mv-item-head > .mv-menu[open] > .mv-menu-panel {
  position: fixed !important;
  top: auto !important;
  right: 12px !important;
  left: auto !important;
  bottom: auto !important;
  width: 220px !important;
  min-width: 220px !important;
  max-width: calc(100vw - 24px) !important;
  height: auto !important;
  z-index: 10000 !important;
}


/* Targeted mobile correction: in feed.php the comment menu is a direct child
   of .mv-comment, NOT a child of .mv-item-head. Align it with the author/date row.
   This overrides the stale structural selector above only on mobile. */
@media (max-width: 640px) {
  .mv-comments-modal-body .comment-list .mv-comment {
    position: relative !important;
  }
  .mv-comments-modal-body .comment-list .mv-comment > .mv-item-head {
    position: static !important;
    padding: 0 !important;
  }
  .mv-comments-modal-body .comment-list .mv-comment > .mv-menu {
    position: absolute !important;
    top: 7px !important;
    right: 8px !important;
    bottom: auto !important;
    left: auto !important;
    width: 30px !important;
    height: 30px !important;
    margin: 0 !important;
    transform: none !important;
    z-index: 101 !important;
  }
  .mv-comments-modal-body .comment-list .mv-comment .comment-meta {
    padding-right: 38px !important;
  }
}

/* FINAL MOBILE OVERRIDE: keep the comment textarea and Comment button on one row. */
@media (max-width: 640px) {
  .mv-comments-modal-body > .comments-area > form.comment-form {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 8px !important;
    width: calc(100% + 24px) !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }
  .mv-comments-modal-body > .comments-area > form.comment-form > textarea[name="body"] {
    display: block !important;
    flex: 1 1 0% !important;
    width: 0 !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    font-size: 16px !important;
  }
  .mv-comments-modal-body > .comments-area > form.comment-form > button[type="submit"] {
    display: inline-flex !important;
    flex: 0 0 auto !important;
    align-items: center !important;
    justify-content: center !important;
    align-self: center !important;
    width: auto !important;
    min-width: max-content !important;
    min-height: 44px !important;
    margin: 0 !important;
    white-space: nowrap !important;
  }
}

/* Align the comment Like control and Reply link on one shared baseline in the popup. */
.mv-comments-modal-body .comment-list .mv-comment .mv-comment-tools {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap;
  align-items: center !important;
  justify-content: flex-start;
  gap: 12px;
  width: 100%;
  margin-top: 8px;
  line-height: 1;
}
.mv-comments-modal-body .comment-list .mv-comment .mv-comment-tools > .mv-comment-like-form {
  display: inline-flex !important;
  align-items: center !important;
  flex: 0 0 auto;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1 !important;
}
.mv-comments-modal-body .comment-list .mv-comment .mv-comment-tools > .mv-comment-like-form > button,
.mv-comments-modal-body .comment-list .mv-comment .mv-comment-tools > button.mv-text-action {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center;
  align-self: center !important;
  min-height: 28px;
  margin: 0 !important;
  padding: 0 !important;
  vertical-align: middle;
  line-height: 1 !important;
}
.mv-comments-modal-body .comment-list .mv-comment .mv-comment-tools .mv-heart-icon {
  display: block;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
}
@media (max-width: 640px) {
  .mv-comments-modal-body .comment-list .mv-comment .mv-comment-tools {
    align-items: center !important;
    gap: 12px;
  }
}

/* DESKTOP-ONLY correction: keep the dropdown anchored to its own three-dot
   control inside the comment popup. No mobile rules are changed. */
@media (min-width: 641px) {
  .mv-comments-modal-body .comment-list .mv-comment {
    position: relative !important;
    overflow: visible !important;
  }

  .mv-comments-modal-body .comment-list .mv-comment > .mv-menu,
  .mv-comments-modal-body .comment-list .mv-comment > .mv-item-head > .mv-menu {
    position: absolute !important;
    top: 7px !important;
    right: 8px !important;
    bottom: auto !important;
    left: auto !important;
    width: 30px !important;
    height: 30px !important;
    margin: 0 !important;
    transform: none !important;
    z-index: 101 !important;
  }

  .mv-comments-modal-body .comment-list .mv-comment > .mv-menu > .mv-menu-panel,
  .mv-comments-modal-body .comment-list .mv-comment > .mv-menu[open] > .mv-menu-panel,
  .mv-comments-modal-body .comment-list .mv-comment > .mv-item-head > .mv-menu > .mv-menu-panel,
  .mv-comments-modal-body .comment-list .mv-comment > .mv-item-head > .mv-menu[open] > .mv-menu-panel {
    position: absolute !important;
    top: 30px !important;
    right: 0 !important;
    bottom: auto !important;
    left: auto !important;
    width: 220px !important;
    min-width: 220px !important;
    max-width: min(220px, calc(100vw - 48px)) !important;
    height: auto !important;
    max-height: min(60vh, 360px) !important;
    overflow-y: auto !important;
    box-sizing: border-box !important;
    z-index: 102 !important;
  }
}

/* Post context shown above comments when a discussion opens in the dialog. */
.mv-comments-modal-post-preview[hidden] { display: none !important; }
.mv-comments-modal-post-preview {
  flex: 0 0 auto; max-height: 28vh; overflow-y: auto; padding: 14px 20px;
  border-bottom: 1px solid #e9edf3; background: #f8fafc;
}
.mv-comments-modal-post-preview .post-author { margin-bottom: 10px; }
.mv-comments-modal-post-preview .post-body { margin: 0; white-space: normal; overflow-wrap: anywhere; line-height: 1.55; }
.mv-comments-modal-post-preview .post-author-handle { overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .mv-comments-modal-post-preview { max-height: 24vh; padding: 12px 15px; }
}

/* Briefly highlight the exact comment opened from a notification. */
.mv-comment.mv-notification-target-comment{outline:2px solid #1d8b70;outline-offset:3px;background:rgba(29,139,112,.08);border-radius:12px;transition:background .25s ease}
