/* =========================================================================
   BASIS-SCHRIFTARTEN & ALLGEMEINES STYLING
   ========================================================================= */
body {
    font-family: 'Inter', sans-serif;
}

.font-serif-cv {
    font-family: 'Merriweather', serif;
}

.font-elegant {
    font-family: 'Playfair Display', serif;
}

.font-tech {
    font-family: 'Space Grotesk', sans-serif;
}

.font-signature {
    font-family: 'Caveat', cursive;
}

/* Dezentere Scrollbalken im Editor */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* =========================================================================
   DIN-A4 SEITEN (LEBENSLAUF & ANSCHREIBEN)
   ========================================================================= */
.a4-page {
    width: 210mm;
    min-height: 297mm;
    background: #ffffff;
    box-shadow: 0 12px 35px rgba(15, 23, 42, 0.18);
    margin: 0 auto;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

/* Abstand & Seitenumbruch für Bewerbungsmappe (Anschreiben + Lebenslauf) */
.a4-bundle-container {
    display: flex;
    flex-direction: column;
    gap: 28px;
    align-items: center;
}

.a4-page-break {
    page-break-after: always;
    break-after: page;
}

/* =========================================================================
   DASHBOARD LIVE-MINI-VORSCHAU (SKALIERUNG AUF KARTENGRÖSSE)
   ========================================================================= */
.mini-cv-viewport {
    width: 100%;
    height: 235px;
    overflow: hidden;
    position: relative;
    background: #f1f5f9;
    display: flex;
    justify-content: center;
}

.mini-cv-scale {
    width: 210mm;
    min-height: 297mm;
    transform: scale(0.24);
    transform-origin: top center;
    pointer-events: none;
    user-select: none;
    background: #ffffff;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
    flex-shrink: 0;
}

/* =========================================================================
   FOTO-AUSSCHNITT-STUDIO (PAN, ZOOM & SHAPES)
   ========================================================================= */
.cv-photo-frame {
    overflow: hidden;
    position: relative;
    display: inline-block;
    flex-shrink: 0;
    background: #e2e8f0;
}

.cv-photo-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform-origin: center center;
    pointer-events: none;
    user-select: none;
}

/* =========================================================================
   INTERAKTIVES CLICK-TO-EDIT IN DER LIVE-VORSCHAU
   ========================================================================= */
.cv-clickable {
    cursor: pointer;
    transition: all 0.15s ease;
    border-radius: 6px;
    position: relative;
}

.cv-clickable:hover {
    outline: 2px dashed rgba(37, 99, 235, 0.6);
    outline-offset: 3px;
    background-color: rgba(37, 99, 235, 0.04);
}

/* =========================================================================
   PERFEKTER DIN-A4 PDF-DRUCK (EINZELN & KOMPLETTE BEWERBUNGSMAPPE)
   ========================================================================= */
@media print {
    @page {
        size: A4 portrait;
        margin: 0;
    }

    html, body {
        background: #ffffff !important;
        margin: 0 !important;
        padding: 0 !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .no-print {
        display: none !important;
    }

    #preview-wrapper,
    #app-preview-wrapper {
        padding: 0 !important;
        margin: 0 !important;
        overflow: visible !important;
        width: 100% !important;
        height: auto !important;
        max-height: none !important;
        background: transparent !important;
        display: block !important;
    }

    .a4-bundle-container {
        display: block !important;
        gap: 0 !important;
    }

    .a4-page {
        box-shadow: none !important;
        margin: 0 !important;
        width: 210mm !important;
        min-height: 297mm !important;
        overflow: hidden !important;
    }

    .cv-clickable:hover {
        background-color: transparent !important;
        outline: none !important;
    }
}