/**
 * Styles for the Championworks Framework Wheel Elementor widget: an intro
 * heading, a static ring of capability segments, and a list of every
 * stage (number, name, description, outcome note), all visible at once.
 * Desktop puts the list beside the wheel; at 900px and below the wheel
 * comes first and the stages stack beneath it. Colors/typography/spacing
 * come from Elementor's control CSS; this file only handles the
 * structural layout.
 */

.cw-ft {
	position: relative;
	width: 100%;
}

.cw-ft__pin {
	position: relative;
	width: 100%;
	overflow: hidden;
	box-sizing: border-box;
	padding: 24px;
}

.cw-ft__eyebrow,
.cw-ft__heading,
.cw-ft__description {
	margin: 0;
}

.cw-ft__heading {
	margin-top: 10px;
}

.cw-ft__description {
	margin-top: 12px;
}

/* ---------- layout ---------- */

/* The wheel spans every row of the right column. The last row is the
   flexible one, so a wheel taller than the text column adds its extra
   height below the footer rather than gaps between the stages. */
.cw-ft__body-row {
	display: grid;
	grid-template-columns: minmax( 0, 1fr ) auto;
	grid-template-rows: auto auto 1fr;
	grid-template-areas:
		"intro  wheel"
		"stages wheel"
		"footer wheel";
	column-gap: 64px;
	align-items: start;
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
	text-align: left;
}

.cw-ft__intro {
	grid-area: intro;
	margin-bottom: 32px;
}

.cw-ft__stages {
	grid-area: stages;
}

.cw-ft__footer {
	grid-area: footer;
	margin: 28px 0 0;
}

/* ---------- stage list ---------- */

.cw-ft__stages {
	list-style: none;
	margin: 0;
	padding: 0;
}

.cw-ft__desc-item {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 8px;
	margin: 0;
	padding: 22px 0;
	border-top: 1px solid transparent;
}

.cw-ft__desc-item:first-child {
	padding-top: 0;
	border-top: 0;
}

.cw-ft__desc-item:last-child {
	padding-bottom: 0;
}

.cw-ft__desc-num,
.cw-ft__desc-title,
.cw-ft__desc-text {
	margin: 0;
}

.cw-ft__desc-num {
	font-size: .78rem;
	letter-spacing: .1em;
	text-transform: uppercase;
	opacity: .85;
}

.cw-ft__desc-text {
	max-width: 42em;
}

.cw-ft__desc-out {
	display: inline-flex;
	gap: 10px;
	align-items: center;
	margin: 6px 0 0;
	padding: 6px 12px;
	border: 1px solid transparent;
	border-radius: 4px;
	line-height: 1.4;
	box-sizing: border-box;
}

.cw-ft__desc-out svg {
	width: 14px;
	height: 14px;
	flex: none;
}

/* ---------- wheel ---------- */

.cw-ft__wheel-wrap {
	grid-area: wheel;
	align-self: center;
	position: relative;
	max-width: 100%;
	aspect-ratio: 1;
	margin: 0;
}

.cw-ft__ring-outline {
	position: absolute;
	inset: 0;
	pointer-events: none;
}

.cw-ft__ring-outline::before,
.cw-ft__ring-outline::after {
	content: '';
	position: absolute;
	border-radius: 50%;
	border: 1px solid transparent;
}

.cw-ft__ring-outline::before {
	inset: calc( 50% - var( --cw-ft-outer-r, 48% ) );
}

.cw-ft__ring-outline::after {
	inset: calc( 50% - var( --cw-ft-inner-r, 30% ) );
}

.cw-ft__wheel {
	position: absolute;
	inset: 0;
}

.cw-ft__seg {
	position: absolute;
	inset: 0;
}

.cw-ft__label {
	position: absolute;
	transform: translate( -50%, -50% );
	text-align: center;
	line-height: 1.2;
}

.cw-ft__label-text {
	display: inline-block;
	white-space: nowrap;
}

/* Number above the name keeps each label narrow enough to sit inside its
   segment, even on the small phone-sized wheel. */
.cw-ft__label-num {
	display: block;
	margin-bottom: .2em;
	opacity: .7;
}

.cw-ft__center {
	position: absolute;
	inset: calc( 50% - var( --cw-ft-center-r, 26% ) );
	border-radius: 50%;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 10px;
	text-align: center;
}

.cw-ft__center-icon {
	display: inline-flex;
	width: 2.2em;
	height: 2.2em;
}

.cw-ft__center-icon svg {
	width: 100%;
	height: 100%;
}

.cw-ft__center-label {
	white-space: nowrap;
}

/* ---------- stacked (tablet / mobile) ---------- */

@media ( max-width: 900px ) {
	.cw-ft__body-row {
		grid-template-columns: minmax( 0, 1fr );
		grid-template-rows: none;
		grid-template-areas:
			"intro"
			"wheel"
			"stages"
			"footer";
		text-align: center;
	}

	.cw-ft__wheel-wrap {
		justify-self: center;
		margin-bottom: 40px;
	}

	.cw-ft__desc-item {
		align-items: center;
	}

	.cw-ft__desc-text {
		margin-inline: auto;
	}
}

/* On the phone-sized wheel the longer labels are wider than the ring, so
   nudge each one outward along its own angle: any overflow then spills
   past the ring's outer edge instead of under the centre circle. */
@media ( max-width: 767px ) {
	.cw-ft__label {
		transform: translate(
			calc( -50% + var( --cw-ft-dx, 0 ) * 8px ),
			calc( -50% + var( --cw-ft-dy, 0 ) * 8px )
		);
	}
}
