/* ITHB — γραμμή «Πίσω / Αρχική» στις σελίδες δραστηριοτήτων, στη θέση των breadcrumbs (22/11/2026). namespace: ithb-
   Τη φτιάχνει το ithb-nav.js και βάζει body.ithb-on· χωρίς το script δεν αλλάζει τίποτα (μένουν τα breadcrumbs). */
#ithb-bar { position: sticky; top: 60px; z-index: 1000; background: #fff; border-bottom: 1px solid #dbe2ea; font-family: 'Inter', -apple-system, 'Segoe UI', sans-serif; }
#ithb-bar .ithb-in { display: flex; align-items: center; justify-content: space-between; gap: 10px; max-width: 830px; margin: 0 auto; padding: 7px 16px; box-sizing: border-box; }
#ithb-bar a { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; border-radius: 99px; font-size: 15px; font-weight: 600; line-height: 1.2; text-decoration: none; }
#ithb-bar a:focus-visible { outline: 3px solid #0064e0; outline-offset: 2px; }
#ithb-bar svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
#ithb-bar .ithb-back { padding: 7px 18px 7px 13px; border: 1.5px solid #9fb0c3; background: #fff; color: #0a1317; }
#ithb-bar .ithb-back:hover { border-color: #0064e0; color: #0457cb; }
#ithb-bar .ithb-home { padding: 7px 6px; color: #4a5a6a; font-weight: 600; }
#ithb-bar .ithb-home:hover { color: #0457cb; }

/* Όπου υπάρχει η γραμμή, τα breadcrumbs του Moodle δεν χρειάζονται· μέσα σε προσπάθεια quiz ούτε το δικό του «Επιστροφή». */
body.ithb-on #page-navbar { display: none !important; }
body.ithb-on#page-mod-quiz-attempt .tertiary-navigation { display: none !important; }

/* Μαζεμένη κεφαλίδα δραστηριότητας (22/11, Loukas: «οι τίτλοι είναι τεράστιοι χωρίς λόγο, τρώνε πολύ οθόνη»): εικονίδιο και τίτλος σε μία
   μικρή γραμμή ακριβώς κάτω από τη γραμμή πλοήγησης, ώστε το υλικό να έρχεται αμέσως, ειδικά στο κινητό. */
body.ithb-on #topofscroll { padding-top: 10px !important; margin-top: 0 !important; }
body.ithb-on #page-header .page-context-header { flex-wrap: nowrap !important; align-items: center; margin-bottom: 0 !important; }
body.ithb-on #page-header .page-header-image { display: flex; align-items: center; }
body.ithb-on #page-header .page-header-image .activityiconcontainer { display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; min-width: 30px; padding: 4px; margin: 0 8px 0 0 !important; border-radius: 8px; line-height: 1; }
body.ithb-on #page-header .page-header-image .activityiconcontainer img,
body.ithb-on #page-header .page-header-image .activityiconcontainer .icon { display: block; width: 22px; height: 22px; margin: 0; font-size: 22px; vertical-align: top; }   /* display:block → κέντρο ακριβώς στο ύψος του τίτλου */
body.ithb-on #page-header h1 { font-size: 18px !important; line-height: 1.3 !important; }
/* Το «Επισήμανση ως ολοκληρωμένου» δεν εμφανίζεται μέσα στη δραστηριότητα: ο μαθητής πατά τον κύκλο στην αρχική του μαθήματος. */
body.ithb-on #page-header .header-actions-container { display: none !important; }
/* Καρτέλες του Moodle μέσα στη δραστηριότητα (σε βιβλίο: «Βιβλίο / Περισσότερα»): δεν χρειάζονται στον μαθητή. */
html.itha-learner body.path-mod.ithb-on .secondary-navigation { display: none !important; }
/* Βιβλίο με κάρτες μελέτης: ο τίτλος κεφαλαίου («1. Κάρτες») δεν λέει κάτι, μπροστά είναι η ίδια η κάρτα. */
body.ithb-on .book_content:has(.ithf-deck) > h2 { display: none; }

/* Ό,τι άλλο κολλάει πάνω μέσα στη σελίδα (player ηχητικών, βίντεο) κατεβαίνει όσο το ύψος της γραμμής, για να μη μπει από κάτω της. */
body.ithb-on .ithp-stage { top: calc(8px + var(--ithb-h, 55px)); }
body.ithb-on .ithv-stage { top: calc(14px + var(--ithb-h, 55px)); }

@media (max-width: 560px) {
  #ithb-bar .ithb-in { padding: 5px 12px; }
  #ithb-bar a { font-size: 14px; }
  #ithb-bar .ithb-back { padding: 6px 14px 6px 10px; }
  body.ithb-on #page-header h1 { font-size: 16px !important; }
}
@media print { #ithb-bar { display: none !important; } }
