/*
Theme Name: Hello Elementor Child
Theme URI: https://github.com/elementor/hello-theme-child/
Description: Hello Elementor Child is a child theme of Hello Elementor, created by Elementor team
Author: Elementor Team
Author URI: https://elementor.com/
Template: hello-elementor
Version: 2.0.0
Text Domain: hello-elementor-child
License: GNU General Public License v3 or later.
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Tags: flexible-header, custom-colors, custom-menu, custom-logo, editor-style, featured-images, rtl-language-support, threaded-comments, translation-ready
*/

/* Add your custom styles here */
.frm_style_formidable-style.with_frm_style input[type=submit] {
    background: #cf945f !important;
}

.frm_style_formidable-style.with_frm_style input[type=submit]:hover {
    color: black !important;
    border-width: 2px;
    border-style: double;
    border-color: black;
}

.frm_style_lines-no-boxes.with_frm_style {
    --success-text-color: #000000 !important;
}

.windsong-header-stats {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
}

.windsong-header-stats .stat {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.windsong-header-stats .stat strong {
    font-size: 15px;
    font-weight: 700;
}

.windsong-header-stats .pending strong {
    color: #e65100;
}

.windsong-header-stats .divider {
    color: #aaa;
    font-weight: 400;
}

/* ============================================
   Fix Admin Bar Overlapping Header (Stronger)
   ============================================ */
// Force header below admin bar
function windsong_fix_header_below_admin_bar() {
    if (is_admin_bar_showing()) {
        ?>
        <script>
        document.addEventListener('DOMContentLoaded', function() {
            // Target the main header
            const header = document.querySelector('header.elementor-location-header');
            
            if (header) {
                header.style.setProperty('top', '32px', 'important');
                header.style.setProperty('margin-top', '0', 'important');
            }
            
            // Also target any inner fixed containers (common in Elementor)
            const fixedContainers = document.querySelectorAll('.elementor-location-header .e-con.e-parent');
            fixedContainers.forEach(function(el) {
                if (getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {
                    el.style.setProperty('top', '32px', 'important');
                }
            });
        });
        </script>
        <?php
    }
}
add_action('wp_footer', 'windsong_fix_header_below_admin_bar', 9999);