/* styles-motivation-survey.css — a nyilvános "Motivációs térkép" pilot
 * kitöltőfelületének saját komponensei. A váz (fejléc, kártyák, gombok,
 * állapotsáv) a styles-chat.css + styles-questionnaire.css + public-shell.css
 * fájlokból jön; itt csak a kényszerválasztásos opciók, a Likert-skála, a
 * folyamatjelző és a befejező kártya stílusa van.
 */

/* Az oldal egyetlen képernyős váz: az #app 100vh magas, a görgetés a
 * #questionnaire-container belsejében történik. A dokumentumot ezért nem
 * szabad görgethetővé tenni: ha a böngésző mégis odagörget (pl. egy fókuszba
 * kerülő, `position: absolute` elemet követve), az #app teljesen kicsúszik a
 * képből, és az oldal üresnek látszik. Ez a védelem a kérdéskártyák
 * pozicionálása mellett is hasznos. */
html,
body {
    height: 100%;
    overflow: hidden;
}

.motivation-progress {
    margin-bottom: 14px;
}

/* A kérdőív alsó gombsora. Asztali nézetben egy sorban marad: a hosszabb
   feliratú gombok 13 px-esek, a korábbi kitöltések választója pedig rugalmasan
   zsugorodik. Mobilon a @media (max-width: 760px) szabály alá rendezi.

   A másodlagos műveletek (új kitöltés, korábbi kitöltések) külön csoportban
   vannak. Desktopon ez a csoport "display: contents"-tel ugyanúgy részt vesz
   az egy soros gombsorban, mobilon viszont egy összecsukható panelbe kerül. */
#motivationActions {
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

#motivationActions .questionnaire-button {
    flex: 0 0 auto;
    padding: 9px 12px;
    font-size: 13px;
    white-space: nowrap;
}

/* Az "Előző" a bal szélen marad, a többi vezérlő jobbra igazodik. */
#motivationActions #motivationPrev {
    margin-right: auto;
}

#motivationActions .motivation-session-select {
    flex: 0 1 210px;
    width: auto;
    min-width: 120px;
    min-height: 36px;
    font-size: 12px;
}

/* Desktopon a csoport nem generál külön dobozt: a benne lévő gombok a
   gombsor közvetlen flex-elemeiként viselkednek. A lenyitó mobilon jelenik
   meg, ezért desktopon rejtett. */
#motivationActions .motivation-actions-more {
    display: contents;
}

#motivationMoreToggle {
    display: none;
}

/* A "Korábbi kitöltések" felirat desktopon vizuálisan rejtett: a select
   aria-labelje úgyis elmondja a szerepét, és így elfér egy sorban a gombsor.
   Mobilon a select fölé kerül, ahol van hely a teljes feliratnak. */
#motivationPreviousSessionsLabel {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.motivation-progress-track {
    height: 8px;
    border-radius: 999px;
    background: #e5e7eb;
    overflow: hidden;
}

.motivation-progress-fill {
    height: 100%;
    width: 0;
    border-radius: 999px;
    background: #007AFF;
    transition: width 0.2s ease;
}

/* A részek állapotjelzői (I…IV). A chipek száma és sorrendje a részek
 * sorrendjéből jön, ezért a felnőtt változatban (munkakörnyezet nélkül) csak
 * három chip látszik. */
.motivation-progress-parts {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 6px;
}

.motivation-part-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 1px 8px;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    background: #f9fafb;
    color: #6b7280;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.6;
}

/* A nem kötelező rész szaggatott kerettel: hiánya nem hiba. */
.motivation-part-chip.is-optional {
    border-style: dashed;
}

.motivation-part-chip.is-current {
    border-color: #007AFF;
    background: #eff6ff;
    color: #1d4ed8;
}

.motivation-part-chip.is-done {
    border-color: #16a34a;
    background: #f0fdf4;
    color: #15803d;
}

/* A kész részt pipa jelöli; a chipben a sorszám marad. */
.motivation-part-chip.is-done::after {
    content: '✓';
    font-weight: 700;
}

.motivation-progress-label {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
    margin-top: 6px;
    font-size: 12px;
    color: #4b5563;
}

.motivation-step-title {
    font-size: 16px;
    margin-bottom: 6px;
}

.motivation-step-instruction {
    font-size: 13px;
    line-height: 1.45;
    color: #4b5563;
    margin-bottom: 14px;
}

/* A rész elé kitett kedvcsináló bekezdés (definíció: `lead`). Szándékosan
   nagyobb és sötétebb az instrukciónál, hogy az első képernyőn ez legyen az
   első dolog, ami megfogja a kitöltőt. Ha a definícióban nincs `lead` mező,
   a motor elemet sem rajzol. */
.motivation-step-lead {
    font-size: 14px;
    line-height: 1.55;
    color: #1f2937;
    margin: 0 0 12px;
    padding-left: 12px;
    border-left: 3px solid #f59e0b;
}

/* --- I. rész: kényszerválasztás ------------------------------------------ */

.motivation-question {
    border: 1px solid #e1e1e1;
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 14px;
    background: #fff;
}

.motivation-question.is-missing {
    border-color: #dc2626;
    box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.12);
}

.motivation-question legend {
    font-weight: 600;
    font-size: 14px;
    line-height: 1.4;
    padding: 0;
    margin-bottom: 10px;
}

.motivation-question-number {
    color: #2c4e6e;
}

.motivation-options {
    display: grid;
    gap: 8px;
}

.motivation-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid #d6d6d6;
    border-radius: 10px;
    background: #fafafa;
    font-size: 13px;
    line-height: 1.4;
    cursor: pointer;
    /* A rádiógomb `position: absolute` (lásd lent): ha nincs pozicionált ős,
       a tartalmazó blokkja a dokumentum lesz, így a láthatatlan 1x1 px-es
       inputok kinyújtják a dokumentumot (#app 100vh fölé), és a rájuk kerülő
       fókusz a teljes ablakot odagörgeti — az #app kicsúszik a képből, azaz
       üresnek tűnik az oldal. A relatív pozíció ezt megakadályozza. */
    position: relative;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.motivation-option:hover {
    background: #f2f7fd;
    border-color: #9cc4ea;
}

.motivation-option input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.motivation-option-letter {
    flex: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #e5e7eb;
    color: #374151;
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.motivation-option-text {
    flex: 1 1 auto;
    min-width: 0;
}

.motivation-option:has(input:checked),
.motivation-option.is-selected {
    background: #e8f2ff;
    border-color: #007AFF;
}

.motivation-option:has(input:checked) .motivation-option-letter,
.motivation-option.is-selected .motivation-option-letter {
    background: #007AFF;
    color: #fff;
}

.motivation-option:has(input:focus-visible) {
    outline: 2px solid #0059c9;
    outline-offset: 2px;
}

/* --- II. rész: egyetértés-skála ------------------------------------------ */

.motivation-likert {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

.motivation-likert-option {
    flex: none;
    position: relative;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid #d6d6d6;
    background: #f2f2f2;
    color: #374151;
    font-size: 15px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.motivation-likert-option input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.motivation-likert-option:has(input:checked),
.motivation-likert-option.is-selected {
    background: #007AFF;
    border-color: #0060d0;
    color: #fff;
}

.motivation-likert-option:has(input:focus-visible) {
    outline: 2px solid #0059c9;
    outline-offset: 2px;
}

.motivation-likert-anchors {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-top: 6px;
    font-size: 11px;
    line-height: 1.3;
    color: #6b7280;
}

.motivation-likert-anchors span {
    min-width: 0;
}

.motivation-likert-anchors span:last-child {
    text-align: right;
}

/* --- állapotok, befejezés ------------------------------------------------ */

.motivation-notice {
    background: #fffbeb;
    border: 1px dashed #f59e0b;
    color: #92400e;
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 13px;
    line-height: 1.45;
    margin-bottom: 14px;
}

.motivation-notice button {
    margin-top: 8px;
}

.motivation-link-box {
    display: flex;
    gap: 8px;
    align-items: stretch;
    margin: 10px 0;
}

.motivation-link-box input {
    flex: 1 1 auto;
    min-width: 0;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #d6d6d6;
    font-size: 12px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    box-sizing: border-box;
}

.motivation-thanks {
    background: #F3E3B8;
    color: #2C4E6E;
    border-radius: 12px;
    padding: 18px;
    font-size: 14px;
    line-height: 1.5;
}

.motivation-thanks h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.motivation-thanks ul {
    margin: 10px 0 0 18px;
}

.motivation-thanks li {
    margin-bottom: 6px;
}

.motivation-thanks a {
    color: #2C4E6E;
    font-weight: 600;
}

.motivation-thanks .motivation-register {
    display: block;
    margin-top: 14px;
    padding: 12px 16px;
    border-radius: 10px;
    background: #2C4E6E;
    color: #fff;
    text-align: center;
    font-weight: 600;
    text-decoration: none;
}

.motivation-pilot-legal {
    margin: 10px 0 0;
    text-align: center;
    font-size: 12px;
    color: #6b7280;
}

.motivation-pilot-legal a {
    color: #2C4E6E;
    font-weight: 600;
}

/* Nem értékelhető válaszlap (straight-lining / minden irányra ugyanannyi
 * pont): ugyanaz a kártya, de nincs iránytű. A bal szegély jelzi, hogy itt
 * nem eredmény, hanem magyarázat olvasható. */
.motivation-thanks.motivation-invalid {
    border-left: 4px solid #f59e0b;
}

.motivation-invalid .motivation-meta {
    margin-top: 12px;
    font-size: 12px;
    color: #6b7280;
    word-break: break-all;
}

/* --- Eredmény: „a te iránytűd" (csak a tizenéves változatnál) -------------- */

.motivation-compass {
    background: #F3E3B8;
    color: #2C4E6E;
    border-radius: 12px;
    padding: 18px;
    font-size: 14px;
    line-height: 1.5;
}

.motivation-compass h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.motivation-compass-intro {
    margin-bottom: 14px;
}

.motivation-compass-label {
    font-weight: 600;
    margin: 14px 0 6px;
}

.motivation-compass-top {
    list-style: none;
    margin: 0;
    padding: 0;
    counter-reset: compass;
}

.motivation-compass-item {
    counter-increment: compass;
    background: #fff;
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 10px;
}

.motivation-compass-item-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.motivation-compass-item-head h4 {
    font-size: 16px;
    margin: 0;
}

.motivation-compass-item-head h4::before {
    content: counter(compass) ". ";
    color: #6b7280;
}

.motivation-compass-share {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.motivation-career-recommendations {
    margin-top: 14px;
    padding: 12px 14px;
    background: #fff;
    border-radius: 10px;
}

.motivation-career-recommendation-group-title {
    margin: 16px 0 4px;
    font-size: 14px;
}

.motivation-career-recommendations-list {
    margin: 8px 0 0;
    padding-left: 24px;
}

.motivation-career-recommendations-list li {
    padding: 7px 0;
    border-bottom: 1px solid #eef0f2;
}

.motivation-career-recommendations-list li:last-child {
    border-bottom: 0;
}

.motivation-career-recommendation-name {
    display: block;
}

.motivation-career-recommendation-meta {
    margin: 3px 0 0;
    font-size: 12px;
    line-height: 1.4;
    color: #6b7280;
}

/* A szakma neve alatti sor: érdeklődés és munkakörnyezet egymás mellett.
   A címszó az ikon előtt, a háttérinfó utána áll; szűk helyen a két jelzés
   egymás alá tör. */
.motivation-career-recommendation-match-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 18px;
    margin: 4px 0 0;
    font-size: 12px;
    line-height: 1.45;
}

.motivation-career-match {
    display: inline-flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 3px 5px;
    min-width: 0;
    max-width: 100%;
}

.motivation-career-match-label {
    font-weight: 700;
    color: #374151;
    white-space: nowrap;
}

.motivation-career-match-text {
    color: #4b5563;
}

/* A munkakörnyezeti háttér kiemelései: egyezés félkövér, ütközés aláhúzott,
   semleges dőlt; a bizonytalan pólus normál marad. */
.motivation-career-match-pole--match {
    font-weight: 700;
    color: #1f2937;
}

.motivation-career-match-pole--conflict {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

.motivation-career-match-pole--neutral {
    font-style: italic;
}

.motivation-career-match-pole--uncertain {
    font-style: normal;
}

/* A RAG-riport színei: zöld / borostyán / piros / szürke. */
.motivation-rag {
    flex: none;
    font-size: 0.95em;
    line-height: 1;
}

.motivation-rag--green { color: #16a34a; }
.motivation-rag--amber { color: #d97706; }
.motivation-rag--red { color: #dc2626; }
.motivation-rag--gray { color: #6b7280; }

.motivation-career-fit .motivation-rag {
    font-size: 12px;
}

.motivation-career-fit .motivation-rag--green { color: #16a34a; }
.motivation-career-fit .motivation-rag--amber { color: #d97706; }
.motivation-career-fit .motivation-rag--red { color: #dc2626; }
.motivation-career-fit .motivation-rag--gray { color: #6b7280; }

.motivation-compass-blurb {
    margin-top: 6px;
}

.motivation-compass-career-group {
    margin-top: 10px;
}

.motivation-compass-career-title {
    margin: 0 0 4px;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

.motivation-compass-careers {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 6px 0 0;
    padding: 0;
}

.motivation-compass-careers li {
    background: #eef2f6;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 13px;
}

.motivation-compass-step {
    margin-top: 8px;
    font-size: 13px;
}

/* --- Szakma–környezet illeszkedés --------------------------------------- */

.motivation-career-fit {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 8px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.6;
    white-space: nowrap;
}

.motivation-career-fit--primary {
    background: #e6f4ea;
    border-color: #b7ddc1;
    color: #1b5e20;
}

.motivation-career-fit--consider {
    background: #fff6e0;
    border-color: #f0d9a8;
    color: #7a5200;
}

.motivation-career-fit--avoid {
    background: #fdecec;
    border-color: #f2c9c9;
    color: #8c2f2f;
}

.motivation-career-fit--unknown {
    background: #eef2f6;
    border-color: #dbe3ea;
    color: #4b5563;
}

.motivation-career-fit-reason {
    margin: 2px 0 0;
    font-size: 12px;
    line-height: 1.35;
    color: #6b7280;
}

.motivation-career-fit-legend {
    background: #fff;
    border-radius: 10px;
    padding: 12px 14px;
    margin-top: 10px;
}

.motivation-career-fit-tiers {
    margin: 8px 0 0;
    padding-left: 18px;
    font-size: 13px;
    line-height: 1.45;
}

.motivation-career-fit-tiers li {
    margin-bottom: 6px;
}

.motivation-compass-least ul {
    margin: 0 0 0 18px;
}

.motivation-compass-gap {
    background: #fff;
    border-left: 4px solid #2C4E6E;
    border-radius: 6px;
    padding: 10px 12px;
    margin-top: 10px;
}

.motivation-compass-disclaimer {
    font-size: 12px;
    color: #4b5563;
    margin-top: 12px;
}

.motivation-compass-source {
    font-size: 11px;
    color: #6b7280;
    margin-top: 10px;
}

.motivation-compass a {
    color: #2C4E6E;
    font-weight: 600;
}

.motivation-meta {
    font-size: 12px;
    color: #6b7280;
    margin-top: 8px;
}

/* --- III. rész: nem kötelező háttérkérdések ------------------------------ */

.motivation-demographic legend {
    margin-bottom: 6px;
}

.motivation-demographic-select {
    width: 100%;
    max-width: 420px;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #fff;
    color: #1f2937;
    font-family: inherit;
    font-size: 15px;
    line-height: 1.3;
}

.motivation-demographic-select:focus-visible {
    outline: 2px solid #2c4e6e;
    outline-offset: 2px;
}

/* --- IV. rész: munkakörnyezet (háromfokozatú választás) ------------------ */

.motivation-trichotomy {
    display: flex;
    gap: 6px;
    margin-top: 8px;
}

.motivation-trichotomy-option {
    flex: 1 1 0;
    min-width: 0;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 6px;
    border: 1px solid #d6d6d6;
    border-radius: 10px;
    background: #f7f7f8;
    color: #374151;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.motivation-trichotomy-option:hover {
    background: #f2f7fd;
    border-color: #9cc4ea;
}

.motivation-trichotomy-option input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.motivation-trichotomy-code {
    flex: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #e5e7eb;
    color: #374151;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.motivation-trichotomy-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.motivation-trichotomy-option:has(input:checked),
.motivation-trichotomy-option.is-selected {
    background: #e8f2ff;
    border-color: #007AFF;
    color: #0b3d75;
}

.motivation-trichotomy-option:has(input:checked) .motivation-trichotomy-code,
.motivation-trichotomy-option.is-selected .motivation-trichotomy-code {
    background: #007AFF;
    color: #fff;
}

.motivation-trichotomy-option:has(input:focus-visible) {
    outline: 2px solid #0059c9;
    outline-offset: 2px;
}

/* --- Kiértékelő kód a kitöltés elején ----------------------------------- */

.motivation-eval-start {
    margin: 12px 0 4px;
    padding: 12px 14px;
    border: 1px solid #c7d2fe;
    border-radius: 12px;
    background: linear-gradient(180deg, #f8faff 0%, #eef2ff 100%);
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.motivation-eval-start.is-paid {
    border-color: #86efac;
    background: linear-gradient(180deg, #f0fdf4 0%, #dcfce7 100%);
}

.motivation-eval-start-title {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
}

.motivation-eval-start-text {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: #334155;
}

.motivation-eval-start-price {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #3730a3;
}

.motivation-eval-start-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 2px;
}

.motivation-eval-start-actions .questionnaire-button {
    flex: 0 1 auto;
    padding: 9px 14px;
    font-size: 13px;
}

/* --- Papír példány (nyomtatás, papírkód, feltöltés) ---------------------- */

.motivation-paper-print {
    margin-top: 10px;
}

.motivation-paper-print .questionnaire-button {
    font-size: 13px;
    padding: 8px 14px;
}

.motivation-paper-locked h3 {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.3;
}

.motivation-paper-code {
    margin: 4px 0 12px;
    font-family: monospace;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 2px;
    word-break: break-all;
}

.motivation-paper-actions {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
}

.motivation-paper-actions .questionnaire-button {
    flex: 0 1 auto;
    padding: 9px 12px;
    font-size: 13px;
    white-space: nowrap;
}

/* Ha egy kártyán nincs megjeleníthető művelet, a gombsor ne hagyjon üres
   helyet. A JS a .hidden osztályt is kezeli, ez a szabály a biztonsági háló. */
.motivation-paper-actions:empty,
.motivation-paper-actions:not(:has(.questionnaire-button:not(.hidden))) {
    display: none;
}

/* Kitöltött lap feltöltése: kompakt, kártyaszerű eszköz. A fejléc, az
   oldalkód és a feltöltés egy-egy saját sor, de a felesleges üres sorokat
   (kiválasztott fájl, státusz) :empty állapotban elrejtjük. */
.motivation-paper-upload {
    border: 1px solid #dbe3ee;
    border-radius: 14px;
    padding: 12px 14px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.motivation-paper-upload-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 6px 12px;
    flex-wrap: wrap;
}

.motivation-paper-upload-label {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
}

.motivation-paper-upload-hint {
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.motivation-paper-upload-code {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.motivation-paper-upload-code-label {
    font-size: 12px;
    font-weight: 600;
    color: #475569;
}

.motivation-paper-upload .motivation-paper-page-input {
    flex: 0 1 220px;
    width: auto;
    min-width: 150px;
    padding: 8px 10px;
    font-size: 13px;
}

/* A papírlap feltöltése két úton indul: kamerával vagy a készülék fájljai
   közül. A `capture` attribútum a telefonon ugyanis kizárja a galériát, ezért
   a kamera és a fájlválasztó külön mező — a mezők rejtettek, a gombok nyitják
   meg őket. */
.motivation-paper-pickers {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.motivation-paper-pickers .questionnaire-button {
    flex: 1 1 auto;
    padding: 9px 12px;
    font-size: 13px;
}

/* A fájlválasztó mezők láthatatlanok, de a layoutban maradnak: a `display:
   none` a régebbi iOS-en megakadályozza a programozott megnyitást (click()). */
.motivation-paper-file {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.motivation-paper-upload-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.motivation-paper-picked {
    margin: 0;
    flex: 1 1 180px;
    min-width: 0;
    font-size: 12px;
    color: #334155;
    overflow-wrap: anywhere;
}

.motivation-paper-picked:empty,
.motivation-paper-upload-status:empty {
    display: none;
}

.motivation-paper-upload-submit {
    margin-left: auto;
    padding: 9px 18px;
    font-size: 13px;
}

.motivation-paper-upload-status {
    margin: 0;
    padding: 8px 10px;
    border-radius: 8px;
    background: #eef2ff;
    color: #3730a3;
    font-size: 12px;
    line-height: 1.45;
}

.motivation-session-select {
    max-width: 100%;
    min-height: 38px;
    padding: 6px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    color: #1f2937;
    font: inherit;
}

/* --- Papír mód: a képernyő oldala = a nyomtatott lap oldala --------------
   Az oldalkód a nyomtatott lapon szerepel, ezért az adatbevitelnél minden
   lépésnél látszik, és az oldal fotója is ott tölthető fel. Így a kitöltő
   ugyanazt az oldalt látja, mint amit a kezében tart. */

.motivation-paper-page {
    border-color: #c7d2fe;
    background: #f5f7ff;
}

/* Az oldalkód rövid, ezért nem kap külön sort: inline jelvényként a magyarázó
   szöveg mellé kerül, és csak akkor törik új sorba, ha tényleg nem fér el. */
.motivation-paper-page-code {
    display: inline-flex;
    align-items: center;
    margin: 0 6px 0 0;
    padding: 2px 8px;
    border-radius: 999px;
    background: #e0e7ff;
    color: #3730a3;
    font-family: monospace;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.3px;
    line-height: 1.6;
    white-space: nowrap;
    vertical-align: middle;
}

.motivation-paper-page-note {
    margin: 0;
    line-height: 1.55;
}

.motivation-paper-page-input {
    padding: 9px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #fff;
    color: #111827;
    font-family: monospace;
    font-size: 15px;
    letter-spacing: 1px;
}

.motivation-paper-page-input:focus {
    outline: 2px solid #6366f1;
    outline-offset: 1px;
}

/* --- IV. rész eredménye -------------------------------------------------- */

.motivation-work-result {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
}

.motivation-work-axes {
    list-style: none;
    display: grid;
    gap: 8px;
    margin: 8px 0 0;
    padding: 0;
}

.motivation-work-axis {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #f8fafc;
    padding: 9px 12px;
}

.motivation-work-axis-question {
    margin: 0;
    font-size: 12px;
    line-height: 1.35;
    color: #6b7280;
}

.motivation-work-axis-answer {
    margin: 2px 0 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    color: #1f2937;
}

.motivation-work-axis-tag {
    margin: 2px 0 0;
    font-size: 12px;
    line-height: 1.35;
    color: #6b7280;
}

.motivation-work-poles {
    margin-top: 12px;
}

/* --- Nyomtatott kérdőív (teljes lap) ------------------------------------
   A lap a <body> közvetlen gyereke, hogy a nyomtatási szabály minden más
   elemet elrejthessen. Képernyőn rejtett, nyomtatásban folyó tartalom. */

.motivation-print-sheet {
    display: none;
}

/* Minden nyomtatott oldal külön blokk, és a blokkok pontosan egy-egy PDF-
   oldalt tesznek ki: így az oldalkód a rajta lévő kérdéseket azonosítja. */
.motivation-print-page {
    break-after: page;
    page-break-after: always;
}

.motivation-print-page[data-last="true"] {
    break-after: auto;
    page-break-after: auto;
}

.motivation-print-running {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
    margin: 0 0 4px;
    padding-bottom: 2px;
    border-bottom: 0.8pt solid #000;
    font-size: 8.5pt;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.motivation-print-running-page {
    font-weight: 700;
    white-space: nowrap;
}

.motivation-print-title {
    margin: 0 0 1px;
    font-size: 13pt;
}

.motivation-print-lead {
    margin: 0 0 6px;
    font-size: 9pt;
    line-height: 1.3;
}

.motivation-print-codebox {
    border: 1.2pt solid #000;
    padding: 4px 8px;
    margin-bottom: 4px;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 2px 12px;
    break-inside: avoid;
    page-break-inside: avoid;
}

.motivation-print-code-label {
    margin: 0;
    font-size: 7pt;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.motivation-print-code-main {
    flex: 1 1 0;
    min-width: 0;
}

.motivation-print-code,
.motivation-print-page-code {
    margin: 0;
    font-family: monospace;
    font-size: 12pt;
    font-weight: 700;
    letter-spacing: 2px;
    word-break: break-all;
}

.motivation-print-qrs {
    display: flex;
    gap: 8px;
    margin-left: auto;
    flex: 0 0 auto;
}

.motivation-print-qr {
    width: 52px;
    flex: 0 0 auto;
    text-align: center;
}

.motivation-print-qr-box {
    width: 52px;
    height: 52px;
    overflow: hidden;
}

.motivation-print-qr-label {
    margin: 1px 0 0;
    font-size: 6.5pt;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Az oldal kérdésköre („1–9. kérdés (36-ból) · Változat B”): rövid, egy soros
   felirat, ezért nem monospace, hogy elférjen a kód mellett. */
.motivation-print-page-meta {
    margin: 2px 0 0;
    font-size: 8pt;
    line-height: 1.25;
}

.motivation-print-url {
    margin: 0;
    flex: 1 1 auto;
    font-size: 8pt;
    word-break: break-all;
}

.motivation-print-section {
    margin-top: 6px;
}

.motivation-print-section-title {
    margin: 0 0 3px;
    font-size: 12.5pt;
    border-bottom: 1pt solid #000;
    padding-bottom: 2px;
    break-after: avoid;
    page-break-after: avoid;
}

.motivation-print-anchors {
    margin: 0 0 6px;
    font-size: 9pt;
    font-style: italic;
    break-after: avoid;
    page-break-after: avoid;
}

/* A sorszám a kérdés szövegében van (nem a lista jelölőjében): így nem
   duplázódik, és a tördelés a behúzott folytatássorokkal is rendezett marad. */
.motivation-print-sheet ol.motivation-print-items {
    margin: 0;
    padding-left: 0;
    list-style: none;
}

.motivation-print-sheet .motivation-print-items li {
    margin-bottom: 4px;
    break-inside: avoid;
    page-break-inside: avoid;
}

.motivation-print-question {
    display: block;
    break-inside: avoid;
    page-break-inside: avoid;
}

.motivation-print-item-text {
    margin: 0 0 1px;
    padding-left: 1.9em;
    text-indent: -1.9em;
    font-size: 10pt;
    line-height: 1.25;
    break-after: avoid;
    page-break-after: avoid;
    orphans: 2;
    widows: 2;
}

/* A válaszlehetőségek a kérdéssel egy oldalon maradnak: a kérdésblokk
   egésze nem törhető, és a válaszsor külön sem kezdődhet új oldalon. */
.motivation-print-item-options {
    margin: 0;
    padding-left: 1.9em;
    display: flex;
    flex-wrap: wrap;
    /* A válaszsorok között nincs függőleges hézag: a hosszú lehetőségek
       külön sorba törnek, és így marad hely az első oldal bevezetőjének. */
    gap: 0 10px;
    font-size: 9.5pt;
    line-height: 1.2;
    break-before: avoid;
    page-break-before: avoid;
}

.motivation-print-option {
    /* A hosszú válaszlehetőség törhet: nyomtatásban nem csúszhat ki a
       nyomtatási területről (az levágott választ eredményezne). */
    overflow-wrap: break-word;
}

.motivation-print-instruction {
    font-size: 9pt;
    line-height: 1.3;
    margin: 0 0 6px;
    break-after: avoid;
    page-break-after: avoid;
}

.motivation-print-token {
    margin: 2px 0 0;
    font-size: 8.5pt;
    font-family: monospace;
}

.motivation-print-footer {
    margin-top: 8px;
    border-top: 1pt solid #000;
    padding-top: 4px;
    font-size: 8pt;
    break-inside: avoid;
    page-break-inside: avoid;
}

@media print {
    @page {
        margin: 10mm 12mm;
        size: A4 portrait;
    }

    /* A publikus felület váza (styles-chat.css) 100vh magasságra és rejtett
       túlcsordulásra állítja a body-t. Nyomtatásban ez az első oldal
       magasságára vágná a lapot: a PDF egy oldal lenne, és az éppen az
       oldalhatárra eső kérdés válaszai lemaradnának. A lap ezért folyó
       tartalom: a magasság- és túlcsordulás-korlát visszaáll, a lap pedig
       oldaltörésekkel folyik tovább. */
    html,
    body {
        height: auto !important;
        max-height: none !important;
        min-height: 0 !important;
        overflow: visible !important;
        background: #fff !important;
    }

    /* Csak a nyomtatott lap látszik: a kitöltő felület és a fejléc kimarad. */
    body > *:not(.motivation-print-sheet) {
        display: none !important;
    }

    .motivation-print-sheet {
        display: block;
        width: 100%;
        color: #000;
        background: #fff;
        font-family: Georgia, 'Times New Roman', serif;
    }

    .motivation-print-qr img,
    .motivation-print-qr canvas {
        width: 52px !important;
        height: 52px !important;
    }

    /* Egy kérdés és a válaszai: az oldaltörés csak a kérdésblokkok között
       történhet, a kérdésblokkon belül soha. */
    .motivation-print-question {
        break-inside: avoid !important;
        page-break-inside: avoid !important;
    }

    .motivation-print-item-text {
        break-after: avoid !important;
        page-break-after: avoid !important;
    }

    .motivation-print-item-options {
        break-before: avoid !important;
        page-break-before: avoid !important;
    }

    .motivation-print-section-title,
    .motivation-print-anchors,
    .motivation-print-instruction,
    .motivation-print-codebox,
    .motivation-print-footer {
        break-inside: avoid !important;
        page-break-inside: avoid !important;
    }
}

/* 850 px alatt a négy papírművelet nem fér el egy sorban. Ilyenkor nem
   csúsznak egymásra: új sorba törnek. A mobilos (760 px alatti) függőleges
   elrendezést a lenti média-szabály adja. */
@media (max-width: 849px) {
    .motivation-paper-actions {
        flex-wrap: wrap;
    }
}

/* --- Mobilon a gombsor kompakt marad --------------------------------
   Asztali nézetben (850 px körül is) a fenti nowrap szabály egy sorban tartja
   a vezérlőket. Mobilon az elsődleges navigáció (Előző + Következő/Beküldés)
   egy sorban, fele-fele szélességgel marad. A másodlagos műveletek csak a
   "További műveletek" lenyitása után foglalnak helyet. */
@media (max-width: 760px) {
    #motivationActions {
        flex-wrap: wrap;
        align-items: stretch;
    }

    #motivationActions #motivationPrev,
    #motivationActions #motivationNext,
    #motivationActions #motivationSubmit {
        order: 1;
        flex: 1 1 calc(50% - 4px);
        width: auto;
        min-width: 0;
    }

    #motivationActions #motivationPrev {
        margin-right: 0;
    }

    #motivationActions .motivation-actions-more {
        display: none;
        order: 3;
        flex: 0 0 100%;
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }

    #motivationActions.motivation-actions-expanded .motivation-actions-more {
        display: flex;
    }

    #motivationActions .motivation-actions-more > .questionnaire-button,
    #motivationActions .motivation-actions-more .motivation-session-select {
        flex: 0 0 auto;
        width: 100%;
        min-width: 0;
    }

    #motivationMoreToggle {
        display: block;
        order: 2;
        flex: 0 0 100%;
        width: 100%;
        min-height: 34px;
        padding: 4px 8px;
        border: 0;
        border-radius: 8px;
        background: transparent;
        color: #0057b8;
        font: inherit;
        font-size: 13px;
        font-weight: 600;
        line-height: 1.2;
        text-decoration: underline;
        text-underline-offset: 2px;
        cursor: pointer;
    }

    #motivationMoreToggle::after {
        content: ' ▾';
    }

    #motivationActions.motivation-actions-expanded #motivationMoreToggle::after {
        content: ' ▴';
    }

    #motivationPreviousSessionsLabel {
        position: static;
        width: auto;
        height: auto;
        margin: 2px 0 0;
        padding: 0;
        overflow: visible;
        clip: auto;
        clip-path: none;
        white-space: normal;
        font-size: 13px;
        color: #374151;
    }

    .motivation-paper-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .motivation-eval-start-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .motivation-eval-start-actions .questionnaire-button {
        flex: 0 0 auto;
        width: 100%;
    }

    .motivation-paper-actions .questionnaire-button {
        flex: 0 0 auto;
        width: 100%;
    }

    .motivation-paper-pickers,
    .motivation-paper-upload-footer,
    .motivation-paper-upload-code {
        flex-direction: column;
        align-items: stretch;
    }

    .motivation-paper-pickers .questionnaire-button,
    .motivation-paper-upload-footer .questionnaire-button,
    .motivation-paper-upload .motivation-paper-page-input {
        flex: 0 0 auto;
        width: 100%;
        min-width: 0;
    }

    .motivation-paper-upload-submit {
        margin-left: 0;
    }
}


@media (max-width: 480px) {
    .motivation-likert-option {
        width: 38px;
        height: 38px;
    }

    .motivation-option {
        padding: 9px 10px;
    }
}

/* --- A pályaválasztó (tizenéves) oldal fejléce szűk kijelzőn -----------
   A nyilvános ikonsor (5 gomb) és a hosszabb cím 360 px szélességen nem fér
   el egymás mellett: a cím rálóg az ikonokra. Ezen az oldalon ezért a cím a
   logó mellett saját sorba kerülhet, az ikonsor pedig alá. A felnőtt pilot
   fejléce változatlan marad, ezért a szabály csak a motivation_map_teen
   törzsre érvényes. */
@media (max-width: 520px) {
    body[data-questionnaire="motivation_map_teen"] #chat-header {
        flex-wrap: wrap;
        row-gap: 8px;
    }

    body[data-questionnaire="motivation_map_teen"] #chat-header .header-left {
        flex: 1 1 100%;
    }

    body[data-questionnaire="motivation_map_teen"] #chat-header .header-right {
        margin-left: auto;
    }

    body[data-questionnaire="motivation_map_teen"] #chat-header h1 {
        font-size: 18px;
        line-height: 1.25;
        align-items: flex-start;
    }
}
