// =================================================================
// Pullquote 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-pullquote-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-pullquote-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-pullquote-config: (
// 		primary-color:red,
// 		secondary-color: rebeccapurple,
// );


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

$blocks-block-pullquote-config: map-merge( $blocks-block-pullquote-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-pullquote-theme will override the defaults.

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

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

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


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

.#{$scope}-block-bu-pullquote {
	&.has-light-theme-text blockquote,
	&.has-light-theme-text.has-image blockquote,
	&.has-light-theme-text blockquote .caption,
	&.has-light-theme-text.has-image blockquote .container-text .caption {
		color: blocks-get( 'background-color-light' );
	}

	&.has-dark-theme-text blockquote,
	&.has-dark-theme-text.has-image blockquote,
	&.has-dark-theme-text blockquote .caption,
	&.has-dark-theme-text.has-image blockquote .container-text .caption {
		color: blocks-get( 'background-color-dark' );
	}

	&.has-primary-theme-text blockquote,
	&.has-primary-theme-text.has-image blockquote,
	&.has-primary-theme-text blockquote .caption,
	&.has-primary-theme-text.has-image blockquote .container-text .caption {
		color: blocks-get( 'color-primary-text' );
	}

	&.has-secondary-theme-text blockquote,
	&.has-secondary-theme-text.has-image blockquote,
	&.has-secondary-theme-text blockquote .caption,
	&.has-secondary-theme-text.has-image blockquote .container-text .caption {
		color: blocks-get( 'color-secondary-text' );
	}

	&.has-tertiary-theme-text blockquote,
	&.has-tertiary-theme-text.has-image blockquote,
	&.has-tertiary-theme-text blockquote .caption,
	&.has-tertiary-theme-text.has-image blockquote .container-text .caption{
		color: blocks-get( 'color-tertiary-text' );
	}

	&.has-quaternary-theme-text blockquote,
	&.has-quaternary-theme-text.has-image blockquote,
	&.has-quaternary-theme-text blockquote .caption,
	&.has-quaternary-theme-text.has-image blockquote .container-text .caption {
		color: blocks-get( 'color-quaternary-text' );
	}

	&.has-quinary-theme-text blockquote,
	&.has-quinary-theme-text.has-image blockquote,
	&.has-quinary-theme-text blockquote .caption,
	&.has-quinary-theme-text.has-image blockquote .container-text .caption {
		color: blocks-get( 'color-quinary-text' );
	}
	&:not(.is-style-modern):not(.is-style-pop) {

		blockquote {
			&::before,
			&::after {
				color: blocks-get( 'color-primary');
				font-family: blocks-get( 'font-family-secondary');
			}
		}

		&.has-image {

			hr::before,
			hr::after {
				background-color: blocks-get( 'color-page');
			}

			blockquote::before,
			blockquote::after {
				color: blocks-get( 'color-page');
			}

			figure {
				background: $color-grayscale-3;
				margin: 0;
			}
		}

		&.has-light-theme,
		&.has-light-theme.has-image {
			blockquote {
				&::before,
				&::after {
					color: blocks-get( 'background-color-light');
				}
			}
		}

		&.has-dark-theme,
		&.has-dark-theme.has-image {
			blockquote {
				&::before,
				&::after {
					color: blocks-get( 'background-color-dark');
				}
			}
		}

		&.has-primary-theme,
		&.has-primary-theme.has-image {
			blockquote {
				&::before,
				&::after {
					color: blocks-get( 'color-primary');
				}
			}
		}

		&.has-secondary-theme,
		&.has-secondary-theme.has-image {
			blockquote {
				&::before,
				&::after {
					color: blocks-get( 'color-secondary');
				}
			}
		}

		&.has-tertiary-theme,
		&.has-light-theme.has-image {
			blockquote {
				&::before,
				&::after {
					color: blocks-get( 'color-tertiary');
				}
			}
		}

		&.has-quaternary-theme,
		&.has-quaternary-theme.has-image {
			blockquote {
				&::before,
				&::after {
					color: blocks-get( 'color-quaternary');
				}
			}
		}

		&.has-quinary-theme,
		&.has-quinary-theme.has-image {
			blockquote {
				&::before,
				&::after {
					color: blocks-get( 'color-quinary');
				}
			}
		}

		&.alignfull {
			background-color: blocks-get( 'background-color-light');

			&.has-image {
				background-color: transparent;
			}
		}
	}
	&.is-style-modern {
		&.alignwide {
			.container-lockup {
				background-color: blocks-get( 'background-color-light');
			}
		}

		&.alignfull {
			background-color: blocks-get( 'background-color-light');
		}

		.container-icon-inner {
			background-color: blocks-get( 'color-primary');
			color: blocks-get( 'color-page');
		}

		&.has-image {
			.container-icon-inner {
				background-color: blocks-get( 'background-color-dark');
			}
		}

		&.has-light-theme,
		&.has-light-theme.has-image {
			.container-icon-inner {
				background-color: blocks-get( 'background-color-light');
			}
		}

		&.has-dark-theme,
		&.has-dark-theme.has-image {
			.container-icon-inner {
				background-color: blocks-get( 'background-color-dark');
			}
		}

		&.has-primary-theme,
		&.has-primary-theme.has-image {
			.container-icon-inner {
				background-color: blocks-get( 'color-primary');
			}
		}

		&.has-secondary-theme,
		&.has-secondary-theme.has-image {
			.container-icon-inner {
				background-color: blocks-get( 'color-secondary');
			}
		}

		&.has-tertiary-theme,
		&.has-light-theme.has-image {
			.container-icon-inner {
				background-color: blocks-get( 'color-tertiary');
			}
		}

		&.has-quaternary-theme,
		&.has-quaternary-theme.has-image {
			.container-icon-inner {
				background-color: blocks-get( 'color-quaternary');
			}
		}

		&.has-quinary-theme,
		&.has-quinary-theme.has-image {
			.container-icon-inner {
				background-color: blocks-get( 'color-quinary');
			}
		}
	}
	&.is-style-pop {
		background-color: blocks-get( 'background-color-light');

		.container-icon-inner {
			color: blocks-get( 'color-primary');
		}

		&.has-image {
			color: blocks-get( 'color-page');
			background-color: blocks-get( 'background-color-dark');

			hr {
				background-color: blocks-get( 'color-page');
			}

			.container-icon-inner {
				color: blocks-get( 'color-page');
			}
		}

		&.has-light-theme {
			.container-icon-inner {
				&::before {
					color: blocks-get( 'background-color-light');
				}
			}
		}

		&.has-dark-theme {
			.container-icon-inner {
				&::before {
					color: blocks-get( 'background-color-dark');
				}
			}
		}

		&.has-primary-theme {
			.container-icon-inner {
				&::before {
					color: blocks-get( 'color-primary');
				}
			}
		}

		&.has-secondary-theme {
			.container-icon-inner {
				&::before {
					color: blocks-get( 'color-secondary');
				}
			}
		}

		&.has-tertiary-theme {
			.container-icon-inner {
				&::before {
					color: blocks-get( 'color-tertiary');
				}
			}
		}

		&.has-quaternary-theme {
			.container-icon-inner {
				&::before {
					color: blocks-get( 'color-quaternary');
				}
			}
		}

		&.has-quinary-theme {
			.container-icon-inner {
				&::before {
					color: blocks-get( 'color-quinary');
				}
			}
		}
	}
}

