<?php
/**
 * Public Error Page
 *
 * @package Freelance_Studio
 */

if (!defined('ABSPATH')) {
    exit;
}
?>
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
    <meta charset="<?php bloginfo('charset'); ?>">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="robots" content="noindex, nofollow">
    <title><?php esc_html_e('Error', 'freelance-studio'); ?> - <?php echo esc_html($settings['business_name'] ?: get_bloginfo('name')); ?></title>
    <style>
        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }
        
        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
            background: #f3f4f6;
            color: #1f2937;
            line-height: 1.6;
            min-height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .error-container {
            text-align: center;
            padding: 40px;
            background: #fff;
            border-radius: 12px;
            box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
            max-width: 400px;
            margin: 20px;
        }
        
        .error-icon {
            font-size: 48px;
            margin-bottom: 16px;
        }
        
        .error-title {
            font-size: 24px;
            font-weight: 600;
            margin-bottom: 8px;
        }
        
        .error-message {
            color: #6b7280;
            margin-bottom: 24px;
        }
        
        .error-link {
            display: inline-block;
            padding: 12px 24px;
            background: #2271b1;
            color: #fff;
            text-decoration: none;
            border-radius: 8px;
            font-weight: 500;
        }
        
        .error-link:hover {
            background: #1d5d99;
        }
    </style>
</head>
<body>
    <div class="error-container">
        <div class="error-icon">⚠️</div>
        <h1 class="error-title"><?php esc_html_e('Oops!', 'freelance-studio'); ?></h1>
        <p class="error-message"><?php echo esc_html($message); ?></p>
        <a href="<?php echo esc_url(home_url()); ?>" class="error-link"><?php esc_html_e('Go to Homepage', 'freelance-studio'); ?></a>
    </div>
</body>
</html>
