/* search area */
.toolbar-search {
    margin: 0 10px;
    line-height: 80px;
    position: relative;
}

@media (max-width: 600px) {
    .toolbar-search {
        display: none;
    }
}

.toolbar-search input {
    outline: none;
    border: 1px solid var(--color-book-border, rgba(13, 17, 23, 0.2));
    background: var(--color-bg-canvas, #fff);
    border-radius: 3px;
    line-height: 28px;
    width: 250px;
    padding: 0 10px;
    color: var(--color-text-primary, #c9d1d9);
    font-size: 14px;
    transition: width 0.1s;
}

.toolbar-search input:focus {
    border-color: var(--color-state-focus-border, #0969da);
    width: 300px;
}

.toolbar-search input::placeholder {
    color: var(--color-text-primary, #c9d1d9);
}

.toolbar-search:after {
    content: ' ';
    display: inline-block;
    width: 19px;
    height: 20px;
    position: absolute;
    margin-top: -11px;
    top: 50%;
    right: 5px;
}

:root .toolbar-search:after, [data-color-mode=light] .toolbar-search:after {
    background-image: url(data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJMYXllcl8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCIKCSB3aWR0aD0iMTlweCIgaGVpZ2h0PSIyMHB4IiB2aWV3Qm94PSIwIDAgMTkgMjAiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDE5IDIwOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+CgkgPHBhdGggZmlsbD0ibm9uZSIgc3Ryb2tlPSJyZ2JhKDEzLCAxNywgMjMsIDAuMikiIGQ9Ik0zLjUsMC41aDEyYzEuNywwLDMsMS4zLDMsM3YxM2MwLDEuNy0xLjMsMy0zLDNoLTEyYy0xLjcsMC0zLTEuMy0zLTN2LTEzQzAuNSwxLjgsMS44LDAuNSwzLjUsMC41eiIvPgoJIDxwYXRoIGZpbGw9InJnYmEoMTMsIDE3LCAyMywgMC4yKSIgZD0iTTExLjgsNkw4LDE1LjFINy4xTDEwLjgsNkwxMS44LDZ6Ii8+Cjwvc3ZnPg==);
}

[data-color-mode=dark] .toolbar-search:after {
    background-image: url(data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJMYXllcl8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCIKCSB3aWR0aD0iMTlweCIgaGVpZ2h0PSIyMHB4IiB2aWV3Qm94PSIwIDAgMTkgMjAiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDE5IDIwOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+CgkgPHBhdGggZmlsbD0ibm9uZSIgc3Ryb2tlPSJyZ2JhKDI1NSwgMjU1LCAyNTUsIDAuMikiIGQ9Ik0zLjUsMC41aDEyYzEuNywwLDMsMS4zLDMsM3YxM2MwLDEuNy0xLjMsMy0zLDNoLTEyYy0xLjcsMC0zLTEuMy0zLTN2LTEzQzAuNSwxLjgsMS44LDAuNSwzLjUsMC41eiIvPgoJIDxwYXRoIGZpbGw9InJnYmEoMjU1LCAyNTUsIDI1NSwgMC4yKSIgZD0iTTExLjgsNkw4LDE1LjFINy4xTDEwLjgsNkwxMS44LDZ6Ii8+Cjwvc3ZnPg==);
}

/* search results */
.search-section .search-result-title {
    text-align: center;
}

.search-section .search-results-list .search-results-item {
    margin-bottom: 60px;
}

.search-section .search-result-title .keyword {
    color: var(--theme-color, var(--color-book-theme, #a10000));
}

.search-section .search-results-list .search-results-item-title,
.search-section .search-results-list .search-results-item-title a,
.search-section .search-results-list .search-results-item-title a:focus {
    color: var(--color-text-link, #0969da);
    outline: none;
}

.search-section .search-results-list pre .highlight {
    color: var(--color-prettylights-syntax-entity, #8250df);
    font-weight: bold;
}

.search-section .search-results-list {
    margin-top: 100px;
    list-style: none;
}

.search-section .search-results-list pre,
.search-section .search-results-list code {
    color: var(--color-text-primary, #c9d1d9);
    font-family: inherit;
}

.search-section .search-results-list pre {
    background-color: var(--color-bg-tertiary, #f6f8fa);
    padding: .85em 1em;
    margin-bottom: 1.275em;
    line-height: 1.7;
}

/* loading */
.book-body div.loading-item {
    background: var(--color-book-header-bg, rgba(255, 255, 255, 0.7));
    position: absolute;
    z-index: 2;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.book-body div.loading-item .loading {
    font-size: 0;
    text-align: center;
    position: absolute;
    top: 50%;
    left: 50%;
    height: 50px;
    margin-top: -25px;
    margin-left: -12.905px;
    transition: all 0.5s;
    box-sizing: border-box;
}

.book-body div.loading-item .loading > div {
    margin: 0 1px;
    height: 100%;
    width: 3px;
    display: inline-block;
    animation: stretchdelay 1.2s infinite ease-in-out;
    background-color: var(--color-text-primary, #24292f);
}

@-webkit-keyframes stretchdelay {
    0%,
    40%,
    100% {
        -webkit-transform: scaleY(0.4);
    }
    20% {
        -webkit-transform: scaleY(1);
    }
}

@keyframes stretchdelay {
    0%,
    40%,
    100% {
        transform: scaleY(0.4);
        -webkit-transform: scaleY(0.4);
    }
    20% {
        transform: scaleY(1);
        -webkit-transform: scaleY(1);
    }
}
