/**
 * Comment reactions layout fix — kept in sync with themes/wowonder/stylesheet/comment-reactions-fix.css
 * FBTheme3 also applies these rules in fb-design.css; this file is optional if fb-design is loaded.
 */

.post .post-footer .comments-list .comment .comment-body,
.post .post-footer .comments-list .reply .comment-body,
.wo_imagecombo_lbox .lightbox-post-footer .comments-list .comment .comment-body {
  position: relative;
}

.post .post-footer .comments-list .comment .comment-body > .comment-heading,
.post .post-footer .comments-list .reply .comment-body > .reply-heading,
.wo_imagecombo_lbox .lightbox-post-footer .comments-list .comment .comment-body > .comment-heading {
  margin-bottom: 0 !important;
}

.post .post-footer .comments-list .comment .comment-body #comment_reacted,
.post .post-footer .comments-list .reply .comment-body #comment_reacted,
.wo_imagecombo_lbox .lightbox-post-footer .comments-list .comment .comment-body #comment_reacted {
  position: relative !important;
  float: none !important;
  margin: -5px 0 4px 12px !important;
  display: inline-flex !important;
  align-items: center;
  vertical-align: middle;
  z-index: 3;
  pointer-events: none;
}

.post .post-footer .comments-list .comment .comment-body #comment_reacted .like-emo,
.post .post-footer .comments-list .reply .comment-body #comment_reacted .like-emo,
.wo_imagecombo_lbox .lightbox-post-footer .comments-list .comment .comment-body #comment_reacted .like-emo {
  pointer-events: auto;
}

.post .post-footer .comments-list .comment .comment-body #comment_reacted:not(:has(.how_reacted)),
.post .post-footer .comments-list .reply .comment-body #comment_reacted:not(:has(.how_reacted)),
.wo_imagecombo_lbox .lightbox-post-footer .comments-list .comment .comment-body #comment_reacted:not(:has(.how_reacted)) {
  display: none !important;
  margin: 0 !important;
  min-height: 0 !important;
}

.post .post-footer .comments-list .comment .comment-body #comment_reacted .like-emo > .how_reacted,
.post .post-footer .comments-list .reply .comment-body #comment_reacted .like-emo > .how_reacted,
.wo_imagecombo_lbox .lightbox-post-footer .comments-list .comment .comment-body #comment_reacted .like-emo > .how_reacted {
  background: var(--card-bg, #fff) !important;
  box-shadow: 0 0 0 1px var(--fb-border, #e4e6eb);
}

.post .post-footer .comments-list .comment .comment-body > .comment-options,
.post .post-footer .comments-list .reply .comment-body > .comment-options,
.wo_imagecombo_lbox .lightbox-post-footer .comments-list .comment .comment-body > .comment-options {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 6px;
  max-width: 100%;
  margin-top: 0 !important;
  margin-left: 12px !important;
  position: relative;
  z-index: 2;
}

.post .post-footer .comments-list .comment .comment-body .wo-reaction-comment,
.post .post-footer .comments-list .reply .comment-body .wo-reaction-replay,
.wo_imagecombo_lbox .lightbox-post-footer .comments-list .comment .comment-body .wo-reaction-lightbox-comment {
  position: relative !important;
  display: inline-flex !important;
  align-items: center;
  max-width: none !important;
  padding: 0 !important;
  margin: 0;
  vertical-align: middle;
}

.post .post-footer .comments-list .comment .comment-body .reactions-box,
.post .post-footer .comments-list .reply .comment-body .reactions-box,
.wo_imagecombo_lbox .lightbox-post-footer .comments-list .comment .comment-body .reactions-box {
  display: none;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: flex-start !important;
  width: max-content !important;
  max-width: min(320px, calc(100vw - 24px)) !important;
  height: auto !important;
  top: auto !important;
  bottom: calc(100% + 4px) !important;
  left: 0 !important;
  right: auto !important;
  margin: 0;
  padding: 2px 4px !important;
  border-radius: 2em !important;
  box-sizing: border-box;
  list-style: none;
  z-index: 20;
}

.post .post-footer .comments-list .comment .comment-body .reactions-box[style*="display: block"],
.post .post-footer .comments-list .reply .comment-body .reactions-box[style*="display: block"],
.wo_imagecombo_lbox .lightbox-post-footer .comments-list .comment .comment-body .reactions-box[style*="display: block"] {
  display: flex !important;
}

.post .post-footer .comments-list .comment .comment-body .reactions-box .reaction,
.post .post-footer .comments-list .reply .comment-body .reactions-box .reaction,
.wo_imagecombo_lbox .lightbox-post-footer .comments-list .comment .comment-body .reactions-box .reaction {
  float: none !important;
  display: inline-flex !important;
  flex: 0 0 auto !important;
  width: 40px !important;
  height: 40px !important;
  min-width: 40px;
}

@media (max-width: 345px) {
  .post .post-footer .comments-list .comment .comment-body .reactions-box,
  .post .post-footer .comments-list .reply .comment-body .reactions-box {
    width: max-content !important;
    top: auto !important;
    bottom: calc(100% + 4px) !important;
    left: 0 !important;
  }
}

html.wo-night-mode .post .post-footer .comments-list .comment .comment-body .reactions-box,
body.wo-night-mode .post .post-footer .comments-list .comment .comment-body .reactions-box,
html.wo-night-mode .post .post-footer .comments-list .reply .comment-body .reactions-box,
body.wo-night-mode .post .post-footer .comments-list .reply .comment-body .reactions-box {
  background-color: var(--card-bg, #2a2a2a) !important;
  border: 1px solid var(--fb-border, #3d3d3d);
  box-shadow: var(--fb-shadow, 0 1px 5px rgba(0, 0, 0, 0.35)) !important;
}
