/**
 * Comments on posts, from the approved design (site/mockups/blog-post-comments.html) mapped onto
 * core's comment blocks (parts/post-comments.html) and comment_form() markup (inc/blog-comments.php).
 * Hairlines between comments; the post author's replies are the one tinted surface.
 */

:root .talk { margin-top: 56px; }
:root .talk__head h2 { margin: 0; font-size: 1.625rem; font-weight: 700; line-height: 1.15; letter-spacing: -0.03em; }
:root .talk__head p { margin: 8px 0 0; color: var(--muted); font-size: 1rem; line-height: 1.55; text-wrap: pretty; }
:root .talk__empty { margin: 18px 0 0; padding: 22px 0; border-block: 1px solid var(--line); color: #3d3654; font-size: 1rem; }

/* The list and its nesting: one indent level, deeper replies line up with their parent's reply. */
:root .talk .wp-block-comment-template,
:root .talk .wp-block-comment-template ol { margin: 0; padding: 0; list-style: none; }
:root .talk .wp-block-comment-template { margin-top: 24px; border-top: 1px solid var(--line); }
:root .talk .wp-block-comment-template > li { padding: 24px 0; border-bottom: 1px solid var(--line); }
:root .talk .wp-block-comment-template > li > ol { margin-top: 18px; padding-left: 58px; }
:root .talk .wp-block-comment-template ol li + li,
:root .talk .wp-block-comment-template ol ol { margin-top: 12px; }

/* One comment. */
:root .talk .cmt { display: grid; grid-template-columns: 44px 1fr; gap: 0 14px; }
:root .talk .cmt > * { margin-block: 0; }
:root .talk .cmt__avatar { grid-row: span 1; }
:root .talk .cmt__avatar img { display: block; width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: var(--tint); }
:root .talk .cmt__meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; min-height: 22px; align-self: center; }
:root .talk .cmt__meta > * { margin-block: 0; }
:root .talk .cmt__name { font-size: 1rem; font-weight: 600; }
:root .talk .cmt__name a { color: inherit; text-decoration: none; transition: color 0.2s ease; }
:root .talk .cmt__name a:hover { color: var(--purple-deep); }
:root .talk .cmt__badge { display: inline-flex; align-items: center; align-self: center; height: 22px; padding: 0 8px; border-radius: 999px; background: var(--tint); color: var(--purple-deep); font-size: 0.8125rem; font-weight: 600; line-height: 1; }
:root .talk .cmt__date { font-size: 0.875rem; }
:root .talk .cmt__date a { color: var(--muted); text-decoration: none; transition: color 0.2s ease; }
:root .talk .cmt__date a:hover { color: var(--purple-deep); }
:root .talk .cmt__body { grid-column: 2; margin-top: 6px; color: #3d3654; font-size: 1rem; line-height: 1.6; text-wrap: pretty; overflow-wrap: anywhere; }
:root .talk .cmt__body p { margin: 0; }
:root .talk .cmt__body p + p { margin-top: 10px; }
:root .talk .cmt__body a { color: var(--purple-deep); text-decoration: underline; text-decoration-color: var(--line-hover); text-decoration-thickness: 1.5px; text-underline-offset: 3px; transition: color 0.2s ease; }
:root .talk .cmt__body a:hover { color: var(--purple); }
:root .talk .cmt__reply { grid-column: 2; justify-self: start; margin-top: 10px; font-size: 0.9375rem; }
:root .talk .cmt__reply a { display: inline-flex; align-items: center; gap: 6px; padding: 4px 0; color: var(--purple-deep); font-weight: 600; text-decoration: none; transition: color 0.2s ease; }
:root .talk .cmt__reply a::before { content: ""; width: 15px; height: 15px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 14 4 9l5-5M4 9h10.5a5.5 5.5 0 0 1 0 11H11'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 14 4 9l5-5M4 9h10.5a5.5 5.5 0 0 1 0 11H11'/%3E%3C/svg%3E") center / contain no-repeat; }
:root .talk .cmt__reply a:hover { color: var(--purple); }
:root .talk .cmt__held { display: flex; gap: 8px; margin: 2px 0 10px; padding: 10px 12px; border-radius: 10px; background: var(--tint); color: #4a2a86; font-size: 0.9375rem; line-height: 1.45; }
:root .talk .cmt__held svg { flex: none; margin-top: 1px; }
/* A comment still waiting for approval can't take replies yet. */
:root .talk .cmt:has(.cmt__held) .cmt__reply { display: none; }

/* The post author's comments. */
:root .talk .bypostauthor > .cmt { padding: 18px 18px 16px; border-radius: 16px; background: var(--soft); box-shadow: inset 0 0 0 1px var(--tint); }
:root .talk .bypostauthor > .cmt .cmt__avatar img { box-shadow: 0 0 0 3px #fff; }

/* The form. comment-reply.js moves #respond under the comment being answered. */
:root .talk .reply { margin-top: 36px; padding: clamp(22px, 2.6vw, 30px); border: 1px solid #e2dcec; border-radius: var(--radius); background: #fff; }
:root .talk .wp-block-comment-template .reply { margin: 18px 0 0; }
:root .talk .comment-reply-title { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; margin: 0; font-size: 1.3125rem; font-weight: 600; line-height: 1.25; letter-spacing: -0.015em; }
:root .talk .reply__cancel { font-size: 0.9375rem; font-weight: 500; letter-spacing: 0; }
:root .talk .reply__cancel a,
:root .talk .comment-notes a,
:root .talk .logged-in-as a { color: var(--purple-deep); text-decoration: underline; text-decoration-color: var(--line-hover); text-decoration-thickness: 1.5px; text-underline-offset: 3px; transition: color 0.2s ease; }
:root .talk .reply__cancel a:hover,
:root .talk .comment-notes a:hover,
:root .talk .logged-in-as a:hover { color: var(--purple); }
:root .talk .comment-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 8px 0 0; }
:root .talk .comment-form > * { grid-column: 1 / -1; margin: 0; }
:root .talk .comment-form > .comment-form-author,
:root .talk .comment-form > .comment-form-email { grid-column: auto; }
:root .talk .comment-notes,
:root .talk .logged-in-as { margin: 0 0 6px; color: var(--muted); font-size: 0.9375rem; line-height: 1.5; text-wrap: pretty; }
:root .talk .comment-form label { display: block; margin: 0 0 6px; font-size: 0.9375rem; font-weight: 600; }
:root .talk .comment-form label span { color: var(--muted); font-weight: 400; }
:root .talk .comment-form input:not([type=checkbox]):not([type=hidden]),
:root .talk .comment-form textarea { display: block; width: 100%; box-sizing: border-box; margin: 0; padding: 12px 14px; border: 1.5px solid #d6cfe3; border-radius: 12px; background: #fff; color: var(--text); font: inherit; font-size: 1rem; line-height: 1.5; transition: border-color 0.2s ease; }
:root .talk .comment-form input:not([type=checkbox]):not([type=hidden]) { height: 50px; }
:root .talk .comment-form textarea { min-height: 148px; resize: vertical; }
:root .talk .comment-form input:not([type=checkbox]):hover,
:root .talk .comment-form textarea:hover { border-color: var(--line-hover); }
:root .talk .comment-form input:not([type=checkbox]):focus,
:root .talk .comment-form textarea:focus { border-color: var(--purple); outline: 0; }
:root .talk .comment-form input:not([type=checkbox]):focus-visible,
:root .talk .comment-form textarea:focus-visible { outline: 2px solid var(--purple); outline-offset: 2px; }
:root .talk .comment-form-cookies-consent { display: flex; align-items: flex-start; gap: 10px; margin-top: 2px; }
:root .talk .comment-form-cookies-consent input { flex: none; width: 20px; height: 20px; margin: 0; accent-color: var(--purple); }
:root .talk .comment-form-cookies-consent label { margin: 0; color: var(--muted); font-size: 0.9375rem; font-weight: 400; line-height: 1.45; cursor: pointer; }
:root .talk .form-submit { margin-top: 6px; }

@media (max-width: 600px) {
	:root .talk .wp-block-comment-template > li > ol { margin-left: 21px; padding-left: 18px; border-left: 2px solid var(--line); }
	:root .talk .cmt { grid-template-columns: 36px 1fr; gap: 0 12px; }
	:root .talk .cmt__avatar img { width: 36px; height: 36px; }
	:root .talk .bypostauthor > .cmt { padding: 14px 14px 12px; }
	:root .talk .cmt__body,
	:root .talk .cmt__reply { grid-column: 1 / -1; }
	:root .talk .comment-form { grid-template-columns: 1fr; }
	:root .talk .comment-form > .comment-form-author,
	:root .talk .comment-form > .comment-form-email { grid-column: 1 / -1; }
	:root .talk .form-submit .btn { width: 100%; }
}
