.vp-article-wrapper {
  position: relative;

  box-sizing: border-box;

  width: 100%;
  margin: 0 auto 1.25rem;

  text-align: start;
  overflow-wrap: break-word;

  @media (max-width: hope-config.$pad) {
    margin: 0 auto 1rem;
  }

  &:last-child {
    margin-bottom: 0;
  }
}

.vp-article-item {
  display: block;

  padding: 0.75rem 1.25rem;
  border-radius: 0.4rem;

  background: var(--bg-color-float);
  color: inherit;
  box-shadow: 0 1px 3px 1px var(--card-shadow);

  transition: background var(--color-transition),
    box-shadow var(--color-transition);

  @media (max-width: hope-config.$pad) {
    padding: 0.75rem 1rem;
  }

  @media (max-width: hope-config.$mobile) {
    border-radius: 0;
  }

  &:hover {
    box-shadow: 0 2px 6px 2px var(--card-shadow);
  }

  .sticky-icon {
    position: absolute;
    top: 0;

    // NOTE: Compatible with Android Wechat
    // inset-inline-end: 0;
    right: 0;

    width: 1.5rem;
    height: 1.5rem;

    color: var(--theme-color);

    #{hope-config.$rtl-selector} & {
      right: unset;
      left: 0;
    }
  }

  .page-info {
    > span {
      display: flex;
      flex-shrink: 0;
      align-items: center;

      margin-inline-end: 0.5em;

      line-height: 1.8;

      &::after {
        --balloon-font-size: 8px;
        padding: 0.3em 0.6em !important;
      }
    }
  }
}

.vp-article-hr {
  margin-block-start: 0.375em;
  margin-block-end: 0.375em;
}

.vp-article-title {
  position: relative;

  display: inline-block;

  color: var(--text-color);

  font-size: 1.25rem;
  font-family: var(--font-family-heading);
  line-height: 1.6;

  cursor: pointer;

  &::after {
    content: "";

    position: absolute;
    bottom: 0;
    left: 0;

    width: 100%;
    height: 2px;

    background: var(--theme-color);

    visibility: hidden;

    transition: transform 0.3s ease-in-out;
    transform: scaleX(0);
  }

  &:hover {
    cursor: pointer;

    &::after {
      visibility: visible;
      transform: scaleX(1);
    }
  }

  a {
    color: inherit;
    font-weight: 600;
  }

  .lock-icon,
  .slides-icon {
    position: relative;
    bottom: -0.125em;

    display: inline-block;
    vertical-align: baseline;

    width: 1em;
    height: 1em;
    margin-inline-end: 0.25em;

    color: var(--theme-color);
  }

  > span {
    word-break: break-word;
  }
}

.vp-article-cover {
  width: calc(100% + 2.5rem);
  margin: -0.75rem -1.25rem 0.75rem;
  border-top-left-radius: 0.4rem;
  border-top-right-radius: 0.4rem;

  @media (max-width: hope-config.$pad) {
    width: calc(100% + 2rem);
    margin: -0.75rem -1rem 0.75rem;
  }

  @media (max-width: hope-config.$mobile) {
    border-radius: 0;
  }
}

.vp-article-excerpt {
  overflow: hidden;
  line-height: 1.6;
  cursor: default;

  @media (max-width: hope-config.$pad) {
    font-size: 15px;
  }

  @media (max-width: hope-config.$mobile) {
    font-size: 14px;
  }

  h1 {
    display: none;
  }

  h2 {
    font-size: 1.4em;
  }

  h3 {
    font-size: 1.2em;
  }

  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    margin-top: 0.5em;
    margin-bottom: 0.5em;
  }

  // stylelint-disable selector-max-compound-selectors
  h1 + p {
    margin-top: 0.5em;
  }
  // stylelint-enable selector-max-compound-selectors

  p:first-child {
    margin-top: 0.5em;
  }

  p:last-child {
    margin-bottom: 0.5em;
  }

  // code block fix
  pre {
    margin: 0.85rem 0;
    padding: 1.25rem 1.5rem;
    line-height: 1.375;
  }

  // line number fix
  .line-numbers-mode {
    // stylelint-disable selector-max-compound-selectors
    pre {
      padding-left: calc(var(--line-numbers-width) + 1rem);
    }
    // stylelint-enable selector-max-compound-selectors
  }

  // hide code demo
  .code-demo-wrapper {
    display: none;
  }

  // hide external link
  .external-link-icon {
    display: none;
  }

  // footnote fix
  .footnote-anchor {
    display: none;
  }

  section.footnotes {
    display: none;
  }

  img {
    max-width: 100%;
  }

  figure {
    display: flex;
    flex-direction: column;

    width: auto;
    margin: 1rem auto;

    text-align: center;

    transition: transform var(--transform-transition);

    img {
      overflow: hidden;
      margin: 0 auto;
      border-radius: 8px;
    }

    figcaption {
      display: inline-block;
      margin: 6px auto;
      font-size: 0.8rem;

      &:only-child {
        display: none;
      }
    }
  }
}
