/* assets/css/app.css */

/* hidden özniteliği her zaman gizler: Tailwind'in "block", "flex" gibi sınıfları onu geçersiz kılmasın (filtreler, açılır paneller). */
[hidden] {
    display: none !important;
}

/* A4 Page constraints for the preview area */
.cv-page {
    --cv-h: 297mm;
    position: relative;
    width: 210mm;
    min-height: var(--cv-h);
    margin: 0 auto;
    background: white;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    box-sizing: border-box;
    /* Base scaling for responsive view - handled in JS but we set origin here */
    transform-origin: top left;
}

@media print {
    body {
        background: white;
        margin: 0;
        padding: 0;
    }
    header, footer, .ad-slot, .google-auto-placed, ins.adsbygoogle, .no-print, #cookie-consent {
        display: none !important;
    }
    .cv-page {
        margin: 0;
        box-shadow: none;
        width: 100%;
        min-height: 100%;
    }
}

/* Base CV Typography & Utilities inside #cv-preview */
#cv-preview {
    color: #1f2937;
    line-height: 1.5;
    font-size: 10pt; /* Standard CV font size */
    color-scheme: light;
}
#cv-preview *, #cv-preview *::before, #cv-preview *::after {
    box-sizing: border-box;
}
/* PDF dışa aktarımında gölge olmasın (sayfa yüksekliğini script.js paginate() belirler) */
.cv-page.is-exporting {
    box-shadow: none;
}
/* Önizlemede sayfa sınırı göstergesi (PDF'e girmez) */
.cv-page-marker {
    position: absolute;
    left: -12px;
    right: -12px;
    height: 0;
    border-top: 2px dashed #f43f5e;
    z-index: 60;
    pointer-events: none;
}
.cv-page-marker span {
    position: absolute;
    right: 12px;
    top: -11px;
    background: #f43f5e;
    color: #fff;
    font: 600 10px/1 Inter, sans-serif;
    padding: 5px 8px;
    border-radius: 999px;
}

/* Template: Modern */
.tpl-modern .cv-header {
    padding: 30px;
    color: white;
}
.tpl-modern .cv-header h1 {
    font-size: 24pt;
    font-weight: 700;
    margin: 0 0 5px 0;
    line-height: 1.2;
}
.tpl-modern .cv-header h2 {
    font-size: 14pt;
    font-weight: 400;
    margin: 0 0 15px 0;
    opacity: 0.9;
}
.tpl-modern .cv-section-title {
    font-size: 14pt;
    font-weight: 600;
    border-bottom: 2px solid;
    padding-bottom: 5px;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.tpl-modern .cv-content {
    padding: 30px;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}
.tpl-modern .cv-main { /* Left col */ }
.tpl-modern .cv-sidebar { /* Right col */ }

/* Template: Klasik */
.tpl-klasik .cv-page {
    padding: 30px;
}
.tpl-klasik .cv-header {
    text-align: center;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 20px;
    margin-bottom: 20px;
}
.tpl-klasik .cv-header h1 {
    font-size: 26pt;
    font-weight: 700;
    margin: 0 0 5px 0;
    color: #111827;
}
.tpl-klasik .cv-section-title {
    font-size: 14pt;
    font-weight: 700;
    text-transform: uppercase;
    color: #374151;
    border-bottom: 1px solid #d1d5db;
    margin-bottom: 15px;
    padding-bottom: 5px;
}

/* Template: Minimal */
.tpl-minimal .cv-page {
    padding: 40px;
    display: flex;
    gap: 40px;
}
.tpl-minimal .cv-sidebar {
    width: 25%;
    border-right: 1px solid #e5e7eb;
    padding-right: 20px;
}
.tpl-minimal .cv-main {
    flex: 1;
}
.tpl-minimal .cv-header h1 {
    font-size: 28pt;
    font-weight: 300;
    letter-spacing: -0.02em;
    margin: 0 0 10px 0;
}
.tpl-minimal .cv-section-title {
    font-size: 12pt;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 15px;
}

/* Wizard Form Styles */
.wizard-step {
    display: none;
}
.wizard-step.active {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Custom Scrollbar for form area */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 20px;
}

/* Telefonda geniş makale tabloları kendi içinde yana kayar; sayfa yatay kaymaz. */
@media (max-width: 640px) {
    .prose table { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* Uygulama içi tarayıcı uyarısı (Instagram, Facebook, TikTok…; assets/js/in-app.js). Çerez bandının (z-70) üstünde. */
.iab-backdrop { position: fixed; inset: 0; z-index: 80; display: flex; align-items: flex-end; justify-content: center; padding: 12px; background: rgba(15, 23, 42, 0.55); }
@media (min-width: 640px) { .iab-backdrop { align-items: center; } }
.iab-sheet { width: 100%; max-width: 28rem; max-height: calc(100dvh - 24px); overflow-y: auto; padding: 20px; border-radius: 16px; background: #fff; color: #1e293b; font-size: 15px; line-height: 1.5; box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25); }
.iab-title { margin: 0 0 8px; font-size: 18px; font-weight: 700; color: #0f172a; }
.iab-text { margin: 0 0 10px; color: #334155; }
.iab-how { margin: 0 0 16px; padding: 10px 12px; border-radius: 10px; background: #eef2ff; color: #312e81; font-size: 14px; }
.iab-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.iab-btn { flex: 1 1 auto; display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 16px; border: 1px solid #cbd5e1; border-radius: 10px; background: #fff; color: #1e293b; font-size: 15px; font-weight: 600; text-decoration: none; cursor: pointer; }
.iab-primary { border-color: #4f46e5; background: #4f46e5; color: #fff; }
.iab-stay { display: block; width: 100%; margin-top: 12px; padding: 8px; border: 0; background: none; color: #475569; font-size: 14px; text-decoration: underline; cursor: pointer; }
html.dark .iab-sheet { background: #1e293b; color: #e2e8f0; }
html.dark .iab-title { color: #fff; }
html.dark .iab-text { color: #cbd5e1; }
html.dark .iab-how { background: rgba(99, 102, 241, 0.2); color: #c7d2fe; }
html.dark .iab-btn { border-color: #475569; background: #0f172a; color: #e2e8f0; }
html.dark .iab-primary { border-color: #4f46e5; background: #4f46e5; color: #fff; }
html.dark .iab-stay { color: #94a3b8; }

/* ------------------------------------- */
/* GLOBAL DARK MODE FIXES                */
/* ------------------------------------- */
html.dark body {
    background-color: #0f172a !important; 
    color: #f8fafc !important; 
}

/* Backgrounds */
html.dark .bg-white:not(#cv-preview) { background-color: #1e293b !important; }
html.dark .bg-slate-50, 
html.dark .bg-slate-100 { background-color: #0f172a !important; }
html.dark .bg-slate-50:hover, 
html.dark .bg-slate-100:hover { background-color: #1e293b !important; }

/* Text Colors */
html.dark .text-slate-800, 
html.dark .text-slate-900 { color: #f8fafc !important; }
html.dark .text-slate-700 { color: #e2e8f0 !important; }
html.dark .text-slate-600,
html.dark .text-slate-500 { color: #cbd5e1 !important; }

/* Borders */
html.dark .border-slate-100,
html.dark .border-slate-200, 
html.dark .border-slate-300 { border-color: #334155 !important; }

/* Inputs & Forms */
html.dark input, 
html.dark textarea, 
html.dark select {
    background-color: #0f172a !important;
    color: #f8fafc !important;
    border-color: #334155 !important;
}
html.dark input::placeholder, 
html.dark textarea::placeholder {
    color: #64748b !important;
}

/* Ara tonlar (sihirbaz adım rozetleri, önizleme araç çubuğu) */
html.dark .bg-slate-200 { background-color: #334155 !important; }
html.dark .bg-slate-200\/90 { background-color: rgba(51, 65, 85, 0.92) !important; }
html.dark .border-slate-300 { border-color: #475569 !important; }
html.dark .bg-indigo-100 { background-color: #312e81 !important; }
html.dark .text-indigo-600 { color: #a5b4fc !important; }
html.dark .bg-indigo-600 .text-indigo-600,
html.dark .bg-white.text-indigo-600 { color: #ffffff !important; }
html.dark .text-emerald-600 { color: #34d399 !important; }

/* Panels */
html.dark .bg-indigo-50 { background-color: #1e293b !important; }
html.dark .border-indigo-100 { border-color: #334155 !important; }
html.dark .text-indigo-900 { color: #818cf8 !important; }
html.dark .text-indigo-700 { color: #a5b4fc !important; }

/* Renkli metinler: koyu tonlar karanlık zeminde açık tona döner (CV kâğıdı hariç). */
html.dark :is(.text-indigo-500, .text-indigo-800, .text-indigo-900\/80):not(#cv-preview *) { color: #a5b4fc !important; }
html.dark :is(.text-emerald-700, .text-emerald-800, .text-emerald-900):not(#cv-preview *) { color: #6ee7b7 !important; }
html.dark :is(.text-green-500, .text-green-600):not(#cv-preview *) { color: #4ade80 !important; }
html.dark :is(.text-green-700, .text-green-800):not(#cv-preview *) { color: #86efac !important; }
html.dark :is(.text-red-500, .text-red-600):not(#cv-preview *) { color: #f87171 !important; }
html.dark :is(.text-red-700, .text-red-800):not(#cv-preview *) { color: #fca5a5 !important; }
html.dark .text-amber-600:not(#cv-preview *) { color: #fbbf24 !important; }
html.dark :is(.text-amber-700, .text-amber-800, .text-amber-900):not(#cv-preview *) { color: #fcd34d !important; }
html.dark .text-blue-600:not(#cv-preview *) { color: #60a5fa !important; }
html.dark :is(.text-blue-700, .text-blue-800):not(#cv-preview *) { color: #93c5fd !important; }
html.dark .text-purple-600:not(#cv-preview *) { color: #c084fc !important; }
html.dark .text-purple-800:not(#cv-preview *) { color: #d8b4fe !important; }
html.dark .text-orange-600:not(#cv-preview *) { color: #fb923c !important; }
html.dark .text-rose-600:not(#cv-preview *) { color: #fb7185 !important; }
html.dark .text-sky-600:not(#cv-preview *) { color: #38bdf8 !important; }

/* Renkli açık kutular (uyarı, sonuç, rozet): aynı rengin koyu, yarı saydam tonu */
html.dark .bg-white\/90 { background-color: rgba(30, 41, 59, 0.92) !important; }
html.dark .bg-indigo-200 { background-color: rgba(99, 102, 241, 0.35) !important; }
html.dark .bg-red-50 { background-color: rgba(239, 68, 68, 0.12) !important; }
html.dark .bg-red-100 { background-color: rgba(239, 68, 68, 0.2) !important; }
html.dark .bg-rose-50 { background-color: rgba(244, 63, 94, 0.12) !important; }
html.dark .bg-rose-100 { background-color: rgba(244, 63, 94, 0.2) !important; }
html.dark .bg-amber-50 { background-color: rgba(245, 158, 11, 0.12) !important; }
html.dark .bg-amber-100 { background-color: rgba(245, 158, 11, 0.2) !important; }
html.dark .bg-emerald-50 { background-color: rgba(16, 185, 129, 0.12) !important; }
html.dark .bg-emerald-100 { background-color: rgba(16, 185, 129, 0.2) !important; }
html.dark .bg-green-50 { background-color: rgba(34, 197, 94, 0.12) !important; }
html.dark .bg-green-100 { background-color: rgba(34, 197, 94, 0.2) !important; }
html.dark .bg-blue-50 { background-color: rgba(59, 130, 246, 0.12) !important; }
html.dark .bg-sky-100 { background-color: rgba(14, 165, 233, 0.2) !important; }
html.dark .bg-purple-100 { background-color: rgba(168, 85, 247, 0.2) !important; }
html.dark :is(.border-red-100, .border-red-200) { border-color: rgba(239, 68, 68, 0.35) !important; }
html.dark :is(.border-amber-100, .border-amber-200) { border-color: rgba(245, 158, 11, 0.35) !important; }
html.dark :is(.border-emerald-100, .border-emerald-200) { border-color: rgba(16, 185, 129, 0.35) !important; }
html.dark .border-green-200 { border-color: rgba(34, 197, 94, 0.35) !important; }
html.dark .border-blue-200 { border-color: rgba(59, 130, 246, 0.35) !important; }
html.dark :is(.border-indigo-200, .border-indigo-300) { border-color: rgba(99, 102, 241, 0.45) !important; }
html.dark :is(.divide-slate-50, .divide-slate-100, .divide-slate-200) > :not([hidden]) ~ :not([hidden]) { border-color: #334155 !important; }

/* Açık gradyanlar (Sihirli İfadeler başlığı, ana sayfa arka plan ışığı) */
html.dark .from-indigo-50 { --tw-gradient-from: #1e1b4b var(--tw-gradient-from-position) !important; }
html.dark .to-white { --tw-gradient-to: #1e293b var(--tw-gradient-to-position) !important; }
html.dark .from-indigo-100 { --tw-gradient-from: rgba(99, 102, 241, 0.3) var(--tw-gradient-from-position) !important; }
html.dark .to-purple-50 { --tw-gradient-to: rgba(168, 85, 247, 0.15) var(--tw-gradient-to-position) !important; }

/* Makale bağlantıları: prose-indigo’nun karanlık tonu (#6366f1) koyu zeminde zayıf kalıyor. */
html.dark .prose { --tw-prose-links: #a5b4fc !important; --tw-prose-invert-links: #a5b4fc !important; }

/* Üzerine gelme ve seçili hâller. :not(#cv-preview *) kâğıdı dışarıda tutar ve .bg-white kuralının önüne geçer. */
html.dark :is(.hover\:bg-slate-50, .hover\:bg-slate-100, .hover\:bg-white):hover:not(#cv-preview *) { background-color: #273449 !important; }
html.dark .hover\:bg-slate-200:hover:not(#cv-preview *) { background-color: #334155 !important; }
html.dark .hover\:bg-indigo-50\/40:hover:not(#cv-preview *) { background-color: rgba(99, 102, 241, 0.18) !important; }
html.dark .hover\:bg-indigo-50:hover:not(#cv-preview *) { background-color: #312e81 !important; } /* mor bant üstündeki beyaz butonlarda da okunur kalsın */
html.dark .hover\:bg-indigo-100:hover:not(#cv-preview *) { background-color: #3730a3 !important; }
html.dark .hover\:bg-red-50:hover:not(#cv-preview *) { background-color: rgba(239, 68, 68, 0.18) !important; }
html.dark .hover\:bg-red-100:hover:not(#cv-preview *) { background-color: rgba(239, 68, 68, 0.28) !important; }
html.dark .hover\:bg-emerald-100:hover:not(#cv-preview *) { background-color: rgba(16, 185, 129, 0.28) !important; }
html.dark .hover\:bg-blue-100:hover:not(#cv-preview *) { background-color: rgba(59, 130, 246, 0.28) !important; }
html.dark .has-\[\:checked\]\:bg-indigo-50:has(:checked),
html.dark .peer:checked ~ .peer-checked\:bg-indigo-50 { background-color: rgba(99, 102, 241, 0.2) !important; }
html.dark .open\:bg-white[open],
html.dark .focus\:bg-white:focus { background-color: #1e293b !important; }
html.dark :is(.hover\:text-indigo-600):hover:not(#cv-preview *),
html.dark .group:hover .group-hover\:text-indigo-600:not(#cv-preview *) { color: #a5b4fc !important; }
html.dark :is(.hover\:text-indigo-700, .hover\:text-indigo-800):hover:not(#cv-preview *) { color: #c7d2fe !important; }
html.dark :is(.hover\:text-slate-600, .hover\:text-slate-700):hover:not(#cv-preview *) { color: #e2e8f0 !important; }
html.dark .hover\:text-slate-900:hover:not(#cv-preview *) { color: #ffffff !important; }
html.dark :is(.hover\:text-red-600, .hover\:text-red-800):hover:not(#cv-preview *) { color: #fca5a5 !important; }
html.dark .hover\:text-emerald-900:hover:not(#cv-preview *) { color: #a7f3d0 !important; }
html.dark .hover\:text-green-800:hover:not(#cv-preview *) { color: #bbf7d0 !important; }
html.dark .hover\:text-purple-800:hover:not(#cv-preview *) { color: #e9d5ff !important; }
html.dark .hover\:text-orange-800:hover:not(#cv-preview *) { color: #fed7aa !important; }
