/* AI Job Description & Hiring Workflow Generator (ai-job-description-generator.php):
   the form, "Help me define the role", the two inline results and the page sections.
   Screen first, then print: "Print / Save as PDF" prints the job description only. */

/* ---------- Top of the page ---------- */
.jd-page .jd-lead { max-width: 760px; margin: 0 auto; font-size: 17px; color: #444; }
.jd-trust { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin: 12px 0 0; font-size: 14px; color: #2e6b46; }
.jd-trust span { white-space: nowrap; }
.jd-trust .fa { color: #27ae60; margin-right: 4px; }

/* ---------- Form ---------- */
.jd-page .jd-label { font-weight: 700; font-size: 16px; color: #1f2937; }
.jd-page .jd-label-sm { font-weight: 600; font-size: 14px; color: #555; margin-bottom: 4px; }
.jd-page .form-control:focus, .jd-page .form-select:focus { border-color: #286bd6; box-shadow: 0 0 0 0.2rem rgba(40, 107, 214, 0.15); }
.jd-page .form-control.is-invalid { border-color: #dc3545; }
.jd-count { font-size: 13px; color: #999; white-space: nowrap; }
.jd-nowrap { white-space: nowrap; }
.jd-chips-label { font-size: 13px; color: #6c757d; margin-bottom: 4px; }

.jd-define-btn { border-radius: 20px; font-weight: 600; font-size: 13px; padding: 6px 14px; }

.jd-optional { background: #f8f9fb; border: 1px solid #edf0f4; border-radius: 12px; padding: 14px 16px 6px; }
.jd-optional-title { font-size: 14px; font-weight: 700; color: #55606e; margin: 0 0 10px; }
.jd-optional-title span { display: block; font-weight: 400; color: #6c757d; font-size: 13px; margin-top: 2px; }
.jd-optional .form-select, .jd-optional .form-control { font-size: 14px; }

.jd-privacy { background: #f0faf4; border: 1px solid #d4edda; border-radius: 8px; padding: 8px 14px; font-size: 13px; color: #2e6b46; margin: 14px 0 0; }

/* "Help me define the role" suggestions */
.jd-suggest { background: #f0f7ff; border: 1px solid #d6e6fb; border-radius: 12px; padding: 14px 16px; margin-top: 10px; }
.jd-suggest-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: #1f2937; }
.jd-suggest-close { background: none; border: 0; color: #286bd6; font-size: 13px; font-weight: 600; padding: 2px 4px; cursor: pointer; }
.jd-suggest-close:hover { text-decoration: underline; }
.jd-suggest-hint { font-size: 13px; color: #55606e; margin: 4px 0 8px; }
.jd-suggest-loading { margin: 0; font-size: 14px; color: #286bd6; }
.jd-suggest-group { margin-top: 8px; }
.jd-suggest-label { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 700; color: #55606e; margin-bottom: 4px; }
.jd-suggest-all { background: none; border: 0; padding: 0; color: #286bd6; font-size: 13px; font-weight: 600; cursor: pointer; }
.jd-suggest-all:hover { text-decoration: underline; }
.jd-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.jd-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 5px 12px; font-size: 13px; line-height: 1.35; text-align: left;
    color: #2d3436; background: #fff; border: 1px solid #c9d8ee; border-radius: 18px; cursor: pointer; transition: background 0.15s ease, border-color 0.15s ease; }
.jd-chip:hover { border-color: #286bd6; }
.jd-chip .fa { color: #286bd6; font-size: 12px; }
.jd-chip.is-on { background: #e3eefb; border-color: #286bd6; color: #1d4f9e; }
.jd-chip.is-on .fa { color: #27ae60; }

/* Progress while the AI works */
.jd-page .div_wait { background: #f0f7ff; border-radius: 12px; border: 1px solid #d6e6fb; }

/* ---------- Results ---------- */
.jd-results { margin-top: 36px; scroll-margin-top: 90px; }
.jd-results-head { text-align: center; margin-bottom: 18px; }
.jd-results-title { font-size: 28px; font-weight: 700; color: #1f2937; margin-bottom: 4px; }
.jd-results-for { color: #55606e; margin: 0; font-size: 15px; }
.jd-results-for a { color: #286bd6; font-weight: 600; text-decoration: none; }
.jd-results-for a:hover { text-decoration: underline; }

.jd-card { background: #fff; border: 1px solid #e6e9ef; border-radius: 16px; box-shadow: 0 2px 12px rgba(19, 15, 53, 0.06); padding: 22px 26px 24px; margin-bottom: 24px; }
.jd-card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding-bottom: 12px; border-bottom: 2px solid #eef1f5; margin-bottom: 12px; }
.jd-card-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.jd-card-title h3 { font-size: 21px; font-weight: 700; color: #1f2937; }
.jd-card-num { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: #286bd6; color: #fff; font-weight: 700; font-size: 15px; flex: 0 0 auto; }
#wf_card .jd-card-num { background: #e67e22; }
.jd-badge { font-size: 12px; font-weight: 600; padding: 6px 10px; }
.jd-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.jd-actions .btn { font-size: 14px; }
.jd-hint { font-size: 13px; color: #6c757d; margin: 0 0 14px; }

/* Regenerate panel */
.jd-regen { background: #f8f9fb; border: 1px solid #edf0f4; border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; }
.jd-regen label { font-size: 14px; font-weight: 600; color: #333; margin-bottom: 6px; }
.jd-regen-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.jd-regen-chip { background: #fff; border: 1px solid #d9e2ec; border-radius: 16px; padding: 4px 11px; font-size: 13px; color: #444; cursor: pointer; }
.jd-regen-chip:hover, .jd-regen-chip:focus { border-color: #286bd6; color: #286bd6; }
.jd-regen .input-group .btn { border-radius: 0 8px 8px 0 !important; padding: 8px 16px; }
.jd-regen-note { display: block; font-size: 12px; color: #6c757d; margin-top: 6px; }

/* The job description as a document */
.jd-doc { background: #fff; border: 1px solid #edf0f4; border-radius: 12px; padding: 24px 28px; transition: opacity 0.2s ease; }
.jd-doc.is-busy { opacity: 0.45; pointer-events: none; }
.jd-doc-title { font-size: 26px; font-weight: 700; color: #286bd6; margin: 0 0 14px; }
.jd-doc-section { margin-top: 18px; }
.jd-doc-h { font-size: 15px; font-weight: 700; color: #1f2937; text-transform: uppercase; letter-spacing: 0.04em; margin: 0 0 8px; }
.jd-doc-text { font-size: 15.5px; line-height: 1.7; color: #3a4048; margin: 0; white-space: pre-wrap; }
.jd-doc-list { margin: 0; padding-left: 22px; }
.jd-li { position: relative; font-size: 15.5px; line-height: 1.6; color: #3a4048; padding: 2px 30px 2px 0; }
.jd-li::marker { color: #286bd6; }
.jd-doc-section.is-empty .jd-doc-text:empty::before { content: attr(data-placeholder); color: #9aa3ad; font-style: italic; }
.jd-doc-section.is-empty .jd-doc-h { color: #9aa3ad; }

.jd-editable { border-radius: 4px; padding-left: 3px; padding-right: 3px; margin-left: -3px; margin-right: -3px; outline: 0; cursor: text; transition: background 0.15s ease; overflow-wrap: anywhere; }
.jd-editable:hover { background: #f6f8fb; }
.jd-editable:focus { outline: 2px solid #286bd6; outline-offset: 1px; background: #f8f9ff; }

.jd-li-remove { position: absolute; right: 0; top: 2px; background: none; border: 0; border-radius: 6px; padding: 3px 6px; line-height: 1; color: #9aa3ad; cursor: pointer; opacity: 0; transition: opacity 0.15s ease; }
.jd-li:hover .jd-li-remove, .jd-li:focus-within .jd-li-remove, .wf-sub:hover .jd-li-remove, .wf-sub:focus-within .jd-li-remove { opacity: 1; }
.jd-li-remove:hover, .jd-li-remove:focus-visible { background: #fdecec; color: #c0392b; }
@media (hover: none) { .jd-li-remove { opacity: 0.6; } }
.jd-add-line, .wf-add-sub { background: none; border: 0; padding: 6px 0 0; font-size: 13px; font-weight: 600; color: #286bd6; cursor: pointer; opacity: 0.55; transition: opacity 0.15s ease; }
.jd-doc-section:hover .jd-add-line, .jd-doc-section:focus-within .jd-add-line, .wf-body:hover .wf-add-sub, .wf-body:focus-within .wf-add-sub,
.jd-add-line:focus-visible, .wf-add-sub:focus-visible { opacity: 1; }
@media (hover: none) { .jd-add-line, .wf-add-sub { opacity: 0.85; } }
.jd-add-line:hover, .wf-add-sub:hover { text-decoration: underline; }

.jd-before-post { background: #fff8e8; border: 1px solid #f3e2c4; border-radius: 10px; padding: 10px 14px; font-size: 14px; color: #6b4e16; margin-top: 14px; }
.jd-before-post .fa { color: #e0a020; margin-right: 4px; }

/* The hiring workflow */
.wf-steps { list-style: none; margin: 0; padding: 0; }
.wf-step { position: relative; display: flex; gap: 14px; padding: 14px 0 14px; border-bottom: 1px solid #f1f3f6; }
.wf-step:last-child { border-bottom: 0; }
.wf-step::before { content: ""; position: absolute; left: 17px; top: 52px; bottom: -14px; width: 2px; background: #fbe3cc; }
.wf-step:last-child::before { display: none; }
.wf-num { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: #fef0e2; color: #c0651a; font-weight: 700; border: 2px solid #f5c9a0; position: relative; z-index: 1; }
.wf-body { flex: 1 1 auto; min-width: 0; }
.wf-head { display: flex; align-items: flex-start; gap: 8px; }
.wf-title { flex: 1 1 auto; font-size: 18px; font-weight: 700; color: #1f2937; margin: 5px 0 4px; }
.wf-remove { flex: 0 0 auto; background: none; border: 0; border-radius: 6px; padding: 6px 8px; color: #9aa3ad; cursor: pointer; }
.wf-remove:hover, .wf-remove:focus-visible { background: #fdecec; color: #c0392b; }
.wf-desc { font-size: 15px; line-height: 1.6; color: #3a4048; margin: 0 0 6px; white-space: pre-wrap; }
.wf-subs { list-style: none; margin: 4px 0 0; padding: 0; }
.wf-sub { position: relative; display: flex; align-items: flex-start; gap: 9px; padding: 3px 30px 3px 0; font-size: 14.5px; line-height: 1.5; color: #3a4048; }
.wf-dot { flex: 0 0 auto; width: 7px; height: 7px; margin: 8px 4px 0 3px; border-radius: 50%; background: #f0a868; }
.wf-sub-text { flex: 1 1 auto; min-width: 0; }
.wf-step.is-removed .wf-num, .wf-step.is-removed .wf-body, .wf-step.is-removed::before { display: none; }
.wf-removed-bar { flex: 1 1 auto; font-size: 14px; color: #6c757d; background: #f8f9fb; border-radius: 8px; padding: 8px 12px; }
.wf-undo { background: none; border: 0; padding: 0 4px; color: #286bd6; font-weight: 700; cursor: pointer; }
.wf-undo:hover { text-decoration: underline; }

/* WeGoDoo */
.jd-cta { text-align: center; background: linear-gradient(135deg, #fff4f1 0%, #fdeee9 100%); border: 1px solid #f6d3c8; border-radius: 16px; padding: 26px 22px; }
.jd-cta h3 { font-size: 22px; font-weight: 700; color: #1f2937; margin-bottom: 8px; }
.jd-cta p { max-width: 680px; margin: 0 auto 14px; color: #444; line-height: 1.6; }
.jd-cta .jd-cta-note { font-size: 13px; color: #6c757d; margin: 12px auto 0; }

/* The export guide (a bootbox dialog) */
.jd-export-lead { background: #f0faf4; border: 1px solid #d4edda; border-radius: 8px; padding: 9px 12px; color: #2e6b46; }
.jd-export-lead .fa { color: #27ae60; }
.jd-export-lead.is-warn { background: #fff8e8; border-color: #f3e2c4; color: #6b4e16; }
.jd-export-lead.is-warn .fa { color: #e0a020; }
.jd-export-steps { padding-left: 20px; margin-bottom: 10px; }
.jd-export-steps li { margin-bottom: 6px; line-height: 1.55; }
.jd-export-steps a { color: #286bd6; font-weight: 600; text-decoration: underline; }
.jd-export-text summary { cursor: pointer; color: #286bd6; font-size: 14px; font-weight: 600; }
.jd-export-text textarea { margin-top: 8px; font-size: 13px; font-family: Consolas, Menlo, monospace; }

/* ---------- Sections below the tool ---------- */
.jd-section-intro { max-width: 760px; margin: 0 auto 22px; color: #555; }
.jd-include { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
@media (min-width: 768px) { .jd-include { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.jd-include-item { display: flex; gap: 12px; background: #fff; border: 1px solid #e6e9ef; border-radius: 12px; padding: 14px 16px; }
.jd-include-item .fa { flex: 0 0 auto; width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: #f0f7ff; color: #286bd6; font-size: 15px; }
.jd-include-item h3 { font-size: 16px; font-weight: 700; margin: 4px 0 3px; color: #1f2937; }
.jd-include-item p { margin: 0; font-size: 14.5px; color: #555; line-height: 1.6; }
.jd-leave-out { background: #fef7f0; border: 1px solid #f6e0c8; border-radius: 12px; padding: 14px 18px; margin-top: 14px; color: #5a4632; }

.jd-steps-overview { list-style: none; counter-reset: jd-step; margin: 0 auto; padding: 0; max-width: 860px; }
.jd-steps-overview li { position: relative; counter-increment: jd-step; padding: 4px 0 18px 54px; line-height: 1.65; color: #444; }
.jd-steps-overview li::before { content: counter(jd-step); position: absolute; left: 0; top: 0; display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; background: #e67e22; color: #fff; font-weight: 700; }
.jd-steps-overview h3 { font-size: 17px; font-weight: 700; color: #1f2937; margin: 6px 0 4px; }

.jd-organize { background: #fff; border: 1px solid #e6e9ef; border-radius: 16px; box-shadow: 0 2px 10px rgba(19, 15, 53, 0.06); padding: 28px 24px; }
.jd-organize ul { list-style: none; padding: 0; margin: 0 auto 18px; max-width: 640px; }
.jd-organize li { position: relative; padding: 5px 0 5px 30px; color: #444; }
.jd-organize li .fa { position: absolute; left: 0; top: 8px; color: #27ae60; }

.jd-page .example-role-card { cursor: pointer; transition: transform 0.2s ease, box-shadow 0.2s ease; }
.jd-page .example-role-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); }
.jd-page .example-role-card:focus-visible { outline: 2px solid #286bd6; outline-offset: 2px; border-radius: 15px; }
.jd-role-meta { display: inline-block; font-size: 12px; font-weight: 600; color: #55606e; background: #f1f3f6; border-radius: 10px; padding: 2px 9px; margin-top: 8px; }

/* ---------- Phones ---------- */
@media (max-width: 575px) {
    /* The quick-start chips sit on one row that scrolls sideways, so the form starts on the first screen. */
    .jd-example-chips { display: flex; flex-wrap: nowrap; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none;
        -webkit-mask-image: linear-gradient(to right, #000 85%, transparent); mask-image: linear-gradient(to right, #000 85%, transparent); }
    .jd-example-chips::-webkit-scrollbar { display: none; }
    .jd-page .jd-example-chips .example-chip { flex: 0 0 auto; margin: 0; white-space: nowrap; min-height: 40px; padding: 8px 14px; }
    .jd-page .jd-lead { font-size: 15px; }
    .jd-trust { font-size: 13px; gap: 4px 12px; }
    .jd-card { padding: 16px 14px 18px; border-radius: 14px; }
    .jd-card-title h3 { font-size: 19px; }
    .jd-actions { width: 100%; }
    .jd-actions .btn { flex: 1 1 auto; font-size: 13px; padding: 7px 10px; }
    .jd-doc { padding: 16px 14px; }
    .jd-doc-title { font-size: 22px; }
    .jd-doc-text, .jd-li { font-size: 15px; }
    .jd-results-title { font-size: 23px; }
    .wf-step { gap: 10px; }
    .wf-step::before { left: 15px; top: 46px; }
    .wf-num { width: 32px; height: 32px; }
    .wf-title { font-size: 16.5px; margin-top: 4px; }
    .jd-cta { padding: 22px 14px; }
}

@media (prefers-reduced-motion: reduce) {
    .jd-chip, .jd-doc, .jd-editable, .jd-li-remove, .jd-page .example-role-card { transition: none !important; transform: none !important; }
}

/* ---------- Print / Save as PDF: the job description only ---------- */
@media print {
    /* The site's script pads the body for the sticky header; paper has no header. */
    body.jd-printing { background: #fff !important; padding-top: 0 !important; }
    body.jd-printing #sticky-header, body.jd-printing .footer, body.jd-printing .copyright,
    body.jd-printing .jd-noprint, body.jd-printing .notifyjs-corner, body.jd-printing .modal,
    body.jd-printing .modal-backdrop, body.jd-printing iframe { display: none !important; }
    body.jd-printing .free-ai, body.jd-printing .container { max-width: none !important; width: auto !important; margin: 0 !important; padding: 0 !important; }
    body.jd-printing .jd-results { margin: 0 !important; }
    body.jd-printing .jd-card { border: 0 !important; box-shadow: none !important; padding: 0 !important; margin: 0 !important; }
    body.jd-printing .jd-doc { border: 0 !important; padding: 0 !important; border-radius: 0; opacity: 1 !important; }
    body.jd-printing .jd-doc-title { font-size: 20pt; color: #000; margin-bottom: 10pt; }
    body.jd-printing .jd-doc-section { margin-top: 12pt; break-inside: avoid-page; page-break-inside: avoid; }
    body.jd-printing .jd-doc-section.is-empty { display: none !important; }
    body.jd-printing .jd-doc-h { font-size: 11pt; color: #000; margin-bottom: 4pt; break-after: avoid; page-break-after: avoid; }
    body.jd-printing .jd-doc-text, body.jd-printing .jd-li { font-size: 10.5pt; line-height: 1.5; color: #000; }
    body.jd-printing .jd-li { padding-right: 0; }
    body.jd-printing .jd-li::marker { color: #000; }
    body.jd-printing .jd-editable { background: none !important; outline: 0 !important; padding-left: 0; padding-right: 0; margin-left: 0; margin-right: 0; }
    @page { margin: 16mm 16mm; }
}
