@extends('backEnd.layouts.master')
@section('title','Add Benefit')

@section('css')
<style>@verbatim
    .card { border: none; box-shadow: 0 0 20px rgba(18, 38, 63, 0.03); border-radius: 12px; }
    .form-label { font-weight: 600; font-size: 13px; color: #636e72; margin-bottom: 6px; }
    .form-control { border-radius: 8px; padding: 10px 12px; }
    .switch { position: relative; display: inline-block; width: 44px; height: 22px; }
    .switch input { opacity: 0; width: 0; height: 0; }
    .slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #eef2f7; transition: .4s; border-radius: 34px; }
    .slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 2px; bottom: 1px; background-color: white; transition: .4s; border-radius: 50%; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
    input:checked + .slider { background-color: #0acf97; }
    input:checked + .slider:before { transform: translateX(20px); }
@endverbatim</style>
@endsection

@section('content')
<div class="container-fluid">
    <div class="row mb-3 mt-3">
        <div class="col-12 d-flex justify-content-between align-items-center">
            <h4 class="page-title mb-0 text-dark fw-bold">Add Benefit (সুক্কারী খেজুরের উপকারিতা)</h4>
            <a href="{{ route('admin.benefit.index') }}" class="btn btn-light rounded-pill border shadow-sm px-4">
                <i class="fe-arrow-left me-1"></i> Back
            </a>
        </div>
    </div>

    <form action="{{ route('admin.benefit.store') }}" method="POST">
        @csrf
        <div class="row">
            <div class="col-lg-6">
                <div class="card">
                    <div class="card-body">
                        <div class="mb-3">
                            <label class="form-label">Title <span class="text-danger">*</span></label>
                            <input type="text" name="title" value="{{ old('title') }}" class="form-control @error('title') is-invalid @enderror" required placeholder="উদাহরণ: শক্তিশালী হাড়">
                            @error('title')<div class="invalid-feedback">{{ $message }}</div>@enderror
                        </div>
                        <div class="d-flex align-items-center gap-3">
                            <label class="switch mb-0">
                                <input type="checkbox" name="status" value="1" {{ old('status', true) ? 'checked' : '' }}>
                                <span class="slider round"></span>
                            </label>
                            <span class="text-muted small">Active</span>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <button type="submit" class="btn btn-primary rounded-pill px-4 mt-2">
            <i class="fe-save me-1"></i> Save Benefit
        </button>
    </form>
</div>
@endsection
