/*
 * Blush template — warm centered layout, tinted page background, tinted
 * section bands. Shared by browser (edit) and mPDF (pdf). No flexbox, no
 * CSS grid: floats / tables / block layout only, so the two renderers agree.
 */

/* ---- page margins (multi-page) ---------------------------------------- *
 * PdfService gives mPDF margin_* = 0, so a PDF's only vertical margin is
 * this wrapper's own padding — and a wrapper's padding-top lands on page 1
 * alone, leaving every later page hard against the sheet edge.
 *
 * @page restores an identical margin on every page; `@page :first` zeroes
 * the top one so page 1 keeps using the wrapper padding it always had and
 * its output is unchanged. Left/right stay 0 — the wrapper's horizontal
 * padding already applies to every page. Inert in the browser (@page is
 * print-only), and builder.js reads these same values back out of CSSOM
 * so its page-count model matches what mPDF actually does. */
/* The rose tint is a full-SHEET wash, not a sidebar band, so it is a plain
   background-color rather than a PNG. It has to live on @page: a background on
   .resume-page paints only behind the flowed block, so on page 2 it stopped
   where the content ended and left the remainder white. Same pattern as
   cobalt/lin/azur.
   Unlike the band templates, the wrapper below KEEPS its background: it is the
   identical colour, so it cannot mask anything (the band templates had to drop
   theirs because a white wrapper painted over a coloured band), and the
   browser canvas needs it since @page is print-only. */
@page {
    margin: 44px 0 50px 0;
    background-color: #fdf6f6;
}
@page :first {
    margin-top: 0;
}

.resume-page.resume-blush {
    width: 794px;               /* A4 @ 96dpi -> fills A4 width in mPDF */
    box-sizing: border-box;
    /* No min-height. It existed to make the wrapper's own background fill one
       full sheet when content was short; the @page background-color above does
       that for every sheet now, and a fixed height on a multipage wrapper pads
       page 2 with blank space or clips a short resume (skill §7). */
    padding: 44px 60px 50px;
    background: #fdf6f6;
    color: #2a2020;
    font-family: 'DejaVu Serif', Georgia, "Times New Roman", Times, serif;
    font-size: 14px;
    line-height: 1.45;
}

/* mPDF does NOT inherit font-family/size into table cells — anything inside
   a <td> silently falls back to the serif document default (in-td trap class,
   2026-07 slate rework). This template's row/column/band layout uses tables,
   so the font must be declared at td level too. No-op in the browser. */
.resume-blush td {
    font-family: 'DejaVu Serif', Georgia, "Times New Roman", Times, serif;
    font-size: 14px;
    line-height: 1.45;
    color: #2a2020;
}


/* ---- header (centered) ------------------------------------------------ */
.cv-header {
    text-align: center;
    margin-bottom: 22px;
}
.cv-photo-wrap {
    margin-bottom: 12px;
}
.cv-photo,
.cv-photo-initials {
    margin: 0 auto;
}
.cv-name-line {
    margin: 0;
    font-weight: normal;
}
.cv-name {
    font-size: 28px;
    font-weight: bold;
    letter-spacing: 0.3px;
}
.cv-jobtitle {
    font-size: 17px;
    font-style: italic;
    margin-left: 10px;
}
.cv-contact {
    margin-top: 10px;
    font-size: 12.5px;
    color: #4a3d3d;
}
.cv-contact-item {
    white-space: nowrap;
}
.cv-contact-sep {
    color: #b98d97;
    margin: 0 7px;
}
.cv-icon {
    display: inline-block;
    margin-right: 3px;
}
.cv-icon.cv-icon-linkedin {
    display: inline-block;
    width: 12px;
    height: 12px;
    line-height: 12px;
    font-size: 8px;
    font-weight: bold;
    color: #fff;
    text-align: center;
    border-radius: 2px;
    margin-right: 3px;
}

/* ---- section band (full-width, bleeds past body padding) -------------- */
.cv-section {
    margin-bottom: 16px;
}
.cv-section-title {
    box-sizing: border-box;
    width: 100%;
    margin: 0 -60px 12px;
    padding: 7px 60px;
    background: #f8e3e7;
    font-family: 'DejaVu Serif', Georgia, "Times New Roman", Times, serif;
    font-size: 15px;
    font-weight: bold;
    text-align: center;
    letter-spacing: 0.5px;
}
.cv-body-inner {
    padding: 0 2px;
}
.cv-summary {
    text-align: left;
}

/* ---- items -------------------------------------------------------------- */
/* Keep-together (skill §7): without page-break-inside:avoid mPDF splits an
   entry's title away from its bullets across a page boundary. */
.cv-item {
    position: relative;
    margin-bottom: 12px;
    page-break-inside: avoid;
}
/* Heading + its FIRST entry move as one block (mPDF ignores
   page-break-after:avoid on a heading alone).
   DELIBERATELY NOT applied to the skills / languages / certifications
   sections: those contain floats (.cv-lang-cell float:left, .cv-lang-level
   and .cv-item-side float:right), and a float inside a
   page-break-inside:avoid block makes mPDF miscalculate the block height and
   paint duplicated, overlapping content (skill §5). Wrapping whole sections
   here produced exactly that — the Languages band and its rows rendered on
   top of an experience entry at the head of page 4 AND again further down.
   The narrow head+first-entry wrappers below contain no floats and are safe. */
.cv-section-head-group {
    page-break-inside: avoid;
}
.cv-item:last-child {
    margin-bottom: 0;
}

/* Two-column "title left / dates+location right" via table (mPDF-safe). */
.cv-row {
    width: 100%;
    border-collapse: collapse;
}
.cv-row td {
    vertical-align: top;
    padding: 0;
}
.cv-row-main {
    text-align: left;
}
.resume-blush .cv-row-side {
    text-align: right;
    white-space: nowrap;
    width: 40%;
    color: #4a3d3d;
    font-size: 12.5px;
}
.cv-item-title {
    font-weight: bold;
}
.cv-item-org {
    font-style: italic;
    color: #4a3d3d;
}
.cv-item-sep {
    color: #4a3d3d;
    font-style: normal;
}
.cv-item-loc {
    font-style: italic;
}
.cv-dates {
    font-weight: bold;
}
.cv-sep-bar {
    margin: 0 6px;
    color: #c9a8b0;
}
.cv-item-details {
    margin-top: 3px;
}

/* Bullets */
.cv-bullets {
    margin: 5px 0 0;
    padding-left: 20px;
}
.cv-bullets li {
    margin-bottom: 2px;
    position: relative;
}

/* Skills / certifications */
.cv-skills-line {
    line-height: 1.6;
}
.cv-inline-item {
    position: relative;
    margin-bottom: 3px;
    page-break-inside: avoid;
}
.cv-item-side {
    float: right;
    width: 120px;
    text-align: right;
    color: #4a3d3d;
    font-size: 12.5px;
}
.cv-muted {
    color: #8a7676;
}

/* Skill/language level dots (tpl_dots) */
.cv-level {
    font-size: 10px;
    letter-spacing: 1px;
    margin-left: 4px;
}
.cv-dot-on {
    color: #9d174d;
}
.cv-dot-off {
    color: #e5c9ce;
}

.cv-taglist {
    line-height: 2;
}
.cv-tag {
    display: inline-block;
    margin: 0 6px 4px 0;
    padding: 2px 6px;
    background: #f8e3e7;
    border-radius: 3px;
}

/* ---- languages: two-column grid, name left / dots right --------------- */
.cv-lang-grid {
    overflow: hidden;
}
.cv-lang-cell {
    position: relative;
    float: left;
    width: 50%;
    box-sizing: border-box;
    padding: 3px 14px 3px 0;
}
.cv-lang-level {
    float: right;
    width: 60px;
    text-align: right;
    font-size: 10px;
    letter-spacing: 1px;
}

/* =====================================================================
 * Edit-mode affordances (browser only — these elements are never
 * emitted in pdf mode, so none of this reaches mPDF).
 * ===================================================================== */

/* contenteditable placeholders */
[contenteditable][data-ph]:empty:before {
    content: attr(data-ph);
    color: #c9a3aa;
    font-style: italic;
    pointer-events: none;
}
[contenteditable] {
    outline: none;
    border-radius: 2px;
    transition: box-shadow 0.12s ease, background 0.12s ease;
}
[contenteditable]:hover {
    box-shadow: 0 0 0 1px #f0cdd4;
}
[contenteditable]:focus {
    box-shadow: 0 0 0 2px #9d174d;
    background: #fdf1f3;
}
.cv-contact [contenteditable] {
    display: inline-block;
    min-width: 40px;
}

/* add / remove / reorder controls */
.edit-controls {
    position: absolute;
    top: -2px;
    right: -44px;
    opacity: 0;
    transition: opacity 0.12s ease;
    white-space: nowrap;
    z-index: 5;
}
.edit-controls--inline {
    position: absolute;
    left: -26px;
    right: auto;
    top: 0;
}
.cv-item:hover > .edit-controls,
.cv-inline-item:hover > .edit-controls,
.cv-lang-cell:hover > .edit-controls,
.cv-bullets li:hover > .edit-controls,
.edit-controls:hover {
    opacity: 1;
}
.edit-controls button {
    font-family: inherit;
    font-size: 13px;
    line-height: 1;
    width: 20px;
    height: 20px;
    margin-left: 2px;
    padding: 0;
    border: 1px solid #ccc;
    background: #fff;
    color: #444;
    border-radius: 3px;
    cursor: pointer;
}
.edit-controls button:hover {
    background: #9d174d;
    border-color: #9d174d;
    color: #fff;
}

.cv-add {
    font-family: inherit;
    font-size: 12.5px;
    margin-top: 6px;
    padding: 4px 10px;
    border: 1px dashed #dba7b3;
    background: #fff;
    color: #9d174d;
    border-radius: 4px;
    cursor: pointer;
}
.cv-add:hover {
    background: #fdf1f3;
    border-color: #9d174d;
}
.cv-add--sm {
    font-size: 11.5px;
    padding: 2px 8px;
}

.cv-current {
    display: block;
    font-family: inherit;
    font-size: 11px;
    font-weight: normal;
    color: #8a7676;
    margin-top: 2px;
    white-space: nowrap;
    cursor: pointer;
}
.cv-current input {
    vertical-align: middle;
}

.cv-tag {
    position: relative;
}
.cv-tag-x {
    font-family: inherit;
    border: none;
    background: none;
    color: #b00;
    cursor: pointer;
    padding: 0 0 0 4px;
    opacity: 0;
    font-size: 13px;
}
.cv-tag:hover .cv-tag-x {
    opacity: 1;
}

.cv-dot-btn {
    font-family: inherit;
    font-size: 10px;
    line-height: 1;
    width: 12px;
    height: 12px;
    padding: 0;
    margin: 0 1px;
    border: none;
    background: none;
    cursor: pointer;
}
.cv-level-toggle {
    font-family: inherit;
    font-size: 9px;
    line-height: 1;
    padding: 1px 3px;
    margin-left: 3px;
    border: 1px solid #ccc;
    background: #fff;
    color: #777;
    border-radius: 2px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.12s ease;
}
.cv-tag:hover .cv-level-toggle,
.cv-inline-item:hover .cv-level-toggle,
.cv-lang-cell:hover .cv-level-toggle {
    opacity: 1;
}
.cv-level-text {
    display: inline-block;
    min-width: 20px;
}
