/* NL Foundations Map — front-end styles. */

.nlfm-map-wrapper {
	display: flex;
	flex-direction: column;
	align-items: center;
}

.nlfm-map {
	width: 100%;
	max-width: 612px;
}

.nlfm-map svg {
	width: 100%;
	height: auto;
	display: block;
}

/* "Tap a province" hint — only shown on touch / small screens. */
.nlfm-map-hint {
	display: none;
}

.nlfm-map-hint.is-hidden {
	display: none !important;
}

.nlfm-map-hint svg {
	width: 16px;
	height: 16px;
	fill: currentColor;
}

@media ( max-width: 768px ), ( hover: none ) and ( pointer: coarse ) {
	.nlfm-map-hint {
		display: inline-flex;
		align-items: center;
		gap: 6px;
		margin: 12px 0 0;
		padding: 7px 14px;
		background: var( --nlfm-btn-bg, #084843 );
		color: var( --nlfm-btn-text, #fff );
		border-radius: 999px;
		font-size: 13px;
		font-weight: 600;
		animation: nlfm-hint-pulse 1.8s ease-in-out infinite;
	}
}

@keyframes nlfm-hint-pulse {
	0%, 100% { transform: translateY( 0 ); opacity: 0.92; }
	50% { transform: translateY( -3px ); opacity: 1; }
}

/* Floating info-box shown on province hover. */
#nlfm-infoBox {
	display: none;
	position: absolute;
	z-index: 1000;
	flex-direction: row;
	flex-wrap: wrap;
	gap: 8px;
	max-width: min( 92vw, 760px );
	padding: 10px;
	background: var( --nlfm-box-bg, #fff );
	border: 0;
	border-radius: var( --nlfm-radius, 16px );
	box-shadow: 0 14px 40px rgba( 8, 72, 67, 0.22 );
	animation: nlfm-pop 0.16s ease-out;
}

/* Each foundation is a soft tile; tiles line up side by side. */
#nlfm-infoBox .nlfm-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 104px;
	padding: 8px 6px;
	background: var( --nlfm-card-bg, #f5faf9 );
	border-radius: 12px;
	text-align: center;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

#nlfm-infoBox .nlfm-card:hover {
	transform: translateY( -2px );
	box-shadow: 0 6px 16px rgba( 8, 72, 67, 0.16 );
}

#nlfm-infoBox .nlfm-card-body {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
}

/* No chip — the logo fills the tile width so it shows as large as possible
   without enlarging the card. */
#nlfm-infoBox .nlfm-card-img {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
}

#nlfm-infoBox .nlfm-card-img img {
	max-width: 92px;
	max-height: 72px;
	width: auto;
	height: auto;
	object-fit: contain;
}

#nlfm-infoBox .nlfm-card-name {
	margin: 6px 0 0;
	font-weight: 700;
	font-size: 12px;
	line-height: 1.25;
	color: var( --nlfm-name-color, #0f2e2b );
}

#nlfm-infoBox .nlfm-card-city {
	margin: 1px 0 0;
	color: var( --nlfm-city-color, #6b7280 );
	font-size: 10px;
	line-height: 1.25;
}

#nlfm-infoBox .nlfm-card-btn {
	font-size: 9px;
	padding: 3px 9px;
	margin-top: 8px;
}

/* "Visit website" pill, shared by popup and sheet. */
.nlfm-card-btn {
	display: inline-block;
	margin-top: 8px;
	padding: 4px 11px;
	background: var( --nlfm-btn-bg, #084843 );
	color: var( --nlfm-btn-text, #fff ) !important;
	font-weight: 600;
	font-size: 11px;
	line-height: 1.4;
	border-radius: 999px;
	text-decoration: none !important;
	white-space: nowrap;
	transition: filter 0.15s ease, transform 0.15s ease;
}

.nlfm-card-btn::after {
	content: " \2192";
}

.nlfm-card-btn:hover {
	filter: brightness( 0.92 );
	transform: translateY( -1px );
}

@keyframes nlfm-pop {
	from { opacity: 0; transform: scale( 0.96 ) translateY( 4px ); }
	to { opacity: 1; transform: scale( 1 ) translateY( 0 ); }
}

/* Social media icon links, shared by popup and sheet. */
.nlfm-card-social {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 8px;
}

.nlfm-social-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: #eef3f2;
	color: #084843;
	text-decoration: none !important;
	transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.nlfm-social-link svg {
	width: 14px;
	height: 14px;
	fill: currentColor;
	display: block;
}

.nlfm-social-link:hover {
	color: #fff;
	transform: translateY( -1px );
}

/* Brand colours on hover. */
.nlfm-social-facebook:hover { background: #1877f2; }
.nlfm-social-instagram:hover { background: #e1306c; }
.nlfm-social-linkedin:hover { background: #0a66c2; }
.nlfm-social-twitter:hover { background: #000; }
.nlfm-social-youtube:hover { background: #ff0000; }

/* In the desktop popup the icons sit centred under the card. */
#nlfm-infoBox .nlfm-card-social {
	justify-content: center;
	gap: 5px;
}

#nlfm-infoBox .nlfm-social-link {
	width: 24px;
	height: 24px;
}

#nlfm-infoBox .nlfm-social-link svg {
	width: 13px;
	height: 13px;
}

/* Province fill + hover colours are output inline by the shortcode (from the
   Map Colors settings page). Only the transition stays here. */
.nlfm-map .region {
	transition: fill 0.2s;
}

/* ---------------------------------------------------------------------------
   Mobile bottom sheet (tap-driven). Hidden until opened via JS.
   --------------------------------------------------------------------------- */
#nlfm-sheet-backdrop {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 100000;
	align-items: flex-end;
	justify-content: center;
	background: rgba( 0, 0, 0, 0.5 );
}

#nlfm-sheet-backdrop.is-open {
	display: flex;
	animation: nlfm-fade 0.2s ease;
}

#nlfm-sheet {
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: 640px;
	max-height: 82vh;
	background: var( --nlfm-box-bg, #fff );
	border-radius: 22px 22px 0 0;
	box-shadow: 0 -8px 40px rgba( 8, 72, 67, 0.3 );
}

#nlfm-sheet-backdrop.is-open #nlfm-sheet {
	animation: nlfm-slide-up 0.3s cubic-bezier( 0.22, 1, 0.36, 1 );
}

/* Grab handle. */
#nlfm-sheet::before {
	content: "";
	flex: 0 0 auto;
	width: 42px;
	height: 5px;
	margin: 10px auto 2px;
	border-radius: 999px;
	background: #d1d5db;
}

.nlfm-sheet-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 10px 18px 14px;
}

.nlfm-sheet-title {
	font-weight: 700;
	font-size: 17px;
	color: #084843;
}

.nlfm-sheet-close {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border: 0;
	border-radius: 50%;
	background: #f1f5f4;
	padding: 0;
	font-size: 22px;
	line-height: 1;
	color: #555;
	cursor: pointer;
}

.nlfm-sheet-body {
	display: flex;
	flex-direction: column;
	gap: 10px;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	padding: 4px 16px calc( 18px + env( safe-area-inset-bottom ) );
}

/* In the sheet, foundations are full-width rows: logo chip left, text right. */
#nlfm-sheet .nlfm-card {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 14px;
	width: auto;
	padding: 12px;
	background: var( --nlfm-card-bg, #f5faf9 );
	border-radius: 14px;
	text-align: left;
}

#nlfm-sheet .nlfm-card-body {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
}

#nlfm-sheet .nlfm-card-img {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 60px;
	height: 60px;
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 1px 4px rgba( 0, 0, 0, 0.08 );
}

#nlfm-sheet .nlfm-card-img img {
	width: 44px;
	height: 44px;
	object-fit: contain;
}

#nlfm-sheet .nlfm-card-name {
	margin: 0;
	font-weight: 700;
	font-size: 15px;
	line-height: 1.3;
	color: var( --nlfm-name-color, #0f2e2b );
}

#nlfm-sheet .nlfm-card-city {
	margin: 2px 0 0;
	color: var( --nlfm-city-color, #6b7280 );
	font-size: 13px;
	line-height: 1.3;
}

#nlfm-sheet .nlfm-card-btn {
	font-size: 12px;
	margin-top: 8px;
}

/* Larger, left-aligned social icons in the sheet (touch-friendly). */
#nlfm-sheet .nlfm-card-social {
	justify-content: flex-start;
	gap: 8px;
}

#nlfm-sheet .nlfm-social-link {
	width: 34px;
	height: 34px;
}

#nlfm-sheet .nlfm-social-link svg {
	width: 18px;
	height: 18px;
}

@keyframes nlfm-fade {
	from { opacity: 0; }
	to { opacity: 1; }
}

@keyframes nlfm-slide-up {
	from { transform: translateY( 100% ); }
	to { transform: translateY( 0 ); }
}

/* Lock background scroll while the sheet is open. */
body.nlfm-no-scroll {
	overflow: hidden;
}

/* On touch / small screens the hover info-box is never used. */
@media ( max-width: 768px ), ( hover: none ) and ( pointer: coarse ) {
	#nlfm-infoBox {
		display: none !important;
	}
}
