@charset "utf-8";
#main_nav .search {
    visibility: hidden
}

#search_content {
    flex: auto
}

#search_content>.inner {
    margin: 0 auto;
    max-width: var(--MaxContentWidth);
    padding: 0 2em;
    box-sizing: border-box
}

#search_default {
    margin: 4em auto;
    padding: 2em;
    max-width: 50em
}

#search_default .cpt-search {
    font-size: 1.25em;
    padding: .4em;
    border-radius: 5em
}

#search_default .cpt-search:not(:focus-within) {
    border-color: transparent;
    background: var(--body-text-color-a5,#fff)
}

#search_default .tips {
    margin: 2em;
    text-align: center;
    font-size: 1.166667em
}

.search_hot_keywords {
    margin-top: 1.5em
}

.search_hot_keywords__title {
    font-size: .95em;
    opacity: .75;
    margin-bottom: .75em
}

.search_hot_keywords__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: .5em .75em
}

.search_hot_keywords__list a {
    display: inline-block;
    padding: .35em .85em;
    background: var(--body-text-color-a10,rgba(0 0 0/5%));
    border-radius: 2em;
    color: currentColor;
    text-decoration: none;
    font-size: .95em
}

.search_hot_keywords__list a:hover {
    background: var(--body-text-color-a15,rgba(0 0 0/8%))
}

.search_hot_keywords--sidebar {
    margin: 2em 0 0
}

.search_hot_keywords--default {
    margin: 2em auto 0;
    max-width: 42em;
    text-align: center
}

.search_hot_keywords--default .search_hot_keywords__list {
    justify-content: center
}

@media only screen and (max-width: 480px) {
    #search_default {
        padding:0
    }

    #search_default .cpt-search {
        font-size: 1em;
        padding: .25em
    }

    #search_default .tips {
        font-size: 1em
    }
}

#search_result {
    display: grid;
    grid-template-columns: 25em 1fr;
    gap: 4em;
    align-items: flex-start;
    margin: 2em 0
}

#search_result>.side {
    position: sticky;
    z-index: 1;
    top: calc((var(--site-header-height) - var(--global-nav-height)) * 1px + 2em);
    margin: 2em 0
}

#search_result>.side .search:not(:focus-within) {
    border-color: transparent;
    background: var(--body-text-color-a5,#fff)
}

#search_result>.side ul {
    margin: 2em 1.5em
}

#search_result>.side a {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2em;
    align-items: center;
    padding: .75em 0;
    color: currentColor;
    text-decoration: none
}

#search_result>.side a::after {
    content: attr(data-search-counter);
    display: block;
    min-width: 3em;
    padding: 0 .5em;
    box-sizing: border-box;
    text-align: center;
    overflow: hidden;
    background: var(--body-text-color-a10,rgba(0 0 0/5%));
    border-radius: 2em;
    font-weight: 800
}

#search_result>.side span {
    display: block;
    white-space: nowrap
}

#search_result>.category .result {
    scroll-margin-block-start: calc((var(--site-header-height) - var(--global-nav-height)) * 1px + 2.5em);
    margin: 2em 0 4em
}

#search_result>.category .result h3 {
    font-size: 1.5em
}

#search_result>.category .ItemList {
    margin: 2em 0
}

@media only screen and (max-width: 1000px) {
    #search_result {
        grid-template-columns:1fr;
        grid-template-rows: auto 1fr
    }

    #search_result>.side {
        margin: 1em 0 calc((var(--site-header-height) - var(--global-nav-height)) * -1px + 2em);
        position: inherit
    }

    #search_result>.side .search {
        max-width: 35em;
        margin: 0
    }

    #search_result>.side ul {
        margin: 1.5em -2em 0;
        padding: 0 2em;
        max-width: var(--VWidth);
        box-sizing: border-box;
        display: flex;
        align-items: center;
        gap: 1em;
        overflow: hidden;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-color: transparent;
        scrollbar-width: none
    }

    #search_result>.side ul::-webkit-scrollbar {
        display: none
    }

    #search_result>.side ul>li {
        scroll-snap-align: center
    }

    #search_result>.side ul>li {
        flex: none
    }

    #search_result>.side a {
        padding: .75em 1.5em;
        gap: 1em;
        background: var(--body-text-color-a10,#fff);
        border-radius: 3em
    }

    #search_result>.side a::after {
        min-width: unset;
        padding: 0;
        background: unset
    }
}

@media only screen and (max-width: 480px) {
    #search_result>.side a {
        display:block
    }

    #search_result>.side a::after {
        display: none
    }

    #search_result>.category .result h3::after {
        content: '('attr(data-search-counter) ')';
        opacity: .5;
        margin-inline-start:1em}

    #search_result>.category .ItemList {
        --itemlist-gap: 1em;
        --W: 4em
    }
}

/* 16px: iOS không auto-zoom khi focus ô tìm trang /search */
@media only screen and (max-width: 1023px) {
    #search_content .cpt-search {
        font-size: 16px !important;
    }

    #search_content input[name="keywords"],
    #search_content input[type="search"] {
        font-size: 16px !important;
    }
}
