/* ============================================================
   Local Guide — reputação, avaliações e rede B2B
   Usa os tokens do tema (fallback para quando o tema não os define).
   ============================================================ */

.lg-social,
.lg-b2b,
.lg-b2b-thread-view,
.lg-b2b-gate {
  --lgx-ink: var(--lg-ink, #0b1524);
  --lgx-ink-2: var(--lg-ink-2, #16233a);
  --lgx-muted: var(--lg-muted, #55647c);
  --lgx-card: var(--lg-card, #ffffff);
  --lgx-line: var(--lg-line, #d7dfee);
  --lgx-blue: var(--lg-blue, #173fcc);
  --lgx-blue-dark: var(--lg-blue-dark, #0a2276);
  --lgx-blue-soft: var(--lg-blue-soft, #e4eaff);
  --lgx-amber: var(--lg-amber, #ffb100);
  --lgx-radius: var(--lg-radius, 18px);
}

/* ---------------------------------------------- Bloco de reputação */

.lg-social {
  padding: 72px 0;
  background: #fff;
  border-top: 1px solid var(--lgx-line);
}

.lg-social-head {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 32px;
}

.lg-social-head > div:first-child {
  flex: 1 1 380px;
  min-width: 0;
}

.lg-sec-kicker {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--lgx-blue);
}

.lg-score-panel {
  flex: 0 0 auto;
  min-width: 220px;
  padding: 20px 24px;
  border-radius: var(--lgx-radius);
  background: linear-gradient(160deg, var(--lgx-blue) 0%, var(--lgx-blue-dark) 100%);
  color: #fff;
}

.lg-score-panel-number {
  display: flex;
  align-items: baseline;
  gap: 2px;
}

.lg-score-panel-number strong {
  font-size: 44px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -.02em;
}

.lg-score-panel-number span {
  font-size: 16px;
  opacity: .75;
}

.lg-score-panel-label {
  margin: 6px 0 4px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  opacity: .9;
}

.lg-score-panel-detail {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  opacity: .85;
}

/* ---------------------------------------------- Resumo das notas */

.lg-rating-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  align-items: center;
  padding: 24px;
  margin-bottom: 28px;
  border: 1px solid var(--lgx-line);
  border-radius: var(--lgx-radius);
  background: #fbfcff;
}

.lg-rating-average {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 150px;
}

.lg-rating-average strong {
  font-size: 40px;
  line-height: 1;
  font-weight: 800;
  color: var(--lgx-ink);
}

.lg-rating-average small {
  color: var(--lgx-muted);
  font-size: 13px;
}

.lg-stars,
.lg-review-stars {
  color: var(--lgx-amber);
  letter-spacing: .1em;
  font-size: 18px;
}

.lg-rating-bars {
  flex: 1 1 260px;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.lg-rating-bars li {
  display: grid;
  grid-template-columns: 34px 1fr 34px;
  gap: 10px;
  align-items: center;
  font-size: 13px;
  color: var(--lgx-muted);
}

.lg-rating-bar {
  display: block;
  height: 8px;
  border-radius: 999px;
  background: #e6ebf6;
  overflow: hidden;
}

.lg-rating-bar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--lgx-amber);
}

.lg-rating-bar-count {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------- Lista de avaliações */

.lg-review-list {
  list-style: none;
  margin: 0 0 32px;
  padding: 0;
  display: grid;
  gap: 16px;
}

.lg-review {
  padding: 20px 22px;
  border: 1px solid var(--lgx-line);
  border-radius: var(--lgx-radius);
  background: #fff;
}

.lg-review header {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.lg-review header strong {
  font-size: 15px;
  color: var(--lgx-ink);
}

.lg-review-verified {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e8f7ef;
  color: #0b7a4b;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .03em;
  vertical-align: middle;
}

.lg-review h3 {
  margin: 0 0 6px;
  font-size: 16px;
  color: var(--lgx-ink-2);
}

.lg-review p {
  margin: 0 0 8px;
  color: var(--lgx-muted);
  line-height: 1.65;
}

.lg-review-date {
  margin: 0;
  font-size: 12px;
  color: #7b8aa3;
}

.lg-social-empty {
  padding: 20px;
  border: 1px dashed var(--lgx-line);
  border-radius: var(--lgx-radius);
  color: var(--lgx-muted);
  text-align: center;
}

/* ---------------------------------------------- Formulário de avaliação */

.lg-review-form,
.lg-b2b-form,
.lg-b2b-cnpj-form {
  display: grid;
  gap: 16px;
  padding: 24px;
  border: 1px solid var(--lgx-line);
  border-radius: var(--lgx-radius);
  background: #fbfcff;
}

.lg-review-form h2,
.lg-b2b-form h2 {
  margin: 0;
  font-size: 20px;
}

.lg-rating-input {
  border: 0;
  margin: 0;
  padding: 0;
}

.lg-rating-input legend {
  font-size: 13px;
  font-weight: 700;
  color: var(--lgx-ink-2);
  margin-bottom: 8px;
}

.lg-rating-stars {
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  gap: 6px;
}

.lg-rating-stars input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.lg-rating-stars label {
  cursor: pointer;
  padding: 6px 12px;
  border: 1px solid var(--lgx-line);
  border-radius: 10px;
  background: #fff;
  font-size: 14px;
  font-weight: 600;
  color: var(--lgx-muted);
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.lg-rating-stars label:hover,
.lg-rating-stars label:hover ~ label {
  border-color: var(--lgx-amber);
  color: #8a5d00;
}

.lg-rating-stars input:checked ~ label {
  background: var(--lgx-amber);
  border-color: var(--lgx-amber);
  color: #3d2a00;
}

.lg-rating-stars input:focus-visible + label {
  outline: 2px solid var(--lgx-blue);
  outline-offset: 2px;
}

.lg-field {
  display: grid;
  gap: 6px;
}

.lg-field label {
  font-size: 13px;
  font-weight: 700;
  color: var(--lgx-ink-2);
}

.lg-field input,
.lg-field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--lgx-line);
  border-radius: 12px;
  background: #fff;
  font: inherit;
  color: var(--lgx-ink);
}

.lg-field input:focus,
.lg-field textarea:focus {
  outline: 2px solid var(--lgx-blue);
  outline-offset: 1px;
  border-color: var(--lgx-blue);
}

.lg-social-locked {
  padding: 20px;
  border: 1px solid var(--lgx-line);
  border-radius: var(--lgx-radius);
  background: #fbfcff;
  display: grid;
  gap: 12px;
  justify-items: start;
}

.lg-social-locked p {
  margin: 0;
  color: var(--lgx-muted);
}

.lg-social-b2b-link {
  margin: 20px 0 0;
}

/* ---------------------------------------------- Caixa de mensagens B2B */

.lg-b2b,
.lg-b2b-gate,
.lg-b2b-thread-view {
  padding: 32px 0 64px;
}

.lg-b2b-head {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: flex-start;
  justify-content: space-between;
  padding-bottom: 24px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--lgx-line);
}

.lg-b2b-eyebrow {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--lgx-blue);
}

.lg-b2b-head h1 {
  margin: 0 0 8px;
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -.02em;
  color: var(--lgx-ink);
}

.lg-b2b-head p {
  margin: 0;
  color: var(--lgx-muted);
}

.lg-b2b-verified,
.lg-b2b-status {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.lg-b2b-verified,
.lg-b2b-status-verified {
  background: #e8f7ef;
  color: #0b7a4b;
}

.lg-b2b-status-pending {
  background: #fff4de;
  color: #8a5d00;
}

.lg-b2b-status-rejected {
  background: #fdeaea;
  color: #a52216;
}

.lg-b2b-status-none {
  background: #eef1f7;
  color: var(--lgx-muted);
}

.lg-b2b-stats {
  display: flex;
  gap: 20px;
  font-size: 13px;
  color: var(--lgx-muted);
}

.lg-b2b-stats strong {
  display: block;
  font-size: 22px;
  color: var(--lgx-ink);
}

/* lista de conversas */

.lg-b2b-thread-list {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.lg-b2b-thread a {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border: 1px solid var(--lgx-line);
  border-radius: 14px;
  background: #fff;
  text-decoration: none;
  color: inherit;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.lg-b2b-thread a:hover {
  border-color: var(--lgx-blue);
  box-shadow: 0 8px 24px rgba(23, 63, 204, .1);
}

.lg-b2b-thread.is-unread a {
  border-left: 4px solid var(--lgx-blue);
  background: #f7f9ff;
}

.lg-b2b-thread-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.lg-b2b-thread-name {
  font-weight: 700;
  color: var(--lgx-ink);
}

.lg-b2b-thread-subject {
  font-size: 13px;
  color: var(--lgx-muted);
}

.lg-b2b-thread-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 12px;
  color: var(--lgx-muted);
}

.lg-b2b-thread-badge {
  min-width: 22px;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--lgx-blue);
  color: #fff;
  font-weight: 700;
  text-align: center;
}

.lg-b2b-empty {
  padding: 28px;
  border: 1px dashed var(--lgx-line);
  border-radius: var(--lgx-radius);
  text-align: center;
  color: var(--lgx-muted);
}

/* conversa */

.lg-b2b-back {
  margin: 0 0 16px;
  font-size: 14px;
}

.lg-b2b-thread-view header h1 {
  margin: 0 0 6px;
  font-size: clamp(22px, 2.6vw, 30px);
  color: var(--lgx-ink);
}

.lg-b2b-thread-view header p {
  margin: 0 0 24px;
  color: var(--lgx-muted);
  font-size: 14px;
}

.lg-b2b-messages {
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
  display: grid;
  gap: 14px;
  max-height: 560px;
  overflow-y: auto;
}

.lg-b2b-message {
  display: flex;
  justify-content: flex-start;
}

.lg-b2b-message.is-mine {
  justify-content: flex-end;
}

.lg-b2b-bubble {
  max-width: min(640px, 88%);
  padding: 14px 18px;
  border: 1px solid var(--lgx-line);
  border-radius: 16px;
  background: #fff;
}

.lg-b2b-message.is-mine .lg-b2b-bubble {
  background: var(--lgx-blue-soft);
  border-color: #c9d5ff;
}

.lg-b2b-message-author {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--lgx-ink-2);
}

.lg-b2b-message-author span {
  font-weight: 400;
  color: #7b8aa3;
}

.lg-b2b-message-body {
  color: var(--lgx-ink);
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.lg-b2b-message-body p {
  margin: 0 0 8px;
}

.lg-b2b-message-body p:last-child {
  margin-bottom: 0;
}

/* portão de CNPJ */

.lg-b2b-gate {
  display: grid;
  gap: 14px;
  max-width: 720px;
}

.lg-b2b-gate h2 {
  margin: 0;
  font-size: clamp(22px, 2.6vw, 30px);
  color: var(--lgx-ink);
}

.lg-b2b-cnpj-state {
  padding: 18px 20px;
  border: 1px solid var(--lgx-line);
  border-radius: 14px;
  background: #fbfcff;
  display: grid;
  gap: 6px;
}

.lg-b2b-cnpj-state p {
  margin: 0;
  font-size: 14px;
  color: var(--lgx-muted);
}

@media (max-width: 720px) {
  .lg-social,
  .lg-b2b {
    padding: 48px 0;
  }

  .lg-rating-summary {
    gap: 20px;
    padding: 18px;
  }

  .lg-b2b-thread-meta {
    width: 100%;
    justify-content: flex-start;
  }

  .lg-rating-stars {
    flex-wrap: wrap;
  }
}

/* ---------------------------------------------- Botões (fallback sem sections.css) */

.lg-social .lg-btn,
.lg-b2b .lg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border: 1px solid var(--lgx-line);
  border-radius: 999px;
  background: #fff;
  color: var(--lgx-ink);
  font: inherit;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

.lg-social .lg-btn:hover,
.lg-b2b .lg-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(11, 21, 36, .12);
}

.lg-social .lg-btn-primary,
.lg-b2b .lg-btn-primary {
  background: var(--lgx-blue);
  border-color: var(--lgx-blue);
  color: #fff;
}

.lg-b2b-gate .lg-btn {
  display: inline-flex;
  align-items: center;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid var(--lgx-blue);
  background: var(--lgx-blue);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}
