/* resume-templates.css — resume templates, jade palette */

.template-picker {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.template-btn {
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 8px 16px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    background: var(--card);
    color: var(--text);
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.template-btn.active {
    background: var(--brand);
    color: #fff;
    border-color: var(--brand);
}

.template-btn:hover:not(.active) {
    background: var(--input-bg);
    border-color: var(--border-hover);
}

/* PDF-vs-ATS note box — uses gold accent */
.note-box {
    font-size: 0.88rem;
    line-height: 1.55;
    padding: 12px 16px;
    background: var(--accent-soft);
    border: 1px solid #e8d9b8;
    border-left: 4px solid var(--accent-bright);
    border-radius: 8px;
    margin-bottom: 18px;
    color: #6b5000;
}

.note-box strong {
    color: var(--accent);
}

.note-box a {
    color: var(--accent);
    font-weight: 700;
    text-decoration: none;
}

.note-box a:hover {
    text-decoration: underline;
}

@media (prefers-color-scheme: dark) {
    .note-box {
        background: var(--accent-soft);
        border-color: #4a3f1f;
        border-left-color: var(--accent);
        color: #e0c688;
    }

    .note-box strong {
        color: var(--accent-bright);
    }

    .note-box a {
        color: var(--accent-bright);
    }
}

/* Preview wrapper */
.preview-wrap {
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-bottom: 16px;
    background: #e0ece6;
}

.preview-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--brand-soft);
    border-bottom: 1px solid var(--border);
}

.preview-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--brand-dark);
    margin-right: auto;
}

/* A4 page preview */
.resume-preview {
    width: 100%;
    max-width: 8.27in;
    min-height: 11.69in;
    margin: 20px auto;
    padding: 0.75in;
    box-sizing: border-box;
    background: #ffffff;
    box-shadow: 0 4px 20px rgba(16, 40, 32, 0.12);
    font-size: 11pt;
    line-height: 1.5;
    color: #1c2f28;
}

.placeholder-text {
    color: var(--muted);
    font-style: italic;
    text-align: center;
    margin-top: 120px;
}

/* Section content */
.resume-section-content {
    font-size: 10.5pt;
}

.resume-section-content p {
    margin: 0 0 3px 0;
}

.resume-section-content ul {
    margin: 0 0 6px 0;
    padding-left: 1.3em;
    list-style-type: disc;
}

.resume-section-content ul li {
    margin-bottom: 2px;
}

.resume-section-content strong {
    font-weight: 700;
    color: inherit;
}

/* Template: Classic */
.resume-preview.template-classic {
    font-family: Georgia, "Times New Roman", serif;
}

.template-classic .resume-name {
    font-size: 20pt;
    font-weight: 700;
    margin-bottom: 4px;
    text-align: center;
}

.template-classic .resume-contact {
    text-align: center;
    font-size: 10pt;
    color: #555;
    margin-bottom: 16px;
}

.template-classic .resume-section {
    margin-bottom: 14px;
}

.template-classic .resume-section-heading {
    font-size: 12pt;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid #ccc;
    margin-bottom: 6px;
    padding-bottom: 2px;
}

/* Template: Modern */
.resume-preview.template-modern {
    font-family: Arial, Calibri, Helvetica, sans-serif;
}

.template-modern .resume-name {
    font-size: 22pt;
    font-weight: 700;
    margin-bottom: 4px;
    color: #1c2f28;
}

.template-modern .resume-contact {
    font-size: 10pt;
    color: #666;
    margin-bottom: 16px;
}

.template-modern .resume-section {
    margin-bottom: 12px;
}

.template-modern .resume-section-heading {
    font-size: 11pt;
    font-weight: 700;
    color: #0a7a58;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 4px;
}

/* Template: Compact */
.resume-preview.template-compact {
    font-family: Calibri, Arial, sans-serif;
    font-size: 10.5pt;
    line-height: 1.35;
}

.template-compact .resume-name {
    font-size: 18pt;
    font-weight: 700;
    margin-bottom: 2px;
    text-align: center;
}

.template-compact .resume-contact {
    text-align: center;
    font-size: 9.5pt;
    color: #555;
    margin-bottom: 10px;
}

.template-compact .resume-section {
    margin-bottom: 8px;
}

.template-compact .resume-section-heading {
    font-size: 10.5pt;
    font-weight: 700;
    text-transform: uppercase;
    border-bottom: 1px solid #bbb;
    margin-bottom: 3px;
    padding-bottom: 1px;
}

.template-compact .resume-section-content {
    font-size: 10pt;
}

.template-compact .resume-section-content ul li {
    margin-bottom: 1px;
}

/* Format toolbar (toggle buttons) */
.format-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.format-hint {
    font-size: 0.78rem;
    color: var(--muted);
    margin-right: auto;
}

.format-btn {
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 6px 14px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    background: var(--card);
    color: var(--text);
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.format-btn:hover {
    background: var(--input-bg);
}

.format-btn:active {
    transform: scale(0.98);
}

.format-btn.active {
    background: var(--brand);
    color: #fff;
    border-color: var(--brand);
}

.format-btn strong {
    font-weight: 800;
}

/* Mobile */
@media screen and (max-width: 640px) {
    .resume-preview {
        padding: 24px 20px;
        min-height: auto;
        margin: 12px;
    }
}

/* Print */
@page {
    size: A4;
    margin: 0.75in;
}

@media print {

    html,
    body {
        margin: 0;
        padding: 0;
        background: #fff;
    }

    body * {
        visibility: hidden;
    }

    .resume-preview,
    .resume-preview * {
        visibility: visible;
    }

    .resume-preview {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        min-height: 0;
        padding: 0;
        margin: 0;
        box-shadow: none;
        border: none;
        background: #fff;
    }

    .preview-toolbar,
    .nav,
    .template-picker,
    .field,
    .format-toolbar,
    .footer-note {
        display: none !important;
    }
}

@media (prefers-color-scheme: dark) {
    .preview-wrap {
        background: #0a1210;
    }

    .preview-toolbar {
        background: var(--brand-soft);
    }

    .preview-label {
        color: var(--brand-dark);
    }

    .format-btn {
        background: var(--card);
        color: var(--text);
        border-color: var(--border);
    }

    .format-btn:hover {
        background: var(--input-bg);
    }

    .format-btn.active {
        background: var(--brand);
        color: #fff;
    }

    .template-btn {
        background: var(--card);
        color: var(--text);
        border-color: var(--border);
    }

    .template-btn:hover:not(.active) {
        background: var(--input-bg);
    }
}

/* Subheadings (project titles, job titles) in the preview */
.resume-preview .resume-subheading {
    font-weight: 700;
    font-size: 1.02em;
    margin: 0.9em 0 0.35em;
    color: inherit;
}

.resume-preview .resume-subheading:first-child {
    margin-top: 0.2em;
}