/* Normalize buttons */
#map-search-form button,
#map-search-form input,
#map-search-form optgroup,
#map-search-form select,
#map-search-form textarea {
	font-family: "Proxima Nova", Arial, "Helvetica Neue", Helvetica, sans-serif;
	font-size: 100%; /* 1 */
	line-height: 1.15; /* 1 */
	margin: 0; /* 2 */
	border: none;
}

/**
 * Show the overflow in IE.
 * 1. Show the overflow in Edge.
 */

#map-search-form button,
#map-search-form input {
	/* 1 */
	overflow: visible;
}

/**
 * Remove the inheritance of text transform in Edge, Firefox, and IE.
 * 1. Remove the inheritance of text transform in Firefox.
 */

#map-search-form button,
#map-search-form select {
	/* 1 */
	text-transform: none;
}

/**
 * Correct the inability to style clickable types in iOS and Safari.
 */

#map-search-form button,
#map-search-form [type="button"],
#map-search-form [type="reset"],
#map-search-form [type="submit"] {
	-webkit-appearance: button;
}

#map {
	height: 545px;
}

#map-search.loading h2 small {
	display: none;
}

#map-search.loading #map-search-results {
	margin-top: 0;
}

#filter-state,
#filter-type {
	min-width: 240px;
}

.filter-label {
	opacity: 0.9;
}

.button__filter::after {
	content: "";
	background: url(../svg/caret-down.svg) center center no-repeat;
	background-size: contain;
	height: 18px;
	width: 18px;
	position: absolute;
	right: 1.5rem;
}

#filter-state.active .button__filter,
#filter-type.active .button__filter,
#filter-state.open .button__filter,
#filter-type.open .button__filter {
	background: #106cff;
}

.map__filters .filter__wrapper.open .filter__container {
	display: block;
}

.map__filters .filter__container {
	max-height: 300px;
	overflow: auto;
	width: 100%;
}

.map__results-items {
	display: grid;
	grid-template-columns: 1fr 1fr 1fr;
	grid-column-gap: 48px;
	grid-row-gap: 48px;
}

.map-search-container {
	width: 100%;
}

#map-search-form {
	color: #1a1a1a;
	font-size: 20px;
	margin: 20px auto;
	float: none;
	max-width: 720px;
	background: #fff;
	padding: 24px;
	border-radius: 4px;
	box-shadow: rgba(0, 14, 55, 0.1) 0 2px 14px 0;
	display: flex;
	align-items: center;
	align-content: center;
	justify-content: flex-start;
}

#map-search-form.focus-within\:shadow-outline:focus-within {
	/* box-shadow: rgba(0, 14, 55, 0.1) 0 2px 14px 0, rgba(0, 0, 0, 0.15) 0 0 0 5px; */
	box-shadow: rgba(0, 14, 55, 0.1) 0 2px 14px 0, rgba(0, 98, 255, 0.5) 0 0 0 5px;
}

#map-search-form input {
	outline: none !important;
}

#map-search-form input,
#map-search-form button,
#map-search-form .schools-count {
	background: none;
	line-height: 24px;
}
#map-search-form button,
#map-search-form .schools-count {
	color: #106cff;
	font-size: 16px;
	font-weight: 900;
}
#map-search-form .schools-count {
	color: #000;
}
#map-search-form button:hover {
	color: #000;
}

#q {
	flex-grow: 4;
	box-shadow: none;
}

#map-search-form .reset,
#map-search-form .submit {
	display: none;
}

.search-submitted #map-search-form .reset {
	display: inline;
}

.filter__container li a {
	color: #000;
	display: block;
}
.filter__container li a:hover {
	background: #000;
	color: #fff;
}

.marker-cluster {
	background: url(../svg/bnc-marker.svg) center center no-repeat;
}
.marker-cluster div {
	background: none;
}

.marker-cluster span {
	line-height: 22px;
	color: #fff;
	font-weight: bold;
	font-size: 16px;
}

.show-address {
	display: none;
	font-size: 13px;
}
.show-address a {
	color: #8d8f92;
	text-decoration: underline;
}
.show-address a:hover {
	color: #000;
}
/* Reset leaflet's default z-indexes */
.leaflet-zoom-box {
	z-index: 800;
}
.leaflet-pane {
	z-index: 400;
}
.leaflet-tile-pane {
	z-index: 200;
}
.leaflet-overlay-pane {
	z-index: 400;
}
.leaflet-shadow-pane {
	z-index: 500;
}
.leaflet-marker-pane {
	z-index: 600;
}
.leaflet-tooltip-pane {
	z-index: 650;
}
.leaflet-popup-pane {
	z-index: 700;
}
.leaflet-map-pane canvas {
	z-index: 100;
}
.leaflet-map-pane svg {
	z-index: 200;
}
.leaflet-control {
	z-index: 800;
}
/* This is the only change. The rest are for reference */
.leaflet-top,
.leaflet-bottom {
	z-index: 999;
}

@media screen and (max-width: 899px) {
	.leaflet-control-zoom {
		display: none;
	}

	.map__results-items {
		grid-template-columns: 1fr 1fr;
		grid-column-gap: 14px;
		grid-row-gap: 14px;
	}

	#map-search-form {
		margin-left: 10px;
		margin-right: 10px;
	}
}

/* Weird breakpoint for our filters */
@media screen and (max-width: 519px) {
	.map__filters {
		flex-direction: column;
		flex-grow: 1;
	}
	#filter-type {
		margin-left: 0;
		margin-top: 2rem;
	}
	.map__filters .filter__container {
		z-index: 1;
	}
}

@media screen and (max-width: 499px) {
	.map__results-items {
		grid-template-columns: 1fr;
		grid-column-gap: 10px;
		grid-row-gap: 10px;
	}

	.address {
		display: none;
	}
	.show-address {
		display: block;
	}
	.map__results-items .telephone .text-link {
		display: none;
	}
	.map__results-items .email .text-link {
		display: none;
	}
	.map__results-items .telephone,
	.map__results-items .email {
		width: 49%;
	}

	.map__results-items .telephone > a,
	.map__results-items .email > a {
		background: #646768;
		text-align: center;
	}
	.map__results-items .telephone > a:hover,
	.map__results-items .email > a:hover {
		background: #106cff;
	}
}
