/* WristBuzz comments section. Loaded by article pages that include
   wb_comments_render_section() from _comments.php. The visual register
   matches the article-page surface (white card, soft shadow, restrained
   typography); it shouldn't read as a separate widget. */

.wb-c {
  margin: 16px 0 0;
  padding: 20px 0 0;
  border-top: 1px solid var(--border, #E4E7EE);
  font-family: 'Inter', sans-serif;
}
.wb-c-h {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.3px;
  margin: 0 0 18px;
  color: var(--accent, #5B4EFA);
  display: flex;
  align-items: center;
  gap: 10px;
}
.wb-c-h-ico {
  width: 22px;
  height: 22px;
  color: var(--accent, #5B4EFA);
  flex-shrink: 0;
}
.wb-c-count {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted, #6B7280);
  background: var(--surface, #F7F8FF);
  border: 1px solid var(--border, #E4E7EE);
  padding: 2px 9px;
  border-radius: 999px;
}
.wb-c-empty {
  color: var(--muted, #6B7280);
  font-size: 14.5px;
  background: var(--surface, #F7F8FF);
  border: 1px dashed var(--border, #E4E7EE);
  border-radius: 12px;
  padding: 20px 22px;
  margin: 0 0 24px;
}

.wb-c-list { list-style: none; padding: 0; margin: 0 0 32px; display: flex; flex-direction: column; gap: 18px; }
.wb-c-item {
  background: #fff;
  border: 1px solid var(--border, #E4E7EE);
  border-radius: 14px;
  padding: 18px 20px 16px;
  scroll-margin-top: 80px;
}
.wb-c-item.is-reply {
  margin-top: 12px;
  border-left: 3px solid var(--accent, #5B4EFA);
  background: var(--surface, #F7F8FF);
}
/* Admin reply ("WristBuzz" team comment): a slightly louder treatment so
   readers notice it as an official response, not another community reply. */
.wb-c-item.is-admin {
  border-left-width: 3px;
  border-left-color: var(--accent, #5B4EFA);
  background: linear-gradient(180deg, rgba(91,78,250,.06) 0%, rgba(91,78,250,.02) 100%);
  box-shadow: inset 0 0 0 1px rgba(91,78,250,.15);
}
.wb-c-replies { list-style: none; padding: 0 0 0 16px; margin: 14px 0 0; display: flex; flex-direction: column; gap: 10px; }

.wb-c-author-wb {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--accent, #5B4EFA) !important;
  font-weight: 800 !important;
  font-style: normal !important;
}
.wb-c-wb-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent, #5B4EFA);
  flex-shrink: 0;
}
.wb-c-wb-icon svg { width: 16px; height: 16px; display: block; }
.wb-c-badge {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--accent, #5B4EFA);
  background: rgba(91,78,250,.12);
  border: 1px solid rgba(91,78,250,.25);
  padding: 1px 7px 2px;
  border-radius: 999px;
  line-height: 1.4;
}

.wb-c-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.wb-c-author {
  font-size: 14px;
  font-weight: 800;
  color: var(--text, #0A0A14);
  letter-spacing: -.1px;
}
.wb-c-author.is-anon { color: var(--muted, #6B7280); font-weight: 700; font-style: italic; }
.wb-c-replyto { font-size: 11.5px; color: var(--soft, #9CA3AF); font-weight: 500; }
.wb-c-when {
  font-size: 11.5px;
  color: var(--soft, #9CA3AF);
  margin-left: auto;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.wb-c-body {
  font-size: 14.5px;
  line-height: 1.65;
  color: #1F2937;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}
.wb-c-actions { margin-top: 10px; }
.wb-c-reply-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  color: var(--accent, #5B4EFA);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .02em;
  cursor: pointer;
  padding: 4px 0;
}
.wb-c-reply-btn:hover { text-decoration: underline; }
.wb-c-reply-btn::before {
  content: '';
  width: 14px; height: 14px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235B4EFA' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><polyline points='9 17 4 12 9 7'/><path d='M20 18v-2a4 4 0 0 0-4-4H4'/></svg>");
  background-repeat: no-repeat; background-position: center; background-size: contain;
}

/* Default state: the comment form sits collapsed behind a "Leave a comment"
   button. Clicking the trigger (or any "Reply" link on a comment) reveals
   the form, which has its own × close to put it back. */
.wb-c-form-trigger {
  display: flex;
  justify-content: flex-start;
}
.wb-c-form-trigger[hidden] { display: none; }
.wb-c-form-open {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent, #5B4EFA);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 13px 22px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .01em;
  cursor: pointer;
  transition: background .15s, transform .12s, box-shadow .15s;
  box-shadow: 0 4px 14px rgba(91,78,250,.18);
}
.wb-c-form-open:hover { background: var(--accent-h, #4338E8); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(91,78,250,.25); }
.wb-c-form-open:active { transform: translateY(0); }

.wb-c-form {
  position: relative;
  background: #fff;
  border: 1.5px solid var(--border, #E4E7EE);
  border-radius: 16px;
  padding: 24px 24px 22px;
  margin: 0;
}
.wb-c-form[hidden] { display: none; }
.wb-c-form-close {
  position: absolute;
  top: 12px; right: 14px;
  background: none;
  border: none;
  color: var(--soft, #9CA3AF);
  font-size: 24px;
  font-weight: 400;
  line-height: 1;
  width: 30px; height: 30px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.wb-c-form-close:hover { background: var(--surface, #F7F8FF); color: var(--text, #0A0A14); }
.wb-c-form-h {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -.2px;
  margin: 0 0 4px;
  color: var(--text, #0A0A14);
}
.wb-c-form-sub {
  font-size: 13px;
  color: var(--muted, #6B7280);
  margin: 0 0 16px;
  line-height: 1.5;
}
.wb-c-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
@media (max-width: 640px) { .wb-c-row { grid-template-columns: 1fr; } }
.wb-c-field { display: flex; flex-direction: column; gap: 5px; }
.wb-c-field span {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted, #6B7280);
  letter-spacing: .02em;
}
.wb-c-field span em { font-style: normal; color: var(--soft, #9CA3AF); font-weight: 500; margin-left: 4px; }
.wb-c-field input,
.wb-c-field textarea {
  font-family: inherit;
  font-size: 14.5px;
  color: var(--text, #0A0A14);
  background: var(--surface, #F7F8FF);
  border: 1.5px solid var(--border, #E4E7EE);
  border-radius: 10px;
  padding: 10px 12px;
  outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
  width: 100%;
  box-sizing: border-box;
}
.wb-c-field textarea { min-height: 110px; resize: vertical; line-height: 1.55; }
.wb-c-field input:focus,
.wb-c-field textarea:focus {
  border-color: var(--accent, #5B4EFA);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(91,78,250,.10);
}

/* Honeypot must be visually invisible AND keyboard-skipped, but still
   parse-able by lazy bots that fill any <input>. The display:none variant
   gets ignored by some scripted submitters; this off-screen approach
   triggers the broader range. */
.wb-c-hp {
  position: absolute !important;
  left: -9999px !important;
  top: -9999px !important;
  width: 1px; height: 1px;
  opacity: 0;
  pointer-events: none;
}

.wb-c-reply-banner {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent, #5B4EFA);
  background: rgba(91,78,250,.08);
  border: 1px solid rgba(91,78,250,.20);
  border-radius: 10px;
  padding: 9px 14px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.wb-c-reply-banner strong { font-weight: 800; color: var(--text, #0A0A14); }
.wb-c-reply-cancel {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--muted, #6B7280);
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  padding: 0 4px;
  cursor: pointer;
}
.wb-c-reply-cancel:hover { color: var(--text, #0A0A14); }

.wb-c-form-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
}
.wb-c-submit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent, #5B4EFA);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 11px 20px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: .02em;
  cursor: pointer;
  transition: background .15s, transform .12s;
}
.wb-c-submit:hover { background: var(--accent-h, #4338E8); }
.wb-c-submit:active { transform: translateY(1px); }
.wb-c-submit:disabled { opacity: .55; cursor: progress; }
.wb-c-form-msg {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted, #6B7280);
  flex: 1;
  min-height: 18px;
}
.wb-c-form-msg.is-ok { color: #047857; }
.wb-c-form-msg.is-err { color: #B91C1C; }
