/**
 * Styles for 'Product Price (Custom)' Block and WooCommerce Product Price.
 * Uses low-specificity :where() defaults and explicit inheritance so all
 * right-side Gutenberg Styles (Typography, Color, Border, Spacing, Alignment)
 * apply identically in the Editor and on the Frontend.
 *
 * @package My_Custom_Code
 */

/* Baseline defaults (zero specificity so Gutenberg preset classes & inline styles win) */
:where(.wp-block-my-custom-code-product-price) {
	display: flex;
	flex-direction: row;
	justify-content: flex-start;
	align-items: center;
	flex-wrap: wrap;
	gap: 5px;
	font-size: 24px;
	font-family: "Space Grotesk", sans-serif;
	font-weight: 700;
	color: var(--wp--preset--color--text-primary);
}

/* Ensure inner WooCommerce price elements inherit all Gutenberg wrapper styles */
.wp-block-my-custom-code-product-price ins,
.wp-block-my-custom-code-product-price > span,
.wp-block-my-custom-code-product-price .woocommerce-Price-amount,
.wp-block-my-custom-code-product-price bdi {
	font-size: inherit;
	font-family: inherit;
	font-weight: inherit;
	font-style: inherit;
	line-height: inherit;
	letter-spacing: inherit;
	text-transform: inherit;
	color: inherit;
}

:where(.wp-block-my-custom-code-product-price) ins {
	order: -1;
	text-decoration: none;
}

.wp-block-my-custom-code-product-price[style*="text-decoration"] ins {
	text-decoration: inherit;
}

/* Regular/strikethrough price scales proportionally with the chosen block typography & color */
:where(.wp-block-my-custom-code-product-price) del {
	font-size: 0.55em;
	font-weight: 400;
	opacity: 0.7;
	color: inherit;
	text-decoration: line-through;
}

/* Native Gutenberg text alignment mapped to flex main-axis */
.wp-block-my-custom-code-product-price.has-text-align-left,
.wp-block-my-custom-code-product-price[style*="text-align: left"],
.wp-block-my-custom-code-product-price[style*="text-align:left"] {
	justify-content: flex-start;
}

.wp-block-my-custom-code-product-price.has-text-align-center,
.wp-block-my-custom-code-product-price[style*="text-align: center"],
.wp-block-my-custom-code-product-price[style*="text-align:center"] {
	justify-content: center;
}

.wp-block-my-custom-code-product-price.has-text-align-right,
.wp-block-my-custom-code-product-price[style*="text-align: right"],
.wp-block-my-custom-code-product-price[style*="text-align:right"] {
	justify-content: flex-end;
}

/* Core WooCommerce Product Price baseline (moved from nexora-shop theme) */
:where(.single-product .wp-block-column .wc-block-components-product-price) {
	display: flex;
	flex-direction: row-reverse;
	justify-content: flex-end;
	align-items: center;
	gap: 5px;
}

:where(.single-product .wp-block-column .wc-block-components-product-price ins),
:where(.single-product .wp-block-column .wc-block-components-product-price > span) {
	font-size: 24px;
	font-family: "Space Grotesk", sans-serif;
	font-weight: 700;
	color: var(--wp--preset--color--text-primary);
	text-decoration: none;
}

:where(.single-product .wp-block-column .wc-block-components-product-price del) {
	font-size: 12px;
	font-weight: 400;
	color: var(--wp--preset--color--text-secondary);
}
