/* Facets */
.ais-SearchBox-form {
	position: relative;
}

/* If using the InstantSearch Panel widget around the SearchBox, override hidden attribute */
.algolia-widget-searchBox .ais-Panel[hidden] {
	display: block;
}

.ais-SearchBox .ais-SearchBox-form button.ais-SearchBox-reset,
.location-container .location-clear,
.algolia-widget-autoCompleteList button.ais-SearchBox-reset {
	position: absolute;
	top: 0;
	right: 0;
	border: none;
	padding: 0;
	transform: translateY(-50%) translateX(50%);
	background: #666666;
	color: white;
	height: 20px;
	width: 20px;
	text-align: center;
	align-items: center;
	vertical-align: middle;
	justify-content: center;
	cursor: pointer;
	display: flex;
}

.ais-SearchBox .ais-SearchBox-form button.ais-SearchBox-reset[hidden],
.location-container .location-clear[hidden],
.algolia-widget-autoCompleteList button.ais-SearchBox-reset[hidden] {
	display: none;
}

.ais-SearchBox-loadingIndicator {
	position: absolute;
	top: 4px;
	right: 2em;
}

.ais-SearchBox .ais-SearchBox-form button.ais-SearchBox-reset svg,
.location-container .location-clear svg,
.algolia-widget-autoCompleteList button.ais-SearchBox-reset svg {
	width: 8px;
	/* height: 10px; */
}

.ais-SearchBox .ais-SearchBox-form button.ais-SearchBox-reset svg path,
.location-container .location-clear svg path {
	fill: white;
}

.ais-RefinementList-searchBox button.ais-SearchBox-submit {
	display: none;
}

input.ais-SearchBox-input[type="search"] {
	background-image: url('../images/icon-search.png');
	background-repeat: no-repeat;
	background-position: calc(100% - 0.5em) center;
	background-size: 1.3em;
	height: 52px;
	box-shadow: none;
}

.ais-MenuSelect select {
	max-width: 100%;
}

.ais-RefinementList-count, .ais-HierarchicalMenu-count {
	background-color: #dfe2ee;
	border-radius: 10px;
	color: #3a4570;
	display: inline-block;
	font-size: 12px;
	min-width: 20px;
	height: 20px;
	text-align: center;
	vertical-align: middle;
	line-height: 20px;
	vertical-align: middle;
	position: relative;
	top: -3px;
	width: auto;
    padding: 0 5px;
	margin-left: 1rem;
}

body .leaflet-control a {
	text-decoration: none;
}

.result-facet-hits {
	width: 100%;
}

.yoko-algolia-search .algolia-widget {
	margin-bottom: 20px;
}

/* Search results */

.algolia-search-results + .algolia-no-filters-message,
.result-facet-hits + .algolia-no-filters-message {
	display: none;
}

body.algolia-no-filters.algolia-hide-empty-results .algolia-search-results + .algolia-no-filters-message,
body.algolia-no-filters.algolia-hide-empty-results .result-facet-hits + .algolia-no-filters-message {
	display: block;
	text-align: center;
	width: 100%;
}

body.algolia-no-filters.algolia-hide-empty-results .algolia-search-results,
body.algolia-no-filters.algolia-hide-empty-results .result-facet-hits,
body.algolia-no-filters.algolia-hide-empty-results .result-facet-pagination,
body.algolia-no-filters.algolia-hide-empty-results .algolia-widget-pagination,
body.algolia-no-filters.algolia-hide-empty-results .result-facet-stats,
body.algolia-no-filters.algolia-hide-empty-results .algolia-widget-stats,
body.algolia-no-filters.algolia-hide-empty-results .algolia-map-icon-container,
.ais-Pagination.ais-Pagination--noRefinement {
	display: none;
}

#hits ol.ais-Hits-list {
	list-style: none;
	padding-left: 0;
}

#hits ol.ais-Hits-list li {
	font-size: 14px;
	margin-bottom: 40px;
}

#hits .feed-item-simple {
	background-color: #fff;
}

/* A shake animation */
.ais-Hits-item > .js-clicked {
	animation: shake 0.5s;
	animation-delay: 0.5s;
}

@keyframes shake {
	0% { transform: rotate(0deg) scale(1); }
	25% { transform: rotate(5deg); }
	50% { transform: rotate(0deg) scale(1.15); }
	75% { transform: rotate(-5deg); }
	100% { transform: rotate(0deg) scale(1); }
}

.leaflet-popup-content {
    font-size: 1.5rem;
}

/* Pagination */
.ais-Pagination-list {
	align-items: center;
	display: flex;
	gap: 0.3rem;
	list-style: none;
	justify-content: center;
	padding-left: 0;
}

.ais-Pagination-link {
	border: 1px solid #c4c8d8;
	display: block;
	padding: 0.3rem 0.6rem;
	text-align: center;
	transition: background-color .2s ease-out;
	-webkit-transition: background-color .2s ease-out;
	min-width: 2em;
}

.ais-Pagination-link:active,
.ais-Pagination-link:focus,
.ais-Pagination-link:hover {
	background-color: #ffffff;
	text-decoration: none;
}

.ais-Pagination-item--disabled .ais-Pagination-link {
	opacity: .6;
	cursor: not-allowed;
	color: #a5abc4;
}

.ais-Pagination-item--selected .ais-Pagination-link {
    color: #fff;
    background-color: #435166;
    border-color: #435166;
}

.ais-GeoSearch-map {
	height: 500px; /* You can change this height */
}

.algolia-map-icon {
    /* Set the marker size here */
    width: 36px;
    height: 36px;
    border-radius: 2rem;
    /* Set the marker color here */
    background: #aa3300;
    display: inline-block;
    border-bottom-right-radius: 0;
    position: relative;
    transform: rotate(45deg);

    /* optional fanciness */
    border: 1px solid #881100;
    bottom: 10px;
}

/* inner circle (optional if you don't need the central dot) */
.algolia-map-icon::before {
    content: "";
    background: white;
    width: 50%;
    height: 50%;
    border-radius: 100%;
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translate(-50%, -50%);

    /* optional fanciness */
    box-shadow: 0.1rem 0.1rem 0.2rem 0.1rem rgba(0, 0, 0, 0.1);
}

/* shadow (optional if you don't need a shadow) */
.algolia-map-icon::after {
    content: "";
    background: rgba(128, 128, 128, 0.2);
    width: 75%;
    height: 75%;
    border-radius: 100%;
    position: absolute;
    top: 100%;
    left: 100%;
    transform: translate(-50%, -50%) rotate(45deg) scaleX(0.5);
}

.widget.search-facet-_geoloc-wrapper {
	display: none;
}

.ais-RefinementList-showMore.ais-RefinementList-showMore--disabled {
	display: none;
}

.ais-RefinementList-searchBox {
	margin-bottom: 1rem;
}

/* Checkboxes */

.ais-RefinementList-label,
.ais-GeoSearch-label {
	cursor: pointer;
}

.ais-RefinementList-label input,
.ais-GeoSearch-label input {
	display: none;
}

.ais-RefinementList-label:before,
.ais-GeoSearch-label:before {
    content: '';
    height: 14px;
    width: 14px;
    border: 1px solid #6D6D6D;
    display: inline-block;
    border-radius: 2px;
    margin-right: 8px;
    flex-shrink: 0;
}

.ais-RefinementList-label:hover:before,
.ais-RefinementList-label:focus:before,
.ais-GeoSearch-label:hover:before,
.ais-GeoSearch-label:focus:before,
.ais-RefinementList-item--selected .ais-RefinementList-label:before,
.ais-GeoSearch-label.ais-GeoSearch-label--selected:before {
	background-image: url("data:image/svg+xml,%3Csvg width='10' height='10' viewBox='0 0 10 10' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='10' height='10' fill='%236D6D6D'/%3E%3C/svg%3E%0A");
    background-size: 10px 10px;
    background-position: center;
    background-repeat: no-repeat;
}

label.ais-RefinementList-label:hover:before,
label.ais-RefinementList-label:focus:before,
.ais-GeoSearch-label:hover:before,
.ais-GeoSearch-label:focus:before {
	opacity: 0.5;
}

.result-facet-_geoloc,
.result-facet-geosearch {
	height: 400px;
}

.ais-GeoSearch-tree div {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.ais-GeoSearch-tree {
	padding: 1rem 0;
}

.ais-GeoSearch-tree .ais-GeoSearch-label {
	padding: 1rem 0;
}

.location-container {
	position: relative;
	margin-bottom: 1rem;
}

.location-input-container {
	position: relative;
}

.location-container .location-button {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	right: .25em;
	background-color: transparent;
	padding: 0;
}

.location-container .location-input-container > input[type="text"]:placeholder-shown + button + button {
	display: none;
}

.location-container .location-button > i {
	display: block;
}

.location-container .location-button:hover {
	background-color: transparent;
}

.location-container input.loading + .location-button > i {
	animation: spin 1s infinite linear;
	display: block;
}

/* Spin Animation Keyframes */
@keyframes spin {
	0% {
		transform: rotate(0deg);
	}
	100% {
		transform: rotate(359deg);
	}
}

.location-container .location-button:hover i:before {
	opacity: 1;
}

.location-container .location-button i:before {
	content: '';
	background-image: url('../images/icon-locate.png');
	background-size: 100%;
	background-repeat: no-repeat;
	background-position: center;
	width: 1.5em;
	height: 1.5em;
	opacity: .5;
	display: block;
}

.location-actions {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.leaflet-pane {
	z-index: 10;
}

/* Heirarchical Menu Widget */
.ais-HierarchicalMenu-item.ais-HierarchicalMenu-item--selected.ais-HierarchicalMenu-item--parent {
	margin-bottom: 1rem;
}

.ais-HierarchicalMenu-link.ais-HierarchicalMenu-link--selected {
	font-weight: bold !important;
}

/* Select2 Widget */

body.yoko-algolia-search button.select2-selection__clear {
    color: initial;
    padding: initial;
    line-height: initial;
}

.algolia-directory-filters-container > button.filter-toggle,
.algolia-directory-filters-container button.filter-toggle {
	display: none;
}

@media screen and (max-width: 767px) {
	body, html {
		overflow-x: hidden;
	}

	.algolia-directory-filters-container {
		position: fixed;
		width: 100vw !important;
		bottom: -75vh;
		bottom: -75dvh;
		background: white;
		z-index: 1000;
		height: 75vh;
		height: 75dvh;
		left: 0;
		right: 0;
		margin: 0 !important;
		box-shadow: 0 0 100px rgba(0,0,0,1);
		transition: all .25s linear;
	}

	.algolia-directory-filters-container > button.filter-toggle {
		display: flex;
		background-color: black;
		color: white;
		text-align: center;
		align-content: center;
		justify-content: center;
		left: 50%;
		transform: translateX(-50%);
		vertical-align: middle;
		line-height: 2rem;
		padding: 1rem 2rem;
		transition: all .25s linear;
		z-index: 10000;
		/* bottom: calc( env(safe-area-inset-bottom) + 2rem ); */
		/* position: fixed; */
		position: absolute;
		top: -10rem;
	}

	/* Add HeroIcon Chevron Up */
	.algolia-directory-filters-container > button.filter-toggle:after {
		content: '';
		background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='1.5' stroke='%23ffffff' class='w-6 h-6'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='m4.5 15.75 7.5-7.5 7.5 7.5' /%3E%3C/svg%3E%0A");
		background-size: 100%;
		background-repeat: no-repeat;
		background-position: center;
		width: 1em;
		height: 1em;
		display: inline-block;
		margin-left: .5em;
		top: 2px;
		position: relative;
		transition: all .25s linear;
	}

	.algolia-directory-filters-container > div {
		position: absolute;
		top: 0 !important;
		left: 0;
		right: 0;
		bottom: 0;
		overflow: auto;
	}

	.algolia-directory-filters-container.open {
		bottom: 0;
		bottom: env(safe-area-inset-bottom);
	}

	.algolia-directory-filters-container.open > button.filter-toggle {
		/* bottom: calc( env(safe-area-inset-bottom) + 100dvh - 7rem ); */
		top: -6rem;
	}

	.algolia-directory-filters-container.open > button.filter-toggle:after {
		transform: rotate(180deg);
	}
}

.algolia-results-container {
	display: flex;
	justify-content: space-between;
	flex-wrap: wrap;
}

.algolia-results-container .result-facet-hits {
	width: 100%;
	margin-top: 20px;
}

/* AutoComplete */

.algolia-widget-autoCompleteList {
	position: relative;
}

.autoComplete_wrapper {
	display: block;
}

.ais-SearchBox-input.autoComplete {
	width: 100%;
}

.autoComplete_wrapper > ul > li {
	font-size: 1em;
}

.algolia-widget-autoCompleteList.loading .autoComplete_wrapper input {
	background-image: none;
}

.algolia-widget-autoCompleteList.loading .autoComplete_wrapper {
	position: relative;
}

/* HTML: <div class="loader"></div> */
.algolia-widget-autoCompleteList.loading .autoComplete_wrapper:after {
	content: '';
	position: absolute;
	right: 10px;
	top: 10px;
	width: 30px;
	padding: 5px;
	aspect-ratio: 1;
	border-radius: 50%;
	background: rgba(0,0,0,0.4);
	--_m: conic-gradient(#0000 10%,#000),
   linear-gradient(#000 0 0) content-box;
	-webkit-mask: var(--_m);
	mask: var(--_m);
	-webkit-mask-composite: source-out;
	mask-composite: subtract;
	animation: spinningLoaderAnimation 1s infinite linear;
}
@keyframes spinningLoaderAnimation {to{transform: rotate(1turn)}}

[id^="autoComplete_list_"] li em {
	font-weight: bold;
	font-style: normal;
}

[id^="autoComplete_list_"] .no_result {
	padding: 0.3rem 0.5rem;
	color: rgba(0,0,0,0.7);
}

.leaflet-popup-content .multi-records-list {
	list-style: none;
	margin: 0;
	padding: 0;
}