/**
 * Cool Bear — Spring-rate selector + customisation widget.
 *
 * Two-axis (front / rear) numeric selector with min/max bounds drawn from
 * data attributes. Operator can set bounds via CSV; customer can pick from
 * available rates AND type a custom value within bounds.
 *
 * Vision Decision 4 — "Option to modify spring rates — customer customises
 * the front/rear rates from a list of available rates (operator can set bounds)."
 */

.cb-springs {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--wp--preset--spacing--30);
}

@media (min-width: 480px) {
	.cb-springs {
		grid-template-columns: 1fr 1fr;
		gap: var(--wp--preset--spacing--40);
	}
}

.cb-spring {
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--20);
	padding: var(--wp--preset--spacing--30);
	background-color: var(--wp--preset--color--surface-sunken);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 6px;
}

.cb-spring__label {
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--wp--preset--color--text-muted);
}

.cb-spring__value-row {
	display: flex;
	align-items: baseline;
	gap: var(--wp--preset--spacing--20);
}

.cb-spring__value {
	flex: 1;
	min-width: 0;
	background: none;
	border: none;
	color: var(--wp--preset--color--text);
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--xl);
	font-weight: 600;
	padding: 0;
	min-height: 44px;
	letter-spacing: -0.02em;
}

.cb-spring__value:focus-visible {
	outline: 2px solid var(--wp--preset--color--accent);
	outline-offset: 4px;
	border-radius: 4px;
}

.cb-spring__unit {
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--text-muted);
	text-transform: uppercase;
}

.cb-spring__range {
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--x-small);
	color: var(--wp--preset--color--text-subtle);
	letter-spacing: 0.04em;
}

.cb-spring__presets {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
}

.cb-spring__preset {
	padding: 4px 10px;
	background-color: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 999px;
	color: var(--wp--preset--color--text-muted);
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--x-small);
	cursor: pointer;
	transition: all 150ms ease;
	min-height: 28px;
	min-width: 44px;
}

.cb-spring__preset:hover {
	color: var(--wp--preset--color--text);
	border-color: var(--wp--preset--color--border-strong);
}

.cb-spring__preset[aria-pressed="true"] {
	background-color: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--text-on-accent);
	border-color: var(--wp--preset--color--accent);
}

.cb-spring__reset {
	align-self: flex-start;
	padding: 6px 10px;
	background: none;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 4px;
	color: var(--wp--preset--color--text-muted);
	font-size: var(--wp--preset--font-size--x-small);
	cursor: pointer;
	transition: color 150ms ease, border-color 150ms ease;
	min-height: 28px;
}

.cb-spring__reset:hover {
	color: var(--wp--preset--color--text);
	border-color: var(--wp--preset--color--text-muted);
}
