/* comments-ui.css - the amber belongs to "this is public".
 *
 * Deliberately not the brand lime: lime is what this dashboard uses for things
 * you press, and "your reply will be visible to everyone" is a state to notice,
 * not a button to hit. One colour, used in three places that all mean the same
 * thing - the label on the card, the strip naming the post, the bar over the
 * composer - so the warning reads as one idea rather than three decorations.
 */

:root {
  --crm-public: #8a5a00;
  --crm-public-bg: #fdf3cf;
  --crm-public-line: #e8cf86;
}

.dark, [data-theme="dark"] {
  --crm-public: #f0c95a;
  --crm-public-bg: #3a2f0c;
  --crm-public-line: #5c4a15;
}

/* ---- the post a comment was left under ---- */

.crm-post-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  background: var(--crm-public-bg);
  border-bottom: 1px solid var(--crm-public-line);
  color: var(--crm-public);
  font-size: 12.5px;
  line-height: 1.4;
  flex: none;
}

.crm-post-strip > svg, .crm-post-strip > i {
  width: 14px;
  height: 14px;
  flex: none;
  font-size: 14px;
  line-height: 0;
}

.crm-post-strip__text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-post-strip__label {
  font-weight: 600;
}

.crm-post-strip__link {
  margin-inline-start: auto;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
  flex: none;
}

.crm-post-strip__link:hover {
  opacity: .75;
}

/* ---- the warning over the composer ---- */

.crm-public-warning {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--crm-public-bg);
  border-bottom: 1px solid var(--crm-public-line);
  color: var(--crm-public);
  font-size: 12.5px;
  line-height: 1.4;
}

.crm-public-warning > svg, .crm-public-warning > i {
  width: 14px;
  height: 14px;
  flex: none;
  font-size: 14px;
  line-height: 0;
}

.crm-public-warning b {
  font-weight: 600;
}

/* The reply box rounds its own corners; the bar sits inside it, so it has to
   follow them or it pokes out at the top. */
.crm-comment-view .reply-box {
  overflow: hidden;
}

/* ---- the send button, once it is a publish button ---- */

.crm-comment-view .reply-box [data-crm-send-renamed] {
  white-space: nowrap;
}

@media (prefers-reduced-motion: no-preference) {
  .crm-post-strip,
  .crm-public-warning {
    animation: crm-public-in .18s ease-out;
  }

  @keyframes crm-public-in {
    from { opacity: 0; }
    to   { opacity: 1; }
  }
}

/* --------------------------------------------------------------------------
   Hiding a comment

   Quiet by default: this sits under every incoming comment, and most of them
   are ordinary questions nobody wants to hide. It only gains colour once a
   comment IS hidden, because that is a state someone needs to notice.
   -------------------------------------------------------------------------- */
.crm-mod {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  font-size: 11.5px;
}

.crm-mod-btn {
  background: transparent;
  border: 1px solid var(--crm-mod-edge, #d7dbd2);
  color: var(--crm-mod-ink, #55606c);
  border-radius: 999px;
  padding: 1px 10px;
  font-size: 11px;
  font-family: inherit;
  cursor: pointer;
  line-height: 1.7;
}
.crm-mod-btn:hover:not(:disabled) { border-color: var(--crm-public); color: var(--crm-public); }
.crm-mod-btn:disabled { opacity: .55; cursor: default; }

.crm-mod-state {
  color: var(--crm-public);
  font-weight: 600;
}

.crm-mod-error {
  color: #b91c1c;
  max-width: 34ch;
  line-height: 1.4;
}

:root.dark, .dark, [data-theme="dark"] {
  --crm-mod-edge: #3a4048;
  --crm-mod-ink: #98a1ad;
}

/* --------------------------------------------------------------------------
   The private reply

   It opens in place, under the comment it answers, because that is the only
   context in which it makes sense - a private reply detached from the
   comment that prompted it is just a message.
   -------------------------------------------------------------------------- */
.crm-mod-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.crm-mod-btn.is-primary {
  background: var(--crm-public-bg);
  border-color: var(--crm-public-line);
  color: var(--crm-public);
  font-weight: 600;
}

.crm-mod-muted { color: var(--crm-mod-ink, #55606c); }

.crm-pr-box {
  margin-top: 8px;
  padding: 10px 11px;
  border: 1px solid var(--crm-mod-edge, #d7dbd2);
  border-radius: 8px;
  max-width: 460px;
}

/* Said before the box is typed into, not after it is sent. */
.crm-pr-note {
  margin: 0 0 8px;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--crm-mod-ink, #55606c);
}

.crm-pr-text {
  width: 100%;
  resize: vertical;
  background: transparent;
  color: inherit;
  border: 1px solid var(--crm-mod-edge, #d7dbd2);
  border-radius: 8px;
  padding: 8px 9px;
  font: inherit;
  font-size: 13px;
  margin-bottom: 8px;
}
.crm-pr-text:focus { outline: 2px solid var(--crm-public); outline-offset: 1px; }

.crm-pr-actions { display: flex; gap: 8px; }

/* ---- the post, visible (2026-09-17) ---- */
.crm-post-strip__text { display: flex; align-items: center; gap: 8px; }
.crm-post-strip__url {
  color: inherit;
  opacity: .85;
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  unicode-bidi: isolate;
}
.crm-post-strip__url:hover { opacity: 1; }
.crm-post-strip .crm-post-strip__link,
.crm-post-strip .crm-post-strip__copy {
  flex: none;
  padding: 3px 10px;
  border: 1px solid currentColor;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.crm-post-strip .crm-post-strip__copy { margin-inline-start: 0; }
.crm-post-strip .crm-post-strip__link:hover,
.crm-post-strip .crm-post-strip__copy:hover { opacity: 1; background: var(--crm-public-line); }
