@extends('layouts.app')

@section('page_title', 'Edit Site Settings')

@section('content')
<section class="section">
    <div class="container">
        <div style="max-width: 800px; margin: 0 auto; background: #fff; padding: 40px; border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.1);">
            <form action="{{ route('admin.settings') }}" method="POST">
                @csrf
                
                <div style="margin-bottom: 25px;">
                    <label style="display: block; margin-bottom: 8px; font-weight: 700;">Site Name (Logo)</label>
                    <input type="text" name="site_name" value="{{ $settings['site_name'] ?? '' }}" style="width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 5px;">
                </div>

                <div style="margin-bottom: 25px;">
                    <label style="display: block; margin-bottom: 8px; font-weight: 700;">Contact Email</label>
                    <input type="email" name="contact_email" value="{{ $settings['contact_email'] ?? '' }}" style="width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 5px;">
                </div>

                <div style="margin-bottom: 25px;">
                    <label style="display: block; margin-bottom: 8px; font-weight: 700;">Contact Address</label>
                    <input type="text" name="contact_address" value="{{ $settings['contact_address'] ?? '' }}" style="width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 5px;">
                </div>

                <div style="margin-bottom: 25px;">
                    <label style="display: block; margin-bottom: 8px; font-weight: 700;">Working Hours</label>
                    <input type="text" name="working_hours" value="{{ $settings['working_hours'] ?? '' }}" style="width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 5px;">
                </div>

                <div style="margin-bottom: 25px;">
                    <label style="display: block; margin-bottom: 8px; font-weight: 700;">Footer About Text</label>
                    <textarea name="footer_about" style="width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 5px; min-height: 100px;">{{ $settings['footer_about'] ?? '' }}</textarea>
                </div>

                <div style="text-align: center;">
                    <button type="submit" class="button button-primary" style="width: 100%;">Save All Settings</button>
                    <a href="{{ url()->previous() }}" style="display: block; margin-top: 15px; color: #666; text-decoration: none;">Cancel</a>
                </div>
            </form>
        </div>
    </div>
</section>
@endsection
