/* ITHQ — πιο απλό test για τον μαθητή (22/11/2026). namespace: ithq-
   Τα στοιχεία τα φτιάχνει το ithq-quiz.js· χωρίς το script μένει η σελίδα του Moodle όπως είναι. */

/* 1α) σελίδα του test: τα δύο κουμπιά σε μία γραμμή, ίδιο ύψος, στοιχισμένα */
.ithq-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; flex: 1 1 100%; width: 100%; font-family: 'Inter', -apple-system, 'Segoe UI', sans-serif; }
.ithq-actions .quizstartbuttondiv { display: block; margin: 0 !important; }
.ithq-actions .quizstartbuttondiv form, .ithq-actions .quizstartbuttondiv div { margin: 0; }
.ithq-actions .quizstartbuttondiv .btn, .ithq-actions .ithq-again { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; margin: 0; padding: 9px 20px; border-radius: 10px; font-family: inherit; font-size: 15px; font-weight: 600; line-height: 1.25; cursor: pointer; }
.ithq-actions .ithq-again { border: 1.5px solid #9fb0c3; background: #fff; color: #0a1317; }
.ithq-actions .ithq-again:hover { border-color: #0064e0; color: #0457cb; }
.ithq-confirm { flex: 1 1 100%; max-width: 560px; padding: 12px 14px; border: 1px solid #dbe2ea; border-radius: 12px; background: #f3f6f9; }
.ithq-confirm p { margin: 0 0 10px; font-size: 14px; line-height: 1.45; color: #1c1e21; font-family: 'Source Sans 3', -apple-system, 'Segoe UI', sans-serif; }
.ithq-confirm .ithq-yes, .ithq-confirm .ithq-no { display: inline-flex; align-items: center; min-height: 40px; padding: 8px 16px; border-radius: 8px; font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer; }
.ithq-confirm .ithq-yes { margin-right: 8px; border: 1.5px solid #0064e0; background: #0064e0; color: #fff; }
.ithq-confirm .ithq-yes:hover { background: #0457cb; color: #fff; }
.ithq-confirm .ithq-yes.ithq-busy { opacity: .6; pointer-events: none; }
.ithq-confirm .ithq-no { border: 1.5px solid #9fb0c3; background: #fff; color: #0a1317; }
@media (max-width: 440px) {
  .ithq-actions .quizstartbuttondiv, .ithq-actions .quizstartbuttondiv form, .ithq-actions .quizstartbuttondiv .btn, .ithq-actions .ithq-again { width: 100%; }
}

/* 1β) βαθμός και προσπάθειες σε κάρτες, στη θέση των πινάκων του Moodle */
body.ithq-view-on .ithq-native { display: none !important; }
.ithq-view { max-width: 640px; margin: 6px 0 24px; font-family: 'Source Sans 3', -apple-system, 'Segoe UI', sans-serif; color: #1c1e21; }
.ithq-best { display: flex; align-items: center; gap: 18px; padding: 16px 18px; border: 1px solid #dbe2ea; border-radius: 16px; background: #fff; }
.ithq-best-n { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 92px; padding: 10px 12px; border-radius: 14px; background: #fff2e0; color: #9a5200; }
.ithq-best.ithq-pass .ithq-best-n { background: #e6f4ea; color: #18702f; }
.ithq-best.ithq-new .ithq-best-n { background: #e8f2fe; color: #0457cb; }   /* πρώτη φορά: πόσες ερωτήσεις έχει το test */
.ithq-best-n b { font-family: 'Inter', -apple-system, 'Segoe UI', sans-serif; font-size: 32px; font-weight: 700; line-height: 1.05; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.ithq-best-n span { font-size: 13px; opacity: .85; }
.ithq-best-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.ithq-best-t strong { font-family: 'Inter', -apple-system, 'Segoe UI', sans-serif; font-size: 16px; font-weight: 600; color: #0a1317; }
.ithq-best-t span { font-size: 14px; color: #5d6c7b; }
.ithq-scale { position: relative; height: 8px; border-radius: 99px; background: #e4eaf0; }
.ithq-scale i { display: block; height: 100%; border-radius: 99px; background: #d9760a; }
.ithq-best.ithq-pass .ithq-scale i { background: #1f8a3b; }
.ithq-scale em { position: absolute; top: -4px; width: 2px; height: 16px; margin-left: -1px; border-radius: 2px; background: #0a1317; }
.ithq-view .ithq-h { margin: 22px 0 8px; font-family: 'Inter', -apple-system, 'Segoe UI', sans-serif; font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #5d6c7b; }
.ithq-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ithq-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 12px 16px; border: 1px solid #dbe2ea; border-radius: 12px; background: #fff; }
.ithq-att-t { flex: 1 1 200px; min-width: 0; display: flex; flex-direction: column; }
.ithq-att-t b { font-family: 'Inter', -apple-system, 'Segoe UI', sans-serif; font-size: 15px; font-weight: 600; color: #0a1317; }
.ithq-att-t span { font-size: 13px; color: #5d6c7b; }
.ithq-att-g { flex: none; font-size: 14px; color: #5d6c7b; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ithq-att-g b { font-family: 'Inter', -apple-system, 'Segoe UI', sans-serif; font-size: 18px; font-weight: 700; color: #0a1317; }
.ithq-att-g.ithq-pass b { color: #18702f; }
.ithq-pill { flex: none; padding: 3px 10px; border-radius: 99px; background: #eef1f4; color: #5d6c7b; font-size: 13px; font-weight: 600; white-space: nowrap; }
.ithq-pill.ithq-open { background: #e8f2fe; color: #0457cb; }
.ithq-list .ithq-att-a { flex: none; font-family: 'Inter', -apple-system, 'Segoe UI', sans-serif; font-size: 14px; font-weight: 600; color: #0457cb; text-decoration: none; white-space: nowrap; }
.ithq-list .ithq-att-a::after { content: " ›"; }
.ithq-list .ithq-att-a:hover { text-decoration: underline; }
@media (max-width: 440px) {
  .ithq-best { gap: 12px; padding: 14px; }
  .ithq-best-n { min-width: 78px; }
  .ithq-best-n b { font-size: 27px; }
}

/* 2) μέσα στην προσπάθεια: πράσινο «Τέλος test», για να ξεχωρίζει από το μπλε «Επόμενη ερώτηση» */
#responseform .submitbtns .ithq-finish, #responseform .submitbtns .ithq-finish:focus { background: #1f8a3b !important; border-color: #1f8a3b !important; color: #fff !important; }
#responseform .submitbtns .ithq-finish:hover { background: #18702f !important; border-color: #18702f !important; }
/* Ερώτηση «έχεις Ν αναπάντητες»: μπαίνει μέσα στην κολλημένη γραμμή, στη θέση των δύο κουμπιών. */
body.ithq-asking #responseform .submitbtns { flex-wrap: wrap; }
body.ithq-asking #responseform .submitbtns > input { display: none; }
.ithq-ask { flex: 1 1 100%; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; font-family: 'Inter', -apple-system, 'Segoe UI', sans-serif; }
.ithq-ask p { margin: 0; font-size: 15px; color: #0a1317; }
.ithq-ask-b { display: inline-flex; gap: 8px; flex: 1 1 auto; justify-content: flex-end; }
.ithq-ask button { min-height: 44px; padding: 8px 18px; border-radius: 8px; font-size: 15px; font-weight: 600; cursor: pointer; }
.ithq-ask .ithq-ask-no { border: 1.5px solid #9fb0c3; background: #fff; color: #0a1317; }
.ithq-ask .ithq-ask-yes { border: 1.5px solid #1f8a3b; background: #1f8a3b; color: #fff; }
@media (max-width: 560px) { .ithq-ask-b { flex: 1 1 100%; } .ithq-ask-b button { flex: 1 1 0; } }

/* 2α) «Δείξε μου τη σωστή απάντηση» (23/11/2026, δοκιμή στο μάθημα 17): δευτερεύον κουμπί δίπλα στο «Δες αν απάντησες σωστά»
   και, από κάτω, πλαίσιο με τη σωστή απάντηση. Πράσινο = η σωστή απάντηση, παντού (επιλογή, κενό, χάρτης). */
.que .im-controls.ithq-ctrl { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.que .im-controls.ithq-ctrl > .submit { margin: 0; }
.que .ithq-show { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; margin: 0; padding: 6px 14px; border: 1.5px solid #9fb0c3; border-radius: 8px; background: #fff; color: #0457cb; font-family: 'Inter', -apple-system, 'Segoe UI', sans-serif; font-size: 14px; font-weight: 600; line-height: 1.25; cursor: pointer; }
.que .ithq-show:hover, .que .ithq-show:focus-visible { border-color: #0064e0; background: #f3f8ff; }
.que .ithq-show.ithq-busy { opacity: .6; pointer-events: none; }
.que .ithq-answer { max-width: 640px; margin: 10px 0 2px; padding: 12px 14px; border: 1px solid #b7dfc2; border-left: 4px solid #1f8a3b; border-radius: 10px; background: #f1f9f3; color: #0a1317; font-family: 'Source Sans 3', -apple-system, 'Segoe UI', sans-serif; }
.que .ithq-answer-h { display: block; font-family: 'Inter', -apple-system, 'Segoe UI', sans-serif; font-size: 13px; font-weight: 600; color: #18702f; }
.que .ithq-answer-l { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 3px; font-size: 17px; font-weight: 600; line-height: 1.35; }
.que .ithq-answer-l.ithq-answer-many { flex-direction: row; flex-wrap: wrap; gap: 6px; margin-top: 6px; font-size: 15px; }
.que .ithq-answer-many li { padding: 1px 9px; border: 1px solid #b7dfc2; border-radius: 6px; background: #fff; }
.que .ithq-answer-n { display: block; margin-top: 4px; font-size: 14px; color: #3d4a57; }
.que .ithq-answer.ithq-answer-no { border-color: #dbe2ea; border-left-color: #9fb0c3; background: #f3f6f9; }
.que .ithq-answer.ithq-answer-no .ithq-answer-h { color: #3d4a57; font-size: 14px; }
/* πολλαπλή επιλογή: πράσινο περίγραμμα στη σωστή επιλογή (δεν επιλέγεται) */
.que.ithq-shown .answer .ithq-right { position: relative; z-index: 0; }
.que.ithq-shown .answer .ithq-right::before { content: ""; position: absolute; z-index: -1; top: 0; right: 0; bottom: 0; left: 0; border-radius: 8px; background: #e6f4ea; box-shadow: inset 0 0 0 2px #1f8a3b; pointer-events: none; }
/* Το κείμενο της επιλογής είναι <p> με κενό .5rem ΜΟΝΟ από κάτω, άρα μέσα σε πλαίσιο ίσο με τη γραμμή καθόταν ψηλά (2,5px πάνω, 10,5px κάτω)
   και το πλαίσιο ακουμπούσε σχεδόν την επόμενη επιλογή (Loukas 24/11). Γι' αυτό το πλαίσιο είναι ψευδο-στοιχείο ανεβασμένο κατά .25rem:
   ίδιο κενό πάνω και κάτω από το κείμενο ΚΑΙ ίδια απόσταση από την πάνω και την κάτω επιλογή. Η γραμμή και το κείμενό της δεν μετακινούνται. */
.que.ithq-shown .answer .ithq-right:has(.flex-fill > p:last-child)::before { top: -.25rem; bottom: .25rem; }
/* κενά και αντιστοίχιση: ετικέτα με τη σωστή λέξη δίπλα σε κάθε κενό */
.que .ithq-chip { display: none; }
.que.ithq-shown .ithq-chip { display: inline-block; margin: 2px 6px; padding: 1px 8px; border: 1px solid #b7dfc2; border-radius: 6px; background: #e6f4ea; color: #18702f; font-family: 'Inter', -apple-system, 'Segoe UI', sans-serif; font-size: 14px; font-weight: 600; line-height: 1.5; vertical-align: middle; white-space: normal; }
.que.match.ithq-shown .ithq-chip { display: block; width: fit-content; margin: 4px 0 0; }
/* χάρτες: ετικέτες πάνω στις σωστές θέσεις (δεν πιάνονται με το ποντίκι, ο μαθητής σέρνει κανονικά από κάτω) */
.que .ithq-map { display: none; position: absolute; z-index: 6; pointer-events: none; }
.que.ithq-shown .ithq-map { display: block; }
.que .ithq-spot { position: absolute; width: 0; height: 0; }
.que .ithq-spot b { position: absolute; left: 0; bottom: 2px; padding: 1px 6px; border-radius: 5px; background: #18702f; color: #fff; font-family: 'Inter', -apple-system, 'Segoe UI', sans-serif; font-size: 12px; font-weight: 600; line-height: 1.35; white-space: nowrap; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
.que .ithq-spot.ithq-spot-c b { bottom: 11px; transform: translateX(-50%); }
.que .ithq-spot.ithq-spot-c::after { content: ""; position: absolute; left: -7px; top: -7px; width: 14px; height: 14px; border: 2px solid #18702f; border-radius: 50%; background: rgba(31, 138, 59, .3); }
@media (max-width: 440px) {
  .que .im-controls.ithq-ctrl > .submit, .que .ithq-show { width: 100%; }
  .que .ithq-spot b { font-size: 10px; padding: 0 4px; }
}
