<?php
/**
 * @package			No Boss Extensions
 * @subpackage  	No Boss Calendar
 * @author			No Boss Technology <contact@nobosstechnology.com>
 * @copyright		Copyright (C) 2020 No Boss Technology. All rights reserved.
 * @license			GNU Lesser General Public License version 3 or later; see <https://www.gnu.org/licenses/lgpl-3.0.en.html>
 */

defined('_JEXEC') or die();
$s = "";

 
if(empty($custom->month_header_color)){
    $custom->month_header_color = "inherit";
}else{
    $s .= 
        ".{$moduleName} .nb-calendar__date .month-header-title{
            color: {$custom->month_header_color};
        }
    ";
}

$headerColor = (!empty($custom->month_header_mobile_color) ? $custom->month_header_mobile_color : $custom->month_header_color);
//aplica estilos do mobile
$s .=
    "@media screen and (max-width: 767px){";
        if($theme != "model2"){
            //quando for diferente do modelo 2 deve mudar a cor das setas e do texto no mobile
            $s .= ".{$moduleName} .nb-calendar__header{";
                $s .= "color:" . (!empty($custom->month_header_mobile_color) ? $custom->month_header_mobile_color : $custom->month_header_color) . ";";
            $s .= "}";
        }

        $s .=".{$moduleName} .nb-header-controls .nb-calendar__date{
            {$custom->month_header_style_mobile}
        }";

        if(!empty($custom->month_header_space_mobile)){
            $s .=".{$moduleName} .nb-calendar__header .nb-header-controls{
                {$custom->month_header_space_mobile}
            }";
        }      

        if($theme != "model2"){
            $s .= 
            ".{$moduleName} .nb-calendar-controls span.fa{
                    color: {$headerColor} !important;
            }
            .{$moduleName} .nb-arrows{
                {$custom->arrows_style_mobile}
            }";
        }  
        if(!empty($custom->month_header_mobile_background_color) && $theme == "model3"){ 
            $s .= ".{$moduleName} .nb-calendar__header{
                {$custom->month_header_mobile_background_color}
            }";
            $s .= 
                ".{$moduleName} .nb-calendar__header{
                    {$custom->month_header_mobile_background_color} 
                }
            ";
        } 
$s .= "}";

// chama função que adiciona prefixo em todo o estilo que foi concatenado na variável $s 
$assetsObject->addStyleWithPrefix($s); 

?>

