<?php 
/**
 * Titan live-style
**/ 
?>
<?php 

function titan_head() {

	$slide_style = get_option('t1t_slider_picker');
	if($slide_style == 'slider_fx1'){$slide_picker='slide';}else{$slide_picker='fade';}

	
	$t1t_site_width = get_option('t1t_site_width').'px';
	$t1t_title_picker = get_option('t1t_title_picker');
	$bloginfo = get_template_directory_uri();
	$menu_background = get_option('t1t_menu_background');
	$menucolor = get_option('t1t_menu_color');
	$menu_font_weight = get_option('t1t_menu_font_weight');
	$menu_hover_color =  get_option('t1t_menu_hover_color');
	$t1t_social_color = get_option('t1t_social_color');
	$main_color = get_option('t1t_main_color');
	$widget_fx = get_option('t1t_widget_fx');
	$image_effect = get_option('t1t_image_effect');
	$font = get_option('t1t_fonts');
	$menu_font = get_option('t1t_menu_font');
	$widget_font = get_option('t1t_widget_font');
	$search_color = get_option('t1t_search_color');
	$menu_border_color = get_option('t1t_menu_border_color');
	$uppercase_title = get_option('t1t_uppercase_title');
	$t1t_content_font_size = get_option('t1t_content_font_size').'px'; 
	$t1t_content_line_height = $t1t_content_font_size * 1.5.'px';
	
	
//Css
	echo "

<style type='text/css'>
body{font-family:$font;}
.widget-title, .tv-featured-title{font-family:$widget_font;}
#main-nav ul li a, #mob-menu{font-family: $menu_font;}
.normal, .normal .fixed-menu #main-nav, #footer.normal{max-width:$t1t_site_width;}
#wrapper{max-width:$t1t_site_width;}
#navigation, #logo, #top-navigation, .content-social, .super-slider, .super-slider-part:before, .super-slider-post:nth-child(2):after, .header-posts, .sub-menu-wrapper {border-color:$menu_border_color;}
#navigation{box-shadow:0 1px 0 $menu_border_color;}
#navigation, #logo, #top-navigation, .footer-wrap, .ticker-box, .header-posts, .page-numbers.current, #mob-menu{background:$menu_background;}
.menu-item .menu-link, #mob-menu, #top-menu ul li a, #ticker a, #footer, #footer a, .header-posts a, #top-date, .header-posts li .date, .page-numbers.current{color:$menucolor;}
#main-nav ul li:hover > .menu-link, #top-menu ul li a:hover, #top-menu ul li a:hover, .header-posts li .featured-posts-title a:hover, .header-posts .featured-posts-text .category-icon a:hover, #footer a:hover, #ticker a:hover{color:$menu_hover_color;}
#main-nav ul li > .menu-link{font-weight:$menu_font_weight;}
.youtube-social-icon, .fb-social-icon, .twitter-social-icon, .pinterest-social-icon, .google-social-icon, .instagram-social-icon, .rss-social-icon{background-image:url($bloginfo/images/social-buttons-header$t1t_social_color.png)}

.content-social, .featured-category, .about-social, .trending-title, #site-logo, .about-logo, .page-numbers{background: $main_color;}
.t1t-blog-posts-thumb, .small-review-score, .post-page-gallery-thumbnails .flex-active-slide:after, .flex-active .wide-slider-thumb:after{border-color:$main_color;}
.blog-post-author a, .t1t-blog-posts-author a, .most-commented-count a{color:$main_color;}

#searchform .submit-button{background:$main_color url($bloginfo/images/search-icon$t1t_social_color.png) no-repeat center;}
#navigation #searchform input{background:url($bloginfo/images/search-icon$search_color.png) no-repeat center;}

ul.tabs li.active{background:$menu_background;}
ul.tabs li.active, ul.tabs li {border-color:$menu_background;}
#main-nav .menu-links.inside-menu, .img-featured-review-score, .widget-title.style_title2 .widget-style-wrap, .blog-post-categories, .jumping-posts li:hover .jumping-posts-text, #submit, .woocommerce input#searchsubmit{background:$main_color;}
.sub-meni .menu-links.inside-menu li{background: $menu_background;}
.sub-meni .menu-links.inside-menu li a{color: $menucolor;}
.menu-links.inside-menu .menu-link:after {border-top: 8px solid $main_color;}
.sub-menu{border-color:$main_color;}
.widget-title.style_title6 .widget-style-wrap:before, .widget-title.style_title6:after, .widget-title.style_title7 .widget-style-wrap:before, .widget-title.style_title8:after, .widget-title.style_title8 .widget-style-wrap:before, .widget-title.style_title2:after{border-bottom-color:$main_color;}
#post-content{font-size:$t1t_content_font_size;line-height:$t1t_content_line_height;}
::selection{background:$main_color;}
::-moz-selection{background:$main_color;}
.load-circle{border-bottom:5px solid $main_color;border-right:5px solid $main_color;box-shadow: 0 0 35px $main_color;}
#wp-calendar #today{background:$main_color !important;text-shadow:none;}
.total-score, .score-width, li:hover .play-icon{background: $main_color;}
.jumping-posts li:hover .jumping-posts-text:before{border-bottom: 14px solid $main_color;}
.single-post #post-content:first-letter{font-size:67px; color:$main_color;float: left;line-height: 60px;margin-right: 8px;}
#post-page-title h1{text-transform:$uppercase_title;}
blockquote, q.left, q{border-left: 2px solid $main_color;color:$main_color;}
.img-featured-review-score:before{border-top: 9px solid $main_color;}
.sub-meni .menu-links.inside-menu li:hover{background:$menu_background;}
#main-nav .sub-meni .menu-links.inside-menu li:hover > .menu-link{color:$menu_hover_color;}
.ticker-arrows{background:$menu_background;box-shadow:-21px 0 30px $menu_background;}


.bypostauthor a, .post-author a, .post-author a:visited, .good-title, .bad-title, #post-content a, .last-word, .trending-posts-category a, .category-tv-icon a, .ticker-sign, .featured-posts-text .category-icon a, .ticker-heading, .jumping-posts-category a, a:hover, .featured-posts-text .category-icon a:hover, .trending-posts-category a:hover, .featured-posts-title a:hover, #post-content a:hover, .img-featured-title h2 a:hover, .slide-title a:hover, .blog-post-title h2 a:hover, .bypostauthor a:hover, .post-author a:hover {color:$main_color;}


.content q.right{border-left:0;border-right: 2px solid $main_color;color:$main_color;}



.widget.buddypress div.item-options a, .widget_display_stats dd{color:$main_color;}
#buddypress div.item-list-tabs ul li a span, #buddypress div.item-list-tabs ul li.current a span, #buddypress div.item-list-tabs ul li.selected a span, .widget.buddypress #bp-login-widget-form #bp-login-widget-submit, span.bp-login-widget-register-link a, button#user-submit, .bbp-login-form .bbp-login-links a, tt button.button.submit.user-submit, input#bbp_search_submit {background:$main_color;}

.image_fx1:hover:after{background: $main_color;}

.cart-top{background:url($bloginfo/images/shopping-cart-icon$search_color.png) no-repeat 36px 0;}
@media screen and (max-width: 600px) {#main-nav ul li {background:$menu_background;}#main-nav ul li:hover a{color:$main_color;}}

.woocommerce #content input.button, .woocommerce #respond input#submit, .woocommerce a.button, .woocommerce button.button, .woocommerce input.button, .woocommerce-page #content input.button, .woocommerce-page #respond input#submit, .woocommerce-page a.button, .woocommerce-page button.button, .woocommerce-page input.button, .woocommerce a.button.alt, .woocommerce button.button.alt, .woocommerce input.button.alt, .woocommerce #respond input#submit.alt, .woocommerce #content input.button.alt, .woocommerce-page a.button.alt, .woocommerce-page button.button.alt, .woocommerce-page input.button.alt, .woocommerce-page #respond input#submit.alt, .woocommerce-page #content input.button.alt, .woocommerce .widget_layered_nav_filters ul li a, .woocommerce-page .widget_layered_nav_filters ul li a, .woocommerce .widget_layered_nav ul li.chosen a, .woocommerce-page .widget_layered_nav ul li.chosen a, .woocommerce span.onsale, .woocommerce-page span.onsale, .woocommerce .woocommerce-message:before, .woocommerce-page .woocommerce-message:before, .woocommerce .woocommerce-info:before, .woocommerce-page .woocommerce-info:before, .woocommerce table.cart a.remove:hover, .woocommerce #content table.cart a.remove:hover, .woocommerce-page table.cart a.remove:hover, .woocommerce-page #content table.cart a.remove:hover, .woocommerce .widget_price_filter .ui-slider .ui-slider-handle, .woocommerce-page .widget_price_filter .ui-slider .ui-slider-handle, .woocommerce .widget_price_filter .ui-slider .ui-slider-range, .woocommerce-page .widget_price_filter .ui-slider .ui-slider-range, .woocommerce div.product .woocommerce-tabs ul.tabs li, .woocommerce #content div.product .woocommerce-tabs ul.tabs li, .woocommerce-page div.product .woocommerce-tabs ul.tabs li, .woocommerce-page #content div.product .woocommerce-tabs ul.tabs li{background:$main_color;}

.woocommerce ul.products li.product .price, .woocommerce-page ul.products li.product .price, .woocommerce div.product span.price, .woocommerce div.product p.price, .woocommerce #content div.product span.price, .woocommerce #content div.product p.price, .woocommerce-page div.product span.price, .woocommerce-page div.product p.price, .woocommerce-page #content div.product span.price, .woocommerce-page #content div.product p.price, .woocommerce a.button.alt:hover, .woocommerce button.button.alt:hover, .woocommerce input.button.alt:hover, .woocommerce #respond input#submit.alt:hover, .woocommerce #content input.button.alt:hover, .woocommerce-page a.button.alt:hover, .woocommerce-page button.button.alt:hover, .woocommerce-page input.button.alt:hover, .woocommerce-page #respond input#submit.alt:hover, .woocommerce-page #content input.button.alt:hover, .woocommerce a.button:hover, .woocommerce button.button:hover, .woocommerce input.button:hover, .woocommerce #respond input#submit:hover, .woocommerce #content input.button:hover, .woocommerce-page a.button:hover, .woocommerce-page button.button:hover, .woocommerce-page input.button:hover, .woocommerce-page #respond input#submit:hover, .woocommerce-page #content input.button:hover, .woocommerce-page #main a.button:hover, .woocommerce div.product .woocommerce-tabs ul.tabs li, .woocommerce #content div.product .woocommerce-tabs ul.tabs li, .woocommerce-page div.product .woocommerce-tabs ul.tabs li, .woocommerce-page #content div.product .woocommerce-tabs ul.tabs li, .woocommerce div.product .woocommerce-tabs ul.tabs .active a:hover, span.posted_in a, span.tagged_as a, .woocommerce h1.page-title, .woocommerce .jumping-posts .star-rating, .woocommerce-page .jumping-posts .star-rating, .amount, #header .cart-contents:hover, #header .cart-contents{color:$main_color;}

.woocommerce .woocommerce-message, .woocommerce-page .woocommerce-message, .woocommerce .woocommerce-info, .woocommerce-page .woocommerce-info{border-top:3px solid $main_color; }

.product_meta, .woocommerce div.product div.summary, .woocommerce #content div.product div.summary, .woocommerce-page div.product div.summary, .woocommerce-page #content div.product div.summary, .woocommerce #reviews #comments ol.commentlist li .comment-text p, .woocommerce-page #reviews #comments ol.commentlist li .comment-text p, .woocommerce #review_form #respond p, .woocommerce-page #review_form #respond p, .woocommerce div.product .woocommerce-tabs .panel, .woocommerce #content div.product .woocommerce-tabs .panel, .woocommerce-page div.product .woocommerce-tabs .panel, .woocommerce-page #content div.product .woocommerce-tabs .panel, .woocommerce #reviews h3, .woocommerce-page #reviews h3{font-size:$t1t_content_font_size;line-height:$t1t_content_line_height;}




</style>";

//Slider

	echo
	"<script type='text/javascript'>
	
			var slide_picker = '$slide_picker';
			var widget_fx = '$widget_fx';
			var title_picker = '$t1t_title_picker';
			var image_effect = '$image_effect';
	</script>";

}

function customizer_css() {
	echo "
	
	<style type='text/css'>
.customize-control-image .container, .customize-control-header .container{float:left;background:#ebebeb;margin-bottom:10px;height:auto !important;}
.customize-control-header .header-view{background:#ebebeb;}	
.customize-control-image .actions{width:100%;float:left;}
.customize-section .customize-control-image .preview-thumbnail img {max-width:100% !important;max-height:100% !important;}
#customize-control-t1t_logo .container{}
#customize-control-t1t_menu_logo .container{background:#ccc;}
#customize-control-t1t_apple_touch_icon .container{width:98px;}
#customize-control-t1t_apple_touch_icon .container{width:98px;}
#customize-control-t1t_apple_touch_icon .customize-control-title{line-height:16px;margin-bottom:5px;}
#customize-section-t1t_images .customize-control{padding-bottom:20px;}
 
    </style>";
}
//Login page css
function custom_login_css() {
    $login_logo = get_header_image();
	$login_logo_height = get_custom_header()->height.'px';
	$login_logo_width = get_custom_header()->width.'px';
	$main_color = get_option('t1t_main_color');
	
	
	echo "
	<style type='text/css'>
body.login {background: #FFF;}
.login *{text-align:center;}
.login label{font-size:18px;font-weight:700;color:#000;}

input#rememberme {float: left;height: 17px;width: 17px;margin-right: 12px;margin-top: 2px;}
.login form .forgetmenot label{font-size:16px;}
.forgetmenot{margin:7px 0;}
.login h1 a {background-image: url($login_logo);background-size: $login_logo_width $login_logo_height;width: $login_logo_width;height: $login_logo_height;}
.interim-login #login{width:320px;}
#login {width: 400px;padding: 8% 0 0;margin: auto;}
input#wp-submit{background-color:$main_color;border:0;border-radius:0;font-size:16px;text-transform:uppercase;font-weight:700;color:#FFF !important;padding: 0 12px;height: 30px;line-height: 28px;}
.login form{margin-top:0;box-shadow:none;-webkit-box-shadow:none;padding:30px 0 60px;}
.login #nav{font-size:0;padding:0;}
p#nav a{background-color:$main_color;border:0;border-radius:0;font-size:16px;text-transform:uppercase;font-weight:700;color:#FFF !important;padding: 5px 0px;margin-right:20px; float: left;text-align: center;margin-bottom: 20px;width:100%;}
.login #backtoblog a{color:$main_color;font-size:20px;font-weight:700;}
 p#nav a:hover, input#wp-submit:hover{background-color:#FFF;color:$main_color !important;box-shadow:inset 0 0 10px $main_color;}
 .login #login_error{border-color:$main_color;}
    </style>";
}
//Fonts

function google_font() {
	$font = get_option('t1t_fonts');
	$fontmenu = get_option('t1t_menu_font');
	$fontwidget = get_option('t1t_widget_font');
	$t1t_customfont = str_replace( ' ', '+', $font ) . ':400,600,700,800|' . $font;
	$t1t_customfontmenu = str_replace( ' ', '+', $fontmenu ) . ':400,600,700,800|' . $fontmenu;
	$t1t_customfontwidget = str_replace( ' ', '+', $fontwidget ) . ':400,600,700,800|' . $fontwidget;
	$protocol = is_ssl() ? 'https' : 'http';
	wp_enqueue_style( 'google-fonts', "$protocol://fonts.googleapis.com/css?subset=latin,latin-ext,cyrillic,cyrillic-ext&family=".$t1t_customfont . " rel='stylesheet' type='text/css" );
	wp_enqueue_style( 'google-menu-fonts', "$protocol://fonts.googleapis.com/css?subset=latin,latin-ext,cyrillic,cyrillic-ext&family=".$t1t_customfontmenu . " rel='stylesheet' type='text/css" );
	wp_enqueue_style( 'google-widget-fonts', "$protocol://fonts.googleapis.com/css?subset=latin,latin-ext,cyrillic,cyrillic-ext&family=".$t1t_customfontwidget . " rel='stylesheet' type='text/css" );
}
add_action('login_head', 'custom_login_css');
add_action( 'wp_enqueue_scripts', 'google_font' );
add_action( 'wp_head', 'titan_head');
add_action( 'customize_controls_print_styles', 'customizer_css' );
?>