/**
 * SigmaGraft About — Location.
 *
 * Defaults only: every value here is overridable by the widget's controls.
 *
 * ── The panel ─────────────────────────────────────────────────────────────
 *
 * One horizontal strip split into a tinted text side and a photograph. Three
 * things follow from the mockup:
 *
 *   The tint is on the TEXT SIDE, not the panel. The pale blue stops exactly
 *   where the photograph starts, so .sgxa-loc__body carries the colour and
 *   the panel stays transparent — which also lets a client tint the whole
 *   strip instead by moving the colour up to the panel.
 *
 *   The panel owns the radius and clips its children. Rounding once, at the
 *   top, is what makes the two halves meet with no seam and no double corner.
 *
 *   The pin is its own column. .sgxa-loc__row is a flex row of [icon][text],
 *   so the description starts under the heading rather than under the pin.
 *
 * Width is carried on `width`, never `flex-basis`: basis addresses the main
 * axis, so the moment the panel stacks into a column a basis of 53% would
 * silently become a height.
 */

.sgxa-loc {
	position: relative;
	overflow-x: clip;
	isolation: isolate;
	padding: 8px 0 40px;
	background-color: #FFFFFF;
}

.sgxa-loc__overlay {
	position: absolute;
	inset: 0;
	z-index: 0;
	pointer-events: none;
}

.sgxa-loc__inner {
	position: relative;
	z-index: 2;
	width: 100%;
	max-width: 1200px;
	margin-inline: auto;
	padding-inline: 24px;
}

.sgxa-loc--container-full .sgxa-loc__inner {
	max-width: none;
}

/* ═════════ Panel ═════════ */

.sgxa-loc__panel {
	--sgxa-l-t: 300ms;
	--sgxa-l-lift: 0px;
	--sgxa-l-media-w: 53%;
	--sgxa-l-img-scale: 1.04;
	--sgxa-l-img-rotate: 0deg;
	--sgxa-l-icon-scale: 1;
	--sgxa-l-icon-lift: 0px;

	display: flex;
	flex-direction: row;
	align-items: stretch;
	width: 100%;
	min-height: 115px;
	overflow: hidden;
	isolation: isolate;
	border-radius: 4px;
	transition:
		background-color var(--sgxa-l-t) ease,
		border-color var(--sgxa-l-t) ease,
		box-shadow var(--sgxa-l-t) ease,
		transform var(--sgxa-l-t) ease;
}

.sgxa-loc__panel:hover {
	transform: translateY(var(--sgxa-l-lift));
}

/* ═════════ Text side ═════════ */

.sgxa-loc__body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	justify-content: center;
	min-width: 0;
	padding: 18px 26px 18px 24px;
	background-color: #EDF3FA;
	transition: background-color var(--sgxa-l-t) ease;
}

/* The pin's own column — this is what aligns the description with the
   heading rather than with the pin. */
.sgxa-loc__row {
	display: flex;
	flex-direction: row;
	align-items: flex-start;
	gap: 12px;
	min-width: 0;
}

.sgxa-loc__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	margin-block-start: 1px;
	color: #1A62C4;
	font-size: 18px;
	line-height: 0;
	transition:
		color var(--sgxa-l-t) ease,
		background-color var(--sgxa-l-t) ease,
		border-color var(--sgxa-l-t) ease,
		transform var(--sgxa-l-t) ease;
}

.sgxa-loc__panel:hover .sgxa-loc__icon {
	transform: translateY(var(--sgxa-l-icon-lift)) scale(var(--sgxa-l-icon-scale));
}

.sgxa-loc__content {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	min-width: 0;
	text-align: start;
}

.sgxa-loc__title {
	margin: 0 0 7px;
	color: #0E2E5C;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.3;
	text-wrap: balance;
	transition: color var(--sgxa-l-t) ease;
}

.sgxa-loc__text {
	margin: 0;
	color: #5A6B7D;
	font-size: 11.5px;
	line-height: 1.55;
	text-wrap: pretty;
	transition: color var(--sgxa-l-t) ease;
}

.sgxa-loc__btns {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	margin-block-start: 14px;
}

.sgxa-loc__btn {
	--sgxa-btn-fg: #FFFFFF;
	--sgxa-btn-bg: #1A4C9B;
	--sgxa-btn-bd: #1A4C9B;
	--sgxa-btn-fg-h: #FFFFFF;
	--sgxa-btn-bg-h: #0E2E5C;
	--sgxa-btn-bd-h: #0E2E5C;

	padding: 10px 20px;
	font-size: 12.5px;
}

/* ═════════ Photograph ═════════ */

.sgxa-loc__media {
	position: relative;
	flex: 0 0 auto;
	align-self: stretch;
	width: var(--sgxa-l-media-w, 53%);
	height: var(--sgxa-l-media-h, auto);
	overflow: hidden;
	background-color: #DCE6F2;
	/* No radius of its own — the panel clips it, so the strip rounds once. */
}

a.sgxa-loc__media:focus-visible {
	outline: 2px solid #1A4C9B;
	outline-offset: -3px;
}

/*
 * Absolutely positioned rather than height:100%. The frame's height comes
 * from align-self:stretch, not from a declared value, so a percentage height
 * would resolve against `auto` and collapse to the image's intrinsic ratio —
 * leaving the frame's background visible and skipping the crop entirely.
 */
.sgxa-loc__img {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center center;
	transition:
		transform 560ms ease,
		opacity 560ms ease,
		filter 560ms ease;
}

.sgxa-loc__panel:hover .sgxa-loc__img {
	transform: scale(var(--sgxa-l-img-scale)) rotate(var(--sgxa-l-img-rotate));
}

.sgxa-loc__media-overlay {
	position: absolute;
	inset: 0;
	display: block;
	opacity: 0;
	pointer-events: none;
	transition: opacity 560ms ease;
}

/* ═════════ Responsive fallbacks ═════════ */

/*
 * Panel height, image width and height, padding, alignment and every type
 * size have responsive controls, so only behaviour without a control repeats
 * here: once the panel stacks, the photograph needs a declared height because
 * there is no longer a text side beside it to borrow one from.
 */
@media (max-width: 767px) {

	.sgxa-loc__panel {
		--sgxa-l-media-w: 100%;
	}

	.sgxa-loc__media {
		height: var(--sgxa-l-media-h, 190px);
	}
}

@media (prefers-reduced-motion: reduce) {

	.sgxa-loc__panel,
	.sgxa-loc__body,
	.sgxa-loc__icon,
	.sgxa-loc__title,
	.sgxa-loc__text,
	.sgxa-loc__img,
	.sgxa-loc__media-overlay {
		transition: none !important;
	}

	.sgxa-loc__panel:hover,
	.sgxa-loc__panel:hover .sgxa-loc__img,
	.sgxa-loc__panel:hover .sgxa-loc__icon {
		transform: none;
	}
}
