/* 
  ============================================
  RAZ CV Maker Styles (Enhanced Wizard)
  Versi: 1.1.0
  Dibuat oleh: RAZ Creative Studio
  ============================================ 
*/

:root {
    --raz-gold: #ffcc00;
    --raz-dark: #1a1a1a;
    --raz-light: #ffffff;

    /* CV Dynamic Variables */
    --cv-primary: #333333;
    --cv-accent: #ffcc00;
    --cv-text: #333333;
    --cv-bg: #ffffff;
    --cv-sidebar-bg: #f8f9fa;
    --cv-font: 'Inter', sans-serif;
    --cv-padding: 40px;
    --cv-spacing: 25px;
}

#cv-preview-container {
    background: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    width: 210mm;
    min-height: 297mm;
    margin: 0 auto;
    position: relative;
    color: var(--cv-text);
    font-family: var(--cv-font);
    overflow: visible;
    /* Mengizinkan konten mengalir ke halaman berikutnya */
    display: flex;
    flex-direction: column;
}

/* Aturan Page Break untuk multi-halaman */
.cv-section {
    page-break-inside: avoid;
    /* Hindari pemotongan section di tengah-tengah */
    break-inside: avoid;
}

.cv-header {
    page-break-after: avoid;
    /* Header tidak boleh terputus dari konten di bawahnya */
    break-after: avoid;
}

.section-title {
    page-break-after: avoid;
    /* Judul section tidak boleh terputus dari isinya */
    break-after: avoid;
}

/* WIZARD UI */
.wizard-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s;
    opacity: 0.5;
    position: relative;
    min-width: 100px;
}

.wizard-step.active {
    opacity: 1;
}

.wizard-step .marker {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #262626;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    margin-bottom: 4px;
    border: 2px solid #333;
    transition: all 0.3s;
    color: #888;
}

.wizard-step.active .marker {
    background: var(--raz-gold);
    color: black;
    border-color: var(--raz-gold);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
}

.wizard-step.completed .marker {
    background: #4ade80;
    color: black;
    border-color: #4ade80;
}

.wizard-step .label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #666;
}

.wizard-step.active .label {
    color: var(--raz-gold);
}

.wizard-line {
    flex-grow: 1;
    height: 1px;
    background: #333;
    margin-top: -28px;
}

/* PANELS */
.wizard-panel {
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* FILTER TABS */
.filter-tab {
    padding: 8px 16px;
    border-radius: 99px;
    font-size: 12px;
    font-weight: 600;
    background: #1a1a1a;
    border: 1px solid #333;
    color: #888;
    transition: all 0.2s;
}

.filter-tab:hover {
    border-color: #555;
    color: #ccc;
}

.filter-tab.active {
    background: var(--raz-gold);
    color: black;
    border-color: var(--raz-gold);
}

/* EDITOR UI */
.cv-input {
    width: 100%;
    background: #262626;
    border: 1px solid #3d3d3d;
    border-radius: 0.75rem;
    padding: 0.875rem 1rem;
    color: white;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.cv-input:focus {
    outline: none;
    border-color: var(--raz-gold);
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.2);
}

.group-box {
    background: #0d0d0d;
    border: 1px solid #222;
    padding: 24px;
    border-radius: 16px;
}

.group-title {
    color: var(--raz-gold);
    font-weight: 800;
    font-size: 1.125rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

/* TEMPLATE GALLERY */
.template-card {
    background: #1a1a1a;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    aspect-ratio: 1 / 1.41;
}

.template-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    border-color: #333;
}

.template-card.active {
    border-color: var(--raz-gold);
    box-shadow: 0 0 25px rgba(212, 175, 55, 0.3);
}

.template-thumb-preview {
    width: 100%;
    height: 100%;
    background: white;
    pointer-events: none;
    overflow: hidden;
    position: relative;
    border-bottom: 1px solid #eee;
}

.live-thumb-container {
    width: 1000px;
    /* Base width for scaling */
    height: 1414px;
    /* A4 aspect ratio */
    position: absolute;
    top: 0;
    left: 0;
    transform-origin: top left;
    background: white;
    color: black;
}

.variation-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--raz-gold);
    color: black;
    font-size: 8px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.template-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
    padding: 12px;
    text-align: center;
}

.template-name {
    font-size: 12px;
    font-weight: 800;
    color: white;
}

.template-cat {
    font-size: 10px;
    color: var(--raz-gold);
    font-weight: 600;
}

/* --- CV PREVIEW CORE --- */
#cv-paper-container {
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
}

#cv-preview-content {
    font-family: 'Inter', sans-serif;
    line-height: 1.5;
    background: white;
    color: black;
    min-height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
}

/* --- ARSITEKTUR LAYOUT TEMPLATE (DIVERSE) --- */

/* --- CONSOLIDATED ARCHETYPES --- */

/* 1. MODERN */
.T-Modern {
    padding: var(--cv-padding);
}

.T-Modern .cv-header {
    margin-bottom: 40px;
    border-left: 10px solid var(--cv-accent);
    padding-left: 20px;
}

.T-Modern .cv-body {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
}

.T-Modern .section-title {
    font-weight: 900;
    letter-spacing: -1px;
    color: var(--cv-primary);
    border-bottom: 4px solid var(--cv-accent);
    display: inline-block;
    padding-bottom: 5px;
}

/* 2. CLASSIC */
.T-Classic {
    padding: 60px;
    text-align: center;
}

.T-Classic .cv-header {
    border-bottom: 1px solid #ddd;
    padding-bottom: 30px;
    margin-bottom: 40px;
}

.T-Classic .section-title {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    border: none;
    font-size: 1.4rem;
    color: var(--cv-primary);
}

.T-Classic .section-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 1px;
    background: #ccc;
    margin: 10px auto;
}

/* 3. CREATIVE */
.T-Creative {
    display: grid !important;
    grid-template-columns: 280px 1fr !important;
    min-height: 100% !important;
    flex: 1;
    /* Stretch in flex container */
    align-items: stretch;
}

.T-Creative .cv-sidebar {
    background: var(--cv-sidebar-bg, #1a1a1a);
    padding: 40px 30px;
    color: var(--cv-text, #fff);
    height: 100%;
}

.T-Creative .cv-main {
    padding: 50px 40px;
    background: var(--cv-bg, #fff);
    height: 100%;
}

.T-Creative .section-title {
    border-left: 4px solid var(--cv-accent);
    padding-left: 15px;
    color: var(--cv-primary);
    font-weight: 800;
}

/* 4. MINIMALIST */
.T-Minimalist {
    padding: 80px;
}

.T-Minimalist .cv-header {
    margin-bottom: 60px;
}

.T-Minimalist .section-title {
    text-transform: uppercase;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 3px;
    color: #999;
    border: none;
}


/* 5. PROFESSIONAL (Boxed Headers) */
.T-Professional {
    padding: 0;
}

.T-Professional .cv-header {
    background: var(--cv-primary);
    color: white;
    padding: 50px;
}

.T-Professional .cv-body {
    padding: 40px;
}

.T-Professional .section-title {
    background: #f0f0f0;
    padding: 10px 20px;
    border: none;
    font-weight: 700;
    border-radius: 4px;
    color: var(--cv-primary);
}

/* --- NEW VARIATION SYSTEM --- */

/* Variations for Modern */
.V-A {
    --cv-padding: 40px;
}

.V-B {
    --cv-padding: 20px;
    border: 15px solid var(--cv-accent);
}

.V-C {
    --cv-padding: 60px;
    background: #fffcf5;
}

.V-D {
    --cv-padding: 40px;
    border-top: 30px solid var(--cv-primary);
}

.V-E {
    --cv-padding: 50px;
    background: linear-gradient(to bottom, #f8f9fa 200px, #ffffff 200px);
}

/* Variations for Creative Photo */
.V-Photo-A {
    --cv-sidebar-bg: #1a1a1a;
    --cv-text: #fff;
}

.V-Photo-B {
    --cv-sidebar-bg: #ececec;
    --cv-text: #333;
    grid-template-columns: 1fr 35%;
}

/* Photo Modern Variations */
.V-A.T-Photo-Modern {
    --cv-sidebar-bg: #fff;
}

.V-B.T-Photo-Modern {
    background: #fdfdfd;
    border-top: 20px solid var(--cv-primary);
}

.V-C.T-Photo-Modern .modern-header-photo {
    border-radius: 50%;
}

.V-D.T-Photo-Modern .cv-header {
    background: var(--cv-primary);
    color: white;
    border-bottom: none;
}

/* Photo Split Variations */
.V-E.T-Photo-Split .cv-split-side {
    background: linear-gradient(135deg, #1a1a1a, #333);
}

.V-F.T-Photo-Split .cv-split-side {
    background: var(--cv-primary);
}

.V-G.T-Photo-Split {
    flex-direction: row-reverse;
}

/* Photo on right */
.V-H.T-Photo-Split .cv-split-side img {
    border: 15px solid white;
    margin: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Photo Float Variations */
.V-I.T-Photo-Float .cv-header-float {
    background: var(--cv-accent);
    height: 250px;
}

.V-J.T-Photo-Float .floating-photo {
    right: auto;
    left: 60px;
}

.V-K.T-Photo-Float .cv-header-float {
    background: #000;
    color: #fff;
}

.V-L.T-Photo-Float .floating-photo {
    border-radius: 8px;
    transform: rotate(-3deg);
}

/* Photo Right Variations */
.V-M.T-Photo-Right .cv-sidebar {
    background: var(--cv-primary);
    color: #fff;
    border-left: none;
}

.V-N.T-Photo-Right {
    grid-template-columns: 1fr 320px;
}

.V-O.T-Photo-Right .profile-photo {
    border-radius: 4px;
    border-color: var(--cv-accent);
}

.V-P.T-Photo-Right .section-title {
    border-bottom: 2px solid var(--cv-accent);
}

/* ATS Customizations */
.V-ATS-A {
    max-width: 800px;
    margin: 0 auto;
    padding: 50px;
    font-size: 11pt;
}

.V-ATS-B {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px;
    border: 1px solid #000;
}

/* 6. ATS (Optimized for Parsing) */
.T-ATS {
    padding: 50px;
    line-height: 1.4;
    color: #000;
}

.T-ATS .cv-header {
    border-bottom: 2px solid #000;
    margin-bottom: 25px;
    padding-bottom: 10px;
}

.T-ATS .section-title {
    border: none;
    font-size: 1.1rem;
    text-decoration: underline;
    margin-top: 20px;
    color: #000;
}

.T-ATS .entry-item {
    margin-bottom: 15px;
}

/* 7. PHOTO-BASED ARCHETYPES (DIVERSIFIED) */

/* A. MODERN TOP (Horizontal Header) */
.T-Photo-Modern {
    display: block !important;
    min-height: 100% !important;
}

.T-Photo-Modern .modern-header-photo {
    width: 180px;
    height: 180px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 10px 10px 0 var(--cv-accent);
}

/* B. SPLIT (Vertical 50/50 look) */
.T-Photo-Split {
    display: block !important;
    min-height: 100% !important;
}

.T-Photo-Split .cv-split-side {
    background: #111;
    color: #fff;
    min-height: 100%;
}

/* C. FLOAT (Overlapping elements) */
.T-Photo-Float {
    display: block !important;
    min-height: 100% !important;
}

.T-Photo-Float .floating-photo {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 8px solid white;
    position: absolute;
    bottom: -70px;
    right: 60px;
    z-index: 10;
}

/* D. RIGHT SIDEBAR */
.T-Photo-Right {
    display: block !important;
    min-height: 100% !important;
}

.T-Photo-Right .cv-sidebar {
    border-left: 1px solid #eee;
    background: #f9f9f9;
    padding: 40px 30px;
}

/* ORIGINAL PHOTO STYLE (Sidebar Left) */
.T-Photo {
    display: grid !important;
    grid-template-columns: 280px 1fr !important;
    min-height: 100% !important;
    flex: 1;
    align-items: stretch;
}

.T-Photo .cv-sidebar {
    background: #2c3e50;
    color: white;
    padding: 40px 30px;
    height: 100%;
}

.T-Photo .profile-photo {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.2);
    object-fit: cover;
    margin: 0 auto 30px;
    display: block;
    background: #444;
}

.T-Photo .cv-main {
    padding: 50px 40px;
}

.T-Photo .section-title {
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 20px;
    font-weight: 800;
}

/* VARIATIONS (ATS focused) */
.V-ATS-Classic {
    font-family: 'Times New Roman', serif;
}

.V-ATS-Modern {
    font-family: 'Arial', sans-serif;
}

/* VARIATIONS (Photo focused) */
.V-Photo-Circle .profile-photo {
    border-radius: 50%;
}

.V-Photo-Square .profile-photo {
    border-radius: 12px;
}

.V-Photo-Sidebar .cv-sidebar {
    background: #1a1a1a;
}

/* 8. IT & DEV (Dark, Grid-based, Monospace accents) */
.T-IT {
    padding: 40px;
    background: #fafafa;
    font-family: 'Inter', sans-serif;
}

.T-IT .cv-header {
    background: #1a1a1a;
    color: white;
    padding: 40px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.T-IT .section-title {
    color: #2563eb;
    font-family: monospace;
    font-weight: 800;
    border-left: 4px solid #2563eb;
    padding-left: 15px;
    margin-top: 30px;
}

/* 9. MEDICAL & HEALTH (Clean, Blue/Green accents, Trustworthy) */
.T-Medical {
    padding: 40px;
    border: 15px solid #f0fdf4;
}

.T-Medical .cv-header {
    border-bottom: 3px solid #166534;
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.T-Medical .section-title {
    color: #166534;
    text-transform: uppercase;
    letter-spacing: 2px;
    border: none;
    margin-top: 30px;
}

/* 10. EDUCATION (Structured, Classic, Warm tones) */
.T-Education {
    padding: 50px;
    background: #fffcf5;
}

.T-Education .cv-header {
    border: 2px solid #92400e;
    padding: 30px;
    margin-bottom: 40px;
    position: relative;
}

.T-Education .section-title {
    color: #92400e;
    border-bottom: 1px solid #92400e;
    margin-top: 25px;
}


.T-Professional .cv-header {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
    background: #f8f9fa;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 40px;
}

.T-Professional .section-title {
    background: #333;
    color: white;
    padding: 6px 15px;
    border: none;
    border-radius: 4px;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

/* --- MASSIVE VARIATION MATRIX --- */

/* Basic Resets for Variations */
[class*="V-"] .section-title {
    border-color: var(--cv-accent) !important;
    color: var(--cv-primary) !important;
}

/* Variations A: Modern Standard */
.V-A {
    --cv-padding: 40px;
}

.V-A .section-title {
    border-bottom: 2px solid var(--cv-accent);
}

/* Variations B: Boxed Professional */
.V-B {
    --cv-padding: 30px;
    border: 8px solid var(--cv-accent);
}

.V-B .section-title {
    background: var(--cv-primary);
    color: white !important;
    padding: 8px 15px;
    border-radius: 4px;
    border: none !important;
}

.V-B .entry-item {
    border-left: 4px solid var(--cv-accent);
    padding-left: 20px;
}

/* Variations C: Minimalist Line */
.V-C {
    --cv-padding: 60px;
}

.V-C .section-title {
    border: none !important;
    position: relative;
    padding-bottom: 12px;
    font-weight: 300;
}

.V-C .section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--cv-accent);
}

/* Variations D: Bold Gradient / High Impact */
.V-D {
    --cv-padding: 40px;
    border-top: 25px solid var(--cv-primary);
}

.V-D .section-title {
    background: linear-gradient(90deg, var(--cv-accent), transparent);
    padding: 5px 12px;
    border: none !important;
    color: black !important;
}

/* Variations E: Industrial / Technical */
.V-E {
    --cv-padding: 45px;
    background: #fafafa;
}

.V-E .entry-header {
    border-bottom: 1px dotted #ccc;
    padding-bottom: 5px;
}

.V-E .entry-year {
    background: var(--cv-accent);
    color: black;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.7rem;
}

/* Variations F: Icon-centric Sidebar (For Creative) */
.V-F .cv-sidebar {
    text-align: center;
}

.V-F .section-title {
    text-align: center;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.V-F .skill-bar-outer {
    height: 12px;
    border-radius: 0;
}

/* Variations G: Soft & Rounded */
.V-G {
    --cv-padding: 50px;
    border-radius: 40px;
    overflow: hidden;
}

.V-G .section-title {
    border: 2px solid var(--cv-accent);
    border-radius: 30px;
    padding: 5px 20px;
    width: fit-content;
}

/* Variations H: Dark Header / Contrast */
.V-H .cv-header {
    background: var(--cv-primary);
    color: white !important;
    padding: 40px;
    margin: -40px -40px 40px -40px;
}

.V-H .cv-header * {
    color: white !important;
}

/* Variations I: Double Stripe Layout */
.V-I .section-title {
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    padding: 10px 0;
    text-align: center;
}

/* Variations J: Vertical Accent Stripe */
.V-J {
    border-left: 30px solid var(--cv-accent);
}

.V-J .section-title {
    padding-left: 10px;
    border-left: 5px solid var(--cv-primary);
}

/* INDUSTRY SPECIFIC TWEAKS */
.T-IT {
    --cv-font: 'Inter', sans-serif;
    --cv-accent: #3b82f6;
}

.T-Medical {
    --cv-font: 'Roboto', sans-serif;
    --cv-accent: #10b981;
}

.T-Education {
    --cv-font: 'Playfair Display', serif;
    --cv-accent: #92400e;
}

/* Special Gold on Dark */

/* GENERAL RENDERING CLASSES */
.entry-item {
    margin-bottom: 25px;
}

.entry-header {
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    font-size: 1.05rem;
}

.entry-subheader {
    color: #555;
    font-style: italic;
    font-size: 0.9rem;
    margin-bottom: 6px;
}

.entry-year {
    font-size: 0.85rem;
    color: #888;
    font-weight: 600;
}

.entry-desc {
    font-size: 0.9rem;
    color: #444;
    white-space: pre-line;
    line-height: 1.6;
}

/* Skills Bar */
.skill-item {
    margin-bottom: 12px;
}

.skill-label {
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 4px;
    display: block;
}

.skill-bar-outer {
    height: 6px;
    background: #eee;
    border-radius: 10px;
    overflow: hidden;
    width: 100%;
}

.skill-bar-inner {
    height: 100%;
    background: var(--raz-gold);
    border-radius: 10px;
}

/* --- CUSTOMIZER INTERACTIVE STYLES --- */
.selectable-item {
    transition: all 0.2s ease;
    outline: 2px solid transparent;
}

.selectable-item:hover {
    outline: 2px dashed var(--raz-gold);
    cursor: crosshair;
    background: rgba(212, 175, 55, 0.05);
}

.raz-selected {
    outline: 2px solid var(--raz-gold) !important;
    background: rgba(212, 175, 55, 0.1) !important;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.3) !important;
}

#customizer-preview-wrapper {
    background: #e0e0e0;
    padding: 60px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    overflow-y: auto;
    max-height: 85vh;
}

#cv-preview-content-7 {
    background: white;
    width: 210mm;
    min-height: 297mm;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.custom-scrollbar::-webkit-scrollbar {
    width: 5px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #0d0d0d;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: var(--raz-gold);
}

/* NO PRINT & PRINT OPTIMIZATION */
@media print {

    /* Hide UI Elements */
    header,
    footer,
    .wizard-step,
    .wizard-line,
    .lg:col-span-4,
    .filter-tab,
    button,
    hr,
    .no-print,
    #publish-modal {
        display: none !important;
    }

    /* Reset Body and Container for Print */
    body {
        background: white !important;
        margin: 0 !important;
        padding: 0 !important;
        color: black;
    }

    /* Force background colors to print */
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    /* Isolate Preview Container */
    #cv-preview-container {
        position: relative !important;
        /* Bukan fixed, agar bisa multi-halaman */
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        box-shadow: none !important;
        border: none !important;
        overflow: visible !important;
    }

    /* Hide everything except the preview container and its children */
    body>*:not(.mt-20) {
        display: none !important;
    }

    .mt-20 {
        margin-top: 0 !important;
        padding: 0 !important;
        max-width: none !important;
    }

    #panel-step-6 {
        display: block !important;
        padding: 0 !important;
    }

    .lg:col-span-8 {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .bg-white.rounded-lg.shadow-2xl {
        box-shadow: none !important;
        border-radius: 0 !important;
        width: 100% !important;
        max-width: none !important;
    }
}