<div style="width: 900px; margin: 0px auto; font-family: Arial; font-size: 14px; line-height: 1.4; color: #333333;">
	@if (isset($company->preferences['image']) && $company->preferences['image'])<img src="{{ $company->image_full }}" align="center" style="max-width: 375px; width: 100%; display: block; margin: 0px auto;" />@endif
	<h1 style="text-align: center; font-size: 36px; margin-bottom: 5px; font-weight: 500;">ESTIMATE</h1>
	<p style="display: flex; flex-direction: row; align-items: center; margin: 0 0 10px;">
		<span style="padding-right: 20px;">TO</span>
		<span style="width: 100%; flex-shrink: 1; border-bottom: 3px solid #f1f1f1; margin: 5px;"></span>
		<span style="padding-left: 20px;">DETAILS</span>
	</p>
	<div style="width: 50%; float: left; margin-bottom: 25px;">
		{{ $estimate->customer->name }}<br />
		<a href="https://maps.google.com/?q={{ $estimate->property->location['address'] }}" target="_blank" style="color: #333333; text-decoration: none;">{{ substr($estimate->property->location['address'], 0, 35) }}...</a><br />
		<b>P:</b> {{ $estimate->customer->contacts['phone_primary'] }}<br />
		<b>E:</b> <a href="mailto:{{ $estimate->customer->contacts['email'] }}" target="_blank" style="color: #333333; text-decoration: none;">{{ $estimate->customer->contacts['email'] }}</a>
	</div>
	<div style="width: 50%; float: left; text-align: right; margin-bottom: 25px;">
		<b>ID:</b> {{ $estimate->number }}<br />
		<b>DATE:</b> {{ $estimate->date_formatted }}<br />
		<b>EXPIRATION DATE:</b> {{ $estimate->expiration_date_formatted }}<br />
		<b>DISCOUNT:</b> ${{ number_format($estimate->discount, 2, '.', ',') }}
	</div>
	@if (count($estimate->description))
	<table border="0" cellpadding="0" cellspacing="0" width="100%" style="border: 1px solid #f1f1f1; margin-bottom: 25px;">
		<thead>
			<tr>
				<th style="text-align: left; padding: 15px; font-weight: normal; font-size: 16px; width: 50%;"><span style="padding-bottom: 10px; border-bottom: 2px solid black;">Item</span></th>
				<th style="text-align: left; padding: 15px; font-weight: normal; font-size: 16px; width: 25%;"><span style="padding-bottom: 10px; border-bottom: 2px solid black;">Qty</span></th>
				<th style="text-align: left; padding: 15px; font-weight: normal; font-size: 16px; width: 25%;"><span style="padding-bottom: 10px; border-bottom: 2px solid black;">Total</span></th>
			</tr>
		</thead>
		<tbody>
		@foreach($estimate->description as $item)
			<tr style="font-size: 14px">
				<td style="border-bottom: solid 1px #f1f1f1; padding: 15px;"><b>{{ $item['name'] }}</b><br /><i>{{ $item['description'] }}</i></td>
				<td style="border-bottom: solid 1px #f1f1f1; padding: 15px;">{{ $item['qty'] }}</td>
				<td style="border-bottom: solid 1px #f1f1f1; padding: 15px;">${{ number_format($item['price'] * $item['qty'], 2, '.', ',') }}</td>
			</tr>
		@endforeach
		</tbody>
		<tfoot>
			<tr>
				<td colspan="3" style="text-align: right; font-weight: bold; font-size: 16px; font-style: italic; padding: 15px;">Amount: ${{ number_format($estimate->amount, 2, '.', ',') }}</td>
			</tr>
		</tfoot>
	</table>
	@endif
	@if ($estimate->about)
	<p style="text-align: center; padding: 0px; margin: 25px 0px;">
		{{ $estimate->about }}
	</p>
	@endif
	<p style="text-align: center; padding: 0px; margin: 25px 0px;">
		<a href="https://www.routely-api.com/api/v1/customer/estimates/accept/{{ $estimate->token }}" target="_blank" style="display: inline-block; padding: 10px 25px; text-decoration: none; color: #FFFFFF; background-color: #8bc34a; color: #FFFFFF;">ACCEPT THIS ESTIMATE</a>
		<a href="https://www.routely-api.com/api/v1/customer/estimates/reject/{{ $estimate->token }}" target="_blank" style="display: inline-block; padding: 10px 25px; text-decoration: none; color: #FFFFFF; background-color: #e51c23; color: #FFFFFF;">REJECT THIS ESTIMATE</a>
	</p>
	<div style="width: 100%; display: block; overflow: auto; background-color: #141E30; color: #FFFFFF; margin-bottom: 25px;">
		<div style="width: 260px; padding: 20px; float: left; text-align: center; line-height: 2;">
			<h5 style="border-bottom: 2px solid white; padding-bottom: 10px; text-align: center; font-weight: bold; font-size: 16px; margin: 0px 0px 15px 0px;">SHOWROOM</h5>
			<a href="https://maps.google.com/?q={{ $company->location['address'] }}" style="color: #FFFFFF; text-decoration: none;">{{ $company->location['address'] }}</a>
		</div>
		<div style="width: 260px; padding: 20px; float: left; text-align: center; line-height: 2;">
			<h5 style="border-bottom: 2px solid white; padding-bottom: 10px; text-align: center; font-weight: bold; font-size: 16px; margin: 0px 0px 15px 0px;">CONTACT INFO</h5>
			@if (isset($company->social_media['website']) && $company->social_media['website'])<a href="{{ $company->social_media['website'] }}" target="_blank" style="color: #FFFFFF; text-decoration: none;">{{ $company->social_media['website'] }}</a><br />@endif
			<a href="mailto:{{ $company->contacts['email'] }}" style="color: #FFFFFF; text-decoration: none;">{{ $company->contacts['email'] }}</a><br />
			{{ $company->contacts['phone'] }}
		</div>
		<div style="width: 260px; padding: 20px; float: left; text-align: center; line-height: 2;">
			<h5 style="border-bottom: 2px solid white; padding-bottom: 10px; text-align: center; font-weight: bold; font-size: 16px; margin: 0px 0px 15px 0px;">SOCIAL LINKS</h5>
			@if (isset($company->social_media['facebook']) && $company->social_media['facebook'])<a href="{{ $company->social_media['facebook'] }}" target="_blank" style="color: #FFFFFF; text-decoration: none;">Facebook</a><br />@endif
			@if (isset($company->social_media['instagram']) && $company->social_media['instagram'])<a href="{{ $company->social_media['instagram'] }}" target="_blank" style="color: #FFFFFF; text-decoration: none;">Instagram</a><br />@endif
			@if (isset($company->social_media['youtube']) && $company->social_media['youtube'])<a href="{{ $company->social_media['youtube'] }}" target="_blank" style="color: #FFFFFF; text-decoration: none;">Youtube</a>@endif
		</div>
	</div>
	<p style="text-align: center;">&copy; {{ date('Y') }} {{ $company->name }}</p>
</div>