<?php

$chemical_laboratory_custom_css = "";

$chemical_laboratory_primary_color = get_theme_mod('chemical_laboratory_primary_color');
$chemical_laboratory_second_color = get_theme_mod('chemical_laboratory_second_color');

/*------------------ Primary Global Color -----------*/

if ($chemical_laboratory_primary_color) {
  $chemical_laboratory_custom_css .= ':root {';
  $chemical_laboratory_custom_css .= '--primary-color: ' . esc_attr($chemical_laboratory_primary_color) . ' !important;';
  $chemical_laboratory_custom_css .= '} ';
}

/*------------------ Secondary Global Color -----------*/

if ($chemical_laboratory_second_color) {
  $chemical_laboratory_custom_css .= ':root {';
  $chemical_laboratory_custom_css .= '--secondary-color: ' . esc_attr($chemical_laboratory_second_color) . ' !important;';
  $chemical_laboratory_custom_css .= '} ';
}

/*-------------------- Scroll Top Alignment-------------------*/

$chemical_laboratory_scroll_top_alignment = get_theme_mod( 'chemical_laboratory_scroll_top_alignment','right-align');

if($chemical_laboratory_scroll_top_alignment == 'right-align'){
$chemical_laboratory_custom_css .='#button{';
	$chemical_laboratory_custom_css .='right: 3%;';
$chemical_laboratory_custom_css .='}';
}else if($chemical_laboratory_scroll_top_alignment == 'center-align'){
$chemical_laboratory_custom_css .='#button{';
	$chemical_laboratory_custom_css .='right:0; left:0; margin: 0 auto;';
$chemical_laboratory_custom_css .='}';
}else if($chemical_laboratory_scroll_top_alignment == 'left-align'){
$chemical_laboratory_custom_css .='#button{';
	$chemical_laboratory_custom_css .='left: 3%;';
$chemical_laboratory_custom_css .='}';
}

/*-------------------- Archive Page Pagination Alignment-------------------*/

$chemical_laboratory_archive_pagination_alignment = get_theme_mod( 'chemical_laboratory_archive_pagination_alignment','left-align');

if($chemical_laboratory_archive_pagination_alignment == 'right-align'){
$chemical_laboratory_custom_css .='.pagination{';
	$chemical_laboratory_custom_css .='justify-content: end;';
$chemical_laboratory_custom_css .='}';
}else if($chemical_laboratory_archive_pagination_alignment == 'center-align'){
$chemical_laboratory_custom_css .='.pagination{';
	$chemical_laboratory_custom_css .='justify-content: center;';
$chemical_laboratory_custom_css .='}';
}else if($chemical_laboratory_archive_pagination_alignment == 'left-align'){
$chemical_laboratory_custom_css .='.pagination{';
	$chemical_laboratory_custom_css .='justify-content: start;';
$chemical_laboratory_custom_css .='}';
}

/*-------------------- Scroll Top Responsive-------------------*/

$chemical_laboratory_resp_scroll_top = get_theme_mod( 'chemical_laboratory_resp_scroll_top',true);
if($chemical_laboratory_resp_scroll_top == true && get_theme_mod( 'chemical_laboratory_scroll_to_top',true) != true){
	$chemical_laboratory_custom_css .='#button.show{';
		$chemical_laboratory_custom_css .='visibility:hidden !important;';
	$chemical_laboratory_custom_css .='} ';
}
if($chemical_laboratory_resp_scroll_top == true){
	$chemical_laboratory_custom_css .='@media screen and (max-width:575px) {';
	$chemical_laboratory_custom_css .='#button.show{';
		$chemical_laboratory_custom_css .='visibility:visible !important;';
	$chemical_laboratory_custom_css .='} }';
}else if($chemical_laboratory_resp_scroll_top == false){
	$chemical_laboratory_custom_css .='@media screen and (max-width:575px){';
	$chemical_laboratory_custom_css .='#button.show{';
		$chemical_laboratory_custom_css .='visibility:hidden !important;';
	$chemical_laboratory_custom_css .='} }';
}

/*-------------------- Preloader Responsive-------------------*/

$chemical_laboratory_resp_loader = get_theme_mod('chemical_laboratory_resp_loader',false);
if($chemical_laboratory_resp_loader == true && get_theme_mod('chemical_laboratory_header_preloader',false) == false){
	$chemical_laboratory_custom_css .='@media screen and (min-width:575px){
		.preloader{';
		$chemical_laboratory_custom_css .='display:none !important;';
	$chemical_laboratory_custom_css .='} }';
}

if($chemical_laboratory_resp_loader == false){
	$chemical_laboratory_custom_css .='@media screen and (max-width:575px){
		.preloader{';
		$chemical_laboratory_custom_css .='display:none !important;';
	$chemical_laboratory_custom_css .='} }';
}

// Scroll to top button shape 

$chemical_laboratory_scroll_border_radius = get_theme_mod( 'chemical_laboratory_scroll_to_top_radius','curved-box');
if($chemical_laboratory_scroll_border_radius == 'box'){
	$chemical_laboratory_custom_css .='#button{';
		$chemical_laboratory_custom_css .='border-radius: 0px;';
	$chemical_laboratory_custom_css .='}';
}else if($chemical_laboratory_scroll_border_radius == 'curved-box'){
	$chemical_laboratory_custom_css .='#button{';
		$chemical_laboratory_custom_css .='border-radius: 4px;';
	$chemical_laboratory_custom_css .='}';
}
else if($chemical_laboratory_scroll_border_radius == 'circle'){
	$chemical_laboratory_custom_css .='#button{';
		$chemical_laboratory_custom_css .='border-radius: 50%;';
	$chemical_laboratory_custom_css .='}';
}

// Footer Background Image Attachment 

$chemical_laboratory_footer_attachment = get_theme_mod( 'chemical_laboratory_background_attachment','scroll');
if($chemical_laboratory_footer_attachment == 'fixed'){
	$chemical_laboratory_custom_css .='.site-footer{';
		$chemical_laboratory_custom_css .='background-attachment: fixed;';
	$chemical_laboratory_custom_css .='}';
}elseif ($chemical_laboratory_footer_attachment == 'scroll'){
	$chemical_laboratory_custom_css .='.site-footer{';
		$chemical_laboratory_custom_css .='background-attachment: scroll;';
	$chemical_laboratory_custom_css .='}';
}

// Menu Hover Style	

$chemical_laboratory_menus_item = get_theme_mod( 'chemical_laboratory_menus_style','None');
if($chemical_laboratory_menus_item == 'None'){
	$chemical_laboratory_custom_css .='#site-navigation .menu ul li a:hover, .main-navigation .menu li a:hover{';
		$chemical_laboratory_custom_css .='';
	$chemical_laboratory_custom_css .='}';
}else if($chemical_laboratory_menus_item == 'Zoom In'){
	$chemical_laboratory_custom_css .='#site-navigation .menu ul li a:hover, .main-navigation .menu li a:hover{';
		$chemical_laboratory_custom_css .='transition: all 0.3s ease-in-out !important; transform: scale(1.2) !important;';
	$chemical_laboratory_custom_css .='}';

	$chemical_laboratory_custom_css .= '.main-navigation ul ul li a:hover {';
	$chemical_laboratory_custom_css .= 'margin-left: 20px;';
	$chemical_laboratory_custom_css .= '}';
}	

// Post Content Alignment

$chemical_laboratory_blog_layout_option = get_theme_mod( 'chemical_laboratory_blog_layout_option','Left');
if($chemical_laboratory_blog_layout_option == 'Left'){
	$chemical_laboratory_custom_css .='.post{';
		$chemical_laboratory_custom_css .='text-align: left;';
	$chemical_laboratory_custom_css .='}';
}elseif ($chemical_laboratory_blog_layout_option == 'Right'){
	$chemical_laboratory_custom_css .='.post{';
		$chemical_laboratory_custom_css .='text-align: right;';
	$chemical_laboratory_custom_css .='}';
}elseif ($chemical_laboratory_blog_layout_option == 'Center'){
	$chemical_laboratory_custom_css .='.post{';
		$chemical_laboratory_custom_css .='text-align: center;';
	$chemical_laboratory_custom_css .='}';
}