<?php

namespace Tests\Feature;

use Tests\TestCase;

class AdminComponentsCssShouldIncludeTargetHighlightForPlatformOrderAnchorsTest extends TestCase
{
    public function test_admin_components_css_should_include_target_highlight_for_platform_order_anchors(): void
    {
        $css = (string) file_get_contents(public_path('css/admin-components.css'));

        // 护栏：订单详情页通过锚点直达治理区块时，应有 :target 高亮，增强可达性。
        $this->assertStringContainsString('#relation-subscription:target', $css);
        $this->assertStringContainsString('#sync-failed:target', $css);
        $this->assertStringContainsString('#bmpa-failed:target', $css);
        $this->assertStringContainsString('#payment-receipts:target', $css);
        $this->assertStringContainsString('#add-payment-receipt:target', $css);
        $this->assertStringContainsString('#refund-receipts:target', $css);
        $this->assertStringContainsString('#add-refund-receipt:target', $css);

        // 使用主题 token（focus ring / shadow）
        $this->assertStringContainsString('var(--adm-primary-focus-ring', $css);
        $this->assertStringContainsString('var(--adm-shadow-sm', $css);
    }
}
