/* Keep the public identity before the sticky portrait and the biography. */
.shell.specialist-profile-compact {
  grid-template-areas: "identity identity" "media details";
}

.specialist-profile-compact .specialist-identity {
  min-inline-size: 0;
  padding-block: 4px 8px;
  overflow-wrap: anywhere;
}

.specialist-identity .specialist-profession {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 600;
}

.specialist-identity .specialist-short-description {
  max-inline-size: 68ch;
  margin: 6px 0 0;
  font-size: 1rem;
  line-height: 1.5;
  white-space: pre-wrap;
}

/* Legacy and current profiles use the same order, including when booking is unavailable. */
@media (max-width: 700px) {
  .shell.specialist-profile-compact,
  .shell.specialist-profile-compact:has(.specialist-summary) {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "identity" "media" "details";
  }

  .shell.specialist-profile-compact .specialist-media {
    grid-area: media;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    inline-size: 100%;
  }

  .shell.specialist-profile-compact .specialist-summary {
    grid-template-columns: minmax(0, 1fr);
  }

  .shell.specialist-profile-compact .specialist-media > :is(img, .specialist-actions, .specialist-summary) {
    grid-area: auto;
    grid-column: 1;
    box-sizing: border-box;
    inline-size: 100%;
    max-inline-size: 100%;
    min-inline-size: 0;
    justify-self: stretch;
  }
}
