<?php
// Test CSS enqueue for login page

// Load WordPress
require_once '/home/974670.cloudwaysapps.com/uberrxmprk/public_html/wp-load.php';

// Get the login page
$page = get_page_by_path('training-login');
if (!$page) {
    echo "Login page not found\n";
    exit;
}

// Set up global post
$GLOBALS['post'] = $page;
$GLOBALS['wp_query']->queried_object = $page;
$GLOBALS['wp_query']->queried_object_id = $page->ID;

// Trigger enqueue scripts
do_action('wp_enqueue_scripts');

// Check enqueued styles
global $wp_styles;
echo "Enqueued styles:\n";
foreach($wp_styles->queue as $handle) {
    if (strpos($handle, 'hvac') !== false || strpos($handle, 'community') !== false) {
        $style = $wp_styles->registered[$handle];
        echo "- $handle: " . $style->src . "\n";
    }
}

// Check if shortcode is detected
echo "\nShortcode check:\n";
echo "has_shortcode: " . (has_shortcode($page->post_content, 'hvac_community_login') ? 'YES' : 'NO') . "\n";
echo "Page content: " . substr($page->post_content, 0, 100) . "...\n";