/* ==========================================================
   sadeceis.com - Özel Stiller ve ATS CV Önizleme Tasarımı
   ========================================================== */

/* A4 Kağıt Simülasyonu */
.cv-paper {
    width: 210mm;
    min-height: 297mm;
    padding: 16mm 18mm;
    margin: 0 auto;
    background: #ffffff;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
    transition: all 0.2s ease-in-out;
    position: relative;
    color: #1e293b;
    font-size: 10pt;
    line-height: 1.5;
}

@media (max-width: 1024px) {
    .cv-paper {
        width: 100%;
        min-height: auto;
        padding: 18px;
    }
}

/* ATS Standardı Tipografi */
.cv-paper h1, .cv-paper h2, .cv-paper h3, .cv-paper h4 {
    color: #0f172a;
    letter-spacing: -0.01em;
}

.cv-section-title {
    font-size: 11pt;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding-bottom: 4px;
    margin-bottom: 10px;
    border-bottom: 1.5px solid #cbd5e1;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Yazdırma (Baskı & Vektör PDF İndirme) Stilleri - ATS ve Çoklu Sayfa için Kusursuz */
@media print {
    /* Yazdırılırken gizlenecek tüm arayüz bileşenleri */
    header,
    footer,
    nav,
    aside,
    .no-print,
    .print\:hidden,
    .cv-controls,
    .ad-container,
    .top-announcement,
    #editorColumn,
    #downloadModal,
    button,
    #atsStandardNotice,
    #previewColumn > div:not(.cv-preview-scroll-wrapper),
    #previewColumn > .no-print,
    #previewColumn > div.no-print {
        display: none !important;
        visibility: hidden !important;
        height: 0 !important;
        width: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        opacity: 0 !important;
        overflow: hidden !important;
        border: none !important;
    }

    /* Sayfa kökünü sıfırla */
    html, body {
        background: #ffffff !important;
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        height: auto !important;
        min-height: 100% !important;
        color: #0f172a !important;
        overflow: visible !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        display: block !important;
    }

    /* Grid ve flex sınırlayıcılarını kaldır (sayfa kesmesini engellememesi için) */
    main,
    .max-w-7xl,
    .grid,
    #previewColumn {
        display: block !important;
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
        position: static !important;
        border: none !important;
        box-shadow: none !important;
        background: transparent !important;
        overflow: visible !important;
        max-height: none !important;
        height: auto !important;
    }

    /* Yalnızca önizleme taşıyıcı kutusunu göster (gri arka plan, border, scroll ve 85vh sıfırla) */
    .cv-preview-scroll-wrapper {
        display: block !important;
        width: 100% !important;
        max-width: none !important;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        margin: 0 !important;
        max-height: none !important;
        height: auto !important;
        overflow: visible !important;
        border-radius: 0 !important;
    }

    #cvPreviewContainer {
        display: block !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        background: transparent !important;
    }

    /* A4 Kağıt Düzeni: Yazdırma esnasında kağıt kenar boşlukları @page tarafından yönetilir */
    .cv-paper {
        width: 100% !important;
        max-width: 100% !important;
        min-height: auto !important;
        height: auto !important;
        margin: 0 !important;
        padding: 0 !important;
        box-shadow: none !important;
        border: none !important;
        background: #ffffff !important;
        box-sizing: border-box !important;
        overflow: visible !important;
    }

    /* Çoklu Sayfa (Multi-Page) Akışı ve ATS Blok Güvenliği */
    .cv-section {
        break-inside: auto !important;
        page-break-inside: auto !important;
        margin-bottom: 14px !important;
    }

    .cv-entry {
        break-inside: avoid !important;
        page-break-inside: avoid !important;
        margin-bottom: 10px !important;
    }

    .cv-entry p,
    .cv-entry ul,
    .cv-entry li {
        break-inside: avoid !important;
        page-break-inside: avoid !important;
    }

    .cv-section-title {
        break-after: avoid !important;
        page-break-after: avoid !important;
        break-inside: avoid !important;
        page-break-inside: avoid !important;
        margin-top: 8px !important;
        margin-bottom: 8px !important;
    }

    /* A4 Sayfa Boyutu ve Sayfa Kenar Boşlukları (1. sayfa, 2. sayfa ve tüm sayfalarda eşit üst, alt ve yan boşluk) */
    @page {
        size: A4 portrait;
        margin: 14mm 16mm 14mm 16mm;
    }
}

/* JavaScript Yazdırma Tetikleyicisi Sırasında Gizlenecekler */
body.is-printing-cv header,
body.is-printing-cv footer,
body.is-printing-cv nav,
body.is-printing-cv aside,
body.is-printing-cv .no-print,
body.is-printing-cv #atsStandardNotice,
body.is-printing-cv #editorColumn,
body.is-printing-cv #downloadModal,
body.is-printing-cv #previewColumn > div:not(.cv-preview-scroll-wrapper) {
    display: none !important;
    visibility: hidden !important;
}

/* Şablon Temaları */
/* 1. Klasik ATS: Güvenli, geleneksel, saf serif/sans-serif, Harvard & Stanford kurumsal stili */
.theme-classic {
    font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
}
.theme-classic .cv-name {
    font-size: 19pt;
    font-weight: 700;
    text-align: center;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}
.theme-classic .cv-contact-bar {
    text-align: center;
    font-size: 9pt;
    color: #475569;
    margin-bottom: 14px;
}
.theme-classic .cv-section-title {
    border-bottom: 1.5px solid #0f172a;
    color: #0f172a;
    font-weight: 700;
    letter-spacing: 0.08em;
}

/* 2. Modern ATS: Zarif renk vurgusu, sol çizgi belirteçleri */
.theme-modern {
    font-family: "Plus Jakarta Sans", system-ui, sans-serif;
}
.theme-modern .cv-section-title {
    border-bottom: 2px solid var(--theme-color, #2563eb);
    color: var(--theme-color, #2563eb);
    letter-spacing: 0.04em;
}

/* 3. Minimal ATS: Sade, net, gereksiz hiçbir süsü olmayan saf yapı */
.theme-minimal {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.45;
}
.theme-minimal .cv-section-title {
    border-bottom: 1px solid #cbd5e1;
    color: #334155;
    font-weight: 700;
    letter-spacing: 0.02em;
}

/* 4. Yönetici ATS (Executive): Serif fontlar, çift çizgi, saygın ve tecrübeli profil tasarımı */
.theme-executive {
    font-family: "Merriweather", Georgia, serif;
    line-height: 1.55;
}
.theme-executive .cv-name {
    font-size: 21pt;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #0f172a;
}
.theme-executive .cv-section-title {
    border-bottom: 3px double var(--theme-color, #1e293b);
    color: var(--theme-color, #1e293b);
    font-family: "Merriweather", Georgia, serif;
    font-weight: 700;
    letter-spacing: 0.04em;
}

/* 5. Teknik ATS (Technical): Yazılımcılar ve mühendisler için kod vurgulu, net düzen */
.theme-technical {
    font-family: "Plus Jakarta Sans", system-ui, sans-serif;
}
.theme-technical .cv-name {
    font-size: 20pt;
    font-weight: 800;
    letter-spacing: -0.02em;
}
.theme-technical .cv-section-title {
    border-bottom: 2px solid #e2e8f0;
    color: var(--theme-color, #2563eb);
    font-family: "Roboto Mono", monospace;
    font-size: 10pt;
    letter-spacing: 0.05em;
}
.theme-technical .cv-section-title::before {
    content: "// ";
    color: #94a3b8;
    font-weight: 400;
}

/* 6. Akademik ATS (Academic): Bilim insanları, hukuk ve eğitimciler için zarif hiyerarşi */
.theme-academic {
    font-family: "Merriweather", Georgia, serif;
}
.theme-academic .cv-name {
    font-size: 20pt;
    font-weight: 700;
    text-align: center;
    letter-spacing: 0.02em;
}
.theme-academic .cv-section-title {
    text-align: center;
    border-top: 1px solid #cbd5e1;
    border-bottom: 1px solid #cbd5e1;
    padding: 3px 0;
    color: #1e293b;
    font-weight: 700;
    letter-spacing: 0.12em;
    justify-content: center;
}

/* Form Giriş Elemanları */
.form-input-custom {
    width: 100%;
    border-radius: 0.5rem;
    border: 1px solid #cbd5e1;
    padding: 0.55rem 0.85rem;
    font-size: 0.875rem;
    transition: all 0.15s ease-in-out;
    background-color: #ffffff;
}
.form-input-custom:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
    outline: none;
}

/* ATS Skor Göstergesi */
.score-circle {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
