@import "abstracts/functions";

/* Advanced search */

.advanced-search-container {
	@include break-at(small-desktop-max) {
		flex-direction: column-reverse;
        flex: 1;
        width: calc(100vw - 50px);
	}
    .facets-search-container {
        width: calc(100% - 275px);
        height: calc(100vh - 115px);
        overflow-y: auto;
        padding: 5px;
        background: white;
        border-inline-start: 1px #e0e0e0 solid;
        @include break-at(small-desktop-max) {
            flex: 1;
            width: 100%;
        }
    }
	.facets-container {
		@include break-at(small-desktop-max) {
			flex: 1;
			width: 100%;
		}
		.search-facets {
			@include break-at(small-desktop-max) {
				height: auto;
				overflow-y: hidden;
			}
			.search-facet-item {
                .search-facet-item-heading {
				&:focus {
					box-shadow: inset 0 0 0 3px #000;
					text-decoration: underline;
				}
				&:hover {
					text-decoration: underline;
                    }
				}
			}
		}
	}
}

.facets-container {
    width: 275px;
    border-inline-start: 1px solid #ddd;
}

.faceted-search-card-container {
    border: 1px solid #ddd;
    padding: 20px;
    margin: 15px;
    background: #f9f9f9;
    @include break-at(small-desktop-max) {
        margin: 0px;
    }
}

.search-facets {
    height: calc(100vh - 115px);
    overflow-y: auto;
    background: #fbfbfb;
}

.list-group.search-facets {
    margin: 0;
}

.search-facet-item {
    position: relative;
    display: block;
    padding: 10px 15px;
    margin-bottom: -1px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-right-width: 0px;
    border-left-width: 0px;
    overflow: auto;
    width: 100%;
}

.search-facet-item:first-of-type {
    border-top-width: 1px;
}

a.search-facet-item:not(.active):hover {
    cursor: pointer;
    background: #fbfbfb;
}

a.search-facet-item:hover,
a.search-facet-item:focus {
    background-color: #f8f8f8;
}

.search-facet-item.header {
    background: #f2f2f2;
    padding-top: 5px;
    border-top: none;
    position: sticky;
    top: 0px;
    z-index: 10;
}

.search-facet-item.header .search-facet-item-heading {
    font-weight: 600;
    margin-bottom: 5px;
}

div.search-facet-item.disabled {
    border-bottom: 1px solid #ddd;
    padding-left: 10px;
    padding-right: 10px;
}

.search-facet-item-heading {
    font-weight: 400;
    font-size: 1.3rem;
}

.search-facet-item.header input {
    border-color: #bbb;
}

a.search-facet-item .search-facet-item-heading {
    color: #666;
    margin: 0px;
}

a.search-facet-item {
    color: #777;
}

.search-facet-item.disabled {
    background: #f6f6f6;
    color: #666;
    cursor: pointer;
}

a.search-facet-item.disabled {
    cursor: default;
}

.facet-name {
    font-size: 1.5rem;
    color: #333;
}

.facet-search-criteria {
    position: relative;
    padding: 10px 0px 0px 0px;
}

.facet-search-button {
    margin: 10px;
    display: flex;
    justify-content: flex-end;
}

.facet-btn-group {
    display: flex;
    margin: 5px 20px;
}

.facet-btn {
    width: 50%;
    height: 40px;
}

.facet-btn:focus,
.facet-btn.selected {
    background: #ee9818;
}

.facet-label {
    margin-left: 5px;
    margin-bottom: 5px;
}

.facet-body {
    padding-top: 5px;
    padding-bottom: 45px;
    margin-left: 10px;
}

.facet-body .col-md-4.col-lg-3 {
    padding-right: 5px;
}
.facet-body .col-md-3.col-lg-2 {
    padding-right: 5px;
}

.facet-body div div .select2-container {
    border: none;
}

.facet-body .chosen-container-single .chosen-single {
    height: 36px;
}