/**
 * Scholarships4IS Resume Builder - Standalone Stylesheet
 * File: public/Website/css/resume-builder.css
 * Clean Academic & Professional ATS Harvard Format with Live Vector Preview & PDF Export
 */

:root {
    --sc-primary: #0284c7;
    --sc-primary-hover: #0369a1;
    --sc-primary-dark: #075985;
    --sc-primary-light: #f0f9ff;
    --sc-primary-border: #bae6fd;

    --sc-navy: #0b192c;
    --sc-navy-dark: #070f2b;
    --sc-slate: #1e293b;
    --sc-text-dark: #0f172a;
    --sc-text-muted: #64748b;
    --sc-bg-page: #f8fafc;
    --sc-border: #e2e8f0;
    --sc-radius-lg: 16px;
    --sc-radius-md: 10px;
}

#scholarships4isCvApp {
    font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--sc-text-dark);
    line-height: 1.6;
    max-width: 1320px;
    margin: 0 auto;
    padding: 20px 16px 50px;
    direction: ltr;
    text-align: left;
}

#scholarships4isCvApp * {
    box-sizing: border-box;
}

/* ══════════════════════════════════════════════════════════════════════════
   1) Top Header Banner - Scholarships4IS Brand
   ══════════════════════════════════════════════════════════════════════════ */
.sc-cv-header {
    background: linear-gradient(135deg, #070f2b 0%, #0b192c 50%, #0284c7 100%);
    color: #ffffff;
    border-radius: var(--sc-radius-lg);
    padding: 24px 30px;
    margin-bottom: 24px;
    box-shadow: 0 12px 28px -6px rgba(11, 25, 44, 0.35);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.sc-cv-header__meta {
    max-width: 720px;
}

.sc-cv-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 10px;
    letter-spacing: 0.02em;
}

.sc-cv-header__title {
    margin: 0 0 6px 0;
    font-size: 26px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.sc-cv-header__title span {
    color: #38bdf8;
}

.sc-cv-header__desc {
    margin: 0;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.55;
}

.sc-cv-header__trust {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    font-size: 12px;
    color: #94a3b8;
}

.sc-cv-header__trust-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #e2e8f0;
    font-weight: 600;
}

.sc-cv-header__trust-item i {
    color: #10b981;
}

/* ══════════════════════════════════════════════════════════════════════════
   2) Two-Column Workspace Layout (Form + Sticky Paper Preview)
   ══════════════════════════════════════════════════════════════════════════ */
.sc-cv-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(440px, 0.95fr);
    gap: 28px;
    align-items: start;
}

@media (max-width: 1024px) {
    .sc-cv-grid {
        grid-template-columns: 1fr;
    }
}

/* ══════════════════════════════════════════════════════════════════════════
   3) Form Column & Accordion Cards
   ══════════════════════════════════════════════════════════════════════════ */
.sc-cv-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sc-cv-card {
    background: #ffffff;
    border: 1px solid var(--sc-border);
    border-radius: var(--sc-radius-lg);
    box-shadow: 0 2px 6px -1px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.sc-cv-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.08);
}

.sc-cv-card[open] {
    border-color: #93c5fd;
    box-shadow: 0 6px 16px -3px rgba(2, 132, 199, 0.12);
}

.sc-cv-summary {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: #ffffff;
    cursor: pointer;
    user-select: none;
    font-weight: 700;
    font-size: 15px;
    color: var(--sc-text-dark);
    transition: background 0.2s;
    list-style: none;
}

.sc-cv-summary::-webkit-details-marker {
    display: none;
}

.sc-cv-summary:hover {
    background: #f8fafc;
}

.sc-cv-summary__num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background: var(--sc-primary-light);
    color: var(--sc-primary);
    font-size: 13px;
    font-weight: 800;
    border: 1px solid var(--sc-primary-border);
    flex-shrink: 0;
}

.sc-cv-summary__title {
    flex-grow: 1;
}

.sc-cv-summary__ch {
    color: #94a3b8;
    font-size: 12px;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.sc-cv-card[open] .sc-cv-summary__ch {
    transform: rotate(90deg);
    color: var(--sc-primary);
}

.sc-cv-body {
    padding: 18px 20px 22px;
    border-top: 1px solid #f1f5f9;
    background: #ffffff;
}

/* Form Fields */
.sc-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px 16px;
}

@media (max-width: 600px) {
    .sc-form-grid {
        grid-template-columns: 1fr;
    }
}

.sc-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.sc-form-col-full {
    grid-column: 1 / -1;
}

.sc-field label {
    font-size: 12.5px;
    font-weight: 600;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 4px;
}

.sc-field-req {
    color: #ef4444;
}

.sc-field-hint {
    font-size: 11px;
    color: #64748b;
    margin-top: 2px;
}

.sc-input,
.sc-textarea {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 9px 12px;
    font-size: 13px;
    color: #0f172a;
    background: #ffffff;
    font-family: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.sc-input:focus,
.sc-textarea:focus {
    outline: none;
    border-color: var(--sc-primary);
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.sc-textarea {
    resize: vertical;
    line-height: 1.5;
}

.sc-checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    font-weight: 500;
    color: #334155;
    cursor: pointer;
    margin-top: 10px;
    user-select: none;
}

.sc-checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--sc-primary);
    cursor: pointer;
}

/* Photo Upload Box */
.sc-photo-box {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: var(--sc-radius-md);
    padding: 14px 16px;
    margin-bottom: 18px;
}

.sc-photo-preview {
    width: 62px;
    height: 62px;
    border-radius: 12px;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 24px;
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.sc-photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    image-rendering: auto;
}

.sc-photo-info {
    flex-grow: 1;
}

.sc-photo-title {
    margin: 0 0 3px 0;
    font-size: 13.5px;
    font-weight: 700;
    color: #1e293b;
}

.sc-photo-desc {
    margin: 0;
    font-size: 11.5px;
    color: #64748b;
    line-height: 1.4;
}

.sc-photo-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* Repeaters (Edu, Exp, Courses) */
.sc-repeater-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 14px;
}

.sc-item-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: var(--sc-radius-md);
    padding: 14px 16px 16px;
    position: relative;
    transition: border-color 0.2s;
}

.sc-item-card:hover {
    border-color: #cbd5e1;
}

.sc-item-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e2e8f0;
}

.sc-item-card__title {
    font-size: 13px;
    font-weight: 700;
    color: #334155;
    text-transform: capitalize;
}

.sc-item-card__tools {
    display: flex;
    align-items: center;
    gap: 4px;
}

.sc-btn-icon {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #475569;
    border-radius: 6px;
    width: 26px;
    height: 26px;
    font-size: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.sc-btn-icon:hover:not(:disabled) {
    background: #f1f5f9;
    color: #0f172a;
    border-color: #94a3b8;
}

.sc-btn-icon:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.sc-btn-icon.is-delete {
    color: #ef4444;
    border-color: #fecaca;
    background: #fef2f2;
}

.sc-btn-icon.is-delete:hover {
    background: #ef4444;
    color: #ffffff;
    border-color: #ef4444;
}

.sc-btn-add {
    width: 100%;
    background: #f8fafc;
    border: 1px dashed #0284c7;
    color: #0284c7;
    border-radius: var(--sc-radius-md);
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.sc-btn-add:hover {
    background: var(--sc-primary-light);
    color: #0369a1;
    border-color: #0369a1;
}

/* ══════════════════════════════════════════════════════════════════════════
   4) Bottom Controls Bar (Actions & Backup)
   ══════════════════════════════════════════════════════════════════════════ */
.sc-controls-bar {
    background: #ffffff;
    border: 1px solid var(--sc-border);
    border-radius: var(--sc-radius-lg);
    padding: 14px 18px;
    box-shadow: 0 2px 6px -1px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.sc-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    color: #334155;
    border-radius: 8px;
    padding: 7px 14px;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    user-select: none;
    text-decoration: none;
}

.sc-btn:hover {
    background: #f1f5f9;
    color: #0f172a;
    border-color: #94a3b8;
}

.sc-status-pill {
    margin-left: auto;
    font-size: 11.5px;
    font-weight: 600;
    color: #10b981;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

@media (max-width: 600px) {
    .sc-status-pill {
        width: 100%;
        margin-left: 0;
        margin-top: 4px;
    }
}

/* ══════════════════════════════════════════════════════════════════════════
   5) Side Column (Sticky Live Preview + Download Action)
   ══════════════════════════════════════════════════════════════════════════ */
.sc-cv-side {
    position: sticky;
    top: 80px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

@media (max-width: 1024px) {
    .sc-cv-side {
        position: static;
    }
}

.sc-action-bar {
    background: #ffffff;
    border: 1px solid var(--sc-border);
    border-radius: var(--sc-radius-lg);
    padding: 16px 20px;
    box-shadow: 0 2px 8px -2px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sc-btn-download {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #ffffff !important;
    border: none;
    border-radius: 10px;
    padding: 13px 20px;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: -0.01em;
    cursor: pointer;
    box-shadow: 0 6px 16px -2px rgba(2, 132, 199, 0.4);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.15s, box-shadow 0.15s, filter 0.15s;
    width: 100%;
}

.sc-btn-download:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px -3px rgba(2, 132, 199, 0.5);
    filter: brightness(1.05);
}

.sc-btn-download:active {
    transform: translateY(0);
}

.sc-action-tip {
    margin: 0;
    font-size: 11.5px;
    color: #64748b;
    text-align: center;
    line-height: 1.4;
}

/* ══════════════════════════════════════════════════════════════════════════
   6) Stage Scaler & Preview Container
   ══════════════════════════════════════════════════════════════════════════ */
.sc-preview-stage {
    position: relative;
    background: #e2e8f0;
    border: 1px solid #cbd5e1;
    border-radius: var(--sc-radius-lg);
    overflow: hidden;
    min-height: 500px;
    display: flex;
    justify-content: center;
    padding: 12px;
}

.sc-preview-scaler {
    transform-origin: top center;
    transition: transform 0.15s ease-out;
}

/* ══════════════════════════════════════════════════════════════════════════
   7) Exact ATS Paper Format (Harvard / Single-Column Typography)
   ══════════════════════════════════════════════════════════════════════════ */
.paper {
    width: 794px; /* Standard A4 at 96 DPI */
    min-height: 1123px;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    padding: 42px 48px;
    color: #111827;
    font-family: 'Times New Roman', Times, 'Liberation Serif', serif;
    font-size: 10.5pt;
    line-height: 1.35;
    direction: ltr;
    text-align: left;
    box-sizing: border-box;
}

/* Header */
.paper .pp-hdr {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.paper .pp-hdr-main {
    flex-grow: 1;
}

.paper .pp-hdr-photo {
    flex-shrink: 0;
}

.paper .pp-photo {
    width: 82px;
    height: 82px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid #111827;
    image-rendering: auto;
    filter: none !important;
    -webkit-filter: none !important;
}

.paper .pp-name {
    margin: 0 0 4px 0;
    font-size: 19pt;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-align: center;
    color: #000000;
    font-family: inherit;
    line-height: 1.15;
}

.paper .pp-hdr .pp-name {
    text-align: left;
}

.paper .pp-contact {
    font-size: 9.5pt;
    color: #1f2937;
    text-align: center;
    margin: 3px 0 2px 0;
    line-height: 1.35;
}

.paper .pp-hdr .pp-contact {
    text-align: left;
}

.paper .pp-contact a {
    color: #111827;
    text-decoration: none;
}

.paper .pp-contact .sep {
    margin: 0 6px;
    color: #6b7280;
    font-weight: normal;
}

.paper .pp-head {
    font-size: 11.5pt;
    font-weight: 700;
    color: #111827;
    text-align: center;
    margin: 4px 0 0 0;
    font-family: inherit;
}

.paper .pp-hdr .pp-head {
    text-align: left;
}

.paper .pp-rule {
    border-bottom: 2.5px solid #111827;
    margin: 10px 0 14px 0;
}

/* Sections */
.paper .pp-sec {
    margin-bottom: 12px;
}

.paper .pp-sec h3 {
    margin: 0 0 6px 0;
    font-size: 11pt;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    border-bottom: 1px solid #111827;
    padding-bottom: 2px;
    color: #000000;
    font-family: inherit;
}

.paper .pp-sum {
    margin: 0;
    font-size: 10pt;
    text-align: justify;
    line-height: 1.4;
    color: #111827;
}

/* Entries */
.paper .pp-ent {
    margin-bottom: 8px;
    page-break-inside: avoid;
}

.paper .pp-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 10.5pt;
    font-weight: 700;
    color: #000000;
    margin-bottom: 2px;
}

.paper .pp-row .d {
    font-weight: normal;
    font-size: 9.5pt;
    color: #374151;
    white-space: nowrap;
    padding-left: 8px;
}

.paper .pp-sub {
    font-size: 10pt;
    font-weight: 700;
    color: #1f2937;
    margin: 2px 0 1px 0;
}

/* Lists */
.paper ul {
    margin: 2px 0 4px 0;
    padding-left: 18px;
    list-style-type: disc;
}

.paper ul li {
    font-size: 10pt;
    color: #1f2937;
    margin-bottom: 2px;
    line-height: 1.35;
}

.paper ul.pp-lines {
    list-style-type: disc;
}

.paper ul.pp-dot {
    list-style-type: disc;
}

.paper ul li .note {
    font-size: 9.5pt;
    color: #4b5563;
    margin-top: 1px;
    margin-left: 8px;
}

/* ══════════════════════════════════════════════════════════════════════════
   8) Dedicated Print Container & Engine (#scholarships4isCvPrint)
   ══════════════════════════════════════════════════════════════════════════ */
#scholarships4isCvPrint {
    display: none;
}

@media print {
    /* Hide everything on page */
    html, body {
        background: #ffffff !important;
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        height: auto !important;
        font-family: 'Times New Roman', Times, serif !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    body * {
        visibility: hidden !important;
    }

    header, footer, nav, .admin-bar, .sc-cv-header, .sc-cv-form, .sc-action-bar, .sc-preview-stage {
        display: none !important;
    }

    /* Reveal only the dedicated print container */
    #scholarships4isCvPrint,
    #scholarships4isCvPrint * {
        visibility: visible !important;
    }

    #scholarships4isCvPrint {
        display: block !important;
        position: absolute !important;
        left: 0 !important;
        top: 0 !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #ffffff !important;
    }

    #scholarships4isCvPrint .paper {
        width: 100% !important;
        min-height: auto !important;
        box-shadow: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    #scholarships4isCvPrint .pp-photo {
        filter: none !important;
        -webkit-filter: none !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    @page {
        size: A4 portrait;
        margin: 12mm 15mm;
    }
}
