<?php
$material_options = get_option('gf_stla_form_id_material_design_' . $form_id);
$primary_color = isset($material_options['theme'])? $material_options['theme']: '#6200ee';
$secondary_color = $primary_color;
// $progress_color = isset( $material_options['progress-color'])?$material_options['progress-color']: '#28a745';

echo '<style>


  :root {
	--mdc-theme-primary-'.$form_id.': '.$primary_color.'!important;
	--mdc-theme-secondary-'.$form_id.': '.$secondary_color. '!important;
  }

  #gform_wrapper_'.$form_id.' .mdc-checkbox::before,
  #gform_wrapper_'.$form_id.' .mdc-checkbox::after {
		background-color: '.$secondary_color. ';
	}
	
	@supports not (-ms-ime-align: auto) {
		#gform_wrapper_'.$form_id.' .mdc-checkbox::before,
		#gform_wrapper_'.$form_id.' .mdc-checkbox::after {
			/* @alternate */
			background-color: var(--mdc-theme-secondary-'.$form_id.', '.$secondary_color. ');
		}
	}
	
	#gform_wrapper_'.$form_id.' .mdc-checkbox__background::before {
		background-color: '.$secondary_color. ';
	}
	
	@supports not (-ms-ime-align: auto) {
		#gform_wrapper_'.$form_id.' .mdc-checkbox__background::before {
			/* @alternate */
			background-color: var(--mdc-theme-secondary-'.$form_id.', '.$secondary_color. ');
		}
	}
	
	#gform_wrapper_'.$form_id.' .mdc-checkbox__native-control:enabled:checked~.mdc-checkbox__background,
	#gform_wrapper_'.$form_id.' .mdc-checkbox__native-control:enabled:indeterminate~.mdc-checkbox__background {
		border-color: '.$secondary_color. ';
		/* @alternate */
		border-color: var(--mdc-theme-secondary-'.$form_id.', '.$secondary_color. ');
		background-color: '.$secondary_color. ';
		/* @alternate */
		background-color: var(--mdc-theme-secondary-'.$form_id.', '.$secondary_color. ');
	}
	
	#gform_wrapper_'.$form_id.' .mdc-checkbox--anim-unchecked-checked .mdc-checkbox__native-control:enabled ~ .mdc-checkbox__background,#gform_wrapper_'.$form_id.' .mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__native-control:enabled ~ .mdc-checkbox__background {
		-webkit-animation-name: mdc-checkbox-fade-in-background-0-'.$form_id.' ;
				animation-name: mdc-checkbox-fade-in-background-0-'.$form_id.'; }
	  
	#gform_wrapper_'.$form_id.' .mdc-checkbox--anim-checked-unchecked .mdc-checkbox__native-control:enabled ~ .mdc-checkbox__background,#gform_wrapper_'.$form_id.' .mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__native-control:enabled ~ .mdc-checkbox__background {
		-webkit-animation-name: mdc-checkbox-fade-out-background-0-'.$form_id.';
				animation-name: mdc-checkbox-fade-out-background-0-'.$form_id.'; }

	@-webkit-keyframes mdc-checkbox-fade-in-background-0-'.$form_id.' {
		0% {
			border-color: rgba(0, 0, 0, 0.54);
			background-color: transparent;
		}
		50% {
			border-color: '.$secondary_color. ';
			/* @alternate */
			border-color: var(--mdc-theme-secondary-'.$form_id.', '.$secondary_color. ');
			background-color: '.$secondary_color. ';
			/* @alternate */
			background-color: var(--mdc-theme-secondary-'.$form_id.', '.$secondary_color. ');
		}
	}
	// ********************************************************************
	@keyframes mdc-checkbox-fade-in-background-0-'.$form_id.' {
		0% {
			border-color: rgba(0, 0, 0, 0.54);
			background-color: transparent;
		}
		50% {
			border-color: '.$secondary_color. ';
			/* @alternate */
			border-color: var(--mdc-theme-secondary-'.$form_id.', '.$secondary_color. ');
			background-color: '.$secondary_color. ';
			/* @alternate */
			background-color: var(--mdc-theme-secondary-'.$form_id.', '.$secondary_color. ');
		}
	}
	
	@-webkit-keyframes mdc-checkbox-fade-out-background-0-'.$form_id.'  {
		0%,
		80% {
			border-color: '.$secondary_color. ';
			/* @alternate */
			border-color: var(--mdc-theme-secondary-'.$form_id.', '.$secondary_color. ');
			background-color: '.$secondary_color. ';
			/* @alternate */
			background-color: var(--mdc-theme-secondary-'.$form_id.', '.$secondary_color. ');
		}
		100% {
			border-color: rgba(0, 0, 0, 0.54);
			background-color: transparent;
		}
	}
	
	#gform_wrapper_'.$form_id.' .mdc-radio::before,
	#gform_wrapper_'.$form_id.' .mdc-radio::after {
		background-color: '.$secondary_color. ';
	}
	
	@supports not (-ms-ime-align: auto) {
		#gform_wrapper_'.$form_id.' .mdc-radio::before,
		#gform_wrapper_'.$form_id.' .mdc-radio::after {
			/* @alternate */
			background-color: var(--mdc-theme-secondary-'.$form_id.', '.$secondary_color. ');
		}
	}
	
	@keyframes mdc-checkbox-fade-out-background-0-'.$form_id.' {
		0%,
		80% {
			border-color: '.$secondary_color. ';
			/* @alternate */
			border-color: var(--mdc-theme-secondary-'.$form_id.', '.$secondary_color. ');
			background-color: '.$secondary_color. ';
			/* @alternate */
			background-color: var(--mdc-theme-secondary-'.$form_id.', '.$secondary_color. ');
		}
	}
	#gform_wrapper_'.$form_id.' .mdc-dialog__action:not(:disabled) {
			color: '.$secondary_color. ';
			/* @alternate */
			color: var(--mdc-theme-secondary-'.$form_id.', '.$secondary_color. ');
		}
		#gform_wrapper_'.$form_id.' .mdc-radio .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle {
			border-color: '.$secondary_color. ';
			/* @alternate */
			border-color: var(--mdc-theme-secondary-'.$form_id.', '.$secondary_color. ');
		}
		#gform_wrapper_'.$form_id.' .mdc-radio .mdc-radio__native-control:enabled+.mdc-radio__background .mdc-radio__inner-circle {
			border-color: '.$secondary_color. ';
			/* @alternate */
			border-color: var(--mdc-theme-secondary-'.$form_id.', '.$secondary_color. ');
		}
		#gform_wrapper_'.$form_id.' .mdc-radio .mdc-radio__background::before {
			background-color: '.$secondary_color. ';
		}
		@supports not (-ms-ime-align: auto) {
			#gform_wrapper_'.$form_id.' .mdc-radio .mdc-radio__background::before {
				/* @alternate */
				background-color: var(--mdc-theme-secondary-'.$form_id.', '.$secondary_color. ');
			}
		}
		#gform_wrapper_'.$form_id.' .mdc-ripple-surface--accent::before,
		#gform_wrapper_'.$form_id.' .mdc-ripple-surface--accent::after {
			background-color: '.$secondary_color. ';
		}
		@supports not (-ms-ime-align: auto) {
			#gform_wrapper_'.$form_id.' .mdc-ripple-surface--accent::before,
			#gform_wrapper_'.$form_id.' .mdc-ripple-surface--accent::after {
				/* @alternate */
				background-color: var(--mdc-theme-secondary-'.$form_id.', '.$secondary_color. ');
			}
		}
		// .mdc-button:not(:disabled) {
		// 	color: '.$primary_color.';
		// 	/* @alternate */
		// 	color: var(--mdc-theme-primary-'.$form_id.', '.$primary_color.');
		// }
		#gform_wrapper_'.$form_id.' .mdc-button::before,
		#gform_wrapper_'.$form_id.' .mdc-button::after {
			background-color: '.$primary_color.';
		}
		@supports not (-ms-ime-align: auto) {
			#gform_wrapper_'.$form_id.' .mdc-button::before,
			#gform_wrapper_'.$form_id.' .mdc-button::after {
				/* @alternate */
				background-color: var(--mdc-theme-primary-'.$form_id.', '.$primary_color.');
			}
		}
		#gform_wrapper_'.$form_id.' .mdc-button--raised:not(:disabled),
		#gform_wrapper_'.$form_id.' .mdc-button--unelevated:not(:disabled) {
			background-color: '.$primary_color.';
		}
		@supports not (-ms-ime-align: auto) {
			#gform_wrapper_'.$form_id.' .mdc-button--raised:not(:disabled),
			#gform_wrapper_'.$form_id.' .mdc-button--unelevated:not(:disabled) {
				/* @alternate */
				background-color: var(--mdc-theme-primary-'.$form_id.', '.$primary_color.');
			}
		}
		#gform_wrapper_'.$form_id.' .mdc-button--outlined:not(:disabled) {
			border-color: '.$primary_color.';
			/* @alternate */
			border-color: var(--mdc-theme-primary-'.$form_id.', '.$primary_color.');
		}
		#gform_wrapper_'.$form_id.' .mdc-chip.mdc-chip--selected {
			color: '.$primary_color.';
			/* @alternate */
			color: var(--mdc-theme-primary-'.$form_id.', '.$primary_color.');
		}
		#gform_wrapper_'.$form_id.' .mdc-chip.mdc-chip--selected .mdc-chip__icon.mdc-chip__icon--leading {
			color: rgba(98, 0, 238, 0.54);
		}
		#gform_wrapper_'.$form_id.' .mdc-chip.mdc-chip--selected:hover {
			color: '.$primary_color.';
			/* @alternate */
			color: var(--mdc-theme-primary-'.$form_id.', '.$primary_color.');
		}
		#gform_wrapper_'.$form_id.' .mdc-chip .mdc-chip__checkmark-path {
			stroke: '.$primary_color.';
			/* @alternate */
			stroke: var(--mdc-theme-primary-'.$form_id.', '.$primary_color.');
		}
		#gform_wrapper_'.$form_id.' .mdc-grid-tile__secondary {
			background-color: '.$primary_color.';
			/* @alternate */
			background-color: var(--mdc-theme-primary-'.$form_id.', '.$primary_color.');
			color: #fff;
			/* @alternate */
			color: var(--mdc-theme-on-primary, #fff);
			position: absolute;
			bottom: 0;
			box-sizing: border-box;
			height: 48px;
			padding: 16px;
		}
		#gform_wrapper_'.$form_id.' .mdc-linear-progress__bar-inner {
			background-color: '.$primary_color.';
			/* @alternate */
			background-color: var(--mdc-theme-primary-'.$form_id.', '.$primary_color.');
		}
		#gform_wrapper_'.$form_id.' .mdc-list-item--selected,
		#gform_wrapper_'.$form_id.' .mdc-list-item--activated {
			color: '.$primary_color.';
			/* @alternate */
			color: var(--mdc-theme-primary-'.$form_id.', '.$primary_color.');
		}
		#gform_wrapper_'.$form_id.' .mdc-list-item--selected .mdc-list-item__graphic,
		#gform_wrapper_'.$form_id.' .mdc-list-item--activated .mdc-list-item__graphic {
			color: '.$primary_color.';
			/* @alternate */
			color: var(--mdc-theme-primary-'.$form_id.', '.$primary_color.');
		}
		#gform_wrapper_'.$form_id.' .mdc-list-item--activated::after {
			background-color: '.$primary_color.';
		}
		@supports not (-ms-ime-align: auto) {
			#gform_wrapper_'.$form_id.' :not(.mdc-list--non-interactive)>.mdc-list-item--activated::before,
			#gform_wrapper_'.$form_id.' :not(.mdc-list--non-interactive)>.mdc-list-item--activated::after {
				/* @alternate */
				background-color: var(--mdc-theme-primary-'.$form_id.', '.$primary_color.');
			}
		}
		#gform_wrapper_'.$form_id.' .mdc-ripple-surface--primary::before,
		#gform_wrapper_'.$form_id.' .mdc-ripple-surface--primary::after {
			background-color: '.$primary_color.';
		}
		@supports not (-ms-ime-align: auto) {
			#gform_wrapper_'.$form_id.' .mdc-ripple-surface--primary::before,
			#gform_wrapper_'.$form_id.' .mdc-ripple-surface--primary::after {
				/* @alternate */
				background-color: var(--mdc-theme-primary-'.$form_id.', '.$primary_color.');
			}
		}
		#gform_wrapper_'.$form_id.' .mdc-select:not(.mdc-select--disabled) .mdc-select__native-control:focus ~ .mdc-line-ripple {
			background-color: '.$primary_color.';
			/* @alternate */
			background-color: var(--mdc-theme-primary-'.$form_id.', '.$primary_color.');
		}
		#gform_wrapper_'.$form_id.' .mdc-text-field .mdc-line-ripple {
			background-color: '.$primary_color.';
			/* @alternate */
			background-color: var(--mdc-theme-primary-'.$form_id.', '.$primary_color.');
		}
		#gform_wrapper_'.$form_id.' .mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__path {
			stroke: '.$primary_color.';
			/* @alternate */
			stroke: var(--mdc-theme-primary-'.$form_id.', '.$primary_color.');
		}
		#gform_wrapper_'.$form_id.' .mdc-text-field--textarea.mdc-text-field--focused:not(.mdc-text-field--disabled) {
			border-color: '.$primary_color.';
			/* @alternate */
			border-color: var(--mdc-theme-primary-'.$form_id.', '.$primary_color.');
		}
		#gform_wrapper_'.$form_id.' .mdc-text-field--textarea.mdc-text-field--focused:not(.mdc-text-field--disabled) .mdc-text-field__input:focus {
			border-color: '.$primary_color.';
			/* @alternate */
			border-color: var(--mdc-theme-primary-'.$form_id.', '.$primary_color.');
		}
		#gform_wrapper_'.$form_id.' .mdc-select:not(.mdc-select--disabled) .mdc-select__native-control:focus ~ .mdc-floating-label {
			color: '.$primary_color.'; 
		}

		#gform_wrapper_'.$form_id.' .mdc-text-field--focused:not(.mdc-text-field--disabled) .mdc-floating-label {
			color: '.$primary_color.'; 
		}
		
		#gform_wrapper_'.$form_id.' .mdc-text-field--focused:not(.mdc-text-field--disabled) .mdc-text-field__input::-webkit-input-placeholder {
			color: '.$primary_color.';
		 }
		
		 #gform_wrapper_'.$form_id.' .mdc-text-field--focused:not(.mdc-text-field--disabled) .mdc-text-field__input:-ms-input-placeholder {
			color: '.$primary_color.'; 
		}
		
		#gform_wrapper_'.$form_id.' .mdc-text-field--focused:not(.mdc-text-field--disabled) .mdc-text-field__input::-ms-input-placeholder {
			color: '.$primary_color.'; 
		}
		
		#gform_wrapper_'.$form_id.' .mdc-text-field--focused:not(.mdc-text-field--disabled) .mdc-text-field__input::placeholder {
			color: '.$primary_color.';
		 }
		
		 #gform_wrapper_'.$form_id.' .mdc-switch.mdc-switch--checked .mdc-switch__track {
			background-color: '.$secondary_color. ';
			background-color: var(--mdc-theme-secondary-'.$form_id.', '.$secondary_color. ');
			border-color: '.$secondary_color. ';
			border-color: var(--mdc-theme-secondary-'.$form_id.', '.$secondary_color. ');
		}
		
		#gform_wrapper_'.$form_id.' .mdc-switch.mdc-switch--checked .mdc-switch__thumb {
			background-color:'.$secondary_color. ';
			background-color: var(--mdc-theme-secondary-'.$form_id.', '.$secondary_color. ');
			border-color: '.$secondary_color. ';
			border-color: var(--mdc-theme-secondary-'.$form_id.', '.$secondary_color. ');
		}

		@supports not (-ms-ime-align: auto) {
			.mdc-switch__thumb-underlay::before,
			.mdc-switch__thumb-underlay::after {
				background-color: var(--mdc-theme-secondary-'.$form_id.', '.$secondary_color. ');
			}
		}																													

	#gform_wrapper_'.$form_id.' .mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__leading,
	#gform_wrapper_'.$form_id.' .mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__notch,
	#gform_wrapper_'.$form_id.' .mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__trailing,
	#gform_wrapper_'.$form_id.' .mdc-text-field--textarea:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__leading,
	#gform_wrapper_'.$form_id.' .mdc-text-field--textarea:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__notch,
	#gform_wrapper_'.$form_id.' .mdc-text-field--textarea:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__trailing,
	#gform_wrapper_'.$form_id.' .mdc-select--outlined:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__leading,
	#gform_wrapper_'.$form_id.' .mdc-select--outlined:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__notch,
	#gform_wrapper_'.$form_id.' .mdc-select--outlined:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__trailing  {
		border-color: '.$primary_color. ';
		border-color: var(--mdc-theme-secondary-'.$form_id.', '.$primary_color. ');
	}

	#gform_wrapper_'.$form_id.' .mdc-select:not(.mdc-select--disabled).mdc-select--focused .mdc-floating-label {
		color: '.$primary_color.';
	}
										
</style>';
