/* ============================================================
   Gerador de curriculo do Jobvi (assets/js/jobvi/gerador.js)

   Reproduz o componente "GeradorCurriculo" do prototipo
   jobvi.me. Classes com prefixo jvg-. No fim, o CSS de
   impressao que gera o PDF so com o documento.
   ============================================================ */

.jvg {
    position: relative;
    min-height: 640px;
    border: 0;
    box-shadow: var(--jv-shadow);
    border-radius: 20px;
    padding: 32px 32px 40px;
    background: var(--jv-paper);
    font-family: var(--jv-sans);
    color: var(--jv-ink);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.jvg *,
.jvg *::before,
.jvg *::after {
    box-sizing: border-box;
}

.jvg :where(p, h2, h3, ul) {
    margin: 0;
    padding: 0;
}

.jvg button {
    font-family: var(--jv-sans);
    color: var(--jv-ink);
    cursor: pointer;
}

.jvg button:disabled {
    opacity: 0.45;
    cursor: default;
}

.jvg :focus-visible {
    outline: 2px solid var(--jv-ink);
    outline-offset: 2px;
}

.jvg-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.jvg-noscript {
    font-size: 15px;
    color: var(--jv-text);
}

/* ---------- Cabecalho ---------- */

.jvg-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}

.jvg-back,
.jvg-close {
    flex: none;
    width: 36px;
    height: 36px;
    border: 0;
    box-shadow: var(--jv-shadow-sm);
    border-radius: 50%;
    background: #fff;
    font: 600 15px/1 var(--jv-sans);
}

.jvg-head__sub {
    font: 600 11px/1 var(--jv-mono);
    letter-spacing: 0.05em;
    color: #4b5563;
}

.jvg-head__title {
    margin-top: 2px;
    font: 700 22px/1.2 var(--jv-sans);
    letter-spacing: -0.01em;
    color: var(--jv-ink);
}

.jvg-head__title:focus {
    outline: none;
}

/* ---------- Passos ---------- */

.jvg-progress {
    display: flex;
    gap: 5px;
    max-width: 720px;
    margin-bottom: 16px;
}

.jvg-progress span {
    flex: 1;
    height: 4px;
    border-radius: 2px;
    background: rgba(17, 24, 39, 0.12);
}

.jvg-progress span.is-on {
    background: var(--jv-ink);
}

.jvg-wizard {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
    align-items: start;
}

.jvg-saved {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 12.5px;
    color: #4b5563;
}

.jvg-saved span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #059669;
}

.jvg-stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.jvg-stack--sm {
    gap: 9px;
    margin-bottom: 14px;
}

.jvg-two {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.jvg-field {
    display: block;
}

.jvg-label {
    display: block;
    margin-bottom: 8px;
    font: 600 14px/1.3 var(--jv-sans);
    color: var(--jv-ink);
}

.jvg-input {
    display: block;
    width: 100%;
    border: 1.5px solid transparent;
    border-radius: 12px;
    padding: 14px 16px;
    background: #f3f4f6;
    font: 400 16px/1.4 var(--jv-sans);
    color: var(--jv-ink);
}

.jvg-input:focus {
    border-color: var(--jv-ink);
    background: #fff;
    outline: none;
}

.jvg-input--sm {
    border-color: transparent;
    border-radius: 10px;
    padding: 11px 13px;
    font-size: 13.5px;
}

.jvg-textarea {
    min-height: 120px;
    margin-bottom: 18px;
    padding: 14px;
    font-size: 14px;
    line-height: 1.55;
    resize: vertical;
}

.jvg-help {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.4;
    color: #4b5563;
}

.jvg-help.is-erro {
    color: #b91c1c;
}

.jvg-help--gap {
    margin-top: 16px;
    font-size: 12.5px;
}

.jvg-foto {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.jvg-foto__slot {
    display: flex;
    flex: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    width: 80px;
    height: 100px;
    overflow: hidden;
    border: 1px dashed rgba(17, 24, 39, 0.3);
    border-radius: 10px;
    background: #e9e9eb;
    font-size: 13px;
    color: #4b5563;
    cursor: pointer;
}

.jvg-foto__slot:focus-within {
    outline: 2px solid var(--jv-ink);
    outline-offset: 2px;
}

.jvg-foto__slot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.jvg-foto__nota {
    font-size: 11.5px;
    line-height: 1.5;
    color: #4b5563;
}

.jvg-link-erro {
    border: none;
    padding: 0;
    background: none;
    font: 600 12px var(--jv-mono) !important;
    color: #b91c1c !important;
}

.jvg-sugestao {
    border: 0;
    box-shadow: var(--jv-shadow-sm);
    border-radius: 12px;
    padding: 13px 15px;
    background: #fff;
    font-size: 13px !important;
    line-height: 1.5;
    text-align: left;
    color: #374151 !important;
    transition: box-shadow 0.2s ease;
}

.jvg-sugestao:hover,
.jvg-dashed:hover,
.jvg-chip:hover,
.jvg-btn:hover:not(:disabled) {
    border-color: var(--jv-ink);
    box-shadow: var(--jv-shadow-hover-sm);
}

.jvg-lista {
    margin-bottom: 14px;
}

.jvg-item {
    display: flex;
    align-items: center;
    gap: 12px;
    border: 0;
    box-shadow: var(--jv-shadow);
    border-radius: 14px;
    padding: 14px 16px;
    background: #fff;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.jvg-item__txt {
    flex: 1;
    min-width: 0;
}

.jvg-item__txt strong {
    display: block;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.3;
}

.jvg-item__txt span {
    display: block;
    font-size: 12.5px;
    line-height: 1.4;
    color: #4b5563;
}

.jvg-box {
    display: flex;
    flex-direction: column;
    gap: 9px;
    border: 0;
    box-shadow: var(--jv-shadow);
    border-radius: 14px;
    padding: 16px;
    background: #fff;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.jvg-soft {
    border-radius: 10px;
    padding: 12px;
    background: #fafafa;
}

.jvg-soft .jvg-label {
    margin-bottom: 8px;
}

.jvg-soft__q {
    margin-bottom: 8px !important;
    font-weight: 600;
    font-size: 12.5px;
    line-height: 1.4;
}

.jvg-add {
    display: block;
    border: none;
    padding: 3px 0;
    background: none;
    font-size: 12.5px !important;
    line-height: 1.5;
    text-align: left;
    color: #374151 !important;
}

.jvg-add:hover {
    color: var(--jv-ink) !important;
}

.jvg-row {
    display: flex;
    gap: 8px;
}

.jvg-row .jvg-input {
    flex: 1;
}

.jvg-nav {
    margin-top: 24px;
}

.jvg-btn {
    border: 0;
    box-shadow: var(--jv-shadow-sm);
    border-radius: 12px;
    padding: 13px 20px;
    background: #fff;
    font-weight: 600;
    font-size: 13.5px;
    transition: box-shadow 0.2s ease;
}

.jvg-btn--dark {
    border-color: var(--jv-ink);
    background: var(--jv-ink);
    color: #fff !important;
    font-weight: 700;
}

.jvg-btn--dark:hover:not(:disabled) {
    background: #374151;
}

.jvg-btn--sm {
    border-radius: 10px;
    padding: 11px 16px;
    font-size: 13px;
}

.jvg-btn--grow {
    flex: 1;
}

.jvg-btn--block {
    display: block;
    width: 100%;
}

.jvg-dashed {
    width: 100%;
    border: 1px dashed rgba(17, 24, 39, 0.24);
    border-radius: 14px;
    padding: 14px;
    background: none;
    font-weight: 600;
    font-size: 13.5px;
    color: #374151 !important;
}

.jvg-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.jvg-chips--scroll {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    margin-bottom: 16px;
}

.jvg-chip {
    display: flex;
    flex: none;
    align-items: baseline;
    gap: 7px;
    border: 0;
    box-shadow: var(--jv-shadow-sm);
    border-radius: 999px;
    padding: 8px 14px;
    background: #fff;
    font-weight: 500;
    font-size: 12.5px;
    color: #374151 !important;
    transition: box-shadow 0.2s ease;
}

.jvg-chip b {
    font: 700 9.5px var(--jv-mono);
}

.jvg-chip.is-on {
    border-color: var(--jv-ink);
    background: var(--jv-ink);
    color: #fff !important;
}

/* ---------- Lista de cidades (combobox do campo Cidade) ---------- */

.jvg-combo {
    position: relative;
}

.jvg-combo__list {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    z-index: 30;
    max-height: 280px;
    overflow-y: auto;
    margin: 6px 0 0 !important;
    border: 0;
    border-radius: 12px;
    padding: 6px !important;
    background: #fff;
    box-shadow: var(--jv-shadow-lg);
    list-style: none;
}

.jvg-combo__list[hidden] {
    display: none;
}

.jvg-combo__opt {
    border-radius: 8px;
    padding: 9px 10px;
    font: 400 14px/1.3 var(--jv-sans);
    color: var(--jv-ink);
    cursor: pointer;
}

.jvg-combo__opt:hover,
.jvg-combo__opt.is-active {
    background: #f1efea;
}

/* ---------- Previa ao vivo ---------- */

.jvg-side {
    position: sticky;
    top: 88px;
}

.jvg-mini {
    min-height: 400px;
    border-radius: 6px;
    padding: 24px;
    background: #fff;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    margin-bottom: 12px;
}

.jvg-mini__nome {
    font: 700 18px/1.2 var(--jv-sans);
    margin-bottom: 3px;
}

.jvg-mini__cargo {
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 12px;
    line-height: 1.3;
    color: #374151;
}

.jvg-mini__contato {
    margin-bottom: 14px;
    font-size: 9.5px;
    line-height: 1.5;
    color: #4b5563;
    overflow-wrap: anywhere;
}

.jvg-mini__rule {
    height: 1px;
    margin-bottom: 14px;
    background: rgba(17, 24, 39, 0.14);
}

.jvg-mini__sec {
    margin-bottom: 6px;
    font: 600 9px/1 var(--jv-sans);
    letter-spacing: 0.1em;
    color: #4b5563;
}

.jvg-mini__txt {
    margin-bottom: 16px;
    font-size: 11.5px;
    line-height: 1.55;
    color: #374151;
}

.jvg-mini__exp {
    margin-bottom: 8px;
}

.jvg-mini__exp strong {
    display: block;
    font-weight: 600;
    font-size: 11.5px;
    line-height: 1.3;
}

.jvg-mini__exp span {
    display: block;
    font-size: 10px;
    color: #4b5563;
}

/* ---------- Revisao (documento completo) ---------- */

.jvg-config {
    margin-bottom: 16px;
}

.jvg-config .jvg-label {
    margin-bottom: 10px;
}

.jvg-config .jvg-help {
    margin-bottom: 20px;
    font-size: 12.5px;
}

.jvg-review {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 24px;
    align-items: start;
}

.jvg-paper {
    min-width: 0;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    overflow: hidden;
}

.jvg-panel {
    margin-bottom: 14px;
    border: 0;
    box-shadow: var(--jv-shadow);
    border-radius: 16px;
    padding: 18px;
    background: #fff;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.jvg-panel .jvg-label {
    margin-bottom: 12px;
}

.jvg-review .jvg-stack--sm {
    gap: 8px;
}

.jvg-rule {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid rgba(17, 24, 39, 0.08);
    padding: 8px 0;
    font-size: 12px;
}

.jvg-rule span {
    color: #4b5563;
}

.jvg-rule strong {
    font-weight: 600;
    text-align: right;
}

.jvg-tool {
    display: block;
    border: none;
    padding: 8px 0;
    background: none;
    font-weight: 600;
    font-size: 13px;
    text-align: left;
}

.jvg-tool:hover {
    color: #374151 !important;
}

.jvg .jvg-app {
    display: block;
    border-radius: 16px;
    padding: 16px;
    background: var(--jv-ink);
    color: #fff;
}

.jvg-app strong {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 13px;
    line-height: 1.3;
}

.jvg-app span {
    display: block;
    margin-bottom: 10px;
    font-size: 12px;
    line-height: 1.5;
    color: #9fc0d8;
}

.jvg-app em {
    font-style: normal;
    font-weight: 600;
    font-size: 12px;
    text-decoration: underline;
}

/* O documento em si (tela e PDF). */
.jvg-doc {
    padding: 36px;
    color: #374151;
}

.jvg-doc__head {
    display: flex;
    align-items: center;
    gap: 18px;
    margin: 0 0 8px;
}

.jvg-doc__head--faixa {
    margin: -36px -36px 22px;
    padding: 30px 36px;
}

.jvg-doc__head h2 {
    margin: 0;
    font-weight: 700;
    font-size: 27px;
    line-height: 1.15;
    letter-spacing: -0.01em;
}

.jvg-doc__cargo {
    margin-top: 4px !important;
    font: 500 13px/1.3 var(--jv-sans);
}

.jvg-doc__foto {
    flex: none;
    width: 72px;
    height: 90px;
    border-radius: 6px;
    object-fit: cover;
}

.jvg-doc__contato {
    margin-bottom: 20px !important;
    font: 400 11px/1.5 var(--jv-sans);
    color: #4b5563;
}

.jvg-doc__head--faixa + .jvg-doc__contato {
    margin-top: -8px !important;
}

.jvg-doc__sec {
    margin-bottom: 18px;
    break-inside: avoid;
}

.jvg-doc__sec h3 {
    margin: 0 0 10px;
    border-bottom: 1px solid rgba(17, 24, 39, 0.14);
    padding-bottom: 7px;
    font: 600 10px/1 var(--jv-sans);
    letter-spacing: 0.11em;
}

.jvg-doc__sec p,
.jvg-doc__item {
    font: 400 12.5px/1.6 var(--jv-sans);
    color: #374151;
}

.jvg-doc__item + .jvg-doc__item {
    margin-top: 10px;
}

.jvg-doc__item strong {
    display: block;
    font-weight: 600;
    color: var(--jv-ink);
}

.jvg-doc__when {
    display: block;
    font-size: 11px;
    color: #4b5563;
}

.jvg-doc__item p {
    margin-top: 3px;
}

.jvg-doc__vazio {
    color: #9ca3af !important;
    font-style: italic;
}

.jvg-doc--compacto {
    padding: 26px;
}

.jvg-doc--compacto .jvg-doc__sec {
    margin-bottom: 12px;
}

.jvg-doc--compacto .jvg-doc__sec p,
.jvg-doc--compacto .jvg-doc__item {
    font-size: 11.5px;
    line-height: 1.45;
}

.jvg-doc__sign {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    margin-top: 28px;
    font-size: 11.5px;
}

.jvg-doc__line {
    width: 180px;
    border-bottom: 1px solid #374151;
}

.jvg-doc__closing {
    margin-top: 20px !important;
    font-size: 11.5px;
    font-style: italic;
}

.jvg-doc__marca {
    margin-top: 28px !important;
    font: 500 9px/1 var(--jv-sans);
    letter-spacing: 0.06em;
    color: #9ca3af;
    text-align: center;
}

/* ---------- Ferramentas ---------- */

.jvg-ats {
    max-width: 640px;
}

.jvg-ats__score {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 20px !important;
    font-size: 12.5px;
    color: #4b5563;
}

.jvg-ats__score strong {
    font: 800 40px/1 var(--jv-mono);
}

.jvg-ats__list {
    margin-bottom: 20px !important;
    list-style: none;
}

.jvg-ats__list li {
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(17, 24, 39, 0.08);
    padding: 10px 0;
    font-size: 12.5px;
    line-height: 1.5;
    color: #4b5563;
}

.jvg-ats__list li > span[aria-hidden] {
    display: flex;
    flex: none;
    justify-content: center;
    align-items: center;
    width: 18px;
    height: 18px;
    border: 1.5px solid var(--jv-ink);
    border-radius: 4px;
    background: var(--jv-ink);
    font: 700 11px/1 var(--jv-sans);
    color: #fff;
}

.jvg-ats__list li.is-falha {
    color: #b91c1c;
}

.jvg-ats__list li.is-falha > span[aria-hidden] {
    border-color: #b91c1c;
    background: #fff;
    color: #b91c1c;
}

.jvg-vaga {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
    max-width: 900px;
}

.jvg-vaga .jvg-textarea {
    min-height: 240px;
    margin: 0;
    font-size: 13px;
}

.jvg-match {
    margin-bottom: 18px;
    border-radius: 14px;
    padding: 16px 18px;
    background: var(--jv-ink);
    color: #fff;
}

.jvg-match span {
    display: block;
    margin-bottom: 8px;
    font: 600 10.5px/1 var(--jv-sans);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #9ca3af;
}

.jvg-match strong {
    font: 800 32px/1 var(--jv-mono);
}

.jvg-tag {
    border-radius: 999px;
    padding: 6px 12px;
    font-weight: 500;
    font-size: 12px;
}

.jvg-tag.is-ok {
    background: var(--jv-ink);
    color: #fff;
}

.jvg-tag.is-falta {
    border: 1px solid #b91c1c;
    color: #b91c1c;
}

.jvg-carta {
    max-width: 600px;
}

.jvg-carta .jvg-input {
    margin-bottom: 18px;
}

.jvg-carta__texto {
    margin-bottom: 14px;
    border: 1px solid transparent;
    border-radius: 12px;
    padding: 18px;
    background: #f3f4f6;
    font-family: 'Newsreader', Georgia, serif;
    font-size: 14px;
    line-height: 1.65;
    white-space: pre-line;
}

/* ---------- Modal do PDF ---------- */

.jvg-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px;
    background: rgba(17, 24, 39, 0.55);
}

.jvg-modal__box {
    position: relative;
    width: 100%;
    max-width: 540px;
    border-radius: 20px;
    padding: 26px 28px;
    background: #fff;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

.jvg-modal__box .jvg-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 34px;
    height: 34px;
}

.jvg-modal__box h3 {
    margin: 0 0 8px;
    font: 600 21px/1.3 var(--jv-sans);
    color: var(--jv-ink);
}

.jvg-modal__text {
    margin-bottom: 18px !important;
    font-size: 13.5px;
    line-height: 1.6;
    color: #4b5563;
}

/* ---------- Responsivo ---------- */

@media (max-width: 1000px) {
    .jvg-wizard,
    .jvg-review {
        grid-template-columns: 1fr;
    }

    .jvg-side {
        position: static;
    }

    .jvg-mini {
        min-height: 0;
    }
}

@media (max-width: 640px) {
    .jvg {
        margin: 0 -16px;
        border-right: 0;
        border-left: 0;
        border-radius: 0;
        padding: 22px 16px 32px;
    }

    .jvg-two,
    .jvg-vaga {
        grid-template-columns: 1fr;
    }

    .jvg-doc {
        padding: 22px;
    }

    .jvg-doc__head--faixa {
        margin: -22px -22px 18px;
        padding: 22px;
    }

    .jvg-doc__head h2 {
        font-size: 22px;
    }
}

/* ---------- Impressao: o PDF ---------- */

/* A camada de impressao fica fora do .jv, entao repete as variaveis. */
.jvg-print {
    --jv-ink: #111827;
    --jv-sans: 'Schibsted Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --jv-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
    display: none;
    font-family: var(--jv-sans);
}

@media print {
    @page {
        size: A4;
        margin: 14mm;
    }

    html.jvg-printing body > *:not(.jvg-print) {
        display: none !important;
    }

    html.jvg-printing,
    html.jvg-printing body {
        margin: 0 !important;
        padding: 0 !important;
        background: #fff !important;
    }

    html.jvg-printing .jvg-print {
        display: block;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .jvg-print .jvg-doc {
        padding: 0;
    }

    .jvg-print .jvg-doc__head--faixa {
        margin: 0 0 22px;
        border-radius: 4px;
        padding: 24px 26px;
    }
}
