/* Comment section shared by all themes. Colours inherit from the theme;
   --accent sets the highlight colour. */
.yc-comments { --yc-line: rgba(127, 127, 127, .18); --yc-muted: rgba(127, 127, 127, .95); margin: 3em 0 1em; font-size: 15px; line-height: 1.7; }
/* Themes often reset line-height on every element or style #comments h3. */
.yc-comments :where(div, p, li, ol, span, time, button) { line-height: inherit; }
#comments .yc-title { position: relative; margin: 0 0 .5em; padding: 0 0 .6em; text-align: left; line-height: 1.4; font-size: 1.25em; font-weight: 600; border-bottom: 1px solid var(--yc-line); }
#comments .yc-title::after { content: ""; position: absolute; left: 0; bottom: -1px; width: 48px; height: 2px; background: var(--accent, #5c8b59); }
.yc-list, .yc-replies { list-style: none; margin: 0; padding: 0; }
.yc-thread { padding: 1.4em 0; border-bottom: 1px solid var(--yc-line); }
.yc-replies { margin: 1.1em 0 0 26px; padding-left: 30px; border-left: 2px solid var(--yc-line); }
.yc-replies > li + li { margin-top: 1.1em; }

.yc-item { display: flex; gap: 14px; scroll-margin-top: 80px; margin: -6px; padding: 6px; border-radius: 8px; transition: background .6s; }
.yc-item.yc-hl { background: rgba(255, 200, 0, .15); }
.yc-avatar { width: 48px; height: 48px; border-radius: 50%; flex: none; object-fit: cover; background: rgba(127, 127, 127, .12); box-shadow: 0 0 0 1px var(--yc-line); }
.yc-replies .yc-avatar { width: 38px; height: 38px; }
.yc-body { flex: 1; min-width: 0; }
.yc-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; line-height: 1.4; }
.yc-author { font-weight: 600; font-size: 1.02em; }
.yc-author a { color: inherit; text-decoration: none; border-bottom: 1px dotted var(--yc-line); }
.yc-author a:hover { color: var(--accent, #5c8b59); }
.yc-admin .yc-author { color: var(--accent, #5c8b59); }
.yc-badge {
  padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 500; line-height: 1.4;
  color: var(--accent, #5c8b59); background: color-mix(in srgb, var(--accent, #5c8b59) 12%, transparent);
}
.yc-to { font-size: .85em; color: var(--yc-muted); }
.yc-text { margin: .35em 0 .3em; font-size: 1.05em; overflow-wrap: anywhere; }
.yc-text p { margin: 0 0 .6em; }
.yc-text p:last-child { margin-bottom: 0; }
.yc-text a { color: var(--accent, #5c8b59); }
.yc-text code { padding: 1px 5px; border-radius: 3px; font-size: .9em; background: rgba(127, 127, 127, .12); }
.yc-foot { display: flex; align-items: center; gap: 14px; font-size: .82em; color: var(--yc-muted); }
.yc-reply { display: none; padding: 0; border: 0; background: none; color: var(--yc-muted); font: inherit; font-weight: 600; cursor: pointer; }
.yc-reply::before { content: "↩ "; }
.yc-reply:hover { color: var(--accent, #5c8b59); }
.yc-open .yc-reply { display: inline; }

.yc-form { margin-top: 1.75em; display: grid; gap: 12px; }
.yc-thread .yc-form { margin: 1.1em 0 0 62px; }
.yc-replies .yc-form { margin-left: 0; }
.yc-form textarea, .yc-form input {
  box-sizing: border-box; width: 100%; margin: 0; padding: 10px 12px; font: inherit; color: inherit;
  background: rgba(127, 127, 127, .06); border: 1px solid var(--yc-line); border-radius: 6px;
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.yc-form textarea { resize: vertical; min-height: 7em; }
.yc-form textarea:focus, .yc-form input:focus {
  outline: none; background: var(--card, #fff); border-color: var(--accent, #5c8b59);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent, #5c8b59) 15%, transparent);
}
.yc-fields { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.yc-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.yc-actions button {
  padding: 9px 22px; border: 0; border-radius: 6px; font: inherit; font-weight: 600; cursor: pointer;
  background: var(--accent, #5c8b59); color: #fff; transition: filter .2s;
}
.yc-actions button:hover { filter: brightness(1.08); }
.yc-actions button:disabled { opacity: .6; cursor: default; }
.yc-msg { font-size: .9em; }
.yc-msg.yc-err { color: #c0392b; }
.yc-replying { font-size: .9em; color: var(--yc-muted); }
.yc-replying b { color: inherit; }
.yc-replying .yc-cancel { margin-left: 8px; padding: 0; border: 0; background: none; color: var(--accent, #5c8b59); font: inherit; cursor: pointer; }
.yc-notice { margin-top: 1em; padding: .7em 1em; border-radius: 6px; background: color-mix(in srgb, var(--accent, #5c8b59) 12%, transparent); }
.yc-closed { margin-top: 1.25em; color: var(--yc-muted); }
.yc-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

@media (max-width: 640px) {
  .yc-fields { grid-template-columns: 1fr; }
  .yc-replies { margin-left: 8px; padding-left: 16px; }
  .yc-thread .yc-form { margin-left: 0; }
  .yc-avatar { width: 40px; height: 40px; }
  .yc-replies .yc-avatar { width: 34px; height: 34px; }
}
