.page {
  height: 100%;
  overflow-y: auto;
  padding-bottom: 20px;
  flex: 1 1 auto;
  overflow: visible;

  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    position: relative;
    overflow: visible;

    margin: 2rem 0;

    .zola-anchor {
      color: $color--link;
      cursor: pointer;
      font-size: 1rem;
      font-weight: initial;
      left: 0px;
      opacity: 0;
      padding: 0 1rem;
      position: absolute;
      text-align: center;
      text-decoration: none;
      top: 50%;
      width: 30px;
      text-align: center;
      transform: translateY(-50%) translateX(-100%);
      transition: opacity 100ms linear;
      z-index: 999;

      &:hover {
        text-decoration: underline;
        opacity: 1;
      }
    }

    &:hover {
      .zola-anchor {
        opacity: 1;
      }
    }
  }

  h1 {
    margin-top: 0;
    font-size: 1.8rem;
  }

  img {
    max-width: 100%;
  }

  hr {
    height: 3px;
    padding: 0;
    margin: 1.7rem 0;
    overflow: hidden;
    background-color: #e7e7e7;
    border: none;
  }

  &__content {
    position: relative;
    overflow: visible;

    a {
      color: $color--link;
      text-decoration: none;

      &:hover {
        text-decoration: underline;
      }
    }

    pre {
      overflow: auto;
      display: block;
      white-space: pre;
      max-width: calc(100vw - 4rem);
      padding: 1rem;
      border-radius: 0;
    }

    blockquote {
      margin: 0;
      margin-bottom: 0.85em;
      padding: 0 15px;
      color: #858585;
      border-left: 4px solid #e5e5e5;
    }

    iframe {
      border: 0;
    }

    table {
      margin: 0 auto;
      border-collapse: collapse;
      border-color: #cccccc;

      td {
        padding: 3px 20px;
        border: 1px solid #ccc;
      }

      thead {
        th {
          padding: 6px 13px;
          font-weight: bold;
          border: 1px solid #ccc;
        }
      }
    }

    word-wrap: break-word;
    line-height: 1.7;
    padding: 0 15px 40px;

    p,
    pre {
      margin: 1.7rem 0;
    }

    aside {
      border: 1px solid #d6d8d8;
      border-radius: 6px;
      font-size: 0.8rem;
      padding: 1rem;
      margin: 1.7rem 0;

      code {
        background: #e6e8e8;
        border: 1px solid #d6d8d8;
      }

      p {
        margin: 0;
      }
    }
  }
}

@include min-screen(600px) {
  .page {
    left: $sidebar-width;
  }
}

.page-without-menu {
  width: 100%;
  left: 0;

  .previous {
    left: 15px;
  }
}

@include max-screen(600px) {
  .page {
    width: 100%;
    left: 0;
  }
}

.search-container {
  display: none;

  &--is-visible {
    display: block;
  }

  #search {
    width: 100%;
    padding: 1rem;
    border: 1px solid #aaa;
    border-radius: 3px;
    background-color: #fafafa;
    color: #000;
  }

  .search-results {
    &__header {
      font-weight: bold;
      padding: 1rem 0rem;
    }

    &__items {
      margin: 0;
      padding: 0;
      list-style: none;
    }

    &__item {
      margin-bottom: 1rem;
    }

    &__teaser {
      font-size: 90%;
    }
  }
}

.search-mode {
  .prev-link,
  .next-link {
    display: none;
  }
}
