/* Standalone/feed post presentation refinements. */
.community-card-author {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  min-width: 0;
}

.community-author-identity {
  display: flex !important;
  min-width: 0;
  flex: 1 1 auto;
  flex-direction: row !important;
  align-items: center;
  gap: 11px;
}

.community-author-meta {
  display: flex !important;
  min-width: 0;
  flex-direction: column !important;
  gap: 3px;
}

.community-author-meta > a {
  min-width: 0;
  text-decoration: none !important;
}

.community-author-meta strong {
  display: block;
  overflow: hidden;
  color: #f2fbf5 !important;
  font: 700 .82rem/1.2 "Space Grotesk", Arial, sans-serif !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.community-author-meta time {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #789184;
  font-size: .64rem;
  line-height: 1.3;
  white-space: nowrap;
}

.community-author-meta time::before {
  width: 5px;
  height: 5px;
  flex: none;
  border-radius: 50%;
  background: #35f27a;
  box-shadow: 0 0 0 3px rgba(53, 242, 122, .09);
  content: "";
}

.community-author-controls {
  display: flex !important;
  width: auto !important;
  flex: 0 0 auto;
  flex-direction: row !important;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}

.community-owner-actions {
  display: inline-flex !important;
  width: auto !important;
  margin: 0 !important;
  padding: 3px;
  flex-direction: row !important;
  align-items: center;
  gap: 4px !important;
  border: 1px solid rgba(142, 190, 164, .14);
  border-radius: 10px;
  background: rgba(255, 255, 255, .025);
}

.community-owner-actions form {
  display: flex;
  margin: 0;
}

.community-owner-actions a,
.community-owner-actions button {
  display: grid !important;
  width: 31px !important;
  min-width: 31px !important;
  height: 31px !important;
  padding: 0 !important;
  place-items: center !important;
  border: 1px solid transparent !important;
  border-radius: 7px !important;
  background: transparent !important;
  box-shadow: none !important;
  transition: color .16s, border-color .16s, background .16s, transform .16s;
}

.community-owner-actions svg {
  width: 15px !important;
  height: 15px !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 1.8 !important;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.community-owner-actions .post-action-edit {
  color: #7ee8a3 !important;
}

.community-owner-actions .post-action-edit:hover {
  border-color: rgba(53, 242, 122, .3) !important;
  background: rgba(53, 242, 122, .1) !important;
  color: #b7ffce !important;
  transform: translateY(-1px);
}

.community-owner-actions .post-action-delete {
  color: #ff8998 !important;
}

.community-owner-actions .post-action-delete:hover {
  border-color: rgba(255, 113, 132, .32) !important;
  background: rgba(255, 113, 132, .1) !important;
  color: #ffc0c8 !important;
  transform: translateY(-1px);
}

.community-owner-actions a:focus-visible,
.community-owner-actions button:focus-visible {
  outline: 3px solid rgba(53, 242, 122, .2) !important;
  outline-offset: 2px;
}

/* The shell stays fixed while only the pre element scrolls horizontally. */
.post-markdown-body .code-block-shell {
  position: relative;
  max-width: 100%;
  margin: 1.4em 0;
}

.post-markdown-body .code-block-shell > pre {
  margin: 0 !important;
  padding-top: 48px !important;
}

.post-markdown-body .code-copy-button {
  position: absolute;
  z-index: 3;
  top: 9px;
  right: 9px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(91, 245, 143, .24);
  border-radius: 8px;
  background: rgba(9, 24, 16, .96);
  color: #a8efbe;
  font: 700 .62rem/1 "DM Sans", Arial, sans-serif;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .22);
  cursor: pointer;
  transition: transform .16s, border-color .16s, background .16s, color .16s;
}

.post-markdown-body .code-copy-button svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.post-markdown-body .code-copy-button:hover {
  border-color: rgba(91, 245, 143, .5);
  background: #10271a;
  color: #d9ffe5;
  transform: translateY(-1px);
}

.post-markdown-body .code-copy-button:focus-visible {
  outline: 3px solid rgba(53, 242, 122, .24);
  outline-offset: 2px;
}

.post-markdown-body .code-copy-button.is-copied {
  border-color: rgba(53, 242, 122, .58);
  background: #12331f;
  color: #73ff9e;
}

@media (max-width: 600px) {
  .community-card-author {
    align-items: flex-start !important;
    flex-wrap: wrap;
    gap: 9px !important;
  }

  .community-author-identity {
    width: 100%;
  }

  .community-author-controls {
    width: 100% !important;
    justify-content: flex-end;
  }

  .community-owner-actions {
    width: auto !important;
    margin: 0 !important;
  }

  .post-markdown-body .code-block-shell {
    margin-right: -4px;
    margin-left: -4px;
  }

  .post-markdown-body .code-block-shell > pre {
    padding: 46px 17px 17px !important;
    border-radius: 9px;
  }

  .post-markdown-body .code-copy-button {
    top: 8px;
    right: 8px;
  }
}

/* AJAX heart reaction */
.post-like-form {
  position: relative;
  display: inline-flex;
  margin: 0;
  align-items: center;
}

.post-like-button {
  display: inline-flex;
  min-height: 38px;
  padding: 6px 11px 6px 7px;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(151, 186, 166, .14);
  border-radius: 11px;
  background: rgba(255, 255, 255, .025);
  color: #8ea399;
  font: 700 .72rem/1 "DM Sans", Arial, sans-serif;
  text-decoration: none !important;
  cursor: pointer;
  transition: color .18s, border-color .18s, background .18s, transform .12s, box-shadow .18s;
}

.post-like-heart {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, .035);
  transition: background .18s, transform .18s;
}

.post-like-heart svg {
  width: 17px;
  height: 17px;
  fill: transparent;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: fill .18s, stroke .18s, transform .18s, filter .18s;
}

.post-like-button strong {
  min-width: 1ch;
  color: #d9e6df;
  font-size: .73rem;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.post-like-label {
  color: inherit;
  font-size: .66rem;
}

.post-like-button:hover {
  border-color: rgba(53, 242, 122, .34);
  background: rgba(53, 242, 122, .075);
  color: #79f7a6;
  transform: translateY(-1px);
}

.post-like-button:active {
  transform: translateY(0) scale(.97);
}

.post-like-button:focus-visible {
  outline: 3px solid rgba(53, 242, 122, .2);
  outline-offset: 2px;
}

.post-like-button.is-liked {
  border-color: rgba(53, 242, 122, .38);
  background: linear-gradient(135deg, rgba(53, 242, 122, .14), rgba(53, 242, 122, .045));
  color: #45f584;
  box-shadow: inset 0 0 0 1px rgba(116, 255, 167, .04), 0 8px 24px rgba(3, 76, 30, .13);
}

.post-like-button.is-liked .post-like-heart {
  background: rgba(53, 242, 122, .13);
}

.post-like-button.is-liked .post-like-heart svg {
  fill: #35f27a;
  stroke: #35f27a;
  filter: drop-shadow(0 3px 7px rgba(53, 242, 122, .3));
}

.post-like-button.is-liked strong {
  color: #8dffb4;
}

.post-like-button.is-animating .post-like-heart {
  animation: post-heart-pop .42s cubic-bezier(.2, .8, .3, 1.35);
}

.post-like-button.is-loading {
  opacity: .65;
  cursor: wait;
}

.post-like-button.is-loading .post-like-heart {
  animation: post-heart-loading .7s ease-in-out infinite alternate;
}

.post-like-button:disabled {
  pointer-events: none;
}

.post-like-button-large {
  min-height: 44px;
  padding: 7px 14px 7px 8px;
  border-radius: 12px;
}

.post-like-button-large .post-like-heart {
  width: 30px;
  height: 30px;
}

.post-like-button-large .post-like-heart svg {
  width: 19px;
  height: 19px;
}

.post-like-status {
  position: absolute;
  overflow: hidden;
  width: 1px;
  height: 1px;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.post-like-form.has-error .post-like-button {
  border-color: rgba(255, 113, 132, .5);
  animation: post-like-shake .25s ease-in-out 2;
}

@keyframes post-heart-pop {
  0% { transform: scale(.82); }
  45% { transform: scale(1.24) rotate(-7deg); }
  100% { transform: scale(1); }
}

@keyframes post-heart-loading {
  from { transform: scale(.88); opacity: .55; }
  to { transform: scale(1.06); opacity: 1; }
}

@keyframes post-like-shake {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(3px); }
}

@media (max-width: 600px) {
  .post-like-button {
    min-height: 40px;
    padding-right: 10px;
  }

}

.community-comments-toggle {
  min-height: 38px;
  border: 1px solid rgba(151, 186, 166, .14) !important;
  border-radius: 11px !important;
  background: rgba(255,255,255,.025) !important;
  color: #91a79b !important;
}

.community-comments-toggle:hover,
.community-comments-toggle.is-open {
  border-color: rgba(53,242,122,.32) !important;
  background: rgba(53,242,122,.07) !important;
  color: #78f5a3 !important;
}

.community-comment-icon {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 8px;
  background: rgba(53,242,122,.065);
}

.community-comment-icon svg {
  width: 17px !important;
  height: 17px !important;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.community-comments-toggle strong {
  min-width: 1ch;
  font-size: .73rem;
  font-variant-numeric: tabular-nums;
}

.cc-comment.is-removing {
  opacity: 0;
  transform: translateY(-5px) scale(.985);
  transition: opacity .18s ease, transform .18s ease;
}

.community-page .cc-reply-form[hidden] {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .post-like-button,
  .post-like-heart,
  .post-like-heart svg {
    transition: none;
  }

  .post-like-button.is-animating .post-like-heart,
  .post-like-button.is-loading .post-like-heart,
  .post-like-form.has-error .post-like-button {
    animation: none;
  }
}
