<div class="ml-[280px] min-h-screen bg-gray-100 p-8 space-y-6">

    <!-- HEADER -->
    <div class="flex justify-between items-center bg-white border border-gray-300 rounded-xl px-6 py-4 shadow-sm">
        <div>
            <h2 class="text-2xl font-semibold text-gray-900">
                Services Page Content
            </h2>
            <p class="text-sm text-gray-500 mt-1">
                Manage category-wise service descriptions displayed on the Services page
            </p>
        </div>

        <a href="<?php echo e(route('admin.services.page.list')); ?>"
            class="inline-flex items-center gap-2 px-5 py-2
                   bg-gray-900 text-white text-sm font-medium
                   rounded-lg hover:bg-gray-800 transition">
            ← Back
        </a>
    </div>

    <!-- SUCCESS MESSAGE -->
    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if(session()->has('success')): ?>
        <div
            class="flex items-center justify-between
                    bg-green-50 border border-green-300
                    text-green-800 px-5 py-3 rounded-lg shadow-sm">
            <span><?php echo e(session('success')); ?></span>
            <button onclick="this.parentElement.remove()" class="text-green-700 font-bold text-lg leading-none">
                ×
            </button>
        </div>
    <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>

    <!-- MAIN FORM CARD -->
    <div class="bg-white rounded-xl border border-gray-300 shadow-md">

        <!-- CARD HEADER -->
        <div class="px-6 py-4 border-b border-gray-200">
            <h3 class="text-lg font-semibold text-gray-900">
                Category-wise Service Description
            </h3>
            <p class="text-sm text-gray-500 mt-1">
                Select a service category and update its description.
            </p>
        </div>

        <!-- FORM START -->
        <form wire:submit.prevent="save">

            <div class="p-6 space-y-6">

                <!-- CATEGORY SELECT -->
                <div class="space-y-1">
                    <label class="block text-sm font-medium text-gray-700">
                        Service Category
                    </label>

                    <select wire:model="service_category_id"
                        class="w-full rounded-lg border border-gray-300 px-4 py-2 text-sm
                               focus:ring-2 focus:ring-[#f38121] focus:border-[#f38121]">
                        <option value="">Select Category</option>
                        <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__currentLoopData = $categories; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $category): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <option value="<?php echo e($category->id); ?>">
                                <?php echo e($category->name); ?>

                            </option>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                    </select>

                    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__errorArgs = ['service_category_id'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                        <p class="text-xs text-red-500 mt-1"><?php echo e($message); ?></p>
                    <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                </div>

                <!-- DESCRIPTION -->
                <div class="space-y-1">
                    <label class="block text-sm font-medium text-gray-700">
                        Description
                    </label>

                    <textarea wire:model="description" rows="6" class="w-full rounded-lg border border-gray-300 px-4 py-3"
                        placeholder="Enter description for selected category...">
</textarea>


                    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__errorArgs = ['description'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                        <p class="text-xs text-red-500 mt-1"><?php echo e($message); ?></p>
                    <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                </div>

            </div>

            <!-- CARD FOOTER -->
            <div class="px-6 py-4 border-t border-gray-200 flex justify-end bg-gray-50 rounded-b-xl">
                <button type="submit"
                    class="inline-flex items-center gap-2
                           px-6 py-2 bg-[#f38121] text-white
                           text-sm font-semibold rounded-lg
                           hover:bg-[#e26f10] transition">
                    Save Content
                </button>
            </div>

        </form>
        <!-- FORM END -->

    </div>
</div>
<?php /**PATH /home1/eggfirst/public_html/resources/views/livewire/admin/services/services-page-cms.blade.php ENDPATH**/ ?>