/* Compact original-design comments, including realtime and reply forms. */
/* Post options share the compact comment styling without hiding reactions. */
.post-stream .post-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.post-stream .post-head > .post-user { flex: 1 1 120px; min-width: 0; }
.post-stream .post-head > small { margin-left: auto; font-size: 11px; overflow-wrap: anywhere; }
.post-more-menu { position: relative; flex: 0 0 36px; margin-left: auto; }
.post-more-menu > summary { list-style: none; }
.post-more-menu > summary::-webkit-details-marker { display: none; }
.post-stream .post-more-button {
  display: grid; place-items: center; width: 36px; min-width: 36px; height: 36px;
  padding: 0; border: 1px solid #ffffff1f; border-radius: 6px;
  background: #ffffff0b; color: var(--muted); cursor: pointer;
}
.post-more-button img { width: 20px; height: 20px; filter: brightness(0) invert(1); opacity: 0.75; }
.post-more-button:hover, .post-more-menu[open] > summary { background: #6ea8fe21; border-color: #6ea8fe52; }
.post-more-menu:not([open]) > .post-more-popover { display: none; }
.post-more-popover {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 35;
  width: 208px; max-width: calc(100vw - 40px); padding: 5px;
  border: 1px solid #354257; border-radius: 8px; background: #161e2b;
  box-shadow: 0 12px 28px #0006;
}
.post-more-popover > form { display: block; margin: 0; padding: 0; }
.post-more-popover .post-menu-item {
  display: block; width: 100%; min-height: 38px; padding: 9px 10px;
  border: 0; border-radius: 4px; background: transparent; color: var(--text);
  font: inherit; font-size: 13px; line-height: 1.4; text-align: left;
  overflow-wrap: anywhere; cursor: pointer; transform: none;
}
.post-more-popover .post-menu-item:hover { background: #ffffff14; transform: none; }
.post-more-popover .post-menu-item.danger { color: #ff9b9b; }
.post-more-popover .post-menu-item:disabled { opacity: 0.5; cursor: default; background: transparent; }
.post-more-button:focus-visible, .post-menu-item:focus-visible { outline: 2px solid #6ea8fe; outline-offset: 2px; }
@media (max-width: 760px) {
  .post-more-menu { flex-basis: 44px; }
  .post-stream .post-more-button { width: 44px; min-width: 44px; height: 44px; }
  .post-more-popover .post-menu-item { min-height: 44px; }
}

.comment-list .comment-item {
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--cb-border, #ffffff17);
  border-radius: 8px;
  background: #161e2b;
}
.comment-list .comment-head { gap: 6px 8px; margin-bottom: 7px; }
.comment-list .comment-head > small:first-of-type { margin-left: auto; }
.comment-list .comment-copy { margin: 0; color: #e1e7f0; font-weight: 400; overflow-wrap: anywhere; }
.comment-list .comment-head .name-with-badge { color: #f4f7fb; }
.comment-list .comment-actions { display: flex; flex-wrap: wrap; align-items: center; width: 100%; margin: 7px 0 0; gap: 6px 16px; }
.comment-list .comment-replies { margin-top: 12px; padding-left: 12px; border-left: 1px solid #ffffff25; }
.comment-list .comment-replies .comment-item { padding: 0; border: 0; border-radius: 0; background: transparent; }
.comment-like-pair { display: inline-flex; align-items: center; gap: 2px; }
.comment-like-form { display: inline-flex; margin: 0; padding: 0; }
.comment-heart-button, .comment-like-count, .comment-list .comment-reply-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 32px; padding: 3px 0; border: 0; border-radius: 4px;
  background: transparent; color: #a4afc0; font: inherit; font-size: 12px; line-height: 1.4;
  transform: none; cursor: pointer;
}
.comment-heart-button { flex: 0 0 28px; width: 28px; }
.comment-heart-button[aria-pressed='true'] { color: #6ea8fe; }
.comment-heart-button:disabled { opacity: 0.5; cursor: default; }
.comment-like-count { min-width: 24px; font-variant-numeric: tabular-nums; text-decoration: underline; text-decoration-color: #6ea8fe55; text-underline-offset: 3px; }
.comment-list .comment-reply-button { width: auto; height: auto; min-width: 0; }
.comment-heart-button:hover, .comment-like-count:hover, .comment-list .comment-reply-button:hover { color: #c6dcff; background: transparent; border-color: transparent; transform: none; }
.comment-actions .comment-more-menu { margin-left: auto; }
.comment-list .comment-more-menu:not([open]) > .comment-more-popover { display: none; }
.comment-list .comment-more-popover { left: auto; right: 0; max-width: calc(100vw - 40px); border-radius: 8px; }
.comment-list .comment-more-popover::before { left: auto; right: 12px; }
.comment-tool-icon { display: block; flex: 0 0 18px; width: 18px; height: 18px; background: currentColor; mask: center / contain no-repeat; }
.comment-icon-heart { mask-image: url('/icons/navigation/heart.svg'); }
.comment-heart-button[aria-pressed='true'] .comment-icon-heart { mask-image: url('/icons/navigation/heart-filled.svg'); }
.comment-icon-smile { mask-image: url('/icons/navigation/smile.svg'); }
.comment-icon-send { mask-image: url('/icons/navigation/arrow-up.svg'); }
.comment-icon-close { mask-image: url('/icons/navigation/x.svg'); }
.post-card .comment-compose-compact {
  display: grid; grid-template-columns: minmax(0, 1fr) 34px 34px; align-items: center; gap: 6px;
  min-width: 0; padding: 5px 6px 5px 12px; margin-top: 16px;
  border: 1px solid #354257; border-radius: 8px; background: #111927;
}
.post-card .comment-compose-compact .input { min-width: 0; width: 100%; min-height: 36px; margin: 0; padding: 7px 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.post-card .comment-compose-compact.comment-reply-form { grid-template-columns: minmax(0, 1fr) repeat(3, 34px); margin-top: 12px; }
.post-card .comment-compose-compact .emoji-toggle, .comment-send-button, .comment-cancel-button {
  display: inline-grid; place-items: center; width: 34px; min-width: 34px; height: 34px; min-height: 34px;
  padding: 0; border: 0; border-radius: 6px; background: transparent; color: #a4afc0; cursor: pointer;
}
.comment-send-button { background: #203658; color: #c6dcff; border: 1px solid #36537e; }
.comment-send-button:disabled { opacity: 0.45; cursor: default; }
.post-card .comment-compose-compact [data-compose-error] { grid-column: 1 / -1; }
.post-card .comment-compose-compact .emoji-picker { right: 0; left: auto; width: min(304px, 100%); grid-template-columns: repeat(auto-fit, minmax(34px, 1fr)); border-radius: 8px; background: #1b2535; z-index: 40; }
.post-card .comment-compose-compact .emoji-choice { width: 100%; border-radius: 6px; }
.comment-list .comment-error { margin: 6px 0 0; color: #ffc0c9; font-size: 12px; overflow-wrap: anywhere; }
.comment-likes-dialog { width: min(380px, calc(100% - 28px)); max-height: min(560px, calc(100dvh - 32px)); padding: 0; margin: auto; overflow: auto; border: 1px solid #354257; border-radius: 8px; background: #131b29; color: #f4f7fb; }
.comment-likes-dialog:not([open]) { display: none; }
.comment-likes-dialog::backdrop { background: #050910bb; }
body:has(.comment-likes-dialog[open]) { overflow: hidden; }
.comment-likes-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 15px 16px 12px; border-bottom: 1px solid #ffffff17; }
.comment-likes-head > div { min-width: 0; }
.comment-likes-head h2 { margin: 0; font-size: 16px; line-height: 1.4; }
.comment-likes-head p { margin: 4px 0 0; color: #a4afc0; font-size: 12px; overflow-wrap: anywhere; }
.comment-likes-close { display: grid; place-items: center; flex: 0 0 40px; width: 40px; height: 40px; padding: 0; background: #ffffff06; border: 1px solid #ffffff12; border-radius: 6px; color: inherit; cursor: pointer; }
.comment-likers-list { margin: 0; padding: 4px 16px; list-style: none; }
.comment-likers-list li + li { border-top: 1px solid #ffffff09; }
.comment-liker { display: flex; align-items: center; gap: 11px; min-width: 0; padding: 10px 0; color: inherit; }
.comment-liker-avatar { position: relative; display: grid; place-items: center; flex: 0 0 36px; width: 36px; height: 36px; overflow: hidden; border-radius: 50%; background: #263a51; color: #bdd8f7; font-size: 12px; }
.comment-liker-avatar img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.comment-liker-copy { display: grid; gap: 1px; min-width: 0; }
.comment-liker-copy strong { overflow-wrap: anywhere; }
.comment-liker-copy small { color: #a4afc0; font-size: 12px; overflow-wrap: anywhere; }
.comment-likes-status { margin: 0; padding: 16px; color: #a4afc0; font-size: 13px; overflow-wrap: anywhere; }
.comment-likes-more { display: block; margin: 6px auto 16px; padding: 8px 12px; color: #c6dcff; border: 1px solid #36537e; border-radius: 6px; background: #203658; cursor: pointer; }
.comment-likes-dialog [hidden] { display: none; }
.comment-heart-button:focus-visible, .comment-like-count:focus-visible, .comment-send-button:focus-visible, .comment-cancel-button:focus-visible, .comment-likes-dialog :is(a, button):focus-visible { outline: 2px solid #6ea8fe; outline-offset: 2px; }
.post-meta .post-reaction-pair { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 3px; min-width: 0; }
.post-meta .post-reaction-pair > form { margin: 0; }
.post-meta .post-reaction-count { position: static; display: inline-flex; align-items: center; justify-content: center; width: auto; min-width: 28px; min-height: 36px; padding: 5px 6px; border: 0; border-radius: 6px; background: transparent; color: inherit; font: inherit; font-size: 13px; font-variant-numeric: tabular-nums; text-decoration: underline; text-decoration-color: #6ea8fe66; text-underline-offset: 3px; cursor: pointer; }
.post-meta .post-reaction-count:hover { background: #ffffff08; }
.post-meta .post-reaction-count:focus-visible { outline: 2px solid #6ea8fe; outline-offset: 2px; }
@media (max-width: 760px) {
  .post-meta .post-reaction-count { min-width: 36px; min-height: 44px; }
  .comment-list .comment-item { padding: 11px 12px; }
  .comment-list .comment-replies .comment-item { padding: 0; }
  .comment-list .comment-head > small { font-size: 11px; }
  .comment-heart-button, .comment-like-count, .comment-list .comment-reply-button { min-height: 44px; }
  .comment-heart-button { width: 40px; flex-basis: 40px; }
  .comment-like-count { min-width: 40px; }
  .post-card .comment-compose-compact { grid-template-columns: minmax(0, 1fr) 38px 38px; gap: 4px; padding-left: 10px; }
  .post-card .comment-compose-compact .emoji-toggle, .comment-send-button, .comment-cancel-button { width: 38px; min-width: 38px; height: 42px; min-height: 42px; }
  .post-card .comment-compose-compact .input { font-size: 16px; }
  .post-card .comment-compose-compact .emoji-picker { grid-template-columns: repeat(auto-fit, minmax(40px, 1fr)); }
  .post-card .comment-compose-compact .emoji-choice { height: 44px; }
  .post-card .comment-compose-compact.comment-reply-form { grid-template-columns: minmax(0, 1fr) 38px 38px; }
  .post-card .comment-compose-compact.comment-reply-form .input { grid-column: 1 / 3; grid-row: 1; }
  .post-card .comment-compose-compact.comment-reply-form .comment-compose-emoji { grid-column: 3; grid-row: 1; }
  .post-card .comment-compose-compact.comment-reply-form .comment-cancel-button { grid-column: 2; grid-row: 2; justify-self: end; }
  .post-card .comment-compose-compact.comment-reply-form .comment-send-button { grid-column: 3; grid-row: 2; }
  .comment-likes-close { width: 44px; height: 44px; flex-basis: 44px; }
}
