.post-widget {
    float: right;
    width: 20%;
    padding-left: 30px;
    min-height: 1px;
    +.post-article {
        float: left;
        width: 80%;
        padding-right: 30px;
    }
}

.post-toc-wrap {
    position: fixed;
    overflow-x: hidden;
    width: 20%;
    &.fixed {
        top: @headerH + 20px;
        bottom: 140px;
        overflow-y: auto;
    }

    ol,
    ul {
        list-style: none;
        margin: 0;
    }

    h4 {
        padding: 0 0 10px 20px;
        font-size: 15px;
        font-weight: 600;
        color: #727272;
    }
}
.post-toc-child {
    padding-left: 10px;
}
.post-toc {
    display: inline-block;
    padding: 0;
    font-size: 13px;
    >.post-toc-item {
        position: relative;
    }
}
.post-toc-item {
    font-weight: 400;
    color: @secondaryTextColor;

    &.active {
        >.post-toc-link {
            font-weight: 600;
            color: @primaryColor;
            &:before {
                background: rgba(0, 0, 0, .06);
            }

            &:after {
                border-left: 3px solid @primaryColor;
            }
        }
    }
}
.post-toc-link {
    position: relative;
    z-index: 2;
    display: block;
    padding: 3px 20px;
    line-height: 1.5rem;
    color: inherit;
    word-break: break-all;

    &:hover {
        opacity: .8;
    }

    &:before,
    &:after {
        content: "";
        position: absolute;
        z-index: 1;
        top: 0;
        right: 0;
        width: 100%;
        height: 100%;
    }
}


.post-article {
    .post-content {
        padding-top: 20px;
    }
}
.post-card {
    margin-top: -150px;
    min-height: 100px;
    padding: 35px;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .2);
    .post-meta {
        margin-top: 8px;
    }
}
.post-card-title {
    font-size: 32px;
}
.post-nav {
    margin-top: 30px;
    padding: 16px 0 0;

    .prev,
    .next {
        width: 47%;
        background: @codeBg;
    }

    .next {
        text-align: right;
    }
}

.post-nav-link {
    display: block;
    line-height: 2em;
    font-size: 16px;
    padding: 10px 16px;

    .title {
        .hoverLine(@primaryColor);
    }

    .icon {
        vertical-align: -9%;
    }

    .tips {
        color: @secondaryTextColor;
    }
}

.post-copyright {
    margin-bottom: 100px;
    font-size: 14px;

    .content {
        margin-bottom: 1em;
        padding: 20px 30px;
        word-break: break-all;
        color: @secondaryTextColor;
        background: lighten( @lightPrimaryColor, 12%);
        border-radius: 30px 30px 0;
    }

    footer {
        float: right;

        a {
            position: relative;
            display: block;
            overflow: hidden;
            padding: 0 16px 0 42px;
            height: 28px;
            line-height: 28px;
            color: @secondaryTextColor;
            background: lighten( @lightPrimaryColor, 12%);
            border-radius: 14px;
        }
        img {
            position: absolute;
            top: 0;
            left: 0;
            width: 28px;
            height: 28px;
            border-radius: 50%;
        }
    }
}

.post-footer {
    position: relative;
    margin: 0 -35px;
    padding: 20px 35px 0;
    border-top: 1px solid #ddd;
}

.post-content {
    padding-bottom: 20px;
    line-height: 1.8;

    >.highlight,
    >.image-bubble,
    >pre {
        margin-left: -35px;
        margin-right: -35px;
    }

    >.highlight,
    >pre {
        padding: 20px 35px;
    }

    .image-bubble {
        margin-top: 20px;
        margin-bottom: 20px;
        text-align: center;
    }
    .image-caption {
        display: inline-block;
        margin-top: 10px;
        color: @secondaryTextColor;
    }

    .headerlink {
        visibility: hidden;
        margin-left: -1em;
        padding-right: 5px;
        color: @lightPrimaryColor;

        &:before {
            content: "#";
        }
    }

    p {
        word-wrap: break-word;
    }

    p,
    li {
        a {
            color: @accentColor;
            border-bottom: 1px dotted lighten(@accentColor, 20%);
            word-break: break-all;

            &:hover,
            &:active {
                text-decoration: none;
                border-bottom-style: solid;
                opacity: .7;
            }
        }
    }

    strong {
        font-weight: 600;
        color: @primaryColor;
        a {
            border-color: @accentColor
        }
    }

    em {
        color: @secondaryTextColor
    }

    h1 {
        font-size: 24px;
    }

    h2 {
        font-size: 22px;
    }

    h3 {
        font-size: 20px;
    }

    h4 {
        font-size: 18px;
    }

    h5 {
        font-size: 16px;
    }

    h6 {
        font-size: 14px;
    }

    h1,
    h2,
    h3,
    h4,
    h5 {
        padding-top: @headerH;
        margin-top: @headerH * -1;
    }

    h1,
    h2,
    h3,
    h4,
    blockquote,
    ol,
    p,
    pre,
    table,
    ul,
    figure,
    .video-container {
        margin-bottom: 20px;
    }
    .video-container iframe {
        max-width: 100%;
    }

    h1,
    h2,
    h3,
    h4,
    h5,
    h6 {
        color: @primaryColor;
        &:hover {
            .headerlink {
                visibility: visible
            }
        }
    }

    blockquote p:first-child,
    blockquote:first-child,
    ol:first-child,
    p:first-child,
    pre:first-child,
    table:first-child,
    ul:first-child,
    figure:first-child {
        margin-top: 0
    }

    ol,
    ul {
        font-size: 14px;
        line-height: 30px;
    }

    video,
    audio {
        max-width: 100%;
    }


    blockquote {
        position: relative;
        padding: 16px 20px;
        border-left: 4px solid @primaryColor;
        color: lighten(@primaryTextColor, 30%);
        background: @codeBg;
        font-size: 14px;
        border-radius: 0 2px 2px 0;

        p {
            margin: 0;
        }

        footer {
            margin-top: 10px;
            text-align: right;
            font-size: 80%;
        }
    }

    table {
        width: 100%;
        border: 1px solid #dedede;
        margin: 15px 0;
        border-collapse: collapse;

        tr,
        td {
            height: 35px;
        }

        thead {
            tr {
                background: #f8f8f8;
            }
        }

        tbody {
            tr {
                &:hover {
                    background: #efefef;
                }
            }
        }

        td,
        th {
            border: 1px solid #dedede;
            padding: 0 10px;
        }
    }

    figure {
        table {
            border: none;
            width: auto;
            margin: 0;

            tbody {
                tr {
                    &:hover {
                        background: none;
                    }
                }

                td {
                    border: none;
                }
            }
        }
    }

    code,
    kbd,
    pre,
    samp {
        font-family: @font-code;
    }

    code,
    pre {
        background: @codeBg
    }

    p code,
    li code {
        color: @accentColor;
        line-height: 1;
        margin: 0 4px;
        font-size: 80%;
        padding: 3px 5px;
        border: 1px solid #eee;
        border-radius: 2px;
        word-wrap: break-word;
    }

    pre {
        margin: 24px 0;
        code {
            border-radius: 0;
            font-size: inherit;
            margin: 0;
            padding: 0;
        }
    }
}


.comments {
    padding: 40px 0 0;
}

@media screen and (max-width:760px) {
    .post-widget {
        display: none
    }

    .post-article {
        float: none;
        width: 100%!important;
        padding-right: 0!important;
    }

    .post-card {
        position: relative;
        margin: -20px -16px 0;
        border-radius: 0;
        padding: 16px;

        .post-meta {
            margin-top: -40px;
            padding: 20px 12px;
            background: #fff;
            box-shadow: 0 1px 4px 0 rgba(0,0,0,.16);
            border-radius: 2px;
        }
    }

    .post-card-title {
        display: none
    }

    .post-nav {
        padding: 0;
        margin-left: -16px;
        margin-right: -16px;
        .prev,
        .next {
            width: 50%;
            background: #fff;
            border-bottom: 1px solid @borderColor;
            box-shadow: @boxShadow;
        }
        h4 {
            font-size: 16px;
            line-height: 1.5;
        }
    }

    .has-jax {
        font-size: 13px;
    }
    .MJXc-display {
        overflow-x: auto;
        overflow-y: hidden;
    }

    .comments {
        margin-left: -16px;
        margin-right: -16px
    }
}

@media screen and (max-width:480px) {
    .has-jax {
        font-size: 10px;
    }
    .post-content {
        .highlight,
        .image-bubble,
        >pre {
            margin-left: -16px;
            margin-right: -16px;
        }
        .highlight,
        >pre {
            padding: 16px;
        }
    }
}

