/* FTF Map — inline vector map of the workshop. No embed, nothing to load. */

.ftf-map {
	--ftf-map-height: clamp(18rem, 42vh, 28rem);
	margin-block-start: var(--wp--preset--spacing--30, 1.5rem);
}

.ftf-map__canvas {
	position: relative;
	block-size: var(--ftf-map-height);
	overflow: hidden;
	border-radius: 14px;
	border: 1px solid var(--wp--preset--color--line, #3A3A42);
	background: #15151A;
	box-shadow: 0 1px 0 rgba(255, 255, 255, 0.055) inset, 0 18px 40px -28px rgba(0, 0, 0, 0.9);
}

/* The SVG carries preserveAspectRatio="slice", so it fills the box at any shape and
   crops rather than letterboxing. The pin is off-centre by design, which keeps it in
   frame as the box gets narrower. */
.ftf-map__svg {
	display: block;
	inline-size: 100%;
	block-size: 100%;
}

/* ODbL requires attribution for OpenStreetMap geometry. */
.ftf-map__credit {
	position: absolute;
	inset-block-end: 0.5rem;
	inset-inline-end: 0.75rem;
	margin: 0;
	font-size: 0.6875rem;
	letter-spacing: 0.02em;
	color: var(--wp--preset--color--muted, #B4B6BD);
	opacity: 0.75;
}

.ftf-map__foot {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1.25rem;
	margin-block-start: 1.25rem;
}

.ftf-map__address {
	margin: 0;
	font-family: var(--wp--preset--font-family--display, inherit);
	font-size: var(--wp--preset--font-size--medium, 1.05rem);
	font-weight: 700;
	line-height: 1.5;
	color: var(--wp--preset--color--contrast, #F5F6F7);
}

/* Brand red is only ever a fill behind white — as text on a dark panel it is 2.38:1 and
   fails AA outright. The old click-to-load version used it as link colour; this is the
   corrected treatment. */
.ftf-map__directions {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	/* Required: with inline-size:100% on mobile, content-box sizing adds the padding on
	   top of the full width and the button hangs off the screen. */
	box-sizing: border-box;
	padding: 0.7rem 1.25rem;
	border: 0;
	border-radius: 6px;
	background: var(--wp--preset--color--accent, #BE1622);
	color: #fff;
	font-family: var(--wp--preset--font-family--display, inherit);
	font-size: var(--wp--preset--font-size--small, 0.9375rem);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	text-decoration: none;
	white-space: nowrap;
	transition: filter 0.18s ease;
}

.ftf-map__directions:hover,
.ftf-map__directions:focus {
	filter: brightness(1.12);
	color: #fff;
	text-decoration: none;
}

/* Never let the flex row squeeze this below the button inside it: the button is
   `nowrap`, so a shrunk parent doesn't shrink the button, it just lets it hang out of
   the layout. That was 32px of horizontal overflow on a 390px screen. */
.ftf-map__actions {
	margin: 0;
	flex: 0 0 auto;
}

@media (max-width: 782px) {
	/* Stack instead of competing for one line. */
	.ftf-map__foot {
		flex-direction: column;
		align-items: stretch;
		gap: 0.9rem;
	}

	.ftf-map__actions {
		inline-size: 100%;
	}

	.ftf-map__directions {
		inline-size: 100%;
		justify-content: center;
	}
}

.screen-reader-text {
	position: absolute !important;
	inline-size: 1px;
	block-size: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

/* With the address suppressed the button is the only thing left; keep it left-aligned
   under the map rather than floating out on its own at the far edge. */
.ftf-map__foot--bare {
	justify-content: flex-start;
}
