/**
 * app/code/Nanito/FacetedSearch/view/frontend/web/css/faceted-search.css
 */

.nanito-faceted-search {
    margin-bottom: 30px;
}

.nanito-active-filters {
    margin-bottom: 24px;
    padding-bottom: 18px;
    border-bottom: 1px solid #e5e5e5;
}

.nanito-active-filters-title,
.nanito-facet-title {
    font-weight: 700;
    margin-bottom: 12px;
    text-transform: uppercase;
    font-size: 14px;
}

.nanito-active-filter-list,
.nanito-facet-options {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nanito-active-filter-item,
.nanito-facet-option {
    margin-bottom: 8px;
}

.nanito-active-filter-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
}

.nanito-active-filter-name {
    font-weight: 600;
}

.nanito-clear-all {
    display: inline-block;
    font-size: 13px;
    text-decoration: underline;
}

.nanito-facet {
    margin-bottom: 24px;
}

.nanito-facet-link {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.nanito-checkbox {
    width: 18px;
    height: 18px;
    min-width: 18px;
    border: 1px solid #999;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    line-height: 1;
}

.nanito-facet-option.selected .nanito-checkbox {
    border-color: #000;
    font-weight: 700;
}

.nanito-label {
    flex: 1;
}

.nanito-count {
    opacity: 0.65;
    font-size: 12px;
}

/**
 * Optional: make Magento title look more like Bootstrap h3.
 */
.onlymans.catalog-title .page-title,
.onlymans-catalog-title .page-title,
.onlymans.catalog-title h1,
.onlymans-catalog-title h1 {
    font-size: 1.75rem;
}

.nanito-facet-color-grid {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: .55rem;
    padding: 6px 8px 8px 4px;
}

.nanito-facet-link.color {
    border-radius: 50%;
}

.nanito-facet-color-btn {
    display: block;
    width: 80%;
    aspect-ratio: 1 / 1;
    margin: 0 auto;
    border-radius: 50%;
    cursor: pointer;
    padding: 0;
    border: 1px solid rgba(0, 0, 0, .14);
    background-color: var(--nanito-color, #d1d5db);
    background-image: linear-gradient(145deg, rgba(255, 255, 255, .14), rgba(0, 0, 0, .05));
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, .14);
    transition: box-shadow .15s ease, transform .15s ease, border-color .15s ease;
}

.nanito-facet-color-btn.has-image {
    background-color: #fff;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.nanito-facet-link:hover .nanito-facet-color-btn {
    transform: scale(1.04);
}

.nanito-facet-color-btn.active,
.nanito-facet-link.selected .nanito-facet-color-btn {
    border-color: rgba(0, 0, 0, .35);
    box-shadow:
            0 0 0 3px #fff,
            0 0 0 5px #87afe7,
            inset 0 1px 1px rgba(255, 255, 255, .14);
}

.nanito-facet-color-btn[style*="#ffffff"],
.nanito-facet-color-btn[style*="#fff"] {
    border-color: rgba(0, 0, 0, .35);
}

.nanito-price-filter .range-slider-ui {
    margin-left: 12px;
    margin-right: 12px;
}

.nanito-extra-filters-row-break {
    flex-basis: 100%;
    width: 100%;
    height: 0;
    padding: 0;
    margin: 0;
    border: 0;
}

/* moved inline next to Brand */
#shopFilters .nanito-show-more-filters-wrap {
    flex-basis: auto;
    width: auto;
    display: inline-flex;
    justify-content: flex-start;
    align-items: flex-start;
    order: 50;
}

#shopFilters .nanito-extra-filters-row-break {
    flex-basis: 100%;
    width: 100%;
    height: 0;
    padding: 0;
    margin: 0;
    border: 0;
    order: 60;
}

#shopFilters .nanito-extra-facet {
    order: 70;
    margin-bottom: 20px;
}

/* same visual style, only no forced centered full row */
#shopFilters .nanito-show-more-filters {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    border: 0;
    background: transparent;
    padding: 10px 16px;
    cursor: pointer;
    max-width: 230px;
}

#shopFilters .nanito-show-more-filters .icon-show-more-filters {
    width: 18px;
    height: 18px;
    transition: transform .2s ease;
}

#shopFilters.is-expanded .nanito-show-more-filters .icon-show-more-filters {
    transform: rotate(180deg);
}

#shopFilters .nanito-facet-price .sidebarBlock-content {
    width: 320px;
    min-width: 320px;
}

#shopFilters .nanito-facet-price .filter-price {
    padding: 18px 20px 0 20px;
}

#shopFilters .nanito-facet-price .price-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

#shopFilters .nanito-facet-price .price-wrap-1,
#shopFilters .nanito-facet-price .price-wrap-2 {
    flex: 1;
}

#shopFilters .nanito-facet-price .price-wrap-1 input,
#shopFilters .nanito-facet-price .price-wrap-2 input {
    width: 100%;
}

/* Fix double price range thumbs */
#shopFilters .nanito-facet-price .price-field {
    position: relative;
    height: 36px;
    padding-top: 16px;
    padding-left: 0;
    padding-right: 0;
}

#shopFilters .nanito-facet-price .price-field input[type="range"] {
    position: absolute;
    top: 10px;
    left: 0;
    width: 100%;
    height: 18px;
    margin: 0;
    padding: 0;
    pointer-events: none;
    background: transparent;
    -webkit-appearance: none;
    appearance: none;
}

/* lower slider */
#shopFilters .nanito-facet-price .price-field input[data-range-slider-min] {
    z-index: 2;
}

/* upper slider */
#shopFilters .nanito-facet-price .price-field input[data-range-slider-max] {
    z-index: 3;
}

/* make thumbs clickable */
#shopFilters .nanito-facet-price .price-field input[type="range"]::-webkit-slider-thumb {
    pointer-events: auto;
    position: relative;
    z-index: 5;
    width: 18px;
    height: 18px;
    margin-top: -6px;
    border: 2px solid #232323;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    -webkit-appearance: none;
}

#shopFilters .nanito-facet-price .price-field input[type="range"]::-moz-range-thumb {
    pointer-events: auto;
    position: relative;
    z-index: 5;
    width: 18px;
    height: 18px;
    border: 4px solid #232323;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
}

/* visible track only once */
#shopFilters .nanito-facet-price .price-field input[data-range-slider-min]::-webkit-slider-runnable-track {
    height: 2px;
    background: #323232;
}

#shopFilters .nanito-facet-price .price-field input[data-range-slider-max]::-webkit-slider-runnable-track {
    height: 2px;
    background: transparent;
}

#shopFilters .nanito-facet-price .price-field input[data-range-slider-min]::-moz-range-track {
    height: 2px;
    background: #323232;
}

#shopFilters .nanito-facet-price .price-field input[data-range-slider-max]::-moz-range-track {
    height: 2px;
    background: transparent;
}

/* inputs row */
#shopFilters .nanito-facet-price .price-container {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin: 14px 0 18px;
}

#shopFilters .nanito-facet-price .price-wrap-1,
#shopFilters .nanito-facet-price .price-wrap-2 {
    flex: 1;
    width: auto;
    min-width: 0;
}

#shopFilters .nanito-facet-price .slide_price--to {
    width: auto;
    min-width: 28px;
    text-align: center;
}

.toolbar-item[data-limiter],
.toolbar-item[data-sorting] {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    margin-left: 34px;
}

.toolbar-item[data-limiter] .toolbar-label,
.toolbar-item[data-sorting] .toolbar-label {
    margin: 0;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    line-height: 46px;
}

.nanito-toolbar-filter {
    position: relative;
    width: 122px;
    margin: 0;
}

.nanito-toolbar-sort {
    width: 164px;
}

.nanito-toolbar-filter .sidebarBlock-headingWrapper,
.nanito-toolbar-filter .sidebarBlock-heading {
    height: 46px;
}

.nanito-toolbar-filter .sidebarBlock-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 46px;
    min-height: 46px;
    padding: 0 18px;
    margin: 0;
    border: 1px solid #dcdcdc;
    background: #fff;
    font-size: 14px;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    line-height: 46px;
    cursor: pointer;
}

.nanito-toolbar-filter .sidebarBlock-heading .label-text {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.nanito-toolbar-filter .sidebarBlock-heading .icon,
.nanito-toolbar-filter .sidebarBlock-heading .icon svg {
    width: 14px;
    height: 14px;
    min-width: 14px;
}

.nanito-toolbar-filter .sidebarBlock-content {
    position: absolute;
    top: 46px;
    left: 0;
    width: 100%;
    min-width: 220px;
    z-index: 120;
    background: #fff;
    border: 1px solid #dcdcdc;
    border-top: 0;
    box-shadow: 0 8px 22px rgba(0, 0, 0, .08);
}

.nanito-toolbar-filter .facets__list {
    display: block;
    max-height: none;
    overflow: visible;
    margin: 0;
    padding: 8px 0;
}

.nanito-toolbar-filter .facets__item {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
}

.nanito-toolbar-filter .nanito-toolbar-option {
    display: block;
    padding: 9px 16px;
    color: #232323;
    text-decoration: none;
}

.nanito-toolbar-filter .nanito-toolbar-option:hover {
    background: #f7f7f7;
}

.nanito-toolbar-filter .facet-checkbox {
    padding: 0 !important;
    margin: 0;
    cursor: pointer;
}

.nanito-toolbar-filter .facet-checkbox::before,
.nanito-toolbar-filter .facet-checkbox::after {
    display: none !important;
}

.toolbar-col .icon svg {
    display: block;
}