/* Settings (docs/design-system.md, Surfaces). A 760px
   column of sections, each a section title over a white panel. */

.settings__sections {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

/* The connected TikTok account in its profile row: avatar, name with the
   connection date. */
.settings__who {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  min-width: 0;
}

.settings__who-text {
  min-width: 0;
}

.settings__who-name {
  margin: 0;
  overflow: hidden;
  font-weight: var(--weight-semibold);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.settings__avatar {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-section);
  font-weight: var(--weight-semibold);
  color: var(--color-text-muted);
  border-radius: var(--radius-media);
  background: var(--color-bg-page);
  object-fit: cover;
}

.settings__note {
  margin: 0;
  font-size: var(--text-note);
  color: var(--color-text-muted);
}

.settings__note--error {
  color: var(--color-error);
}

/* The value and the action of a row, side by side. */
.settings__acts {
  display: flex;
  flex: none;
  align-items: center;
  gap: var(--space-6);
}

/* Stands in the value's place while the connections load. */
.settings__placeholder {
  display: block;
  width: 96px;
  height: 20px;
  border-radius: var(--radius-media);
  background: var(--color-bg-control);
  animation: settings-pulse var(--duration-skeleton-pulse) var(--ease-default) infinite;
}

@keyframes settings-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.45; }
}

@media (prefers-reduced-motion: reduce) {
  .settings__placeholder {
    animation: none;
  }
}

/* The profile: rows of a label with its note on the left and the value or
   the action on the right (.card__row draws the line-soft lines). */
.settings__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

/* The label gives way first, so a value such as an email stays on one line. */
.settings__row > :first-child {
  flex: 1 1 0;
  min-width: 0;
}

.settings__row-value {
  min-width: 0;
  overflow-wrap: break-word;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.settings__row-value--muted {
  color: var(--color-text-muted);
}

/* A warning inside the column: the past-due payment, the subscription
   that blocks deleting the account. */
.settings__alert {
  margin: 0 0 var(--space-4);
  color: var(--color-error);
}

.settings__alert--center {
  text-align: center;
}

/* The fields of the password modal. */
.settings__form {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.settings__actions {
  display: flex;
  justify-content: center;
  margin-bottom: var(--space-6);
}

.settings__pages {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  margin-top: var(--space-6);
  font-size: var(--text-note);
  font-variant-numeric: tabular-nums;
  color: var(--color-text-muted);
}

.settings__version {
  margin: var(--space-12) 0 0;
  font-size: var(--text-note);
  color: var(--color-text-muted);
  user-select: all;
}

@media (max-width: 860px) {
  .settings__row {
    flex-wrap: wrap;
  }

  .settings__acts {
    width: 100%;
    justify-content: space-between;
  }
}
