/**
 * Flamingo Marine — Configurator with Hotspots (V4 strip-4 bottom / strip-5 top).
 *
 * A boat stage image on a light gradient ground, overlaid with numbered hotspot
 * buttons. Clicking a hotspot marks it active (pink ring) and slides a callout
 * card in from the right (number badge + title + description + thumbnail). One
 * callout open at a time. A "click & drag to change view" pill sits bottom-centre
 * and is a non-interactive PLACEHOLDER (the rotation asset is sourced separately).
 *
 * Slide-in: translateX(16px)+opacity over 300ms cubic-bezier(0.16,1,0.3,1)
 * (ease-out, site decel curve). prefers-reduced-motion users get an instant show.
 */

.flm-configurator {
	color: var(--wp--preset--color--surface-deep);
}

.flm-configurator__inner {
	position: relative;
	max-width: var(--wp--style--global--wide-size, 1180px);
	margin-inline: auto;
}

/* --- Stage + image ------------------------------------------------------- */

.flm-configurator__stage {
	position: relative;
	width: 100%;
}

.flm-configurator__image {
	display: block;
	width: 100%;
	height: auto;
}

/* --- Hotspots ------------------------------------------------------------ */

.flm-configurator__hotspot {
	position: absolute;
	/* x/y are the dot centre — pull back by half the size. */
	transform: translate(-50%, -50%);
	width: 28px;
	height: 28px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: rgba(24, 28, 37, 0.82);
	color: var(--wp--preset--color--text-primary);
	font-family: var(--wp--preset--font-family--plex);
	font-size: 1rem;
	font-weight: 500;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 1px 4px rgba(24, 28, 37, 0.35);
	transition: transform 160ms ease, box-shadow 160ms ease;
	z-index: 2;
}

.flm-configurator__hotspot-num {
	display: block;
	transform: translateY(0.5px);
}

.flm-configurator__hotspot:hover {
	transform: translate(-50%, -50%) scale(1.15);
	box-shadow: 0 2px 10px rgba(24, 28, 37, 0.5);
}

.flm-configurator__hotspot:focus-visible {
	outline: 2px solid var(--wp--preset--color--focus);
	outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
	.flm-configurator__hotspot:hover {
		transform: translate(-50%, -50%);
	}
}

/* Active hotspot: pink ring around the dot. */
.flm-configurator__hotspot.is-active {
	box-shadow:
		0 0 0 3px #EDEFF4,
		0 0 0 5px var(--wp--preset--color--accent-pink);
}

/* --- Callout card -------------------------------------------------------- */

.flm-configurator__callout {
	position: absolute;
	top: 12%;
	right: 0;
	width: min(330px, 38%);
	padding: var(--wp--preset--spacing--xl);
	background: #FFFFFF;
	border-radius: 14px;
	box-shadow: 0 18px 48px rgba(24, 28, 37, 0.18);
	color: var(--wp--preset--color--surface-deep);
	z-index: 3;

	/* Slide-in resting state; entering state offsets + fades (see .is-entering). */
	opacity: 1;
	transform: translateX(0);
	transition:
		opacity 300ms cubic-bezier(0.16, 1, 0.3, 1),
		transform 300ms cubic-bezier(0.16, 1, 0.3, 1);
}

.flm-configurator__callout[hidden] {
	display: none;
}

/* Entering / pre-reveal offset: start 16px to the right, transparent. */
.flm-configurator__callout.is-entering {
	opacity: 0;
	transform: translateX(16px);
}

.flm-configurator__callout-head {
	display: flex;
	align-items: center;
	gap: var(--wp--preset--spacing--sm);
	margin-bottom: var(--wp--preset--spacing--md);
}

.flm-configurator__callout-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border: 1px solid rgba(24, 28, 37, 0.25);
	border-radius: 999px;
	font-size: 1.125rem;
	font-weight: 500;
	font-variant-numeric: tabular-nums;
}

.flm-configurator__callout-nav {
	display: inline-flex;
	gap: var(--wp--preset--spacing--xs);
	margin-left: auto;
	color: var(--wp--preset--color--text-dim);
	font-size: 1.25rem;
}

.flm-configurator__callout-close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	margin-left: var(--wp--preset--spacing--xs);
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: var(--wp--preset--color--text-dim);
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
	transition: background 160ms ease, color 160ms ease;
}

.flm-configurator__callout-close:hover {
	background: rgba(24, 28, 37, 0.06);
	color: var(--wp--preset--color--surface-deep);
}

.flm-configurator__callout-close:focus-visible {
	outline: 2px solid var(--wp--preset--color--focus);
	outline-offset: 2px;
}

.flm-configurator__callout-title {
	margin: 0 0 var(--wp--preset--spacing--xs);
	font-size: var(--wp--preset--font-size--heading-three);
	font-weight: 600;
	line-height: 1.15;
	color: var(--wp--preset--color--surface-deep);
}

.flm-configurator__callout-desc {
	margin: 0 0 var(--wp--preset--spacing--md);
	font-size: var(--wp--preset--font-size--caption);
	line-height: 1.45;
	color: var(--wp--preset--color--text-dim);
}

.flm-configurator__callout-thumb {
	border-radius: 8px;
	overflow: hidden;
	aspect-ratio: 16 / 9;
	background: var(--wp--preset--color--surface-base);
}

.flm-configurator__callout-thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	/* The stage art is a stand-in; show the boat hull region as the crop. */
	object-position: 30% 55%;
}

/* --- Placeholder rotation pill ------------------------------------------ */

.flm-configurator__pill {
	position: absolute;
	left: 50%;
	bottom: 6%;
	transform: translateX(-50%);
	display: inline-block;
	padding: var(--wp--preset--spacing--sm) var(--wp--preset--spacing--xl);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.7);
	color: var(--wp--preset--color--text-dim);
	font-size: var(--wp--preset--font-size--caption);
	font-weight: 500;
	white-space: nowrap;
	box-shadow: 0 2px 10px rgba(24, 28, 37, 0.12);
	/* Placeholder: not interactive until the rotation asset lands. */
	cursor: default;
	-webkit-user-select: none;
	user-select: none;
	z-index: 2;
}

/* --- Responsive ---------------------------------------------------------- */

@media (max-width: 767px) {
	/* On small screens the card overlaps the boat; drop it below the stage and
	   let it span full width (bottom-sheet style) so copy stays legible. */
	.flm-configurator__callout {
		position: static;
		width: 100%;
		margin-top: var(--wp--preset--spacing--lg);
	}

	.flm-configurator__callout.is-entering {
		transform: translateY(12px);
	}

	.flm-configurator__hotspot {
		width: 24px;
		height: 24px;
		font-size: 0.9375rem;
	}
}

/* --- Reduced motion ------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
	.flm-configurator__hotspot,
	.flm-configurator__callout,
	.flm-configurator__callout-close {
		transition: none;
	}
}
