:root {
  --rp-outline-padding-x: 20px;
}

.rp-outline {
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--rp-c-divider-light);

  &__title {
    padding-left: var(--rp-outline-padding-x);
    padding-right: var(--rp-outline-padding-x);
    flex-shrink: 0;

    font-size: 14px;
    font-weight: 700;
    height: 32px;
    line-height: 32px;
    font-style: normal;
    color: var(--rp-c-text-1);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    @media (max-width: 1280px) {
      display: none;
    }
  }

  &__divider {
    margin-left: var(--rp-outline-padding-x);
    margin-right: var(--rp-outline-padding-x);
    flex-shrink: 0;

    height: 1px;
    background: var(--rp-c-divider-light);
    margin-top: 16px;
    margin-bottom: 16px;
  }

  &__toc {
    padding: 4px var(--rp-outline-padding-x);

    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    max-height: 70vh;
    overflow: auto scroll;
    scrollbar-width: none;

    mask-image: linear-gradient(#0000, #fff 8px calc(100% - 8px), #0000);

    // limit height on mobile where outline is a floating panel
    @media (max-width: 1280px) {
      max-height: 60vh;
    }
  }

  &__bottom {
    padding-left: var(--rp-outline-padding-x);
    padding-right: var(--rp-outline-padding-x);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  &__action-row {
    cursor: pointer;
    font-size: 0.875rem;
    font-style: normal;
    font-weight: 400;
    line-height: 20px;
    color: var(--rp-c-text-2);
    background: transparent;
    display: flex;
    align-items: center;
    gap: 8px;
    border: none;
    padding: 0;
    text-decoration: none;
    transition: color 0.2s;

    &:hover {
      color: var(--rp-c-text-1);
    }

    svg {
      width: 16px;
      height: 16px;
      flex-shrink: 0;
    }
  }
}
