/* ----

# Kico Style Docs
# By: Dreamer-Paul
# Last Update: 2022.12.25

---- */

/* 0 - 全局
-------------------------------- */
:root {
    --light-blue: #57c4fd;
    --darker-gray: #666;

    --bg-dark: #fafafa;
    --bg-darker: #f4f4f4;

    --padding: 1.5em;
}

body {
    margin-left: 3.5em;
}

body.has-bar {
    margin-left: 15.5em;
}

@media screen and (max-width: 600px) {
    body, body.has-bar {
        margin-top: 3.5em;
        margin-left: 0;
    }
}

h1, h2, h3 { font-weight: lighter }
h4, h5, h6 { font-weight: normal }

.btn.customed { border-radius: 3em }

.btn.blue.customed {
    background: #57c4fd;
    box-shadow: 0 4px #41a5cd;
    transition: background .3s, box-shadow .3s, transform .3s;
}
.btn.blue.customed:active {
    box-shadow: none;
    background: #41a5cd;
    transform: translateY(4px);
}


/* 1 - 页眉
-------------------------------- */
.sidebar {
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 3;
    color: #fff;
    position: fixed;
    background-color: var(--light-blue);
}

.sidebar img, .sidebar svg {
    vertical-align: top;
}

.sidebar .header {
    padding: 1em;
    cursor: pointer;
    background-color: #3fb2ed;
}

.sidebar .header img {
    width: 1.5em;
}

.sidebar .title {
    display: none;
    margin-left: .25em;
}

.sidebar .menu a {
    color: #fff;
    padding: 1em;
    display: block;
    position: relative;
}
.sidebar .menu a:hover svg {
    transform: scale(1.1)
}
.sidebar .menu svg {
    fill: #fff;
    width: 1.5em;
}

.sidebar .menu a::before, .sidebar .menu a::after {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.sidebar .menu a:before {
    left: 3em;
    top: 1.25em;
    content: '';
    position: absolute;
    border: .5em solid transparent;
    border-right-color: rgba(0, 0, 0, .6);
}
.sidebar .menu a::after {
    top: .5em;
    left: 4em;
    padding: .5em 1em;
    position: absolute;
    white-space: nowrap;
    border-radius: .5em;
    content: attr(content);
    background: rgba(0, 0, 0, .6);
}

.sidebar .menu a:hover::before, .sidebar .menu a:hover::after {
    opacity: 1;
    visibility: visible;
}

@media screen and (max-width: 600px) {
    .sidebar {
        right: 0;
        bottom: auto;
    }

    .sidebar .header { float: left }
    .sidebar .title { display: inline-block }
    .sidebar .menu { float: right }
    .sidebar .menu a { float: left }

    .sidebar .menu a::before {
        top: 3em;
        left: 1.25em;
        border-color: transparent;
        border-bottom-color: rgba(0, 0, 0, .6);
    }
    .sidebar .menu a::after {
        top: 4em;
        left: 0;
    }
}

.sub-sidebar {
    top: 0;
    left: 3.5em;
    bottom: 0;
    width: 12em;
    padding: 1em;
    z-index: 1;
    position: fixed;
    overflow-y: auto;
    border-right: 1px solid #eee;
}
.sub-sidebar > ul {
    margin: 0;
    list-style: none;
}
.sub-sidebar > ul > li {
    margin-bottom: 2em;
}

.sub-sidebar > ul > li > ul a {
    color: #555;
    font-weight: lighter;
}

.sub-sidebar a {
    color: inherit;
    line-height: 2em;
}

@media screen and (max-width: 600px) {
    .sub-sidebar {
        left: -12em;
        top: 3.5em;
        background: #fff;
        border-right: none;
        transition: transform .3s;
    }
    .sub-sidebar.active {
        outline: 50em solid rgba(0, 0, 0, .5);
        transform: translateX(100%);
    }
}


/* 2 - 主体内容
-------------------------------- */
main .ks-title {
    padding: 1em;
    text-align: center;
    margin-bottom: 2em;
    border-bottom: 1px solid #eee;
}

main .ks-title h2 {
    color: var(--darker-gray);
    font-size: 1.25em;
}

main .ks-content {
    margin-bottom: 2em;
    padding-bottom: 1em;
}

main .ks-content section { margin-top: 5em }
main .ks-content section:first-child { margin-top: 0 }

main .ks-content section > * { margin-bottom: 1em }
main .ks-content section > *:last-child { margin-bottom: 0 }

main .ks-content > h1 {
    color: var(--darker-gray);
    font-size: 1.6em;
    position: relative;
    margin-bottom: 1.5em;
    padding-bottom: .5em;
    display: inline-block;
    scroll-margin-top: 5em;
}
main .ks-content > h1::before {
    content: "";
    left: 0;
    bottom: 0;
    z-index: -1;
    width: 1.5em;
    position: absolute;
    border-radius: 1em;
    border-bottom: .25em solid var(--yellow);
}

main .ks-content section > h2[id] { font-size: 1.4em }
main .ks-content section > h2[id]::before {
    content: "#";
    color: var(--light-blue);
    margin-right: .25em;
}

main .ks-content .demo-block {
    padding: var(--padding);
    border-radius: var(--radius);
    background-color: var(--bg-dark);
    margin-bottom: 0;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

main .ks-content .code-block {
    padding: var(--padding);
    border-radius: var(--radius);
    background-color: var(--bg-darker);
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    margin-bottom: 3em;
}

main .ks-content .code-block:last-child {
    margin-bottom: 0;
}

main .ks-content .code-block summary {
    cursor: pointer;
}

main .ks-content .code-block[open] summary {
    margin-bottom: 1em;
}

/* 首页更多产品 */
.more-product {
    padding: 1.5em;
    border-radius: 1em;
    background: #fafafa;
}
main .more-product + .more-product { margin-top: 1em }

main .more-product p {
    color: var(--darker-gray);
}

/* Demo 样式 */
.show-notice .ks-notice {
    animation: none;
    margin: 0 0 1em 0;
}

.float-demo .float-left, .float-demo .float-right {
    color: #fff;
    padding: 1em;
    background: #3fb2ed;
    border-radius: .5em;
}

.grids-size-demo p, .grids-auto-demo p, .grids-padding-demo p, .columns-hide-demo p {
    color: #fff;
    padding: 1em;
    background: #3fb2ed;
    border-radius: .5em;
}

.animation-demo {
    padding-top: 5em !important;
    padding-bottom: 5em !important;
}


/* 3 - 页尾
-------------------------------- */
footer {
    color: #666;
    padding: 1em 0;
    text-align: center;
    border-top: 1px solid #eee;
}

/* 返回页首 */
footer .to-top {
    z-index: 1;
    color: #fff;
    width: 2em;
    right: 1em;
    bottom: -2em;
    display: block;
    position: fixed;
    border-radius: 50%;
    text-align: center;
    background: rgba(0, 0, 0, .2);
    transition: background .3s, bottom .3s;
}
footer .to-top.active {
    bottom: .85em;
}
footer .to-top:hover {
    color: #fff;
    background: #ffc670;
}
footer .to-top:before {
    content: "\f106";
    font: 1em/2em "FontAwesome";
}


/* 4 - 附加
-------------------------------- */
.gt-container .gt-meta { z-index: auto !important }
.gt-comment-text, .gt-header-controls-tip { display: none }

.token.comment, .token.block-comment, .token.prolog, .token.doctype, .token.cdata { color: slategray }
.token.punctuation { color: #f8f8f2 }
.token.namespace { opacity: .7 }
.token.property, .token.tag, .token.function-name, .token.constant, .token.symbol, .token.deleted { color: #f92672 }
.token.boolean, .token.number { color: #ae81ff }
.token.selector, .token.attr-name, .token.string, .token.char, .token.function, .token.builtin, .token.inserted { color: #a6e22e }

.token.operator, .token.entity, .token.url, .token.variable { color: #f8f8f2 }
.token.atrule, .token.attr-value, .token.class-name { color: #e6db74 }
.token.keyword { color: #66d9ef }
.token.regex, .token.important { color: #fd971f }

.language-css .token.string, .style .token.string { color: #28b9be }

.token.important, .token.bold { font-weight: bold }
.token.italic { font-style: italic }
.token.entity { cursor: help }
.token.important { font-weight: normal }
