/** fuelLOCATIONS v1.1.0 **/

/*--------------------------------------------------------------
>>> TABLE OF CONTENTS:
----------------------------------------------------------------
# Map Wrapper
# Map Filters
# Map Sidebar (list and location details)
# Map List
# Location Details
# Map Canvas - contains map
# Map Legend
# Mobile View
# Triple Panel Layout
--------------------------------------------------------------*/

/*--------------------------------------------------------------
# Map Wrapper
--------------------------------------------------------------*/
.map-wrapper {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	background: #e5e5e5;
}

.map-wrapper button * {
	pointer-events: none; /* Needed for JS click function */
}

@media (min-width: 50em) {
	.map-wrapper {
		display: flex;
	}
}

/*--------------------------------------------------------------
# Map Filters
--------------------------------------------------------------*/
.map-filters {
	flex: 1 1 100%;
	visibility: hidden;
	z-index: 1;
	padding: 0.5em;
	width: 100%;
	line-height: initial;
	color: #fff;
	background: #005e84;
}

.map-filters .map-title {
	padding-top: 0.2em;
	font-size: clamp(0.8rem, 2vw, 1.2rem);
}

.map-filters .map-field {
	display: inline-block;
	margin-top: 0.2rem;
}

.map-filters select {
	border: 1px solid #1B60A7;
	border-radius: 4px;
	padding: 0.1rem 0.3rem;
	color: #1b60a7;
	background: #fff;
}

.map-filters .map-reset-filter-btn {
	padding: 0.2rem 0.3rem;
}

.map-filter-notice {
	position: absolute;
	top: 0;
	right: 0;
	left: 0;
	z-index: 99;
	margin: auto;
	padding: 0.5em;
	font-size: 0.9em;
	text-align: center;
	color: #fff;
	background: rgba(76, 157, 47, 0.8);
	box-shadow: 0 0 0.2em rgba(0, 0, 0, 0.5);
	transition: opacity .5s ease;
	opacity: 0;
}
.map-filter-notice.active {
	opacity: 1;
}

@media (max-width: 49.99em) {
	.map-filter-notice {
		top: unset;
		bottom: 2rem;
	}
}

@media (min-width: 50em) {
	.map-filters {
		display: flex;
		justify-content: center;
		flex-wrap: wrap;
	}

	.map-filters .map-field {
		margin-left: 1em;
	}
}

.filter-enabled.map-wrapper {
    display: grid;
    grid-template-rows: max-content;
}
.filter-enabled .map-filters {
    visibility: visible;
    position: relative;
}
.filter-enabled .map-sidebar {
    position: relative;
    grid-row: 2;
    grid-column: 1;
}
.filter-enabled .map-list.map-active {
    grid-row: 2;
}
.filter-enabled .map-view-bar {
    grid-row: 3;
}
.filter-enabled .map-canvas {
    position: relative;
    grid-row: 2;
    grid-column: 1;
}

@media only screen and (min-width: 50em) {
    .filter-enabled.map-wrapper {
        grid-template-columns: min-content;
    }
    .filter-enabled .map-filters {
        grid-column: span 2;
    }
    .filter-enabled .map-canvas {
        width: 100%;
        grid-column: 2;
    }
}

/*--------------------------------------------------------------
# Map Sidebar (list and location details)
--------------------------------------------------------------*/
.map-sidebar {
	position: absolute;
	flex: 1 1 100%;
	top: 0;
	right: 0;
	bottom: 2.35rem;
	left: 0;
	z-index: 1;
	margin: 0;
	padding: 0 0 1rem;
	overflow-y: auto;
	overscroll-behavior: contain;
	list-style: none;
	color: #fff;
	background: #333;
}

.map-sidebar::-webkit-scrollbar {
	width: 0.3em;
}

.map-sidebar::-webkit-scrollbar-thumb {
	background-color: #888;
}

.map-sidebar::-webkit-scrollbar-track {
	background-color: #f0f0f0;
}

@media (min-width: 50em) {
	.map-list {
		position: relative;
	}
	.map-sidebar {
		min-width: 20rem;
		flex: 0 1 auto;
		width: 25%;
	}
}

/*--------------------------------------------------------------
## Map List
--------------------------------------------------------------*/
.map-list {
	visibility: hidden;
}
.map-list-item {
	margin: 0;
	border-bottom: 1px solid rgba(255,255,255,0.2);
}

.map-list-button {
	padding: 1rem 1.5rem;
	color: #fff;
	width: 100%;
	text-align: left;
	cursor: pointer;
	transition: all 300ms ease;
}

.map-list-button:hover,
.map-list-button:focus,
.map-list-button.map-active {
	color: #fff;
	background: rgba(0,0,0,0.2);
}

.map-list-button .map-loc-title {
	margin: 0;
	font-family: inherit;
	font-size: 1em;
	font-weight: normal;
	color: inherit;
}

.map-list-button:last-of-type {
	border: none;
}

.map-list-button[disabled] {
	display: none;
}

/*--------------------------------------------------------------
# Location Details
--------------------------------------------------------------*/
.map-loc-details {
	display: flex;
	flex-direction: column;
	flex-wrap: nowrap;
	bottom: 0;
	z-index: 9;
	padding: 0;
	color: #fff;
}
@media (min-width: 50em) {
	.map-filters + .map-loc-details {
		top: 3.1rem;
	}
}

.map-loc-details a {
	font-weight: normal;
	line-height: 1.5;
	text-decoration: none;
	color: #fff;
	cursor: pointer;
}
.map-loc-details a:hover, .map-loc-details a:focus {
	text-decoration: underline;
	color: #fff;
}

.map-loc-img {
	background-size: cover;
	background-position: center;
	height: 10em;
	position: relative;
	margin: 0;
}

.map-loc-header {
	padding: 1rem 1.5rem;
	background: rgba(0,0,0,0.2);
	position: relative;
}
.map-loc-header .map-loc-title {
	margin: 0;
	font-family: var(--title-font);
	font-size: 1.5em;
	font-weight: normal;
}
.map-loc-header .map-loc-title a {
	color: #fff;
}
.map-loc-header .map-loc-title a:hover, .map-loc-header .map-loc-title a:focus {
	text-decoration: underline;
	color: #fff;
}
.map-loc-header .map-loc-category {
	display: block;
	font-size: 0.7rem;
	color: #fff;
	margin-bottom: 0.5rem;
}
.map-loc-header .map-loc-category:before {
	content: 'A division of: '
}

/*Star Ratings */
.fuel-average-rating {
	display: inline-block;
	direction: rtl;
	text-align: center;
	line-height: 0;
	margin-bottom: 0.5rem;
	font-size: 1rem;
	/* Use font-size to change star size - override in style.css EXAMPLE: #map_wrapper .fuel-average-rating { font-size: 0.6rem; } */
}
.rating_total {
	float: left;
	margin: 0.05rem 0.625rem 0 0;
	display: none;
}
.fuel-average-rating i {
	display: inline-block;
	margin: 0 0.1rem;
	width: 1em; /* Do not change */
	height: 1em; /* Do not change */
	color: #000;
}
.fuel-average-rating .checked,
.fuel-average-rating .checked~i,
.fuel-average-rating .checked-before~i {
	color: #ffd700
}
/* location details */
.map-loc-header .fuel-average-rating .checked,
.map-loc-header .fuel-average-rating .checked~i,
.map-loc-header .fuel-average-rating .checked-before~i {
	color: #fff;
}
.fuel-average-rating svg {
	max-width: none;
	width: inherit;
	height: inherit;
}
.fuel-average-rating .half-star,
.fuel-average-rating .half-under {
	position: relative;
	top: 0.25rem;
	overflow: hidden;
	width: calc(1em / 2); /* Do not change */
}
.fuel-average-rating .half-star svg,
.fuel-average-rating .half-under svg {
	width: auto;
}
.fuel-average-rating .half-star {
	direction: ltr;
	margin-right: 0;
}
.fuel-average-rating .half-under {
	margin-left: 0;
}

.map-quick-links {
	display: flex;
	justify-content: space-around;
	padding: 0.7rem;
	text-align: center;
	background: rgba(0,0,0,0.1);
}
.map-quick-links a {
	font-size: 0.8em;
	color: #fff;
}
.map-quick-links a:hover, .map-quick-links a:focus {
	text-decoration: none;
}
.map-quick-links  svg {
	margin-bottom: 0.2rem;
}
.map-quick-links a path {
	transition: all 300ms ease;
}
.map-quick-links a svg {
	color: var(--accent-color);
}
.map-quick-links a:hover svg,
.map-quick-links a:focus svg {
	color: var(--primary-color);
}

.map-loc-info {
	flex: 1 1 auto;
	padding: 1.5rem;
	font-size: 0.9em;
}
.map-loc-info > * {
	position: relative;
	margin: 0 0 1rem;
	padding-left: 1.5rem;
	line-height: 1.3;
}
.map-loc-icon svg {
	position: absolute;
	top: 0.2em;
	left: 0;
	width: 1em;
	height: 1em;
	font-size: 1em;
	color: #fff;
}

.hours {
	display: block;
	max-width: 15em;
}
.hours-row {
	display: flex;
	padding: 0.1em 0;
}
.hours-day {
	margin-right: 0.2em;
	min-width: 2.7em;
}

.map-back {
	display: block;
	position: -webkit-sticky;
	position: sticky;
	bottom: 0;
	padding: 0.7rem;
	width: 100%;
	font-size: 0.8em;
	text-align: center;
	color: #fff;
	background: var(--accent-color);
	cursor: pointer;
	transition: all 0.4s ease;
}
.map-back:hover,
.map-back:focus {
	color: #fff;
}
.map-back svg {
	margin-top: -0.05rem;
	margin-right: 0.2rem;
	vertical-align: top;
	color: #fff;
}

/*--------------------------------------------------------------
# Map Canvas - contains map
--------------------------------------------------------------*/
.map-canvas {
	position: relative;
	width: 100%;
	overflow: hidden;
	visibility: hidden;
}

@media (max-width: 49.99em) {
	.map-canvas {
		position: absolute;
		top: 0;
		right: 0;
		bottom: 2.35rem;
		left: 0;
	}
}

@media (min-width: 50em) {
	.map-canvas {
		flex: 1 1 auto;
		width: 75%;
		height: inherit;
	}
}

/*--------------------------------------------------------------
# Map Legend
--------------------------------------------------------------*/
.map-legend {
	background: rgba(255, 255, 255, 0.8);
	padding: 1em;
	margin: 1em;
	z-index: -1;
	position: absolute;
	bottom: 0.7em;
	right: 0;
}

.map-legend h3 {
	margin: 0;
	text-decoration: underline;
}

.map-legend div {
	margin-top: 0.5em;
}

.map-legend img {
	width: 1em;
	margin-right: 0.5em;
}

/*--------------------------------------------------------------
# Mobile View Bar
--------------------------------------------------------------*/
.map-view-bar {
	display: flex;
	justify-content: space-between;
	position: absolute;
	bottom: 0;
	z-index: 5;
	width: 100%;
	font-size: 0.8rem;
	background: var(--accent-color);
}

.map-view-bar svg {
	position: relative;
	top: -0.05rem;
	width: 0.9rem;
	margin-right: 0.5rem;
}

.map-list.map-active,
.map-canvas.map-active {
	visibility: visible;
	z-index: 2;
}

.map-filters.map-active {
	visibility: visible;
	z-index: 3;
}

.map-view-bar button {
	display: none;
	padding: 0.7rem;
	text-align: center;
	color: #fff;
	width: 100%;
}
.map-view-bar button:hover, .map-view-bar button:focus {
	color: #fff;
	background: rgba(0,0,0,0.2);
}

.map-view-bar .map-show-active {
	display: block;
}

.map-filters:not(.map-active) ~ .map-view-bar .map-filter-txt-show,
.map-filters.map-active ~ .map-view-bar .map-filter-txt-hide {
	display: inline-block;
}

@media (min-width: 50em) {
	.map-view-bar {
		display: none;
	}
	.map-list, .map-canvas {
		visibility: visible;
	}
}


/*--------------------------------------------------------------
# Triple Panel Layout
--------------------------------------------------------------*/
@media (min-width: 82em) {
	.triple-panel .map-loc-details {
		position: relative;
		top: 0.3rem;
		height: calc(100% - 0.6rem);
		left: 0.3rem;
		border-radius: 4px;
	}
	.map-wrapper.triple-panel {
		flex-flow: initial;
	}
}