/**
 * Formula frontend styles.
 *
 * A formula is a read-out, not a control: it sits on its own row, takes no
 * hover or pointer affordance, and shows its figure at the end of the line the
 * way a priced option does.
 *
 * Hand-authored rather than built — the module's only Vite-built frontend file
 * is the runtime, and `Module_Base::enqueue_frontend_assets()` falls back to
 * `<slug>.css` when a module ships no built `<slug>.min.css`.
 *
 * @package  wp-3d-configurator\modules\formula\assets\frontend\
 * @author WP Configurator
 * @version 1.3.5
 */

/* Option layers sit side by side as chips; a read-out needs the full row. */
.wp3dconf-parent-control .wp3dconf-control-item.wp3dconf-layer-type-formula {
	display: block;
	width: 100%;
	cursor: default;
}

[class^="wp3dconf"] .wp3dconf-formula {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 10px;
	width: 100%;
	box-sizing: border-box;
	padding: 8px 0;
	font-size: 14px;
	line-height: 1.4;
	color: var(--wp3dconf-text-dark);
}

[class^="wp3dconf"] .wp3dconf-formula-label {
	font-weight: 600;
	overflow-wrap: anywhere;
}

/* The computed figure takes the free space between the label and the price, so
   a row with no price still reads as label-then-value rather than centred. */
[class^="wp3dconf"] .wp3dconf-formula-result {
	flex: 1;
	text-align: right;
	font-variant-numeric: tabular-nums;
	overflow-wrap: anywhere;
}

[class^="wp3dconf"] .wp3dconf-formula .wp3dconf-price {
	flex: none;
	white-space: nowrap;
}

/* A formula with its read-out switched off still prices but renders no markup
   (see Formula::render_layer_html()), leaving an empty list item. Nothing is
   needed to hide it: `.wp3dconf-control-items-wrap` sets no gap, so the item
   collapses to nothing on its own. */

/* Conditional Logic can hide or disable a formula layer like any other. */
.wp3dconf-layer-type-formula.wp3dconf-layer-disabled .wp3dconf-formula {
	opacity: 0.5;
}
