@props([ 'preset' => 'premium', 'amount' => 100, 'currency' => 'USD', 'currencySymbol' => '$', 'recipient' => 'Recipient', 'sender' => 'You', 'code' => null, 'showCode' => false, 'width' => 360, ]) @php $presets = [ 'birthday' => ['bg' => 'linear-gradient(135deg, #FB7185 0%, #F472B6 45%, #C026D3 100%)', 'ink' => '#FFFFFF', 'chip' => 'rgba(255,255,255,.22)', 'motif' => 'confetti', 'ribbon' => 'Happy Birthday'], 'holiday' => ['bg' => 'linear-gradient(135deg, #064E3B 0%, #065F46 40%, #0F766E 100%)', 'ink' => '#FFFFFF', 'chip' => 'rgba(255,255,255,.18)', 'motif' => 'snow', 'ribbon' => "Season's Greetings"], 'thankyou' => ['bg' => 'linear-gradient(135deg, #FDE68A 0%, #FBBF24 55%, #D97706 100%)', 'ink' => '#3F2A05', 'chip' => 'rgba(63,42,5,.10)', 'motif' => 'rays', 'ribbon' => 'With Gratitude'], 'anniversary' => ['bg' => 'linear-gradient(135deg, #4C1D95 0%, #7E22CE 45%, #BE185D 100%)', 'ink' => '#FFFFFF', 'chip' => 'rgba(255,255,255,.20)', 'motif' => 'hearts', 'ribbon' => 'Happy Anniversary'], 'congrats' => ['bg' => 'linear-gradient(135deg, #1E3A8A 0%, #3B82F6 45%, #06B6D4 100%)', 'ink' => '#FFFFFF', 'chip' => 'rgba(255,255,255,.20)', 'motif' => 'sparkles', 'ribbon' => 'Congratulations'], 'premium' => ['ribbon' => 'A Gift For You', 'bg' => 'linear-gradient(135deg, #0B1330 0%, #14245F 45%, #1E3A8A 100%)', 'ink' => '#FFFFFF', 'chip' => 'rgba(255,255,255,.14)', 'motif' => 'mesh'], ]; $key = array_key_exists($preset, $presets) ? $preset : 'premium'; $t = $presets[$key]; $w = (int) $width; $h = (int) round($w / 1.586); $isLightInk = strtoupper($t['ink']) === '#FFFFFF'; $radius = $w >= 320 ? 18 : 12; // Subtle inner highlight only — outer drop shadows were stacking up // visually when the card sits inside its own list/grid/preview cards. // Clean minimal look reads "premium" without the noise. $shadow = 'inset 0 0 0 1px rgba(255,255,255,.10)'; $formattedAmount = $currencySymbol . number_format((float) $amount, 2); @endphp
{{-- Motif SVG overlays --}} @switch($t['motif']) @case('confetti') @for($i = 0; $i < 28; $i++) @php $x = ($i * 47) % 400; $y = ($i * 31) % 252; $r = ($i % 3) * 4 + 6; $rot = ($i * 23) % 360; $colors = ['#FDE68A','#FCA5A5','#A7F3D0','#BFDBFE','#FBCFE8']; @endphp @endfor @break @case('snow') @for($i = 0; $i < 40; $i++) @php $x = ($i * 41) % 400; $y = ($i * 19) % 252; $op = 0.25 + ($i % 3) * 0.15; @endphp @endfor @break @case('rays') @for($i = 0; $i < 8; $i++) @endfor @break @case('hearts') @for($i = 0; $i < 14; $i++) @php $x = ($i * 53) % 400; $y = ($i * 37) % 252; $s = 8 + ($i % 3) * 4; $cx = $x; $cy = $y + $s * 0.3; @endphp @endfor @break @case('sparkles') @for($i = 0; $i < 18; $i++) @php $x = ($i * 41) % 400; $y = ($i * 23) % 252; $s = 4 + ($i % 3) * 3; @endphp @endfor @break @case('mesh') @break @endswitch {{-- Brand mark --}}
{{ setting('site_title') }}
{{-- Ribbon --}}
{{ $t['ribbon'] }}
@php /* * When the code stripe is visible (recipient view), the amount * block needs to sit higher otherwise the stripe overlaps the * digits. 28% top leaves a clean ~25px gap between the amount * descender and the stripe top edge at every card width. */ $amountTopPct = $showCode && $code ? 26 : 38; @endphp {{-- Amount --}}
{{ __('Gift Card Value') }}
{{ $formattedAmount }}
{{-- Footer To/From --}}
{{ __('To') }}
{{ $recipient ?: '—' }}
{{ __('From') }}
{{ $sender ?: '—' }}
{{-- Code stripe (recipient view only) --}} @if($showCode && $code)
{{ $code }}
@endif