/* Ernesto Map — frontend styles */

.emap-wrap {
	margin: var(--space-xl, 1.5rem) 0;
}

.emap-canvas {
	width: 100%;
	height: 500px;
	border-radius: 12px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
	overflow: hidden;
}

/* Consent placeholder — shown until the visitor accepts, or clicks to load.
   Matches .emap-canvas's box exactly so nothing shifts when the map replaces
   it (no CLS on the swap). */
.emap-consent {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 1rem;
	width: 100%;
	height: 500px;
	padding: 1.5rem;
	border-radius: 12px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
	background: var(--bg-alt, #e9ecef);
	color: var(--text-main, #1a1a1b);
	text-align: center;
	box-sizing: border-box;
}

.emap-consent__text {
	margin: 0;
	max-width: 44ch;
	font-size: 0.95em;
	line-height: 1.5;
}

.emap-consent__button {
	padding: 0.6rem 1.4rem;
	border: 0;
	border-radius: var(--button-border-radius, 24px);
	background: var(--color-secondary, #0066ff);
	color: var(--text-on-brand, #fff);
	font: inherit;
	cursor: pointer;
}

.emap-consent__button:hover,
.emap-consent__button:focus-visible {
	background: var(--color-secondary-hover, #0052cc);
}

.emap-sbb {
	margin-top: 0.75rem;
	text-align: center;
	font-size: 0.9em;
}

.emap-sbb a,
.emap-popup-sbb {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
}

/* Override the parent theme's img { display: block } reset */
.emap-sbb-logo {
	display: inline-block !important; /* fights theme img { display:block } reset */
	width: 1.4em;
	height: 1.4em;
	border-radius: 2px;
	flex-shrink: 0;
	vertical-align: middle;
}

.emap-sbb-logo--popup {
	width: 1.2em;
	height: 1.2em;
}

@media (max-width: 600px) {
	.emap-canvas,
	.emap-consent {
		height: 340px;
		border-radius: 8px;
	}
}

/* Gesture hint overlay (two fingers / Ctrl + scroll). */
.emap-gesture-hint {
	position: absolute;
	inset: 0;
	z-index: 1000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
	background: rgba(0, 0, 0, 0.55);
	color: #fff;
	font-size: 1rem;
	text-align: center;
	opacity: 0;
	transition: opacity 0.25s;
	pointer-events: none;
}

.emap-gesture-hint.is-visible {
	opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
	.emap-gesture-hint {
		transition: none;
	}
}
