.dialog.workspace-dialog#patient-dialog {
  inline-size: min(47.5rem, calc(100% - 2rem));
}

.clinical-history {
  display: grid;
  gap: .75rem;
  margin-block-start: 1.25rem;
  min-inline-size: 0;
}

.clinical-history h3,
.clinical-history__form label {
  font-weight: 600;
}

.clinical-history__appointments,
.clinical-history__notes {
  display: grid;
  gap: .5rem;
  list-style: none;
  margin: 0;
  padding: .25rem;
}

.clinical-history__appointments {
  max-block-size: 19rem;
  overflow: auto;
}

.clinical-history__appointments:focus-visible {
  outline: 2px solid var(--color-selected-dark);
  outline-offset: -2px;
}

.clinical-history__appointment,
.clinical-history__note {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md, .5rem);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem 1rem;
  justify-content: space-between;
  min-inline-size: 0;
  overflow-wrap: anywhere;
  padding: .75rem;
}

.clinical-history__appointment-data,
.clinical-history__note,
.clinical-history__note header,
.clinical-history__form {
  display: grid;
  gap: .375rem;
  min-inline-size: 0;
}

.clinical-history__note header,
.clinical-history__form > p {
  font-size: .875rem;
}

.clinical-history__note-body {
  white-space: pre-wrap;
}

.clinical-history__form textarea {
  max-inline-size: 100%;
  resize: vertical;
}
