.transcript__canvas {
  contain: paint;
  padding-top: 2rem;
}

.transcript {
  position: sticky;
  top: 1rem;
  max-height: 100vh;

  display: flex;
  flex-direction: column;
}

.transcript__header {
  flex-shrink: 1;
}

/* scroll shadow */
.transcript__content {
  -webkit-overflow-scrolling: touch;
  overflow-scrolling: touch;

  background:
    /* shadow cover top */
    linear-gradient(
      white 30%,
      rgba(255, 255, 255, 0)
    ) center top,

    /* shadow cover bottom */
    linear-gradient(
      rgba(255, 255, 255, 0),
      white 70%
    ) center bottom,

    /* shadow top */
    radial-gradient(
      farthest-side at 50% 0,
      rgba(0, 0, 0, 0.2),
      rgba(0, 0, 0, 0)
    ) center top,

    /* shadow bottom */
    radial-gradient(
      farthest-side at 50% 100%,
      rgba(0, 0, 0, 0.2),
      rgba(0, 0, 0, 0)
    ) center bottom;

  background-repeat: no-repeat;
  background-size: 100% 40px, 100% 40px, 100% 14px, 100% 14px;
  background-attachment: local, local, scroll, scroll;
}

.transcript__content {
  flex-grow: 1;
  height: 100%;
  max-height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  padding-bottom: 8rem;

  --scrollbar-track-color: transparent;
  --scrollbar-thumb-color: #c2c2c2;
  scrollbar-color: var(--scrollbar-thumb-color) var(--scrollbar-track-color);
  scrollbar-width: thin;

  &::-webkit-scrollbar {
    width: 6px;
  }
  &::-webkit-scrollbar-track {
    background: var(--scrollbar-track-color);
  }
  &::-webkit-scrollbar-thumb {
    background-color: var(--scrollbar-thumb-color);
    border-radius: 6px;
    border: 3px solid var(--scrollbar-track-color);
  }
}

.transcript__line {
  margin-left: -0.25rem;
  margin-right: -0.25rem;
  line-height: 1.5;
  padding: 0.25rem;
  border-radius: 3px;
  &:hover:not([disabled]) {
    background-color: #eee;
  }
}

.transcript__line--highlight {
  background-color: #eee;
  font-weight: 500;
  .tag {
    font-weight: 600;
  }
}
