{{-- New Order — IMPULSA skin (redesigned: compact 3-panel hero + 2-col form). Same Livewire component (Create) and the same real OrderCreator flow. All content fits on a desktop screen without vertical scroll. --}} @php use Illuminate\Support\Str; $total = $hero['total'] ?? 0; $pct = fn ($v) => $total > 0 ? number_format($v / $total * 100, 2).'%' : '0.00%'; // ---- Description → spec-sheet bullets (scraped text) ---- $bullets = []; if ($service && trim((string) $service->description) !== '') { $emoji = '\x{1F000}-\x{1FAFF}\x{2600}-\x{27BF}\x{2B00}-\x{2BFF}\x{2190}-\x{21FF}\x{2300}-\x{23FF}\x{25A0}-\x{25FF}\x{2100}-\x{214F}\x{FE0F}'; $norm = preg_replace('/\s*(?=['.$emoji.'])/u', "\n", trim($service->description)); $norm = preg_replace('/\r\n|\r|•|\s\|\s?|\s-\s/u', "\n", $norm); foreach (preg_split('/\n+/u', $norm, -1, PREG_SPLIT_NO_EMPTY) as $frag) { $t = trim($frag); if ($t === '' || ! preg_match('/[\p{L}\p{N}]/u', $t)) { continue; } if (preg_match('/^['.$emoji.']+\s*(.*)$/u', $t, $m) && trim($m[1]) !== '') { $t = trim($m[1]); } $label = null; $value = $t; if (preg_match('/^([\p{L}\p{N}\/&.\s]{1,26}?)\s*:\s*(.+)$/u', $t, $m2)) { $label = trim($m2[1]); $value = trim($m2[2]); } $low = Str::lower($t); $color = 'var(--color-primary-600)'; if (Str::contains($low, ['velocidad','speed','día','day','boost','k/'])) { $color = '#12c2b8'; } if (Str::contains($t, ['♻']) || preg_match('/\b(refill|lifetime)\b/u', $low) || Str::contains($low, ['recarga','garantía'])) { $color = '#22c55e'; } if (Str::contains($t, ['⚠']) || Str::contains($low, ['drop','no refill','no realice','importante','notice','please read','read the'])) { $color = '#f59e0b'; } $bullets[] = ['label' => $label, 'value' => $value, 'color' => $color]; } $bullets = array_slice($bullets, 0, 24); } // ---- Donut multi-color segments for hero panel 2 ---- $dCompleted = $total > 0 ? round(($hero['completed'] ?? 0) / $total * 100) : 0; $dPending = $total > 0 ? round(($hero['pending'] ?? 0) / $total * 100) : 0; $dCanceled = $total > 0 ? round(($hero['canceled'] ?? 0) / $total * 100) : 0; $dPendEnd = $dCompleted + $dPending; $dCanEnd = $dPendEnd + $dCanceled; $donutGrad = $total === 0 ? 'var(--color-surface-3) 0 100%' : "#22c55e 0 {$dCompleted}%, #f59e0b {$dCompleted}% {$dPendEnd}%, #ef4444 {$dPendEnd}% {$dCanEnd}%, var(--color-surface-3) {$dCanEnd}% 100%"; // ---- Sparkline chart for hero panel 1 (vh matches hero height 155px) ---- $chartSeries = $hero['series'] ?? []; $chart = count($chartSeries) >= 2 ? impulsa_chart($chartSeries, ['vh' => 155, 'padX' => 22, 'padTop' => 48, 'padBottom' => 8, 'tension' => 0.42]) : null; // ---- Hero networks (quick + more, up to 20 chips) ---- $heroNets = array_slice(array_merge($networks['quick'], $networks['more']), 0, 20); @endphp {{-- Scoped styles for this page only --}} {{-- Root: content-driven, no forced viewport height --}}
{{ __('Before you order') }}
{{ $message }}
@enderror @error('massConfirmed'){{ $message }}
@enderror{{ $message }}
@enderror{{ $message }}
@enderror{{ $message }}
@enderror{{ __('Service limit') }}: {{ number_format($service->min) }} – {{ number_format($service->max) }} {{ __('per post') }}
@endif {{-- Posts / Old posts --}}{{ $message }}
@enderror{{ $message }}
@enderror{{ __('Quantity is below the minimum of :min.', ['min' => number_format($service->min)]) }}
@endif @if ($aboveMax){{ __('Quantity is above the maximum of :max.', ['max' => number_format($service->max)]) }}
@endif{{ $message }}
@enderror {{-- Place Order (always visible at bottom of column) --}}