/*
 * Media Minds GBP Maps - front end.
 * Loaded only when a card renders. Colours inherit from the theme footer;
 * override with the custom properties below.
 * Motion: colour/shadow only, ease-out, no transition: all, respects reduced motion.
 */
.mm-gbp-maps {
	--mm-gbp-gap: 0.75rem;
	--mm-gbp-radius: 10px;
	--mm-gbp-btn-bg: #c8102e;
	--mm-gbp-btn-bg-hover: #a50d26;
	--mm-gbp-btn-fg: #fff;
	--mm-gbp-muted: currentColor;
	display: flex;
	flex-direction: column;
	gap: var(--mm-gbp-gap);
	max-width: calc(var(--mm-gbp-map-w, 250px) + 2rem);
	font-size: 0.9375rem;
	line-height: 1.5;
}

.mm-gbp-maps--left { margin-inline-end: auto; }
.mm-gbp-maps--right { margin-inline-start: auto; }

.mm-gbp-maps__title {
	margin: 0;
	font-size: 1.125rem;
	line-height: 1.3;
	color: inherit;
}

.mm-gbp-maps__subtitle {
	margin: 0.25rem 0 0;
	font-size: 0.9375rem;
	color: inherit;
}

.mm-gbp-maps__map {
	width: var(--mm-gbp-map-w, 250px);
	max-width: 100%;
	aspect-ratio: var(--mm-gbp-map-ar, 1);
	border-radius: var(--mm-gbp-radius);
	overflow: hidden;
	background: rgba(127, 127, 127, 0.15);
}

.mm-gbp-maps__map iframe {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
}

.mm-gbp-maps__map-link,
.mm-gbp-maps__phone,
.mm-gbp-maps__note {
	margin: 0;
}

.mm-gbp-maps__map-link a,
.mm-gbp-maps__phone a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.mm-gbp-maps__photos {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
	gap: 0.5rem;
	max-width: var(--mm-gbp-map-w, 250px);
}

.mm-gbp-maps__photo { margin: 0; }

.mm-gbp-maps__photo-img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	border-radius: calc(var(--mm-gbp-radius) - 4px);
}

.mm-gbp-maps__photos .mm-gbp-maps__photo:only-child { grid-column: 1 / -1; }
.mm-gbp-maps__photos .mm-gbp-maps__photo:only-child .mm-gbp-maps__photo-img { aspect-ratio: 4 / 3; }

.mm-gbp-maps__address {
	display: flex;
	flex-direction: column;
	margin: 0;
	font-style: normal;
}

.mm-gbp-maps__name { font-weight: 600; }

.mm-gbp-maps__hours {
	width: 100%;
	max-width: var(--mm-gbp-map-w, 250px);
	margin: 0;
	border-collapse: collapse;
	font-size: 0.875rem;
	font-variant-numeric: tabular-nums;
	background: transparent;
	color: inherit;
}

.mm-gbp-maps__hours th,
.mm-gbp-maps__hours td {
	padding: 0.125rem 0;
	border: 0;
	background: transparent;
	color: inherit;
	text-align: start;
	vertical-align: top;
	font-weight: 400;
}

.mm-gbp-maps__hours td { text-align: end; padding-inline-start: 0.75rem; }
.mm-gbp-maps__hours tr.is-today th,
.mm-gbp-maps__hours tr.is-today td { font-weight: 700; }

.mm-gbp-maps__holidays {
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 0.875rem;
	max-width: var(--mm-gbp-map-w, 250px);
}

.mm-gbp-maps__holiday {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 0 0.75rem;
	padding: 0.125rem 0;
}

.mm-gbp-maps__holiday.is-current { font-weight: 700; }

.mm-gbp-maps__note { font-size: 0.875rem; font-style: italic; }

.mm-gbp-maps__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	align-self: flex-start;
	min-height: 44px;
	padding: 0.625rem 1.125rem;
	border-radius: 999px;
	background: var(--mm-gbp-btn-bg);
	color: var(--mm-gbp-btn-fg);
	font-weight: 600;
	text-decoration: none;
	transition: background-color 160ms ease-out, transform 120ms ease-out, box-shadow 160ms ease-out;
}

.mm-gbp-maps__btn:visited { color: var(--mm-gbp-btn-fg); }

.mm-gbp-maps__btn:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 3px;
}

/* Pressed feedback; scale stays near 1 (never from 0). */
.mm-gbp-maps__btn:active { transform: scale(0.97); }

@media (hover: hover) and (pointer: fine) {
	.mm-gbp-maps__btn:hover {
		background: var(--mm-gbp-btn-bg-hover);
		color: var(--mm-gbp-btn-fg);
		box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
	}
}

.mm-gbp-maps__icon { flex: none; }

/* Full-width band fallback (wp_footer). */
.mm-gbp-maps-band { padding: 2rem 1rem; }
.mm-gbp-maps-band__inner {
	display: flex;
	max-width: 1140px;
	margin: 0 auto;
}
.mm-gbp-maps-band--left .mm-gbp-maps-band__inner { justify-content: flex-start; }
.mm-gbp-maps-band--right .mm-gbp-maps-band__inner { justify-content: flex-end; }

@media (max-width: 767.98px) {
	.mm-gbp-maps--left,
	.mm-gbp-maps--right { margin-inline: 0; }
	.mm-gbp-maps-band__inner { justify-content: flex-start; }
}

.mm-gbp-maps .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

@media (prefers-reduced-motion: reduce) {
	.mm-gbp-maps__btn { transition: none; }
	.mm-gbp-maps__btn:active { transform: none; }
}
