/* comments.css: styles for the live comment section in the manga detail dialog */

/* whole comments tab laid out as a column */
.cmt_root { display: grid; gap: 16px; }

/* the "N reading now" line */
.cmt_live { display: flex; align-items: center; gap: 8px; min-height: 18px; color: var(--muted); font-size: 13px; }

/* pulsing red dot that shows the feed is live */
.cmt_live_dot { width: 8px; height: 8px; border-radius: 50%; background: var(--color_teal); box-shadow: 0 0 0 4px var(--tint_teal); animation: pulse 1.6s ease infinite; }

/* comment box for signed in users */
.cmt_composer { display: grid; gap: 8px; background: var(--panel_raised); border: 0; border-radius: var(--radius_lg); padding: 8px; }

/* text area inside the composer and the edit box */
.cmt_composer textarea, .cmt_edit textarea { width: 100%; box-sizing: border-box; background: var(--panel); color: var(--paper); border: 1px solid transparent; border-radius: var(--radius_small); padding: 10px 12px; font: inherit; min-height: 76px; resize: vertical; }

/* red outline when typing */
.cmt_composer textarea:focus, .cmt_edit textarea:focus { outline: none; border-color: var(--seal); }

/* counter, hint and post button row */
.cmt_composer_row { display: flex; align-items: center; gap: 12px; }

/* character counter */
.cmt_counter { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }

/* keyboard shortcut hint pushes the button right */
.cmt_hint { color: var(--muted); font-size: 12px; margin-right: auto; }

/* disabled post button looks inactive */
.cmt_composer button:disabled { opacity: 0.45; cursor: not-allowed; }

/* sign in prompt for visitors */
.cmt_signin { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; background: var(--tint_periwinkle); border: 0; border-radius: var(--radius_small); padding: 14px 16px; }

/* prompt text */
.cmt_signin p { margin: 0; color: var(--paper); }

/* list of comments */
.cmt_list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }

/* one comment card with avatar on the left */
.cmt_item { display: grid; grid-template-columns: 36px 1fr; gap: 12px; background: var(--panel_raised); border-radius: var(--radius_small); padding: 12px 14px; border-left: 3px solid transparent; }

/* comments that just arrived slide in with a red edge */
.cmt_item.is_fresh { border-left-color: var(--color_teal); animation: cmt_slide_in var(--duration_slow) var(--ease_out) both; }

/* hidden comments look faded for moderators */
.cmt_item.is_hidden { opacity: 0.55; }

/* round avatar with the first letter of the username */
.cmt_avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--seal); color: var(--color_on_accent); font-weight: 700; }

/* text column can shrink on small screens */
.cmt_main { min-width: 0; }

/* name, time and tags on one line */
.cmt_head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; font-size: 14px; }

/* time text */
.cmt_time { color: var(--muted); font-size: 12px; }

/* small labels like edited, hidden, you */
.cmt_tag { font-size: 12px; padding: 1px 7px; border-radius: 999px; border: 1px solid transparent; background: var(--tint_paper); color: var(--muted); }

/* hidden label in red */
.cmt_tag_hidden { border-color: var(--color_coral); color: var(--color_coral); }

/* label on your own comments */
.cmt_tag_you { border-color: var(--paper); color: var(--paper); }

/* comment text keeps line breaks and wraps long words */
.cmt_text { margin: 4px 0 0; white-space: pre-line; overflow-wrap: anywhere; line-height: 1.55; }

/* row of small text buttons under a comment */
.cmt_actions { display: flex; gap: 14px; margin-top: 8px; }

/* text style action buttons */
.cmt_action { background: none; border: 0; padding: 0; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; }

/* action hover */
.cmt_action:hover, .cmt_action:focus-visible { color: var(--paper); text-decoration: underline; }

/* inline edit area */
.cmt_edit { display: grid; gap: 8px; margin-top: 6px; }

/* save and cancel buttons */
.cmt_edit_row { display: flex; gap: 8px; }

/* load older comments button */
.cmt_more { justify-self: center; margin-top: 12px; display: block; margin-left: auto; margin-right: auto; }

/* empty list message */
.cmt_empty { text-align: center; padding: 18px 0; }

/* slide in animation for live comments */
@keyframes cmt_slide_in { from { opacity: 0; transform: translateY(-10px) scale(0.99); } to { opacity: 1; transform: translateY(0) scale(1); } }

/* phone width tweaks */
@media (max-width: 560px) {
  /* hide the keyboard hint on phones */
  .cmt_hint { display: none; }
  /* push the button right without the hint */
  .cmt_counter { margin-right: auto; }
}

/* author name on comments whose author deleted their account */
.cmt_deleted_author { font-style: italic; color: var(--muted); font-weight: 500; }
