/**
 * Consent placeholder for the [us_gmaps] element.
 *
 * Colours come from the Impreza theme options via the CSS custom properties
 * the theme already prints on :root, so the gate follows the site palette.
 *
 * Selectors use a child combinator throughout: a bare `.lhmap-gate` ties with
 * attribute selectors from plugin stylesheets that load later and can lose the
 * `position: absolute`, which drops the placeholder below the map.
 */

.lhmap-wrap {
	position: relative;
	width: 100%;
}

.lhmap-wrap > .lhmap-gate,
.w-map.confirm_load > .lhmap-gate {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	padding: 16px 14px;
	background: #eceef0;
	transition: opacity .35s ease;
}

.lhmap-wrap > .lhmap-gate.is-gone,
.w-map.confirm_load > .lhmap-gate.is-gone {
	opacity: 0;
	pointer-events: none;
}

/* Consent already on record: never paint the placeholder at all */
html.lhmap-consented .lhmap-gate {
	display: none !important;
}

/* Backdrop
   ------------------------------------------------------------------------ */

.lhmap-gate > .lhmap-gate-bg {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
}

.lhmap-gate .lhmap-bg-base {
	fill: #eceef0;
}

.lhmap-gate .lhmap-bg-block {
	fill: #e1e5e9;
}

.lhmap-gate .lhmap-bg-green {
	fill: var(--color-content-secondary, #0b673e);
	opacity: .08;
}

.lhmap-gate .lhmap-bg-road {
	stroke: #fbfcfd;
}

.lhmap-gate .lhmap-bg-pin {
	fill: var(--color-content-secondary, #0b673e);
	opacity: .7;
}

.lhmap-gate .lhmap-bg-pin-dot {
	fill: #fff;
	opacity: 1;
}

/* Card
   ------------------------------------------------------------------------ */

.lhmap-gate > .lhmap-gate-card {
	position: relative;
	z-index: 1;
	box-sizing: border-box;
	width: 100%;
	max-width: 620px;
	max-height: 100%;
	overflow-y: auto;
	padding: 1.9rem 2rem 1.6rem;
	text-align: center;
	background: var(--color-content-bg, #fff);
	box-shadow: 0 6px 34px rgba(0, 0, 0, .14);
}

.lhmap-gate .lhmap-gate-title {
	margin: 0 0 .7rem;
	font-family: var(--h2-font-family, var(--font-family, inherit));
	font-size: 1.35rem;
	font-weight: var(--h1-bold-font-weight, 700);
	line-height: 1.25;
	text-transform: uppercase;
	color: var(--color-content-heading, #000);
}

.lhmap-gate .lhmap-gate-text {
	margin: 0 0 1.15rem;
	font-size: .95rem;
	line-height: 1.55;
	color: var(--color-content-text, #000);
}

.lhmap-gate .lhmap-gate-action {
	margin: 0 0 .9rem;
}

.lhmap-gate .lhmap-gate-prefs {
	margin: 0;
	font-size: .9rem;
}

.lhmap-gate a.lhmap-gate-link {
	text-decoration: underline;
	color: var(--color-content-link, #000);
}

.lhmap-gate a.lhmap-gate-link:hover,
.lhmap-gate a.lhmap-gate-link:focus {
	color: var(--color-content-link-hover, #0b673e);
}

.lhmap-gate .lhmap-gate-status {
	margin: .7rem 0 0;
	font-size: .85rem;
	line-height: 1.5;
	color: var(--color-content-text, #000);
	opacity: .75;
}

.lhmap-gate .lhmap-gate-status:empty {
	display: none;
}

.lhmap-gate .lhmap-gate-status.is-error {
	opacity: 1;
	color: #b3261e;
}

/* Button loading state
   ------------------------------------------------------------------------ */

.lhmap-gate.is-fatal .lhmap-gate-action {
	display: none;
}

.lhmap-gate .lhmap-gate-btn[disabled] {
	cursor: default;
	opacity: .75;
}

.lhmap-gate .lhmap-gate-spinner {
	display: inline-block;
	width: 1em;
	height: 1em;
	margin-right: .6em;
	vertical-align: -.12em;
	border: 2px solid currentColor;
	border-right-color: transparent;
	border-radius: 50%;
	animation: lhmap-spin .7s linear infinite;
}

@keyframes lhmap-spin {
	to { transform: rotate(360deg); }
}

/* Phone width
   ------------------------------------------------------------------------ */

.lhmap-gate.is-compact > .lhmap-gate-card {
	padding: 1.2rem 1.1rem 1rem;
}

.lhmap-gate.is-compact .lhmap-gate-title {
	font-size: 1.1rem;
	margin-bottom: .5rem;
}

.lhmap-gate.is-compact .lhmap-gate-text {
	font-size: .85rem;
	line-height: 1.45;
	margin-bottom: .85rem;
}

.lhmap-gate.is-compact .lhmap-gate-action {
	margin-bottom: .7rem;
}

.lhmap-gate.is-compact .lhmap-gate-prefs {
	font-size: .82rem;
}

@media (max-width: 600px) {

	.lhmap-wrap > .lhmap-gate,
	.w-map.confirm_load > .lhmap-gate {
		padding: 16px 12px;
	}

	.lhmap-gate > .lhmap-gate-card {
		padding: 1.6rem 1.2rem 1.4rem;
	}

	.lhmap-gate .lhmap-gate-title {
		font-size: 1.2rem;
	}

	.lhmap-gate .lhmap-gate-text {
		font-size: .92rem;
		margin-bottom: 1.2rem;
	}

	.lhmap-gate .lhmap-gate-prefs {
		font-size: .88rem;
	}
}

@media (prefers-reduced-motion: reduce) {

	.lhmap-wrap > .lhmap-gate,
	.w-map.confirm_load > .lhmap-gate {
		transition: none;
	}

	.lhmap-gate .lhmap-gate-spinner {
		animation: none;
	}
}
