

<?php $__env->startSection('title', 'Tema Düzenle: ' . $theme->label); ?>

<?php $__env->startSection('content'); ?>
<div class="page-header">
    <div>
        <a href="<?php echo e(route('admin.themes.index')); ?>" class="back-link">
            <svg width="16" height="16" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5">
                <path stroke-linecap="round" stroke-linejoin="round" d="M10.5 19.5L3 12m0 0l7.5-7.5M3 12h18"/>
            </svg>
            Tema Listesi
        </a>
        <h1 class="page-title"><?php echo e($theme->label); ?> Düzenle</h1>
        <p class="page-subtitle">Tema: <code><?php echo e($theme->name); ?></code></p>
    </div>
</div>

<?php if($errors->any()): ?>
    <div class="alert alert-danger">
        <?php $__currentLoopData = $errors->all(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $error): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?><div><?php echo e($error); ?></div><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
    </div>
<?php endif; ?>

<form method="POST" action="<?php echo e(route('admin.themes.update', $theme)); ?>">
    <?php echo csrf_field(); ?>
    <?php echo method_field('PUT'); ?>

    <div class="form-layout">
        <div class="form-main">

            
            <div class="form-card">
                <div class="form-card-header">
                    <h2 class="form-card-title">Temel Bilgiler</h2>
                </div>
                <div class="form-card-body">
                    <div class="form-row">
                        <div class="form-group">
                            <label class="form-label">Tema Etiketi <span class="required">*</span></label>
                            <input type="text" name="label" value="<?php echo e(old('label', $theme->label)); ?>" class="form-input" required maxlength="100">
                        </div>
                        <div class="form-group">
                            <label class="form-label">Sıralama</label>
                            <input type="number" name="sort_order" value="<?php echo e(old('sort_order', $theme->sort_order ?? 0)); ?>" class="form-input" min="0" style="max-width:100px;">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="form-label">Açıklama</label>
                        <textarea name="description" class="form-textarea" rows="2" maxlength="500"><?php echo e(old('description', $theme->description)); ?></textarea>
                    </div>
                </div>
            </div>

            
            <div class="form-card">
                <div class="form-card-header">
                    <h2 class="form-card-title">Hero Renkleri</h2>
                    <p class="form-card-subtitle">Ana sayfa hero bölümünün renk ayarları</p>
                </div>
                <div class="form-card-body">
                    <div class="form-group">
                        <label class="form-label">Hero Arka Plan Gradyanı</label>
                        <input type="text" name="hero_bg_gradient" value="<?php echo e(old('hero_bg_gradient', $theme->hero_bg_gradient)); ?>" class="form-input" placeholder="linear-gradient(135deg, #0f172a 0%, #1a2744 100%)">
                        <p class="form-hint">CSS <code>background</code> değeri. Gradyan veya düz renk girin.</p>
                    </div>
                    <div class="form-row-3">
                        <div class="form-group">
                            <label class="form-label">Başlık Rengi</label>
                            <div class="color-input-group">
                                <input type="color" id="hero_title_preview" value="<?php echo e(substr($theme->hero_title_color ?? '#ffffff', 0, 7)); ?>" oninput="document.getElementById('hero_title_color').value = this.value" class="color-picker">
                                <input type="text" id="hero_title_color" name="hero_title_color" value="<?php echo e(old('hero_title_color', $theme->hero_title_color)); ?>" class="form-input" placeholder="#ffffff">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="form-label">Alt Başlık Rengi</label>
                            <div class="color-input-group">
                                <input type="color" id="hero_sub_preview" value="<?php echo e(substr($theme->hero_subtitle_color ?? '#94a3b8', 0, 7)); ?>" oninput="document.getElementById('hero_subtitle_color').value = this.value" class="color-picker">
                                <input type="text" id="hero_subtitle_color" name="hero_subtitle_color" value="<?php echo e(old('hero_subtitle_color', $theme->hero_subtitle_color)); ?>" class="form-input" placeholder="rgba(148,163,184,0.9)">
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            
            <div class="form-card">
                <div class="form-card-header">
                    <h2 class="form-card-title">Site Renkleri</h2>
                    <p class="form-card-subtitle">Buton, link ve genel UI renkleri</p>
                </div>
                <div class="form-card-body">
                    <div class="form-row-3">
                        <div class="form-group">
                            <label class="form-label">Primary Renk</label>
                            <div class="color-input-group">
                                <input type="color" value="<?php echo e(substr($theme->primary_color ?? '#2563eb', 0, 7)); ?>" oninput="document.getElementById('primary_color').value = this.value" class="color-picker">
                                <input type="text" id="primary_color" name="primary_color" value="<?php echo e(old('primary_color', $theme->primary_color)); ?>" class="form-input" placeholder="#2563eb">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="form-label">Accent Renk</label>
                            <div class="color-input-group">
                                <input type="color" value="<?php echo e(substr($theme->accent_color ?? '#3b82f6', 0, 7)); ?>" oninput="document.getElementById('accent_color').value = this.value" class="color-picker">
                                <input type="text" id="accent_color" name="accent_color" value="<?php echo e(old('accent_color', $theme->accent_color)); ?>" class="form-input" placeholder="#3b82f6">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="form-label">Arka Plan</label>
                            <div class="color-input-group">
                                <input type="color" value="<?php echo e(substr($theme->background_color ?? '#f8fafc', 0, 7)); ?>" oninput="document.getElementById('background_color').value = this.value" class="color-picker">
                                <input type="text" id="background_color" name="background_color" value="<?php echo e(old('background_color', $theme->background_color)); ?>" class="form-input" placeholder="#f8fafc">
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            
            <div class="form-card">
                <div class="form-card-header">
                    <h2 class="form-card-title">Stil Seçenekleri</h2>
                </div>
                <div class="form-card-body">
                    <div class="form-row-3">
                        <div class="form-group">
                            <label class="form-label">Hero Stili</label>
                            <select name="hero_style" class="form-select">
                                <?php $__currentLoopData = ['modern' => 'Modern', 'classic' => 'Classic', 'gradient' => 'Gradient', 'animated' => 'Animated']; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $val => $lbl): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <option value="<?php echo e($val); ?>" <?php echo e(old('hero_style', $theme->hero_style) === $val ? 'selected' : ''); ?>><?php echo e($lbl); ?></option>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </select>
                        </div>
                        <div class="form-group">
                            <label class="form-label">Kart Stili</label>
                            <select name="card_style" class="form-select">
                                <?php $__currentLoopData = ['elevated' => 'Elevated', 'flat' => 'Flat', 'outlined' => 'Outlined']; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $val => $lbl): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <option value="<?php echo e($val); ?>" <?php echo e(old('card_style', $theme->card_style) === $val ? 'selected' : ''); ?>><?php echo e($lbl); ?></option>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </select>
                        </div>
                        <div class="form-group">
                            <label class="form-label">Buton Stili</label>
                            <select name="button_style" class="form-select">
                                <?php $__currentLoopData = ['gradient' => 'Gradient', 'solid' => 'Solid', 'outlined' => 'Outlined']; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $val => $lbl): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <option value="<?php echo e($val); ?>" <?php echo e(old('button_style', $theme->button_style) === $val ? 'selected' : ''); ?>><?php echo e($lbl); ?></option>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </select>
                        </div>
                    </div>

                    <div class="toggle-group">
                        <div class="toggle-item-row">
                            <div>
                                <div class="toggle-label">Animasyonlar</div>
                                <div class="toggle-desc">Hero ve sayfa geçişlerinde animasyonları göster</div>
                            </div>
                            <label class="switch">
                                <input type="checkbox" name="show_animations" value="1" <?php echo e(old('show_animations', $theme->show_animations) ? 'checked' : ''); ?>>
                                <span class="slider"></span>
                            </label>
                        </div>
                    </div>
                </div>
            </div>

            
            <div class="form-card">
                <div class="form-card-header">
                    <h2 class="form-card-title">Özel CSS</h2>
                    <p class="form-card-subtitle">Bu tema için ek CSS override (isteğe bağlı)</p>
                </div>
                <div class="form-card-body">
                    <textarea name="custom_css" class="form-textarea code-textarea" rows="8" placeholder="/* Özel CSS */&#10;.hero { }&#10;.hero-title { }"><?php echo e(old('custom_css', $theme->custom_css)); ?></textarea>
                </div>
            </div>

        </div>

        
        <div class="form-sidebar">
            <div class="form-card sticky-card">
                <div class="form-card-header"><h2 class="form-card-title">Kaydet</h2></div>
                <div class="form-card-body">
                    <button type="submit" class="btn btn-primary btn-full">
                        <svg width="16" height="16" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5">
                            <path stroke-linecap="round" stroke-linejoin="round" d="M4.5 12.75l6 6 9-13.5"/>
                        </svg>
                        Kaydet
                    </button>
                    <a href="<?php echo e(route('admin.themes.index')); ?>" class="btn btn-outline btn-full" style="margin-top:8px;">İptal</a>
                </div>
            </div>

            <div class="form-card" style="margin-top:16px;">
                <div class="form-card-header"><h2 class="form-card-title">Önizleme</h2></div>
                <div class="form-card-body">
                    <div class="mini-preview" id="livePreview" style="background: <?php echo e($theme->hero_bg_gradient); ?>; border-radius: 10px; padding: 20px; text-align: center;">
                        <div style="font-size:18px; font-weight:900; color: <?php echo e($theme->hero_title_color); ?>;">Askeri Platform</div>
                        <div style="font-size:11px; color: <?php echo e($theme->hero_subtitle_color); ?>; margin-top:4px;">Kariyerinize başlayın</div>
                    </div>
                </div>
            </div>

            <div class="form-card" style="margin-top:16px;">
                <div class="form-card-header"><h2 class="form-card-title">Bilgi</h2></div>
                <div class="form-card-body">
                    <div class="info-list">
                        <div class="info-item">
                            <span class="info-label">Tema Adı</span>
                            <span class="info-value"><?php echo e($theme->name); ?></span>
                        </div>
                        <div class="info-item">
                            <span class="info-label">Durum</span>
                            <span class="info-value <?php echo e($theme->is_active ? 'text-success' : 'text-muted'); ?>">
                                <?php echo e($theme->is_active ? '✓ Aktif' : 'Pasif'); ?>

                            </span>
                        </div>
                    </div>
                    <?php if(!$theme->is_active): ?>
                    <form method="POST" action="<?php echo e(route('admin.themes.activate', $theme)); ?>" style="margin-top:12px;">
                        <?php echo csrf_field(); ?>
                        <button type="submit" class="btn btn-primary btn-full">Aktif Et</button>
                    </form>
                    <?php endif; ?>
                </div>
            </div>
        </div>
    </div>
</form>

<style>
.back-link { display: inline-flex; align-items: center; gap: 6px; color: #6b7280; font-size: 14px; text-decoration: none; margin-bottom: 8px; }
.back-link:hover { color: #2563eb; }
.page-title { font-size: 22px; font-weight: 700; color: #111827; margin: 0 0 4px; }
.page-subtitle { color: #9ca3af; font-size: 13px; margin: 0; }
.page-subtitle code { background: #f3f4f6; padding: 2px 6px; border-radius: 4px; }
.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 20px; font-size: 14px; }
.alert-danger { background: #fef2f2; border: 1px solid #fecaca; color: #dc2626; }

.form-layout { display: grid; grid-template-columns: 1fr 280px; gap: 24px; align-items: start; }
@media (max-width: 900px) { .form-layout { grid-template-columns: 1fr; } }

.form-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; overflow: hidden; margin-bottom: 20px; }
.form-card-header { padding: 16px 20px 14px; border-bottom: 1px solid #f1f5f9; }
.form-card-title { font-size: 15px; font-weight: 600; color: #111827; margin: 0 0 2px; }
.form-card-subtitle { font-size: 13px; color: #9ca3af; margin: 0; }
.form-card-body { padding: 20px; }

.form-row { display: grid; grid-template-columns: 1fr auto; gap: 16px; }
.form-row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.form-group { margin-bottom: 16px; }
.form-group:last-child { margin-bottom: 0; }
.form-label { display: block; font-size: 13px; font-weight: 600; color: #374151; margin-bottom: 6px; }
.required { color: #ef4444; }
.form-input { width: 100%; padding: 8px 12px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 14px; font-family: inherit; color: #111827; background: #fff; transition: all 0.2s; }
.form-input:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }
.form-textarea { width: 100%; padding: 8px 12px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 14px; font-family: inherit; color: #111827; resize: vertical; transition: all 0.2s; }
.form-textarea:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }
.form-select { width: 100%; padding: 8px 12px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 14px; font-family: inherit; color: #111827; background: #fff; }
.form-select:focus { outline: none; border-color: #2563eb; }
.form-hint { font-size: 12px; color: #9ca3af; margin-top: 5px; }
.code-textarea { font-family: 'Courier New', monospace; font-size: 13px; background: #0f172a; color: #e2e8f0; border-color: #334155; }

.color-input-group { display: flex; gap: 8px; align-items: center; }
.color-picker { width: 36px; height: 36px; border: 1px solid #d1d5db; border-radius: 8px; cursor: pointer; padding: 2px; flex-shrink: 0; }

.toggle-group { border: 1px solid #e5e7eb; border-radius: 10px; overflow: hidden; }
.toggle-item-row { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; background: #fff; }
.toggle-label { font-size: 14px; font-weight: 500; color: #111827; margin-bottom: 2px; }
.toggle-desc { font-size: 12px; color: #9ca3af; }

.switch { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background: #d1d5db; border-radius: 24px; transition: 0.3s; }
.slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px; background: white; border-radius: 50%; transition: 0.3s; box-shadow: 0 1px 3px rgba(0,0,0,0.2); }
input:checked + .slider { background: #2563eb; }
input:checked + .slider:before { transform: translateX(20px); }

.sticky-card { position: sticky; top: 20px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 16px; border-radius: 8px; font-size: 14px; font-weight: 500; cursor: pointer; text-decoration: none; border: none; transition: all 0.15s; }
.btn-primary { background: linear-gradient(135deg, #2563eb, #3b82f6); color: white; }
.btn-primary:hover { box-shadow: 0 4px 12px rgba(37,99,235,0.3); }
.btn-outline { background: white; border: 1px solid #d1d5db; color: #374151; }
.btn-outline:hover { background: #f9fafb; }
.btn-full { width: 100%; }

.info-list { display: flex; flex-direction: column; gap: 10px; }
.info-item { display: flex; justify-content: space-between; font-size: 13px; }
.info-label { color: #9ca3af; }
.info-value { font-weight: 500; color: #374151; }
.text-success { color: #15803d; }
.text-muted { color: #9ca3af; }
</style>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('admin.layout', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\xampp\htdocs\askeribilgiler\resources\views\admin\themes\edit.blade.php ENDPATH**/ ?>