<?php

$option_appearance_enable  = (array)get_option('new_settings3');
if( isset( $option_appearance_enable['option_appearance_enable'] ) ) :
    $option_appearance_enable_new  = $option_appearance_enable['option_appearance_enable'];
else:
    $option_appearance_enable_new = '';
endif;

$envy_chimp_form_width  = (array)get_option('new_settings3');
if( isset($envy_chimp_form_width['option_form_width']) ) :
    $envy_chimp_form_width_new = $envy_chimp_form_width['option_form_width'];
else: $envy_chimp_form_width_new = '';
endif;

$envy_chimp_form_height  = (array)get_option('new_settings3');
if( isset($envy_chimp_form_height['option_form_height']) ) :
    $envy_chimp_form_height_new = $envy_chimp_form_height['option_form_height'];
else: $envy_chimp_form_height_new = '';
endif;

$envy_chimp_form_bg_color  = (array)get_option('new_settings3');
if( isset($envy_chimp_form_bg_color['option_form_bg_color']) ) :
    $envy_chimp_form_bg_color_new = $envy_chimp_form_bg_color['option_form_bg_color'];
else: $envy_chimp_form_bg_color_new = '';
endif;

$envy_chimp_input_field_bg_color  = (array)get_option('new_settings3');
if( isset($envy_chimp_input_field_bg_color['option_input_field_bg_color']) ) :
    $envy_chimp_input_field_bg_color_new = $envy_chimp_input_field_bg_color['option_input_field_bg_color'];
else: $envy_chimp_input_field_bg_color_new = '';
endif;

$envy_chimp_input_field_width = (array)get_option('new_settings3');
if( isset($envy_chimp_input_field_width['option_input_field_width']) ) :
    $envy_chimp_input_field_width_new = $envy_chimp_input_field_width['option_input_field_width'];
else: $envy_chimp_input_field_width_new = '';
endif;

$envy_chimp_input_field_padding = (array)get_option('new_settings3');
if( isset($envy_chimp_input_field_padding['option_input_field_padding']) ) :
    $envy_chimp_input_field_padding_new = $envy_chimp_input_field_padding['option_input_field_padding'];
else: $envy_chimp_input_field_padding_new = '';
endif; 

$envy_chimp_input_field_border  = (array)get_option('new_settings3');
if( isset($envy_chimp_input_field_border['option_input_field_border']) ) :
    $envy_chimp_input_field_border_new = $envy_chimp_input_field_border['option_input_field_border'];
else: $envy_chimp_input_field_border_new = '';
endif;

$envy_chimp_input_field_border_radius = (array)get_option('new_settings3');
if( isset($envy_chimp_input_field_border_radius['option_input_field_border_radius']) ) :
    $envy_chimp_input_field_border_radius_new = $envy_chimp_input_field_border_radius['option_input_field_border_radius'];
else: $envy_chimp_input_field_border_radius_new = '';
endif; 

$envy_chimp_submit_btn_font_size  = (array)get_option('new_settings3');
if( isset($envy_chimp_submit_btn_font_size['option_submit_btn_font_size']) ) :
    $envy_chimp_submit_btn_font_size_new  = $envy_chimp_submit_btn_font_size['option_submit_btn_font_size'];
else: $envy_chimp_submit_btn_font_size_new = '';
endif;

$envy_chimp_submit_btn_bg_color  = (array)get_option('new_settings3');
if( isset($envy_chimp_submit_btn_bg_color['option_submit_btn_bg_color']) ) :
    $envy_chimp_submit_btn_bg_color_new = $envy_chimp_submit_btn_bg_color['option_submit_btn_bg_color'];
else: $envy_chimp_submit_btn_bg_color_new = '';
endif;

$envy_chimp_submit_btn_bg_hover_color = (array)get_option('new_settings3');
if( isset($envy_chimp_submit_btn_bg_hover_color['option_submit_btn_bg_hover_color']) ) :
    $envy_chimp_submit_btn_bg_hover_color_new = $envy_chimp_submit_btn_bg_hover_color['option_submit_btn_bg_hover_color'];
else: $envy_chimp_submit_btn_bg_hover_color_new = '';
endif;

$envy_chimp_submit_btn_font_color  = (array)get_option('new_settings3');
if( isset($envy_chimp_submit_btn_font_color['option_submit_btn_font_color']) ) :
    $envy_chimp_submit_btn_font_color_new  = $envy_chimp_submit_btn_font_color['option_submit_btn_font_color'];
else: $envy_chimp_submit_btn_font_color_new = '';
endif; 

$envy_chimp_title_font_size = (array)get_option('new_settings2');
if( isset($envy_chimp_title_font_size['option_title_font_size']) ) :
    $envy_chimp_title_font_size_new = $envy_chimp_title_font_size['option_title_font_size'];
else: $envy_chimp_title_font_size_new = '';
endif;

$envy_chimp_desc_font_size = (array)get_option('new_settings2');
if( isset($envy_chimp_desc_font_size['option_desc_font_size']) ) :
    $envy_chimp_desc_font_size_new = $envy_chimp_desc_font_size['option_desc_font_size'];
else: $envy_chimp_desc_font_size_new = '';
endif;

$envy_chimp_heading_font_size = (array)get_option('new_settings2');
if( isset($envy_chimp_heading_font_size['option_heading_font_size']) ) :
    $envy_chimp_heading_font_size_new = $envy_chimp_heading_font_size['option_heading_font_size'];
else: $envy_chimp_heading_font_size_new = '';
endif;

if( $option_appearance_enable_new ) :
$envy_chimp_custom_css = '       
    .envychimp-subscribe-form {
    	background-color: '.esc_attr($envy_chimp_form_bg_color["option_form_bg_color"]).' !important;
    	width: '.esc_attr($envy_chimp_form_width["option_form_width"]).' !important;
    	height: '.esc_attr($envy_chimp_form_height["option_form_height"]).' !important;
    }
    .envychimp-form-control {
        width: '.esc_attr($envy_chimp_input_field_width["option_input_field_width"]).' !important;
        padding: '.esc_attr($envy_chimp_input_field_padding["option_input_field_padding"]).' !important;
        border: '.esc_attr($envy_chimp_input_field_border["option_input_field_border"]).' !important;
        border-radius: '.esc_attr($envy_chimp_input_field_border_radius["option_input_field_border_radius"]).' !important;
        background-color: '.esc_attr($envy_chimp_input_field_bg_color['option_input_field_bg_color']).' !important;
        display: initial !important;
    }
    .envychimp-signup-form-control {
        padding-left: 40px !important;
    }
    .envychimp-default-btn {
    	font-size: '.esc_attr($envy_chimp_submit_btn_font_size['option_submit_btn_font_size']).' !important;
    }
    .envychimp-default-btn {
        background-color: '.esc_attr($envy_chimp_submit_btn_bg_color["option_submit_btn_bg_color"]).' !important;
        color: '.esc_attr($envy_chimp_submit_btn_font_color["option_submit_btn_font_color"]).' !important;
    }
    .envychimp-default-btn:hover {
        background-color: '.esc_attr($envy_chimp_submit_btn_bg_hover_color['option_submit_btn_bg_hover_color']).' !important;
        color: '.esc_attr($envy_chimp_submit_btn_font_color["option_submit_btn_font_color"]).' !important;
    }
    .envychimp-subscribe-area .envychimp-subscribe-form .envychimp-subscribe-content h2 {
        font-size: '.esc_attr($envy_chimp_title_font_size['option_title_font_size']).' !important;
    }
    .envychimp-subscribe-area .envychimp-subscribe-form .envychimp-subscribe-content p {
        font-size: '.esc_attr($envy_chimp_desc_font_size['option_desc_font_size']).' !important; 
    }
    .envychimp-subscribe-area .envychimp-subscribe-form .envychimp-subscribe-content h3 {
        font-size: '.esc_attr($envy_chimp_heading_font_size['option_heading_font_size']).' !important; 
    }

    ';

wp_add_inline_style( 'envy-chimp-main', $envy_chimp_custom_css );

endif;

$envy_chimp_signup_heading_font_size = (array)get_option('new_settings2');
if( isset($envy_chimp_signup_heading_font_size['option_signup_heading_font_size']) ) :
    $envy_chimp_signup_heading_font_size_new = $envy_chimp_signup_heading_font_size['option_signup_heading_font_size'];
else: $envy_chimp_signup_heading_font_size_new = '';
endif;

$envy_chimp_signup_heading_color = (array)get_option('new_settings2');
if( isset($envy_chimp_signup_heading_color['option_signup_heading_color']) ) :
    $envy_chimp_signup_heading_color_new = $envy_chimp_signup_heading_color['option_signup_heading_color'];
else: $envy_chimp_signup_heading_color_new = '';
endif;

$envy_chimp_signup_title_font_size = (array)get_option('new_settings2');
if( isset($envy_chimp_signup_title_font_size['option_signup_title_font_size']) ) :
    $envy_chimp_signup_title_font_size_new = $envy_chimp_signup_title_font_size['option_signup_title_font_size'];
else: $envy_chimp_signup_title_font_size_new = '';
endif;

$envy_chimp_signup_title_color = (array)get_option('new_settings2');
if( isset($envy_chimp_signup_title_color['option_signup_title_color']) ) :
    $envy_chimp_signup_title_color_new = $envy_chimp_signup_title_color['option_signup_title_color'];
else: $envy_chimp_signup_title_color_new = '';
endif;

$envy_chimp_login_title_font_size = (array)get_option('new_settings2');
if( isset($envy_chimp_login_title_font_size['option_login_title_font_size']) ) :
    $envy_chimp_login_title_font_size_new = $envy_chimp_login_title_font_size['option_login_title_font_size'];
else: $envy_chimp_login_title_font_size_new = '';
endif;

$envy_chimp_login_title_color = (array)get_option('new_settings2');
if( isset($envy_chimp_login_title_color['option_login_title_color']) ) :
    $envy_chimp_login_title_color_new = $envy_chimp_login_title_color['option_login_title_color'];
else: $envy_chimp_login_title_color_new = '';
endif;

if( ! $envy_chimp_title_font_size_new == '' || $envy_chimp_desc_font_size_new || $envy_chimp_heading_font_size_new ) :
    
$envy_chimp_custom_font_css = '       
    .envychimp-subscribe-area .envychimp-subscribe-form .envychimp-subscribe-content h2 {
        font-size: '.esc_attr($envy_chimp_title_font_size['option_title_font_size']).' !important;
    }
    .envychimp-subscribe-area .envychimp-subscribe-form .envychimp-subscribe-content p {
        font-size: '.esc_attr($envy_chimp_desc_font_size['option_desc_font_size']).' !important; 
    }
    .envychimp-subscribe-area .envychimp-subscribe-form .envychimp-subscribe-content h3 {
        font-size: '.esc_attr($envy_chimp_heading_font_size['option_heading_font_size']).' !important; 
    }
    .envychimp-header-title h1 {
        font-size: '.esc_attr($envy_chimp_signup_heading_font_size['option_signup_heading_font_size']).' !important;
        color: '.esc_attr($envy_chimp_signup_heading_color['option_signup_heading_color']).' !important;
    }
    .envychimp-user-form h3 {
        font-size: '.esc_attr($envy_chimp_signup_title_font_size['option_signup_title_font_size']).' !important;
        color: '.esc_attr($envy_chimp_signup_title_color['option_signup_title_color']).' !important;
    }
    #loginform h3 {
        font-size: '.esc_attr($envy_chimp_login_title_font_size['option_login_title_font_size']).' !important;
        color: '.esc_attr($envy_chimp_login_title_color['option_login_title_color']).' !important; 
    }

    ';

wp_add_inline_style( 'envy-chimp-main', $envy_chimp_custom_font_css );

endif;