/*
 * Blog comments ("Join the conversation"), in the studio design language (venda-studio.css tokens).
 * Markup: resources/views/site/partials/comments.blade.php + comment.blade.php. Behaviour: js/venda-comments.js.
 * Mobile first: one column; thread + sticky form side by side from 992px.
 */
.vc {
  --vc-gap: clamp(20px, 3vw, 32px);
  background: var(--st-panel, #F5F5F4);
  border-radius: var(--st-radius, 14px);
  padding-block: clamp(48px, 7vw, 100px);
  margin-block: 0 var(--st-gutter, 30px);
  color: var(--st-ink, #171D2E);
  font-family: var(--st-font);
  scroll-margin-top: 100px;
}
.vc__wrap { width: 100%; max-width: var(--st-container, 1326px); margin-inline: auto; padding-inline: var(--st-pad-x, 20px); }
body.venda-studio #st-page .vc__head { max-width: 760px; margin: 0 0 clamp(28px, 4vw, 48px); padding: 0; }
.vc .vc__pill { margin-bottom: 18px; background: #fff; }
body.venda-studio #st-page .vc__title {
  display: flex; align-items: center; flex-wrap: wrap; gap: 12px 16px;
  font-size: var(--st-h2); line-height: 1.05; letter-spacing: -.035em; margin: 0 0 14px; color: var(--st-ink);
}
body.venda-studio #st-page .vc__count {
  display: inline-grid; place-items: center; min-width: 1.6em; height: 1.6em; padding-inline: .45em;
  border-radius: 999px; background: var(--st-blue, #0052FF); color: #fff;
  font-size: .5em; font-weight: 700 !important; letter-spacing: 0; line-height: 1;
}
.vc__count[hidden] { display: none !important; }
body.venda-studio #st-page .vc__lead { font-size: var(--st-lead); line-height: 1.5; color: var(--st-text); margin: 0; max-width: 640px; }

body.venda-studio #st-page .vc__stats { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; }
body.venda-studio #st-page .vc__stat {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px;
  background: #fff; color: var(--st-ink-soft); font-size: 14px; line-height: 1.3;
}
body.venda-studio #st-page .vc__stat strong { color: var(--st-ink); font-weight: 700 !important; }
.vc__stat svg { flex: none; color: var(--st-blue); }

.vc__grid { display: grid; gap: var(--vc-gap); align-items: start; }
@media (min-width: 992px) {
  .vc__grid { grid-template-columns: minmax(0, 1fr) minmax(340px, 420px); }
  .vc__aside { position: sticky; top: 108px; }
}

/* ---------- Thread ---------- */
.vc-list, .vc-replies { list-style: none; margin: 0; padding: 0; }
.vc-list { display: grid; gap: 14px; }
.vc-list:empty { display: none; }
.vc-item { margin: 0; padding: 0; }
.vc-item::before { display: none !important; }
.vc-comment {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px;
  background: #fff; border-radius: var(--st-radius-sm, 10px); padding: clamp(16px, 2.4vw, 24px);
  border: 1px solid transparent; transition: border-color .3s, box-shadow .3s;
}
.vc-item:target > .vc-comment, .vc-item--new > .vc-comment { border-color: var(--st-blue); box-shadow: 0 0 0 4px rgba(0, 82, 255, .08); }
.vc-replies { display: grid; gap: 10px; margin-top: 10px; padding-left: clamp(18px, 4vw, 44px); position: relative; }
.vc-replies:empty { display: none; }
.vc-replies::before { content: ""; position: absolute; left: clamp(8px, 2vw, 22px); top: 0; bottom: 18px; width: 2px; border-radius: 2px; background: var(--st-line); }
.vc-replies .vc-comment { padding: clamp(14px, 2vw, 20px); }

.vc-avatar {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  font: 700 15px/1 var(--st-font); letter-spacing: .02em; flex: none; user-select: none;
}
.vc-replies .vc-avatar { width: 36px; height: 36px; font-size: 13px; }
.vc-avatar--0 { background: #171D2E; color: #fff; }
.vc-avatar--1 { background: #0052FF; color: #fff; }
.vc-avatar--2 { background: #DCE6FF; color: #0038B0; }
.vc-avatar--3 { background: #C6FF00; color: #171D2E; }
.vc-avatar--4 { background: #9DBBFF; color: #171D2E; }
.vc-avatar--5 { background: #ECECEA; color: #171D2E; }
.vc-avatar--team { background: #171D2E; color: #C6FF00; }

.vc-comment__meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; margin-bottom: 6px; }
body.venda-studio #st-page .vc-comment__name { font-weight: 700 !important; font-size: 16px; color: var(--st-ink); }
body.venda-studio #st-page .vc-comment__time { font-size: 14px; color: var(--st-ink-faint); }
body.venda-studio #st-page .vc-badge {
  display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 999px;
  font-size: 11px; font-weight: 700 !important; letter-spacing: .05em; text-transform: uppercase; line-height: 1.4;
}
body.venda-studio #st-page .vc-badge--team { background: var(--st-accent-soft); color: #0038B0; }
body.venda-studio #st-page .vc-badge--pending { background: #FFF4D6; color: #7A5200; }
body.venda-studio #st-page .vc-comment__body p { margin: 0 0 .7em; font-size: 16px; line-height: 1.65; color: var(--st-text); overflow-wrap: anywhere; }
body.venda-studio #st-page .vc-comment__body p:last-child { margin-bottom: 0; }
body.venda-studio #st-page .vc-comment__note { margin: 8px 0 0; font-size: 13px; color: #7A5200; }
.vc-item--pending > .vc-comment { border-style: dashed; border-color: #E8C26A; }

body.venda-studio #st-page .vc-reply {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; padding: 7px 12px 7px 10px; min-height: 36px;
  background: transparent; border: 1px solid var(--st-line); border-radius: 999px; cursor: pointer;
  font-size: 14px; font-weight: 700 !important; color: var(--st-ink); transition: background-color .2s, border-color .2s, color .2s;
}
body.venda-studio #st-page .vc-reply:hover { background: var(--st-ink); border-color: var(--st-ink); color: #fff; }
body.venda-studio #st-page .vc-reply:focus-visible { outline: 3px solid rgba(0, 82, 255, .35); outline-offset: 2px; }

/* Empty state */
.vc-empty {
  display: grid; justify-items: start; gap: 6px;
  background: #fff; border-radius: var(--st-radius-sm, 10px); padding: clamp(24px, 4vw, 40px);
  border: 1px dashed rgba(23, 29, 46, .18);
}
.vc-empty[hidden] { display: none; }
.vc-empty__icon { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--st-accent-soft); color: var(--st-blue); margin-bottom: 8px; }
body.venda-studio #st-page .vc-empty__title { margin: 0; font-size: var(--st-h4); font-weight: 700 !important; letter-spacing: -.02em; color: var(--st-ink); }
body.venda-studio #st-page .vc-empty__text { margin: 0 0 12px; color: var(--st-text); font-size: 16px; }

/* ---------- Form ---------- */
.vc-form { background: #fff; border-radius: var(--st-radius-sm, 10px); padding: clamp(20px, 3vw, 30px); display: grid; gap: 16px; scroll-margin-top: 100px; }
.vc-form__head { display: grid; gap: 6px; }
body.venda-studio #st-page .vc-form__title { margin: 0; font-size: var(--st-h4); letter-spacing: -.02em; color: var(--st-ink); }
body.venda-studio #st-page .vc-form__replying { margin: 0; font-size: 14px; color: var(--st-text); display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.vc-form__replying[hidden] { display: none !important; }
body.venda-studio #st-page .vc-form__cancel {
  background: none; border: 0; padding: 4px 2px; cursor: pointer; color: var(--st-blue); font-size: 14px; font-weight: 700 !important; text-decoration: underline; text-underline-offset: 3px;
}
.vc-form__row { display: grid; gap: 16px; }
@media (min-width: 576px) and (max-width: 991px), (min-width: 1200px) { .vc-form__row { grid-template-columns: 1fr 1fr; } }
.vc-field { display: grid; gap: 6px; min-width: 0; }
body.venda-studio #st-page .vc-label { font-size: 14px; font-weight: 700 !important; color: var(--st-ink); text-transform: none !important; letter-spacing: 0 !important; margin: 0; }
body.venda-studio #st-page .vc-check, body.venda-studio #st-page .vc-check span { text-transform: none !important; letter-spacing: 0 !important; font-weight: 400; }
body.venda-studio #st-page .vc-label__hint { font-weight: 400; color: var(--st-ink-faint); font-size: 13px; }
body.venda-studio #st-page .vc-form :is(input[type="text"], input[type="email"], textarea) { width: 100%; background: var(--st-panel) !important; border-color: transparent !important; }
body.venda-studio #st-page .vc-form :is(input[type="text"], input[type="email"], textarea):focus { background: #fff !important; border-color: var(--st-ink) !important; }
body.venda-studio #st-page .vc-form textarea { min-height: 132px; resize: vertical; }
body.venda-studio #st-page .vc-form [aria-invalid="true"] { border-color: #C62828 !important; background: #FFF6F6 !important; }
.vc-field__foot { display: flex; justify-content: space-between; gap: 10px; min-height: 18px; }
body.venda-studio #st-page .vc-error { font-size: 13px; color: #C62828; }
body.venda-studio #st-page .vc-counter { font-size: 12px; color: var(--st-ink-faint); margin-left: auto; font-variant-numeric: tabular-nums; }
body.venda-studio #st-page .vc-counter.is-near { color: #7A5200; }

.vc-check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.vc-check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--st-blue); flex: none; }
body.venda-studio #st-page .vc-check span { font-size: 14px; color: var(--st-text); line-height: 1.4; }

.vc-turnstile[hidden] { display: none; }
body.venda-studio #st-page .vc-submit { justify-content: center; width: 100%; min-height: 52px; }
body.venda-studio #st-page .vc-submit[disabled] { opacity: .65; cursor: progress; }

.vc-status { border-radius: var(--st-radius-sm, 10px); padding: 12px 14px; font-size: 15px; line-height: 1.45; display: flex; gap: 10px; align-items: flex-start; }
.vc-status[hidden] { display: none; }
body.venda-studio #st-page .vc-status { color: var(--st-ink); }
.vc-status--success { background: #E9F9EF; }
.vc-status--pending { background: #EEF3FF; }
.vc-status--error { background: #FFF0F0; }
.vc-status--error, body.venda-studio #st-page .vc-status--error { color: #A11D1D; }

body.venda-studio #st-page .vc-note { display: flex; gap: 8px; align-items: flex-start; margin: 0; font-size: 13px; line-height: 1.5; color: var(--st-ink-faint); }
.vc-note svg { flex: none; margin-top: 2px; }
body.venda-studio #st-page .vc-note a { color: var(--st-ink); text-decoration: underline; text-underline-offset: 2px; }

/* Honeypot: off-screen, not display:none (some bots skip hidden fields). */
.vc-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

@media (prefers-reduced-motion: reduce) { .vc-comment, .vc-reply { transition: none; } }
