/* JChere站内搜索：最近搜索关键词下拉框 */

/*
 * header.css 对全部 section 使用 contain:content/content-visibility:auto。
 * 该设置会裁切绝对定位的历史记录下拉框，因此搜索区域必须取消内容裁切。
 */
 #homeSiteSearchSection,
 #jcSiteSearchApp,
 .jc-site-search-history-section {
     content-visibility: visible !important;
     contain: none !important;
     overflow: visible !important;
 }
 
 #homeSiteSearchSection form,
 #homeSiteSearchSection .input-group,
 #jcSiteSearchApp .jc-site-search-form,
 #jcSiteSearchApp .jc-site-search-input-row {
     overflow: visible !important;
 }
 
 .jc-site-search-history-wrap {
     position: relative;
     z-index: 20;
     min-width: 0;
     overflow: visible;
 }
 
 .jc-site-search-history-wrap:focus-within {
     z-index: 1090;
 }
 
 .jc-site-search-history-wrap > input {
     width: 100%;
     min-width: 0;
 }
 
 .jc-site-search-history-menu {
     position: absolute;
     top: calc(100% + 6px);
     right: 0;
     left: 0;
     z-index: 1095;
     overflow: hidden;
     max-height: min(360px, 55vh);
     border: 1px solid #dadce0;
     border-radius: 12px;
     background: #fff;
     box-shadow: 0 4px 10px rgba(32, 33, 36, .18);
 }
 
 .jc-site-search-history-menu[hidden] {
     display: none !important;
 }
 
 .jc-site-search-history-heading {
     display: flex;
     align-items: center;
     justify-content: space-between;
     gap: .75rem;
     padding: .62rem .85rem;
     border-bottom: 1px solid #f1f3f4;
     background: #fff;
     color: #70757a;
     font-size: .82rem;
     font-weight: 700;
 }
 
 .jc-site-search-history-clear {
     padding: .15rem .25rem;
     border: 0;
     background: transparent;
     color: #1a73e8;
     font-size: .78rem;
     font-weight: 500;
     cursor: pointer;
 }
 
 .jc-site-search-history-clear[hidden] {
     display: none !important;
 }
 
 .jc-site-search-history-clear:hover,
 .jc-site-search-history-clear:focus-visible {
     text-decoration: underline;
 }
 
 .jc-site-search-history-list {
     overflow-y: auto;
     max-height: min(300px, 45vh);
     margin: 0;
     padding: .25rem 0;
     list-style: none;
     overscroll-behavior: contain;
     -webkit-overflow-scrolling: touch;
 }
 
 .jc-site-search-history-item {
     display: flex;
     align-items: center;
     width: 100%;
     padding: .68rem .85rem;
     border: 0;
     background: #fff;
     color: #202124;
     font: inherit;
     line-height: 1.4;
     text-align: left;
     cursor: pointer;
     overflow-wrap: anywhere;
 }
 
 .jc-site-search-history-item::before {
     flex: 0 0 auto;
     margin-right: .55rem;
     color: #5f6368;
     content: "\2315";
     font-size: 1rem;
 }
 
 .jc-site-search-history-item:hover,
 .jc-site-search-history-item:focus-visible {
     background: #f1f3f4;
     color: #202124;
     outline: none;
 }
 
 .jc-site-search-history-item:focus-visible {
     background: #e8f0fe;
     color: #202124;
     outline: none;
 }
 
 .jc-site-search-history-empty {
     padding: .72rem .85rem;
     color: #70757a;
     font-size: .9rem;
     line-height: 1.4;
 }
 
 /* 首页Bootstrap input-group中使用包装层后，恢复输入框与按钮的连续边框。 */
 .input-group > .jc-site-search-history-wrap {
     display: flex;
     flex: 1 1 auto;
     width: 1%;
     min-width: 0;
 }
 
 .input-group > .jc-site-search-history-wrap > .form-control {
     position: relative;
     flex: 1 1 auto;
     width: 1%;
     min-width: 0;
     border-top-right-radius: 0;
     border-bottom-right-radius: 0;
 }
 
 .input-group > .jc-site-search-history-wrap + .btn {
     margin-left: -1px;
 }
 
 @media (max-width: 576px) {
     .jc-site-search-history-menu {
         max-height: 48vh;
         border-radius: 9px;
     }
 
     .jc-site-search-history-item {
         padding: .75rem .8rem;
         font-size: .95rem;
     }
 }
 
 