/* Filters */
.search-filters { left: 0; }
.search-filters-inner { border-top: 1px solid var(--grey); padding-top: 6px; }
.search-filter-type .ais-RefinementList-list { min-height: 52px; }
.search-filter-collections .ais-RefinementList-list { min-height: 156px; }
.search-filter-orientation .ais-RefinementList-list { min-height: 78px; }

/* Per Page */
.search-per-page { width: 100%; max-width: 150px; top: 10px; right: 0; }
.search-per-page select { height: 24px; line-height: 22px; text-transform: uppercase; font-size: 10px; padding: 0 24px 0 10px; background-size: auto 24px; }

/* Algolia */
.layout-search { min-height:100vh; }
.ais-Hits-list { display: grid; grid-gap:var(--grid-gap); grid-template-columns: repeat(3, minmax(0, 1fr)); } 
.ais-Hits-item { list-style-type:none; }
.ais-RefinementList-list { line-height: 2.6; margin-bottom: 18px; max-height: 208px; overflow-y: auto;overflow-x:hidden; padding-right: 14px;  }
.ais-RefinementList-item { list-style-type: none; }
.ais-RefinementList-list::-webkit-scrollbar { width: 3px; }
.ais-RefinementList-list::-webkit-scrollbar-track { background: var(--grey); }
.ais-RefinementList-list::-webkit-scrollbar-thumb { background: var(--black); }
.ais-RefinementList-item { position: relative; }
.ais-RefinementList-item input { appearance: none; position: absolute; border:1px solid var(--dark-grey); width: 11px; height: 11px; min-width:11px; top:0; bottom: 0; right:0; margin: auto; }
.ais-RefinementList-item input:checked { background: var(--dark-grey); }
.ais-RefinementList-count { color:var(--grey); padding-left: 10px; }

/* Refinement : Panels */
.ais-Panel { border-bottom: 1px solid var(--grey); margin-bottom: 6px;}
.ais-Panel-header { color:var(--grey); font-size: var(--font-regular-large); font-family: var(--serif); text-transform: capitalize; letter-spacing: normal; position: relative; margin-bottom: 6px; }
.ais-Panel--collapsed { height: 30px; overflow: hidden; }
.ais-Panel--collapsed .ais-RefinementList { height: 0; }
.ais-Panel--collapsed .ais-Panel-collapseButton svg { transform: rotate(0);}
.ais-Panel-collapseButton { position: absolute; top:0; left: 0; bottom: 0; right: 0; justify-content: flex-end; display: flex; cursor: pointer; }
.ais-Panel-collapseButton svg { width: 24px; height: 24px; padding: 5px; transition: var(--transition-transform); transform: rotate(180deg); }

/* Refinement : Search */
.ais-RefinementList-searchBox .ais-SearchBox-form { position: relative; width: auto; margin-bottom: 10px; top:auto; right:auto; }
.ais-RefinementList-searchBox input[type="search"] { border-top: 0; border-left: 0; border-right: 0; padding: 0; }

/* Current Refinements */
.ais-CurrentRefinements { display: flex; }
.ais-CurrentRefinements-item { list-style-type: none; display: inline; }
.ais-CurrentRefinements-label { display: none; }
.ais-CurrentRefinements-category, .search-term { line-height: 22px; height: 24px; border-radius: 12px; border:1px solid var(--dark-grey); padding: 0 26px; margin-right: 26px; cursor: pointer; position: relative; display: inline-flex; margin-bottom: var(--grid-gap); }
.ais-CurrentRefinements-delete, .search-term-delete { position: absolute; top: 0; bottom: 0; line-height: 3px; font-size: 10px; right: -16px; left: 0; justify-content: flex-end; align-items: flex-start; display: flex;  }
.ais-RefinementList-labelText { white-space: nowrap; text-overflow: ellipsis; overflow: hidden ;}

/* Search Term */
.search-term { display: none; }
.search-term.active { display: inline-flex; }

/* Search */
.ais-SearchBox-submit, .ais-SearchBox-reset, .ais-SearchBox-loadingIndicator { width: 35px; height: 35px; top:1px; right: 1px; bottom:1px; position: absolute; padding: 0; display: flex; justify-content: center; align-items: center; }
.ais-SearchBox-reset, .ais-SearchBox-loadingIndicator { background: var(--white); }
[hidden] { visibility:hidden; }

/* Pagination */
.search-results-pagination { padding: 0 150px 0 0; }
.search-results-pagination-above { margin-bottom:var(--margin-small); }
.search-results-pagination-below { margin-top:var(--margin-small); }
.ais-Pagination-list { display: flex; flex-wrap: wrap; }
.ais-Pagination-link { width: var(--button-size); height: var(--button-size); line-height: var(--button-size); display: inline-block; }
.ais-Pagination-item { list-style-type:none; }
.ais-Pagination-item--disabled { display: none; }
.ais-Pagination-item--selected { font-weight: bold; }

/* No results */
.ais-Hits--empty { padding: 40px; background: var(--light-grey); font-size: var(--font-medium); min-height: 50vw; }
.ais-Hits--empty p { max-width: 1000px; }
.ais-Hits--empty a { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; }


/* Touch Screens */
@media (hover: hover) {
  /* Search */
  .ais-CurrentRefinements-category, .search-term { transition:var(--transition-button); }
  .ais-CurrentRefinements-category:hover, .search-term:hover { background:var(--black); color:var(--white); }
}

/* Desktop */
@media screen and (max-width: 1440px) {
    .ais-Hits-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media screen and (max-width: 1024px) {
    .search-per-page { position: static; margin-bottom: 20px; }
    .search-results-pagination { padding-right: 0; }
    .ais-Hits-list { grid-template-columns: repeat(1, minmax(0, 1fr)); }
}

@media screen and (min-width: 769px) {
    .tab-search-results { grid-template-columns: 400px auto; }
    .search-selections { margin-bottom:var(--margin-small); min-height: 24px; }
    .search-filters { position: sticky; top:0; left: 0; margin-bottom: auto; top:52px; margin-right: 120px; }
    


}

/* Mobile */
@media screen and (max-width: 768px) {
    .search-filters { position: fixed; top:var(--header-height); bottom: 0; left: 0; right: 0; margin:0; z-index: 2; background: var(--white); transform: translateX(-100%); transition:var(--transition-transform); max-width: 320px; }
    .search-filters-mask { opacity:0; visibility: hidden; transition: var(--transition-fade); top:var(--header-height); left: 0; bottom: 0; right:0; background: rgba(0,0,0,0.5); z-index: 1; }
    .search-filters-inner {  padding: var(--padding) var(--padding) 78px var(--padding); overflow: auto; max-height: calc(100vh - 75px); }
    .search-filters-footer { padding:var(--padding); bottom: 0; left:0; right:0; }
    .search-selections { margin-bottom: var(--padding); }
    .search-actions button { border-bottom: 1px solid var(--dark-grey); line-height: 30px; }
    .show-filters { position: fixed; top:0; left: 0; right:0; }
    .show-filters .header-search { visibility:hidden; pointer-events:none; }
    .show-filters .search-filters { transform: translateX(0); }
    .show-filters .search-filters-mask { opacity: 0.5; backdrop-filter: blur(9px); -webkit-backdrop-filter: blur(9px); visibility: visible; }
    .button-show-filters { margin-bottom: var(--padding); }
    .button-apply-filters { width: 100%; }

    /* Algolia */
    .ais-Hits-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ais-SortBy select { border-bottom: 1px solid var(--dark-grey); width: 100%; }
    .ais-Pagination-link { width: 30px; height: 30px; line-height: 30px; }

    /* Per Page */
    .search-per-page { max-width: none; position: static; margin-bottom: 20px; }

}

/* Small Mobile */
@media screen and (max-width: 600px) {

    /* Results */
    .ais-Hits-list { grid-template-columns: repeat(1, minmax(0, 1fr)); }
    
    /* Filters */
    .ais-CurrentRefinements-category, .search-term { padding: 0 16px; }
}