<?php

$ovation_blog_custom_style= "";

if (false === get_option('ovation_blog_sticky_header')) {
    add_option('ovation_blog_sticky_header', 'off');
}

// Define the custom CSS based on the 'ovation_blog_sticky_header' option

if (get_option('ovation_blog_sticky_header', 'off') !== 'on') {
    $ovation_blog_custom_style .= '.wrap_figure.fixed {';
    $ovation_blog_custom_style .= 'position: static;';
    $ovation_blog_custom_style .= '}';
}

if (get_option('ovation_blog_sticky_header', 'off') !== 'off') {
    $ovation_blog_custom_style .= '.wrap_figure.fixed {';
    $ovation_blog_custom_style .= 'position: fixed; box-shadow: none;';
    $ovation_blog_custom_style .= '}';

    $ovation_blog_custom_style .= '.admin-bar .fixed {';
    $ovation_blog_custom_style .= ' margin-top: 32px;';
    $ovation_blog_custom_style .= '}';
}

//colors
$color = get_theme_mod('ovation_health_blog_primary_color', '#dab768');
$color_heading = get_theme_mod('ovation_health_blog_heading_color','#000');
$color_text = get_theme_mod('ovation_health_blog_text_color', '#7d7d7d');
$color_fade = get_theme_mod('ovation_health_blog_primary_fade', '#fff6e2');
$color_footer_bg = get_theme_mod('ovation_health_blog_footer_bg', '#000');


$ovation_blog_custom_style .= ":root {";
    $ovation_blog_custom_style .= "--theme-primary-color: {$color};";
    $ovation_blog_custom_style .= "--theme-heading-color: {$color_heading};";
    $ovation_blog_custom_style .= "--theme-text-color: {$color_text};";
    $ovation_blog_custom_style .= "--theme-primary-fade: {$color_fade};";
    $ovation_blog_custom_style .= "--theme-footer-color: {$color_footer_bg};";
$ovation_blog_custom_style .= "}";