/*
Theme Name:   GeneratePress Child
Theme URI:    https://generatepress.com
Description:  Default GeneratePress child theme
Author:       Tom Usborne
Author URI:   https://tomusborne.com
Template:     generatepress
Version:      0.1
*/

body:not(.fl-builder-edit) .toggle-item .toggle-content {
	display: flex;
	flex-direction: column;

	max-height: 0;
	overflow: hidden;
	opacity: 0;
	visibility: hidden;

	transition:
		margin 0.35s ease,
		padding 0.35s ease,
		max-height 0.35s ease,
		opacity 0.25s ease,
		visibility 0s linear 0.35s;

	margin: 0;
	padding: 0;
	border: none;
}

body:not(.fl-builder-edit) .toggle-item.is-open .toggle-content {
	opacity: 1;
	visibility: visible;

	transition:
		margin 0.35s ease,
		padding 0.35s ease,
		max-height 0.35s ease,
		opacity 0.25s ease,
		visibility 0s;

	margin-top: 10px;
	padding-top: 10px;

	border-style: solid;
	border-width: 0;
	border-top-width: 2px;
	border-color: #dadfe9;
	background-clip: border-box;
}

body:not(.fl-builder-edit) .toggle-heading {
	position: relative;
	cursor: pointer;
}

body:not(.fl-builder-edit) .toggle-heading .fl-module-icon,
body:not(.fl-builder-edit) .toggle-heading .fl-icon {
	cursor: pointer;
}


.calc-generated-result {
	display: flex;
	flex-direction: column;
	gap: 4px;
	margin-top: 20px;
	padding: 15px 18px;
	background: #e5e9ec;
	border-left: 3px solid var(--orange);
}

.calc-result-label {
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .08em;
}

.calc-generated-result strong {
	font-size: 22px;
	line-height: 1.2;
}


/*** locations ***/

.pp-locations {
	width: 100%;
}

.pp-locations__map {
	width: 100%;
	height: clamp(500px, 55vw, 650px);
	background: #f7f8f9;
	margin-bottom: 40px;
	z-index: 1;
	border: 1px solid #e5e8eb;
}


/* Legend */

.pp-locations__legend {
	display: flex;
	flex-wrap: wrap;
	gap: 18px;
	margin: 0 0 20px;
	font-size: 13px;
}

.pp-locations__legend-item {
	display: flex;
	align-items: center;
	gap: 7px;
}

.pp-locations__legend-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	flex: 0 0 auto;
}

.pp-locations__legend-dot--kelly {
	background: #00703c;
}

.pp-locations__legend-dot--third-party {
	background: #ff5722;
}

.pp-locations__legend-dot--precision {
	background: #2a5aa2;
}


/* Divisions */

.pp-locations__division {
	margin-top: 38px;
}

.pp-locations__division:first-of-type {
	margin-top: 0;
}

.pp-locations__division-title {
	margin: 0 0 16px;
	font-size: 1.35em;
}


/* Location grid */

.pp-locations__grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 14px;
}


/* Location card */

.pp-location {
	position: relative;
	padding: 18px;
	border: 1px solid #e3e7eb;
	background: #fff;
	height: 100%;
	font-size: 14px;
	line-height: 1.45;
}

.pp-location::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 3px;
}

.pp-location--kelly::before {
	background: #00703c;
}

.pp-location--third-party::before {
	background: #ff5722;
}

.pp-location--precision::before {
	background: #2a5aa2;
}


/* Type */

.pp-location__type {
	display: block;
	margin-bottom: 5px;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .08em;
}

.pp-location--kelly .pp-location__type {
	color: #00703c;
}

.pp-location--third-party .pp-location__type {
	color: #ff5722;
}

.pp-location--precision .pp-location__type {
	color: #2a5aa2;
}


/* Title */

.pp-location__title {
	margin: 0 0 9px;
	font-size: 17px;
	line-height: 1.25;
}


/* Address / phone / contacts */

.pp-location__address,
.pp-location__phones,
.pp-location__contacts {
	margin-top: 9px;
	line-height: 1.45;
}

.pp-location__address {
	margin-top: 0;
}

.pp-location__phones a,
.pp-location__contacts a {
	font-size: 13px;
	color: inherit;
}

.pp-location__contact {
	margin-top: 8px;
}

.pp-location__contact:first-child {
	margin-top: 0;
}

.pp-location__contact-name {
	font-weight: 700;
}

.pp-location__contact-title {
	display: block;
	font-size: 12px;
}


/* Note */

.pp-location__note {
	margin-top: 8px;
	font-size: 12px;
	font-weight: 600;
}


/* Directions */

.pp-location__directions {
	display: inline-block;
	margin-top: 11px;
	font-size: 13px;
	font-weight: 700;
}


/* Map popup */

.pp-map-popup {
	font-size: 12px;
}

.pp-map-popup strong {
	display: block;
	margin-bottom: 5px;
	font-size: 15px;
}

.pp-map-popup span {
	display: block;
}


/* MapLibre controls */

.pp-locations__map .maplibregl-ctrl-group {
	border: 0;
	border-radius: 0;
	box-shadow: 0 3px 12px rgba(0, 0, 0, .12);
}

.pp-locations__map .maplibregl-ctrl-group button {
	width: 38px;
	height: 38px;
	background-color: #fff;
}

.pp-locations__map .maplibregl-ctrl-group button:hover {
	background-color: #f2f4f6;
}

.pp-locations__map .maplibregl-ctrl-group button + button {
	border-top: 1px solid #e5e8eb;
}


/* MapLibre popups */

.pp-locations__map .maplibregl-popup-content {
	padding: 16px 18px;
	border-radius: 0;
	box-shadow: 0 4px 18px rgba(0, 0, 0, .16);
	font-family: inherit;
	font-size: 12px;
}

.pp-locations__map .maplibregl-popup-close-button {
	padding: 5px 8px;
	font-size: 18px;
	color: #142741;
}

.pp-locations__map .maplibregl-popup-tip {
	border-top-color: #fff;
}


.pp-map-popup__locations {
	margin-top: 12px;
}

.pp-map-popup__location {
	padding: 12px 0;
	border-top: 1px solid #e5e8eb;
}

.pp-map-popup__location:first-child {
	padding-top: 0;
	border-top: 0;
}

.pp-map-popup__location:last-child {
	padding-bottom: 0;
}

.pp-map-popup__location strong {
	margin-bottom: 3px;
}


/* Responsive */

@media (max-width: 1200px) {

	.pp-locations__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}


@media (max-width: 900px) {

	.pp-locations__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}


@media (max-width: 600px) {

	.pp-locations__map {
		height: 450px;
	}

	.pp-locations__grid {
		grid-template-columns: 1fr;
		gap: 12px;
	}

	.pp-location {
		padding: 16px;
	}
}