<!DOCTYPE html>
<html lang="{{ $locale ?? 'tr' }}">
<head>
    <meta charset="UTF-8">
    <title>{{ __('contract_pdf.document_title') }} - {{ $title }}</title>
    <style>
        body {
            font-family: 'DejaVu Sans', Arial, sans-serif;
            font-size: 12px;
            line-height: 1.5;
            color: #333;
            margin: 0;
            padding: 24px;
        }
        .header {
            text-align: center;
            margin-bottom: 24px;
            border-bottom: 2px solid #333;
            padding-bottom: 16px;
        }
        .header .company-name {
            font-size: 16px;
            font-weight: bold;
            margin-bottom: 4px;
        }
        .header .doc-title {
            font-size: 18px;
            font-weight: bold;
            margin-top: 8px;
        }
        .contract-title {
            font-size: 15px;
            font-weight: bold;
            margin: 20px 0 6px 0;
        }
        .section-label {
            font-size: 13px;
            font-weight: bold;
            margin: 24px 0 8px 0;
            border-bottom: 1px solid #ccc;
            padding-bottom: 4px;
        }
        .contract-content {
            border: 1px solid #e0e0e0;
            padding: 16px;
            background-color: #fafafa;
        }
        .signature-table {
            width: 100%;
            border-collapse: collapse;
            margin-top: 8px;
        }
        .signature-table td {
            padding: 8px 10px;
            border: 1px solid #ddd;
            vertical-align: top;
        }
        .signature-table td.label {
            font-weight: bold;
            width: 200px;
            background-color: #f2f2f2;
        }
        .hash-value {
            font-family: 'DejaVu Sans Mono', monospace;
            font-size: 10px;
            word-break: break-all;
        }
        .legal-note {
            margin-top: 20px;
            font-size: 10px;
            color: #666;
            font-style: italic;
        }
    </style>
</head>
<body>
    <div class="header">
        @if(!empty($company['name']))
            <div class="company-name">{{ $company['name'] }}</div>
        @endif
        <div class="doc-title">{{ __('contract_pdf.document_title') }}</div>
    </div>

    <div class="contract-title">{{ $title }}</div>

    <div class="section-label">{{ __('contract_pdf.contract_content') }}</div>
    <div class="contract-content">
        {!! $content !!}
    </div>

    <div class="section-label">{{ __('contract_pdf.signature_block') }}</div>
    <table class="signature-table">
        <tr>
            <td class="label">{{ __('contract_pdf.accepted_by') }}</td>
            <td>{{ $acceptedBy }}</td>
        </tr>
        <tr>
            <td class="label">{{ __('contract_pdf.accepted_at') }}</td>
            <td>{{ $acceptedAt }}</td>
        </tr>
        <tr>
            <td class="label">{{ __('contract_pdf.ip_address') }}</td>
            <td>{{ $ipAddress }}</td>
        </tr>
        @if(!empty($version))
        <tr>
            <td class="label">{{ __('contract_pdf.version') }}</td>
            <td>{{ $version }}</td>
        </tr>
        @endif
        <tr>
            <td class="label">{{ __('contract_pdf.content_hash') }}</td>
            <td class="hash-value">{{ $contentHash }}</td>
        </tr>
    </table>

    <div class="legal-note">{{ __('contract_pdf.legal_note') }}</div>
</body>
</html>
