//
// ExpandableBox
//

.tox {
  .tox-expandable-box {
    border-radius: 6px;
    border: 1px solid var(--tox-private-border-color, @border-color);
    display: flex;
    flex-direction: column;
    justify-content: stretch;
    gap: var(--tox-private-pad-sm, @pad-sm);
    padding: var(--tox-private-pad-sm, @pad-sm) var(--tox-private-pad-md, @pad-md);
  }

  .tox-expandable-box__content {
    overflow: auto;
  }

  .tox-expandable-box__content--overflowing {
    position: relative;
    overflow: hidden;
  }

  .tox-expandable-box__content--overflowing::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: min(100px, 100%);
    pointer-events: none;
    background: linear-gradient(to bottom, transparent 50%, var(--tox-private-background-color, @background-color));
  }

  .tox-expandable-box__content--expanded {
    max-height: fit-content;
  }

  .tox-expandable-box__toggle {
    align-self: flex-start;
  }
}
