/*
 * NTM Visit / Location — loaded only on pages that use the widget.
 * All selectors are scoped to .ntm-loc. Buttons use their own "ntm-loc__btn"
 * classes (same features as the NTM Button widget, no shared class names).
 * Values match the widget's control defaults.
 */

/* ---------- Layout ---------- */
.ntm-loc {
	--ntm-loc-split: 50%;
	--ntm-loc-min-h: 458px;
	--ntm-loc-map-h: 360px;
	display: grid;
	grid-template-columns: var(--ntm-loc-split) minmax(0, 1fr);
	grid-template-areas: "text map";
	min-height: var(--ntm-loc-min-h);
	overflow: hidden;
	isolation: isolate;
	box-sizing: border-box;
	background-color: #FAF9F6;
	border: 1px solid #EDEAE3;
	border-radius: 18px;
	font-family: "Source Serif 4", "Source Serif Pro", Georgia, serif;
}
.ntm-loc--map-left { grid-template-columns: minmax(0, 1fr) var(--ntm-loc-split); grid-template-areas: "map text"; }
.ntm-loc--no-map { grid-template-columns: minmax(0, 1fr); grid-template-areas: "text"; }

.ntm-loc__text {
	grid-area: text;
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	align-items: flex-start;
	min-width: 0;
	padding: 44px 36px;
	box-sizing: border-box;
}

.ntm-loc__map {
	grid-area: map;
	position: relative;
	min-height: 240px;
	box-sizing: border-box;
}
.ntm-loc .ntm-loc__map iframe {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	margin: 0;
	border: 0;
	transition: filter .3s ease;
}
/* Inset (padding) support: the iframe fills the padded box. */
.ntm-loc .ntm-loc__map { display: flex; }
.ntm-loc .ntm-loc__map iframe { position: relative; inset: auto; flex: 1 1 auto; height: auto; min-height: 100%; }

/* ---------- Text ---------- */
.ntm-loc .ntm-loc__eyebrow {
	display: inline-block;
	margin: 0 0 16px;
	padding: 9px 16px;
	border: 1px solid #CFE0E5;
	border-radius: 999px;
	background: transparent;
	font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
	font-size: 11px;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: 1.2px;
	text-transform: uppercase;
	color: #00355E;
}
.ntm-loc .ntm-loc__heading {
	margin: 0 0 14px;
	padding: 0;
	font-family: inherit;
	font-size: 36px;
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: -0.5px;
	color: #00355E;
}
.ntm-loc .ntm-loc__intro {
	max-width: 520px;
	margin: 0 0 23px;
	font-size: 16.5px;
	line-height: 1.7;
	color: #4A4A44;
}
.ntm-loc .ntm-loc__address {
	margin: 0 0 6px;
	font-size: 16px;
	line-height: 1.5;
	color: #3A3A36;
}
.ntm-loc .ntm-loc__details {
	margin: 0;
	font-size: 15px;
	line-height: 1.5;
	color: #6B6B66;
}

/* ---------- Buttons: max 5, max 2 rows (columns set per device inline) ---------- */
.ntm-loc .ntm-loc__buttons {
	--ntm-loc-track: max-content;
	display: grid;
	grid-template-columns: repeat(var(--ntm-loc-cols-d, 2), var(--ntm-loc-track));
	justify-content: var(--ntm-loc-justify, start);
	gap: 12px;
	margin-top: 26px;
	max-width: 100%;
}
.ntm-loc .ntm-loc__buttons .ntm-loc__btn { width: 100%; }

@media (max-width: 1024px) {
	.ntm-loc .ntm-loc__buttons { grid-template-columns: repeat(var(--ntm-loc-cols-t, 2), var(--ntm-loc-track)); }
}
@media (max-width: 767px) {
	.ntm-loc .ntm-loc__buttons { grid-template-columns: repeat(var(--ntm-loc-cols-m, 2), var(--ntm-loc-track)); justify-content: stretch; width: 100%; }
}

/* ---------- Stacking ---------- */
@media (max-width: 1024px) {
	.ntm-loc--stack-tablet { grid-template-columns: minmax(0, 1fr); grid-template-areas: "text" "map"; min-height: 0; }
	.ntm-loc--stack-tablet.ntm-loc--stack-map-first { grid-template-areas: "map" "text"; }
	.ntm-loc--stack-tablet .ntm-loc__map { min-height: var(--ntm-loc-map-h); }
}
@media (max-width: 767px) {
	.ntm-loc--stack-mobile { grid-template-columns: minmax(0, 1fr); grid-template-areas: "text" "map"; min-height: 0; }
	.ntm-loc--stack-mobile.ntm-loc--stack-map-first { grid-template-areas: "map" "text"; }
	.ntm-loc--stack-mobile .ntm-loc__map { min-height: var(--ntm-loc-map-h); }
	.ntm-loc .ntm-loc__heading { font-size: 28px; }
	.ntm-loc .ntm-loc__text { padding: 28px 20px; }
}

/* ---------- Buttons (same engine as the NTM Button widget, own class names) ---------- */


.ntm-loc .ntm-loc__btn {
	--ntm-lb-dur: 300ms;
	--ntm-lb-ease: cubic-bezier(0.22, 1, 0.36, 1);
	--ntm-lb-hi: 1;

	position: relative;
	isolation: isolate;
	overflow: hidden;
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
	width: var(--ntm-lb-width, auto);
	margin: 0;
	padding: 16px 25px;
	border: 1px solid #6EB8BB;
	border-radius: 999px;
	background: transparent;
	box-shadow: none;
	color: #00355E;
	font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: -0.6px;
	text-align: center;
	text-decoration: none;
	text-transform: none;
	white-space: nowrap;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
	transition:
		color var(--ntm-lb-dur) var(--ntm-lb-ease),
		border-color var(--ntm-lb-dur) var(--ntm-lb-ease),
		box-shadow var(--ntm-lb-dur) var(--ntm-lb-ease),
		transform var(--ntm-lb-dur) var(--ntm-lb-ease);
}

/* The hover background lives on its own layer so it can fade or sweep (gradients too). */
.ntm-loc .ntm-loc__btn-fill {
	position: absolute;
	inset: 0;
	z-index: -1;
	border-radius: inherit;
	background-color: #6EB8BB;
	opacity: 0;
	pointer-events: none;
	transition:
		opacity var(--ntm-lb-dur) var(--ntm-lb-ease),
		transform var(--ntm-lb-dur) var(--ntm-lb-ease);
}

.ntm-loc .ntm-loc__btn-label,
.ntm-loc .ntm-loc__btn-icon { position: relative; }

.ntm-loc .ntm-loc__btn-icon {
	display: inline-flex;
	align-items: center;
	line-height: 1;
	transition: transform var(--ntm-lb-dur) var(--ntm-lb-ease), color var(--ntm-lb-dur) var(--ntm-lb-ease);
}
.ntm-loc .ntm-loc__btn-icon--arrow { font-weight: 400; font-size: 1.35em; margin: -0.15em 0 -0.15em -0.15em; } /* Large thin arrow without growing the button; trims the glyph's built-in left space. */
.ntm-loc .ntm-loc__btn-icon svg { width: 1em; height: 1em; fill: currentColor; }
.ntm-loc .ntm-loc__btn--icon-before .ntm-loc__btn-icon { order: -1; }
.ntm-loc .ntm-loc__btn--icon-before .ntm-loc__btn-icon--arrow { margin: -0.15em -0.15em -0.15em 0; }

/* ---------- Hover / focus ---------- */
.ntm-loc a.ntm-loc__btn:hover,
.ntm-loc a.ntm-loc__btn:focus-visible,
.ntm-loc a.ntm-loc__btn:active {
	color: #FFFFFF;
	border-color: #6EB8BB;
	text-decoration: none;
}
.ntm-loc a.ntm-loc__btn:focus-visible { outline: 2px solid #00355E; outline-offset: 3px; }

.ntm-loc a.ntm-loc__btn:hover .ntm-loc__btn-fill,
.ntm-loc a.ntm-loc__btn:focus-visible .ntm-loc__btn-fill,
.ntm-loc a.ntm-loc__btn:active .ntm-loc__btn-fill { opacity: 1; transform: none; }

/* Fill styles: the layer is fully opaque and revealed by scaling instead of fading. */
.ntm-loc .ntm-loc__btn--fill-sweep-right .ntm-loc__btn-fill { opacity: 1; transform: scaleX(0); transform-origin: left center; }
.ntm-loc .ntm-loc__btn--fill-sweep-left  .ntm-loc__btn-fill { opacity: 1; transform: scaleX(0); transform-origin: right center; }
.ntm-loc .ntm-loc__btn--fill-sweep-up    .ntm-loc__btn-fill { opacity: 1; transform: scaleY(0); transform-origin: center bottom; }
.ntm-loc .ntm-loc__btn--fill-sweep-down  .ntm-loc__btn-fill { opacity: 1; transform: scaleY(0); transform-origin: center top; }
.ntm-loc .ntm-loc__btn--fill-center      .ntm-loc__btn-fill { opacity: 1; transform: scale(0, 1); transform-origin: center; }
.ntm-loc .ntm-loc__btn--fill-instant,
.ntm-loc .ntm-loc__btn--fill-instant .ntm-loc__btn-fill { transition-duration: 0s; }

/* "Disable link": a plain label — no pointer, no hover change. */
.ntm-loc .ntm-loc__btn--static { cursor: default; }

/* ---------- Motion ---------- */
.ntm-loc .ntm-loc__btn {
	--ntm-lb-grow: calc(1 + 0.04 * var(--ntm-lb-hi));
	--ntm-lb-shrink: calc(1 - 0.04 * var(--ntm-lb-hi));
	--ntm-lb-move: calc(3px * var(--ntm-lb-hi));
	--ntm-lb-turn: calc(3deg * var(--ntm-lb-hi));
	--ntm-lb-slide: calc(4px * var(--ntm-lb-hi));
}
.ntm-loc .ntm-loc__btn--fx-bounce { transition-timing-function: cubic-bezier(0.34, 1.8, 0.64, 1); }

/* Keyboard focus always shows the motion. */
.ntm-loc a.ntm-loc__btn--fx-grow:focus-visible      { transform: scale(var(--ntm-lb-grow)); }
.ntm-loc a.ntm-loc__btn--fx-shrink:focus-visible    { transform: scale(var(--ntm-lb-shrink)); }
.ntm-loc a.ntm-loc__btn--fx-lift:focus-visible,
.ntm-loc a.ntm-loc__btn--fx-bounce:focus-visible    { transform: translateY(calc(var(--ntm-lb-move) * -1)); }
.ntm-loc a.ntm-loc__btn--fx-sink:focus-visible      { transform: translateY(var(--ntm-lb-move)); }
.ntm-loc a.ntm-loc__btn--fx-lift-grow:focus-visible { transform: translateY(calc(var(--ntm-lb-move) * -1)) scale(var(--ntm-lb-grow)); }
.ntm-loc a.ntm-loc__btn--fx-tilt:focus-visible      { transform: rotate(calc(var(--ntm-lb-turn) * -1)); }
.ntm-loc a.ntm-loc__btn--icon-slide:focus-visible .ntm-loc__btn-icon { transform: translateX(var(--ntm-lb-slide)); }
.ntm-loc a.ntm-loc__btn--icon-back:focus-visible  .ntm-loc__btn-icon { transform: translateX(calc(var(--ntm-lb-slide) * -1)); }
.ntm-loc a.ntm-loc__btn--icon-up:focus-visible    .ntm-loc__btn-icon { transform: translateY(calc(var(--ntm-lb-slide) * -1)); }
.ntm-loc a.ntm-loc__btn--icon-rotate:focus-visible .ntm-loc__btn-icon { transform: rotate(calc(var(--ntm-lb-turn) * 15)); }

/* Mouse hover — only on devices that truly hover (no stuck effects after a tap). */
@media (hover: hover) and (pointer: fine) {
	.ntm-loc a.ntm-loc__btn--fx-grow:hover      { transform: scale(var(--ntm-lb-grow)); }
	.ntm-loc a.ntm-loc__btn--fx-shrink:hover    { transform: scale(var(--ntm-lb-shrink)); }
	.ntm-loc a.ntm-loc__btn--fx-lift:hover,
	.ntm-loc a.ntm-loc__btn--fx-bounce:hover    { transform: translateY(calc(var(--ntm-lb-move) * -1)); }
	.ntm-loc a.ntm-loc__btn--fx-sink:hover      { transform: translateY(var(--ntm-lb-move)); }
	.ntm-loc a.ntm-loc__btn--fx-lift-grow:hover { transform: translateY(calc(var(--ntm-lb-move) * -1)) scale(var(--ntm-lb-grow)); }
	.ntm-loc a.ntm-loc__btn--fx-tilt:hover      { transform: rotate(calc(var(--ntm-lb-turn) * -1)); }
	.ntm-loc a.ntm-loc__btn--fx-pulse:hover     { animation: ntm-lb-pulse calc(var(--ntm-lb-dur) * 4) cubic-bezier(0.45, 0, 0.55, 1) infinite; }
	.ntm-loc a.ntm-loc__btn--fx-float:hover     { animation: ntm-lb-float calc(var(--ntm-lb-dur) * 6) cubic-bezier(0.45, 0, 0.55, 1) infinite; }
	.ntm-loc a.ntm-loc__btn--fx-wiggle:hover    { animation: ntm-lb-wiggle calc(var(--ntm-lb-dur) * 2.4) cubic-bezier(0.36, 0.07, 0.19, 0.97) both; }
	.ntm-loc a.ntm-loc__btn--fx-wobble:hover    { animation: ntm-lb-wobble calc(var(--ntm-lb-dur) * 3) cubic-bezier(0.36, 0.07, 0.19, 0.97) both; }
	.ntm-loc a.ntm-loc__btn--fx-jello:hover     { animation: ntm-lb-jello calc(var(--ntm-lb-dur) * 3) cubic-bezier(0.36, 0.07, 0.19, 0.97) both; }

	.ntm-loc a.ntm-loc__btn--icon-slide:hover .ntm-loc__btn-icon  { transform: translateX(var(--ntm-lb-slide)); }
	.ntm-loc a.ntm-loc__btn--icon-back:hover .ntm-loc__btn-icon   { transform: translateX(calc(var(--ntm-lb-slide) * -1)); }
	.ntm-loc a.ntm-loc__btn--icon-up:hover .ntm-loc__btn-icon     { transform: translateY(calc(var(--ntm-lb-slide) * -1)); }
	.ntm-loc a.ntm-loc__btn--icon-rotate:hover .ntm-loc__btn-icon { transform: rotate(calc(var(--ntm-lb-turn) * 15)); }
	.ntm-loc a.ntm-loc__btn--icon-nudge:hover .ntm-loc__btn-icon  { animation: ntm-lb-nudge calc(var(--ntm-lb-dur) * 3) cubic-bezier(0.45, 0, 0.55, 1) infinite; }
}

@keyframes ntm-lb-pulse  { 0%, 100% { transform: scale(1); } 50% { transform: scale(var(--ntm-lb-grow)); } }
@keyframes ntm-lb-float  { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(calc(var(--ntm-lb-move) * -1)); } }
@keyframes ntm-lb-nudge  { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(var(--ntm-lb-slide)); } }
@keyframes ntm-lb-wiggle {
	0%, 100% { transform: rotate(0); }
	20% { transform: rotate(calc(var(--ntm-lb-turn) * -1)); }
	40% { transform: rotate(var(--ntm-lb-turn)); }
	60% { transform: rotate(calc(var(--ntm-lb-turn) * -0.6)); }
	80% { transform: rotate(calc(var(--ntm-lb-turn) * 0.3)); }
}
@keyframes ntm-lb-wobble {
	0%, 100% { transform: none; }
	15% { transform: translateX(calc(var(--ntm-lb-move) * -2)) rotate(calc(var(--ntm-lb-turn) * -1)); }
	30% { transform: translateX(calc(var(--ntm-lb-move) * 1.5)) rotate(calc(var(--ntm-lb-turn) * 0.6)); }
	45% { transform: translateX(calc(var(--ntm-lb-move) * -1)) rotate(calc(var(--ntm-lb-turn) * -0.4)); }
	60% { transform: translateX(calc(var(--ntm-lb-move) * 0.6)) rotate(calc(var(--ntm-lb-turn) * 0.2)); }
	75% { transform: translateX(calc(var(--ntm-lb-move) * -0.3)); }
}
@keyframes ntm-lb-jello {
	0%, 100% { transform: none; }
	22% { transform: skewX(calc(var(--ntm-lb-turn) * -3)); }
	37% { transform: skewX(calc(var(--ntm-lb-turn) * 1.5)); }
	52% { transform: skewX(calc(var(--ntm-lb-turn) * -0.75)); }
	67% { transform: skewX(calc(var(--ntm-lb-turn) * 0.375)); }
	82% { transform: skewX(calc(var(--ntm-lb-turn) * -0.18)); }
}

/* Long labels wrap on narrow phones instead of overflowing. */
@media (max-width: 767px) {
	.ntm-loc .ntm-loc__btn { white-space: normal; max-width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
	.ntm-loc .ntm-loc__btn,
	.ntm-loc .ntm-loc__btn-icon { animation: none !important; transform: none !important; }
	.ntm-loc .ntm-loc__btn-fill { transition-property: opacity; }
}

/* Primary style defaults (filled). Secondary = the outline look above. */
.ntm-loc .ntm-loc__btn--primary { color: #FFFFFF; background-color: #6EB8BB; border-color: #6EB8BB; }
.ntm-loc a.ntm-loc__btn--primary:hover,
.ntm-loc a.ntm-loc__btn--primary:focus-visible,
.ntm-loc a.ntm-loc__btn--primary:active { color: #FFFFFF; border-color: #4FA3A7; }
.ntm-loc .ntm-loc__btn--primary .ntm-loc__btn-fill { background-color: #4FA3A7; }
