/* About me and Top friends. Page-look tokens when a look is on, and the
   site text color otherwise, so the cards stay readable in every theme. */

.profile-about-text,
.profile-mood {
  margin: 0.35rem 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.profile-mood {
  font-weight: 600;
}

.profile-sections-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
  margin: 0.5rem 0 0.75rem;
  padding: 0;
  list-style: none;
}

.profile-friend-card {
  min-height: 4.75rem;
  min-width: 0;
  border: 1px solid var(--pl-accent, currentColor);
  border-radius: 8px;
  background: var(--pl-bg, transparent);
  color: var(--pl-fg, inherit);
  padding: 0.4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.15rem;
  overflow: hidden;
}

.profile-friend-initial {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  border: 1px solid var(--pl-accent, currentColor);
  display: grid;
  place-items: center;
  font-weight: 700;
  color: var(--pl-accent-text, var(--pl-accent, inherit));
}

.profile-friend-photo {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  object-fit: cover;
}

.profile-friend-name,
.profile-friend-handle {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-friend-name {
  color: var(--pl-accent-text, var(--pl-accent, inherit));
  text-decoration: none;
  font-weight: 600;
}

.profile-sections-editor select,
.profile-sections-editor textarea,
.profile-sections-editor input[type="text"] {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.profile-friend-slots {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.profile-friend-slots label {
  min-width: 0;
}

@media (max-width: 700px) {
  .profile-sections-grid,
  .profile-friend-slots {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
