/* --- FILL BLOKK – szakaszok és beállítások --- */
.fill-config-panel {
    display: none; margin-bottom: 10px; padding: 10px 12px;
    background: #f0f9ff; border: 1px dashed #7dd3fc;
    border-radius: 6px; font-size: 0.85rem;
  }
  .fill-config-panel.show { display: block; }
  .fill-config-panel .quiz-config-row > label { color: #0c4a6e; }
  .fill-config-panel .quiz-config-row input[type="radio"],
  .fill-config-panel .quiz-config-row input[type="checkbox"] {
    accent-color: #0284c7;
  }
  .fill-config-panel .quiz-config-hint { color: #0c4a6e; }
  .fill-section + .fill-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 2px dashed #cbd5e1;
  }
  .fill-page-info {
    font-size: 0.85rem;
    font-weight: 700;
    color: #64748b;
    margin-left: auto;
    padding: 4px 10px;
    background: #f1f5f9;
    border-radius: 12px;
    font-family: "Consolas", "Courier New", monospace;
  }
  .fill-prev-btn,
  .fill-next-btn {
    background: #2563eb;
    color: white;
    border: 1px solid #1d4ed8;
  }
  .fill-prev-btn:hover,
  .fill-next-btn:hover { background: #1d4ed8; opacity: 1; }

/* --- FILL BLOKK (Szókitöltős kérdés) --- */
.block.fill-block {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
  }
  .block.fill-block .fill-teacher-view {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .block.fill-block .fill-teacher-hint {
    font-size: 0.82rem;
    color: #0c4a6e;
    background: #e0f2fe;
    border: 1px solid #7dd3fc;
    border-radius: 6px;
    padding: 8px 12px;
    line-height: 1.5;
  }
  .block.fill-block .fill-teacher-hint code {
    background: white;
    padding: 1px 5px;
    border-radius: 3px;
    font-family: "Consolas", "Courier New", monospace;
    font-size: 0.85em;
    color: #0369a1;
  }
  .block.fill-block .fill-textarea {
    width: 100%;
    min-height: 120px;
    border: 1px solid #7dd3fc;
    border-radius: 6px;
    padding: 10px 12px;
    /* Monospace betűtípus: a szóközök, behúzások és a karakterek
       szélessége megmarad – jól illik kód/konfiguráció
       kitöltetéséhez. */
    font-family: "Consolas", "Courier New", monospace;
    font-size: 0.92rem;
    line-height: 1.6;
    resize: vertical;
    background: white;
    color: #1e293b;
    outline: none;
    /* A hosszú tartalom a textarea belsejében görgethető legyen
       (mint a quiz-textarea esetén), ne az oldal görögjön. */
    overflow-y: auto;
    overflow-x: hidden;
    transition: height 0.12s ease;
    max-height: 60vh;
    cursor: text;
    user-select: text;
    -webkit-user-select: text;
  }
  .block.fill-block .fill-textarea:focus {
    outline: 2px solid #0284c7;
    border-color: transparent;
  }
  .block.fill-block .fill-preview-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: #0369a1;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 4px;
  }
  .block.fill-block .fill-preview {
    background: white;
    border: 1px solid #bae6fd;
    border-radius: 6px;
    padding: 12px 14px;
    min-height: 40px;
    /* Monospace – hogy az előnézetben ugyanolyan széles legyen
       minden karakter, mint a beviteli mezőben és a diák nézetben. */
    font-family: "Consolas", "Courier New", monospace;
    font-size: 0.92rem;
    line-height: 1.7;
    color: #1e293b;
  }
  .block.fill-block .fill-preview-text {
    word-wrap: break-word;
  }
  .block.fill-block .fill-blank-preview {
    display: inline-block;
    background: #fef3c7;
    border-bottom: 2px solid #f59e0b;
    color: #78350f;
    font-weight: 700;
    padding: 0 8px;
    margin: 0 2px;
    border-radius: 3px 3px 0 0;
    font-family: "Consolas", "Courier New", monospace;
    font-size: 0.85em;
    min-width: 32px;
    text-align: center;
  }
  .block.fill-block .fill-preview-info {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px dashed #bae6fd;
    font-size: 0.78rem;
    color: #0369a1;
    font-weight: 600;
  }
  .block.fill-block .fill-empty {
    color: #94a3b8;
    font-style: italic;
    padding: 8px 0;
  }

  .block.fill-block .fill-header {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    gap: 16px;
    margin-bottom: 14px;
    padding: 12px 16px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
  }
  .block.fill-block .fill-header.perfect { background: #f0fdf4; border-color: #86efac; }
  .block.fill-block .fill-header.failed { background: #fef2f2; border-color: #fca5a5; }
  .block.fill-block .fill-header-left {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    justify-content: center;
  }
  .block.fill-block .fill-header-label {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1e293b;
  }
  .block.fill-block .fill-header-sub {
    font-size: 0.82rem;
    color: #64748b;
  }
  .block.fill-block .fill-header-sub .fill-blank-count {
    font-weight: 700;
    color: #0369a1;
  }
  .block.fill-block .fill-header-right {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4px 20px;
    min-width: 140px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
  }
  .block.fill-block .fill-header.perfect .fill-header-right { border-color: #86efac; }
  .block.fill-block .fill-header.failed .fill-header-right { border-color: #fca5a5; }
  .block.fill-block .fill-header-score-value {
    font-family: "Consolas", "Courier New", monospace;
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1;
    color: #1e293b;
  }
  .block.fill-block .fill-header.perfect .fill-header-score-value { color: #166534; }
  .block.fill-block .fill-header.failed .fill-header-score-value { color: #991b1b; }
  .block.fill-block .fill-header-score-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 4px;
  }

  .block.fill-block .fill-student-view {
    background: white;
    border: 1px solid #bae6fd;
    border-radius: 6px;
    padding: 14px 16px;
    /* Monospace – a diák nézet ugyanolyan elrendezésű legyen,
       mint amit a tanár beírt. */
    font-family: "Consolas", "Courier New", monospace;
    font-size: 0.95rem;
    line-height: 2;
    color: #1e293b;
    word-wrap: break-word;
  }
  .block.fill-block .fill-student-view .fill-text {
    white-space: pre-wrap;
  }
  .block.fill-block .fill-blank-wrap {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 2px 4px;
    vertical-align: baseline;
  }
  .block.fill-block .fill-input {
    display: inline-block;
    /* Fix 4 karakteres kezdőméret – NEM árulja el a helyes válasz
       hosszát (pl. igen/nem eldöntésénél fontos).
       Gépelés közben dinamikusan nő, ha a diák hosszabb szót ír
       be, de ez már az ő saját szava. */
    width: 4ch;
    min-width: 4ch;
    max-width: none;
    padding: 1px 6px;
    border: none;
    border-bottom: 2px solid #0284c7;
    border-radius: 4px 4px 0 0;
    background: #f0f9ff;
    color: #0c4a6e;
    /* Monospace – a beírt szó szélessége illeszkedjen a
       környező szöveghez. */
    font-family: "Consolas", "Courier New", monospace;
    font-size: 1em;
    font-weight: 600;
    text-align: center;
    outline: none;
    transition: width 0.12s ease, background 0.12s, border-color 0.12s;
    box-sizing: content-box;
    vertical-align: baseline;
  }
  .block.fill-block .fill-input:focus {
    background: #e0f2fe;
    border-bottom-color: #0369a1;
    box-shadow: 0 2px 0 0 #0369a1;
  }
  .block.fill-block .fill-input.correct {
    background: #dcfce7;
    border-bottom-color: #16a34a;
    color: #166534;
    cursor: default;
  }
  .block.fill-block .fill-input.wrong {
    background: #fee2e2;
    border-bottom-color: #dc2626;
    color: #991b1b;
    text-decoration: line-through;
    text-decoration-color: rgba(153, 27, 27, 0.5);
    cursor: default;
  }
  .block.fill-block .fill-point-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 8px;
    line-height: 1;
    font-family: "Consolas", monospace;
  }
  .block.fill-block .fill-point-badge.correct {
    background: #16a34a;
    color: white;
  }
  .block.fill-block .fill-point-badge.wrong {
    background: #dc2626;
    color: white;
  }
  .block.fill-block .fill-correct-answer {
    color: #16a34a;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: "Consolas", "Courier New", monospace;
    margin-left: 2px;
    white-space: nowrap;
  }
  .block.fill-block .fill-actions {
    margin-top: 12px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
  }

/* ============================================================
   modosit_564.py — A kitöltős feladat gombjainak elrejtése
   beadás után
   ============================================================
   A body.locked osztály a beadás után kerül a body-ra
   (a finalizeDoc() hívja az applyLockedMode()-ot).
   A .fill-check-btn és a .fill-reset-btn a kitöltős feladat
   gombjai.
   ============================================================ */
body.locked .fill-check-btn,
body.locked .fill-reset-btn {
  display: none !important;
}
