
/* Meta social analytics connection */
.stats-meta-connection {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
  padding: 13px 14px;
  border-left: 3px solid #d4dae1;
}
.stats-meta-connection.is-connected {
  border-left-color: #168445;
}

.stats-meta-connection__copy,
.stats-meta-connection__actions,
.meta-setup-hero,
.meta-setup-actions {
  display: flex;
  align-items: center;
}

.stats-meta-connection__copy {
  gap: 11px;
  min-width: 0;
}

.stats-meta-connection__copy > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.stats-meta-connection__copy strong {
  font-size: 0.82rem;
}

.stats-meta-connection__copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.71rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stats-meta-connection__icon {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: #f6f7f9;
  color: var(--muted-strong);
  place-items: center;
}

.stats-meta-connection.is-connected .stats-meta-connection__icon {
  border-color: rgba(22, 132, 69, 0.28);
  background: rgba(22, 132, 69, 0.08);
  color: #168445;
}

.stats-meta-connection__actions,
.meta-setup-actions {
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 8px;
}

.stats-meta-connection__actions form,
.meta-setup-actions form {
  margin: 0;
}

.stats-meta-connection__actions .button-link,
.meta-setup-actions .button-link,
.meta-setup-actions button {
  min-height: 36px;
}

.meta-setup-hero {
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 14px;
  padding: 18px;
}

.meta-setup-hero h2,
.meta-setup-hero p {
  margin: 0;
}

.meta-setup-hero h2 {
  font-size: 1.05rem;
}

.meta-setup-hero p {
  max-width: 760px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.79rem;
  line-height: 1.5;
}

.meta-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #f6f7f9;
  color: var(--muted-strong);
  font-size: 0.74rem;
  font-weight: 850;
  white-space: nowrap;
}

.meta-status.is-connected {
  border-color: rgba(22, 132, 69, 0.28);
  background: rgba(22, 132, 69, 0.08);
  color: #168445;
}

.meta-setup-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.meta-setup-card {
  margin: 0;
}

.meta-setup-list {
  display: grid;
  margin: 0;
}

.meta-setup-list > div {
  display: grid;
  grid-template-columns: minmax(120px, 0.42fr) minmax(0, 1fr);
  gap: 14px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}

.meta-setup-list > div:last-child {
  border-bottom: 0;
}

.meta-setup-list dt {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 760;
}

.meta-setup-list dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 0.77rem;
  font-weight: 760;
  text-align: right;
}

.meta-setup-list code {
  font-size: 0.68rem;
  font-weight: 650;
}

.meta-setup-actions {
  justify-content: flex-end;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
}

.meta-setup-help {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.45;
}

.meta-account-picker,
.meta-sync-note {
  margin-bottom: 14px;
}

.meta-account-picker > form {
  display: grid;
  gap: 13px;
  padding: 14px;
}

.meta-account-options {
  display: grid;
  gap: 8px;
}

.meta-account-options label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  cursor: pointer;
}

.meta-account-options label:has(input:checked) {
  border-color: rgba(201, 21, 34, 0.42);
  background: var(--soft-red);
}

.meta-account-options input {
  margin-top: 3px;
  accent-color: var(--red);
}

.meta-account-options span {
  display: grid;
  gap: 2px;
}

.meta-account-options strong {
  font-size: 0.8rem;
}

.meta-account-options small {
  color: var(--muted);
  font-size: 0.7rem;
}

.meta-account-picker button {
  width: fit-content;
}

.meta-sync-note {
  padding: 14px 16px;
  border-left: 3px solid #d59a19;
}

.meta-sync-note strong {
  font-size: 0.8rem;
}

.meta-sync-note p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.73rem;
  line-height: 1.45;
}

@media (max-width: 820px) {
  .stats-meta-connection,
  .meta-setup-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .stats-meta-connection__copy small {
    white-space: normal;
  }

  .stats-meta-connection__actions,
  .meta-setup-actions {
    justify-content: flex-start;
  }

  .meta-setup-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .stats-meta-connection__actions,
  .stats-meta-connection__actions form,
  .stats-meta-connection__actions .button-link,
  .stats-meta-connection__actions button,
  .meta-setup-actions,
  .meta-setup-actions form,
  .meta-setup-actions .button-link,
  .meta-setup-actions button {
    width: 100%;
  }

  .meta-setup-list > div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .meta-setup-list dd {
    text-align: left;
  }
}
