/**
 * Flamingo Marine — ROVE Specs.
 *
 * Two columns under a top hairline: LEFT = heading + CTA + spec table; RIGHT =
 * the ortho top-view drawing, separated by a vertical hairline. Spec values are
 * clean numbers; units ride as small sublabels under each row name.
 */

.flm-rovespecs {
	padding-block: clamp(2.5rem, 6vw, 5rem);
	padding-inline: 0;
	/* Clear the sticky header when reached via the #specs anchor (Specs nav). */
	scroll-margin-top: 100px;
}

.flm-rovespecs__inner {
	width: min(92vw, 1840px);
	margin-inline: auto;
	display: grid;
	grid-template-columns: minmax(0, 1.1fr) 1px minmax(0, 0.9fr);
	column-gap: clamp(1.75rem, 4.5vw, 4.5rem);
	align-items: stretch;
	border-top: 1px solid rgba(255, 255, 255, 0.12);
	padding-top: clamp(2rem, 4vw, 3.5rem);
}

/* --- Left column: heading + CTA + table --------------------------------- */

.flm-rovespecs__head {
	margin-bottom: clamp(1.75rem, 4vw, 3.25rem);
}

.flm-rovespecs__title {
	margin: 0 0 clamp(1.25rem, 2.5vw, 1.75rem);
	font-weight: 600;
	font-size: clamp(1.6rem, 2.6vw, 2.35rem);
	line-height: 1.18;
	color: var(--wp--preset--color--text-primary);
}

.flm-rovespecs__title-muted {
	color: var(--wp--preset--color--text-muted);
}

/* Outlined button: transparent fill, white hairline. Hover goes pink —
   action affordance per the sitewide CTA convention (BugHerd #182). */
.flm-rovespecs__cta.wp-element-button {
	display: inline-block;
	background-color: transparent;
	border: 1px solid var(--wp--preset--color--text-primary);
	color: var(--wp--preset--color--text-primary);
	/* Match the header/global outlined CTA metrics — the theme.json button
	   defaults render much larger (corporate feedback #45). */
	padding: 0.625rem 1.25rem;
	font-size: 1.0625rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	transition: border-color 0.15s ease, color 0.15s ease;
}
.flm-rovespecs__cta.wp-element-button:hover,
.flm-rovespecs__cta.wp-element-button:focus-visible {
	border-color: var(--wp--preset--color--accent-pink);
	color: var(--wp--preset--color--accent-pink);
}

/* --- Spec table ---------------------------------------------------------- */

.flm-rovespecs__table {
	width: 100%;
	border-collapse: collapse;
	table-layout: fixed;
}

.flm-rovespecs__caption {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
}

.flm-rovespecs__table tr {
	border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.flm-rovespecs__table th,
.flm-rovespecs__table td {
	text-align: left;
	padding: 0.62rem 0.5rem;
	font-size: var(--wp--preset--font-size--caption);
	vertical-align: baseline;
}

.flm-rovespecs__table th[scope="row"] {
	width: 40%;
	font-weight: 400;
}

.flm-rovespecs__rowlabel {
	display: block;
	color: var(--wp--preset--color--text-secondary);
}

.flm-rovespecs__rowunit {
	display: block;
	margin-top: 1px;
	color: var(--wp--preset--color--text-muted);
	font-size: 0.72rem;
	line-height: 1.2;
}

.flm-rovespecs__table td {
	color: var(--wp--preset--color--text-primary);
	font-variant-numeric: tabular-nums;
}

/* --- Vertical divider + right-column drawing ---------------------------- */

.flm-rovespecs__divider {
	width: 1px;
	background: rgba(255, 255, 255, 0.12);
}

.flm-rovespecs__media {
	display: flex;
	align-items: center;
	justify-content: center;
}

.flm-rovespecs__ortho {
	display: block;
	width: 100%;
	max-width: 30rem;
	height: auto;
}

/* --- Dimension overlay (BugHerd #149) ------------------------------------ */
/* Measure lines around the ortho, anchored to the drawing's content box
   (hull spans 7.3%→96.9% horizontally, 0→96% vertically of the PNG). Values
   render from the 245's spec fields in the pattern. */
.flm-rovespecs__drawing {
	position: relative;
	width: 100%;
	max-width: 30rem;
	/* room for the length line (right) and the stacked beam lines + label (below) */
	padding-right: 3rem;
	padding-bottom: 0.5rem;
	margin-bottom: 3.2rem;
	box-sizing: border-box;
}
.flm-rovespecs__drawing .flm-rovespecs__ortho {
	max-width: none;
}
.flm-rovespecs__dim {
	position: absolute;
	display: flex;
	align-items: center;
	gap: 0.4rem;
	color: var(--wp--preset--color--text-muted);
	font-family: var(--wp--preset--font-family--plex);
	font-size: 0.72rem;
	font-weight: 500;
	letter-spacing: 0.08em;
	white-space: nowrap;
}
.flm-rovespecs__dim i {
	flex: 1;
	position: relative;
	background: rgba(255, 255, 255, 0.3);
}
/* Length: vertical line right of the hull, spanning the DECK only — bow tip
   to transom at 83.7% of the PNG. The swim platforms and outboard sit below
   and are excluded (25' 10" ÷ 8' 6" beam = 3.04 = 507px ÷ 167px, so the
   drawing's scale confirms the transom position). */
.flm-rovespecs__dim--length {
	flex-direction: column;
	right: 1.1rem;
	top: 0;
	height: 83.7%;
}
.flm-rovespecs__dim--length i { width: 1px; }
.flm-rovespecs__dim--length i::before {
	content: "";
	position: absolute;
	left: -4px;
	width: 9px;
	height: 1px;
	background: rgba(255, 255, 255, 0.45);
}
.flm-rovespecs__dim--length i:first-of-type::before { top: 0; }
.flm-rovespecs__dim--length i:last-of-type::before { bottom: 0; }
/* Hull beam (wings up): stacked just above the wings-extended line, spanning
   the hull's 22.7%→81.1% extent of the PNG (hull = 65.7% of the wings span,
   measured). */
.flm-rovespecs__dim--hull {
	flex-direction: row;
	/* 22.7%/18.9% are of the IMAGE; the box adds a 3rem right gutter, so
	   compensate: x% of image = calc(x% of box − x/100 × 3rem). */
	left: calc(22.7% - 0.68rem);
	right: calc(2.43rem + 18.9%);
	bottom: -0.15rem;
}
.flm-rovespecs__dim--hull i { height: 1px; }
.flm-rovespecs__dim--hull i::before {
	content: "";
	position: absolute;
	top: -4px;
	width: 1px;
	height: 9px;
	background: rgba(255, 255, 255, 0.45);
}
.flm-rovespecs__dim--hull i:first-of-type::before { left: 0; }
.flm-rovespecs__dim--hull i:last-of-type::before { right: 0; }
/* Wings beam (extended): horizontal line under the hull, spanning 7.3%→96.9%. */
.flm-rovespecs__dim--beam {
	flex-direction: row;
	left: 7.3%;
	right: calc(3rem + 3.1%);
	bottom: -1.2rem;
}
.flm-rovespecs__dim--beam i { height: 1px; }
.flm-rovespecs__dim--beam i::before {
	content: "";
	position: absolute;
	top: -4px;
	width: 1px;
	height: 9px;
	background: rgba(255, 255, 255, 0.45);
}
.flm-rovespecs__dim--beam i:first-of-type::before { left: 0; }
.flm-rovespecs__dim--beam i:last-of-type::before { right: 0; }
.flm-rovespecs__drawing-label {
	position: absolute;
	left: 7.3%;
	right: calc(3rem + 3.1%);
	bottom: -3rem;
	text-align: center;
	color: var(--wp--preset--color--text-secondary);
	font-family: var(--wp--preset--font-family--plex);
	font-size: 0.78rem;
	font-weight: 500;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

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

@media (max-width: 900px) {
	.flm-rovespecs__inner {
		grid-template-columns: 1fr;
		row-gap: clamp(2rem, 6vw, 3rem);
	}
	/* Hide the now-horizontal divider slot; the drawing drops below the table. */
	.flm-rovespecs__divider {
		display: none;
	}
	.flm-rovespecs__media {
		border-top: 1px solid rgba(255, 255, 255, 0.1);
		padding-top: clamp(1.5rem, 5vw, 2.5rem);
	}
	.flm-rovespecs__ortho {
		max-width: 26rem;
	}
}
