#pie-stimulus-container {
  display: -ms-flexbox;
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: row;
  -ms-flex-direction: row;
  flex-direction: row;
  -webkit-flex-wrap: nowrap;
  -ms-flex-wrap: nowrap;
  flex-wrap: nowrap;
  -webkit-justify-content: flex-start;
  -ms-flex-pack: start;
  justify-content: flex-start;
  -webkit-align-content: stretch;
  -ms-flex-line-pack: stretch;
  align-content: stretch;
  -webkit-align-items: flex-start;
  -ms-flex-align: start;
  align-items: flex-start;
  overflow: hidden;
  }

#pie-stimulus-container #stimulus {
  -webkit-order: 0;
  -ms-flex-order: 0;
  order: 0;
  -webkit-flex: 1;
  -ms-flex: 1;
  flex: 1;
  -webkit-align-self: auto;
  -ms-flex-item-align: auto;
  align-self: auto;
  height: 100%;
  overflow: scroll;
  }

#pie-stimulus-container #read-more {
  display: none;
}

#pie-stimulus-container #item {
  -webkit-order: 0;
  -ms-flex-order: 0;
  order: 0;
  -webkit-flex: 1;
  -ms-flex: 1;
  flex: 1;
  -webkit-align-self: auto;
  -ms-flex-item-align: auto;
  align-self: auto;
  height: 100%;
  overflow: scroll;
  }

#pie-stimulus-container #resizer {
  width: 5px;
  cursor: ew-resize;
  background-color: transparent;
  height: 100%;
  transition: width 0.2s ease-in-out, background-color 0.2s ease-in-out;
}

#pie-stimulus-container #resizer:hover {
  background-color: lightblue;
  cursor: ew-resize;
}

#pie-stimulus-container #resizer:active {
  background-color: lightblue;
  cursor: ew-resize;
}


@media screen and (max-width: 1020px) {
  #pie-stimulus-container {
    flex-direction: column;
  }

  #resizer {
    display: none;
  }

  #pie-stimulus-container #stimulus {
    width: 100%;
    overflow: hidden;
    position: relative;
    flex:0 0 30%; /* stimulus represents 30% of the available space */
  }
  #pie-stimulus-container #item {
    width: 100%;
    overflow: auto;
    flex:1;
  }
  #pie-stimulus-container #stimulusPlayer {
    opacity: 1;
    transition: opacity 0.3s;
  }

  #pie-stimulus-container #stimulus.truncated::after {
    content: "";
    position: absolute;
    bottom: 0;
    right: 0;
    left: 0;
    height: 50px; /* Adjust the height of the fade-out portion */
    background: linear-gradient(rgba(255, 255, 255, 0), white);
  }

  #pie-stimulus-container #read-more {
    display: block;
    margin-top: 10px;
    cursor: pointer;
    align-self: center;
    border: none;
    background-color: transparent;
    color: cornflowerblue;
  }

}
