// =================================================================
// Sample Styles - Configurable
// =================================================================
//
//
// Styles in this file should only be using properties that are
// in the global array ($blocks-defaults) so they can be overwritten by
// the child theme
// Examples: color, border-color, font-family
//
// Variant styles, such as "open", or an alternate layout should be declared here
// as shown below IF that variant needs to modify one of the properties that
// can be overwritten via the array. This lets the child theme overwrite that
// as well.
//
// If you aren't using styles from the global array ($blocks-defaults) by
// using blocks-get() it doesn't belong in this file as it will be printed
// in the stylesheet multiple times (for each publication)
//

$blocks-block-sample-config: ();

// use the above array if you need to override the global $blocks-defaults array
// of styles ONLY for this block IN the plugin.
// You can then override THIS array by using $blocks-block-sample-theme in the child theme to
// override this array
//
// Remember, with great power comes great responsibility. This should not be used unless
// you really need it. Think carefully about why you aren't modifying the global config by adding
// a different variable.
//
// $blocks-block-sample-config: (
// 		primary-color:red,
// 		secondary-color: rebeccapurple,
// );


// Use the default Blocks configuration. You can override this globally
// in a theme.

$blocks-block-sample-config: map-merge( $blocks-block-sample-config, $blocks-config );

// This allows themes to optionally set theme options for this
// block only. You can set all or a few options - only the options
// you set in $block-block-sample-theme will override the defaults.

@if variable-exists( blocks-block-sample-theme ) {
	$blocks-block-sample-config: map_merge( $blocks-block-sample-config, $blocks-block-sample-theme );
}

// A global helper variable for the block-get mixin.

$current-map: $blocks-block-sample-config;


$scope: blocks-get( 'scope' );

.#{$scope}-block-bu-stats {
	.wp-block-stats-caption {
		font-family: blocks-get( 'font-family-secondary' );
		color: blocks-get( 'font-color-aside' );
	}

	.wp-block-bu-stat-number {
		font-family: blocks-get( 'font-family-secondary' );
	}


	&.has-number-font-primary {
		.wp-block-bu-stat-number {
			font-family: blocks-get( 'font-family-primary' );
		}
	}

	&.has-number-font-secondary {
		.wp-block-bu-stat-number {
			font-family: blocks-get( 'font-family-secondary' );
		}
	}

	&.has-number-font-tertiary {
		.wp-block-bu-stat-number {
			font-family: blocks-get( 'font-family-tertiary' );
		}
	}

	&.has-text-font-primary {
		.wp-block-bu-stat-text-pre,
		.wp-block-bu-stat-text-post {
			font-family: blocks-get( 'font-family-primary' );
		}
	}

	&.has-text-font-secondary {
		.wp-block-bu-stat-text-pre,
		.wp-block-bu-stat-text-post {
			font-family: blocks-get( 'font-family-secondary' );
		}
	}

	&.has-text-font-tertiary {
		.wp-block-bu-stat-text-pre,
		.wp-block-bu-stat-text-post {
			font-family: blocks-get( 'font-family-tertiary' );
		}
	}

	.wp-block-bu-stat-circle1 {
		stroke: blocks-get( 'color-gray-e' );
	}

	.wp-block-bu-stat-circle2 {
		stroke: blocks-get( 'background-color-dark' );
	}

	.has-circle1-color-dark .wp-block-bu-stat-circle1 {
		stroke: blocks-get( 'background-color-dark' );
	}

	.has-circle1-color-primary .wp-block-bu-stat-circle1 {
		stroke: blocks-get( 'color-primary' );
	}

	.has-circle1-color-secondary .wp-block-bu-stat-circle1 {
		stroke: blocks-get( 'color-secondary' );
	}

	.has-circle1-color-tertiary .wp-block-bu-stat-circle1 {
		stroke: blocks-get( 'color-tertiary' );
	}

	.has-circle1-color-quaternary .wp-block-bu-stat-circle1 {
		stroke: blocks-get( 'color-quaternary' );
	}

	.has-circle2-color-dark .wp-block-bu-stat-circle2 {
		stroke: blocks-get( 'background-color-dark' );
	}

	.has-circle2-color-primary .wp-block-bu-stat-circle2 {
		stroke: blocks-get( 'color-primary' );
	}

	.has-circle2-color-secondary .wp-block-bu-stat-circle2 {
		stroke: blocks-get( 'color-secondary' );
	}

	.has-circle2-color-tertiary .wp-block-bu-stat-circle2 {
		stroke: blocks-get( 'color-tertiary' );
	}

	.has-circle2-color-quaternary .wp-block-bu-stat-circle2 {
		stroke: blocks-get( 'color-quaternary' );
	}
}
