.appointment-list-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.appointment-list-item--left-container {
  display: flex;
  flex-grow: 1;
  flex-direction: row;
  align-items: flex-start;
  justify-content: flex-start;
  gap: .5rem;

  h4 {
    font-size: var(--rem-14);
    color: var(--text-heading);
    font-variation-settings: 'wght' var(--text-medium);
  }

  span.appointment-list-item--text {
    font-size: var(--rem-12);
    &:not([data-is-colored="true"]) {
      color: var(--text-additional);
    }
  }
}

.appointment-list-item--subtitle-with-icon-container {
  width: fit-content;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: .25rem;
  white-space: nowrap;
}

.appointment-list-item--meta-row {
  flex-wrap: wrap;
}

.appointment-list-item-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.appointment-list-item--clickable {
  cursor: pointer;
}

.appointment-list-item--right-container {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: .25rem;
}

.appointment-list-item--avatar-cluster {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: .25rem;
}

.appointment-list-item--caret {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  rotate: 0deg;
  transition: rotate .2s ease-in;
}

.appointment-list-item-wrapper:has(.appointment-list-item--history:not(.hidden)) .appointment-list-item--caret {
  rotate: 90deg;
}

.appointment-list-item--history {
  width: 100%;
  padding: .75rem 1rem;
  border-top: 1px solid var(--border-secondary);
}

.appointment-list-item--history-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: max-content 1.25rem 1fr;
  column-gap: 1rem;
  row-gap: 0;
  align-items: center;
}

.appointment-list-item--history-entry {
  display: contents;
}

.appointment-list-item--history-time {
  font-size: var(--rem-11);
  color: var(--text-additional);
  white-space: nowrap;
  text-align: right;
  font-variation-settings: 'wght' var(--text-medium);
  letter-spacing: .02em;
  padding: .375rem 0;
}

.appointment-list-item--history-marker {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  min-height: 2rem;
}

.appointment-list-item--history-marker::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: var(--border-secondary);
  transform: translateX(-50%);
  z-index: 0;
}

.appointment-list-item--history-entry:first-child .appointment-list-item--history-marker::before {
  top: 50%;
}

.appointment-list-item--history-entry:last-child .appointment-list-item--history-marker::before {
  bottom: 50%;
}

.appointment-list-item--history-dot {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  background: var(--colors-accessory-navy);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  position: relative;
}

.appointment-list-item--history-label {
  font-size: var(--rem-12);
  color: var(--text-heading);
  font-variation-settings: 'wght' var(--text-medium);
  padding: .375rem 0;
}

.appointment-list-item--history-set-by {
  color: var(--text-additional);
  font-variation-settings: 'wght' 400;
}

.appointment-list-item--history-empty {
  font-size: var(--rem-12);
  color: var(--text-additional);
}