/*
 * Consent placeholder shown in place of the WP Store Locator map until the visitor
 * opts in. WPSL equivalent of the YITH gate on lattrape-reves.be.
 *
 * WPSL floats #wpsl-gmap (float:right, percentage width), so the gate is NOT
 * wrapped around the map — map-consent.js places it as an absolutely positioned
 * sibling inside the map's offset parent and sets its left/top/width/height inline
 * to match the map box exactly. These rules only carry the look; the geometry is
 * set by the script. Everything is scoped under .alr-mapgate so the plugin and
 * theme stylesheets do not reach in.
 */

.alr-mapgate {
	position: absolute;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	background: #eef1f5;
	opacity: 1;
	transition: opacity 0.4s ease;
}

.alr-mapgate.is-leaving {
	opacity: 0;
	pointer-events: none;
}

/* Stylised, self-contained map drawing. No third-party request is made for it. */
.alr-mapgate .alr-mapgate__art {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.alr-mapgate .alr-mapgate__card {
	position: relative;
	z-index: 1;
	box-sizing: border-box;
	width: calc(100% - 3rem);
	max-width: 30rem;
	padding: 2rem;
	border-radius: 0.5rem;
	background: #fff;
	box-shadow: 0 0.5rem 2.5rem rgba(0, 0, 0, 0.14);
	text-align: center;
}

.alr-mapgate .alr-mapgate__icon {
	display: block;
	width: 2.5rem;
	height: 2.5rem;
	margin: 0 auto 1rem;
	color: #6A2383;
}

.alr-mapgate .alr-mapgate__title {
	margin: 0 0 0.75rem;
	font-size: 1.25rem;
	line-height: 1.3;
}

.alr-mapgate .alr-mapgate__text {
	margin: 0 0 1.5rem;
	font-size: 0.9375rem;
	line-height: 1.55;
	opacity: 0.8;
}

.alr-mapgate .alr-mapgate__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.6rem;
	min-height: 2.75rem;
	padding: 0.75rem 1.75rem;
	border: 0;
	border-radius: 2rem;
	background: #6A2383;
	color: #fff;
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	transition: background 0.2s ease;
}

.alr-mapgate .alr-mapgate__button:hover,
.alr-mapgate .alr-mapgate__button:focus-visible {
	background: #5A1E6F;
	color: #fff;
}

.alr-mapgate .alr-mapgate__button[disabled] {
	opacity: 0.75;
	cursor: default;
}

.alr-mapgate .alr-mapgate__spinner {
	width: 1rem;
	height: 1rem;
	border: 2px solid rgba(255, 255, 255, 0.4);
	border-top-color: #fff;
	border-radius: 50%;
	animation: alr-mapgate-spin 0.7s linear infinite;
}

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

.alr-mapgate .alr-mapgate__link {
	display: block;
	margin: 1rem auto 0;
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	font-size: 0.8125rem;
	opacity: 0.7;
	text-decoration: underline;
	cursor: pointer;
}

.alr-mapgate .alr-mapgate__link:hover,
.alr-mapgate .alr-mapgate__link:focus-visible {
	opacity: 1;
}

.alr-mapgate .alr-mapgate__button:focus-visible,
.alr-mapgate .alr-mapgate__link:focus-visible {
	outline: 2px solid #6A2383;
	outline-offset: 3px;
}

@media (max-width: 600px) {
	.alr-mapgate .alr-mapgate__card {
		width: calc(100% - 2rem);
		padding: 1.5rem 1.25rem;
	}

	.alr-mapgate .alr-mapgate__title {
		font-size: 1.125rem;
	}

	.alr-mapgate .alr-mapgate__text {
		font-size: 0.875rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.alr-mapgate {
		transition: none;
	}

	.alr-mapgate .alr-mapgate__spinner {
		animation-duration: 2s;
	}
}
