/* DC360 Moodle styles (was /wbuk/moodle/moodle.css plus the CSS in Additional HTML). Loaded by local_dc360pagekit after the theme CSS. */

#page.hasstickyfooter #page-content {
    margin-bottom: 2rem;
}

.main-inner {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.drawer.drawer-right.show {
    z-index: 11;
}
.modal-backdrop {
    z-index: 10;
}

.navbar, .primary-navigation .navigation, .primary-navigation .navigation .nav-link {
    height: 30px !important;
}

body:not(.siteadmin) #page.drawers {
    margin-top: 0;
}
body.siteadmin .navbar {
    position: relative;
}
#page.drawers {
    height: 100vh;
}
.drawer-left, .drawer-right {
    top: 0;
}

.siteadmin #page.drawers {
    margin-top: 30px;
    height: calc(100vh - 30px);
}
.siteadmin .drawer-left, .siteadmin .drawer-right {
    top: 30px;
}

.drawerheader {
    height: 25px;
}

#format_tiles_overlay {
    width: 100% !important;
}

/* ===================== */
/* VPL CLEANUP */
/* ===================== */
#vpl_ide_comments,
#vpl_ide_console,
#vpl_ide_about,
a[href="http://vpl.dis.ulpgc.es/"] {
    display: none;
}

/* ===================== */
/* GLOBAL LAYOUT */
/* ===================== */
#page {
    padding-top: 1rem;
}
.contents {
    padding-bottom: 1rem;
}

/* ===================== */
/* HEADER IMAGE POSITION */
/* ===================== */
#id_pageheadercontainer {
    position: relative;
    overflow: visible;
}

.cm-type-lesson #id_pageheadercontainer img.float-right {
    position: absolute;
    right: 0;
    top: 0;
}

/* ===================== */
/* LESSON PAGES */
/* ===================== */
#page-navbar {
    display: none;
}

#page-content .activity-header {
    display: none;
}

/* ===================== */
/* LESSON ANSWERS */
/* ===================== */
.path-mod-lesson .answeroption {
    background: #eee;
    padding: 12px;
    margin-bottom: 14px;
    border-radius: 6px;
    box-shadow: 1px 1px 6px #bbb;
}

.path-mod-lesson .answeroption .form-check {
    width: 100%;
}

.path-mod-lesson .answeroption .form-check-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    padding: 12px 14px 12px 50px;
    border-radius: 6px;
    background: #eee;
    box-shadow: 1px 1px 6px #bbb;
    cursor: pointer;
    transition: background 0.2s ease;
}

.path-mod-lesson .answeroption .form-check-label:hover {
    background: #e4e4e4;
}

.path-mod-lesson .answeroption .form-check-label p {
    display: inline;
    margin: 0;
}

.path-mod-lesson .answeroption input[type="radio"] {
    margin-top: 3px;
    flex-shrink: 0;
}

.path-mod-lesson .answeroption input[type="radio"]:checked + p {
    font-weight: bold;
}

.path-mod-lesson .answeroption input[type="radio"]:checked {
    accent-color: #2e488c;
}

/* ===================== */
/* REVEAL FOUC PREVENTION */
/* ===================== */
#page-mod-lesson-view div[role="main"] .text_to_html .box.py-3.generalbox,
#page-mod-lesson-view .studentanswer table.generaltable tbody tr td.lastcol:not(:has(.response)) {
    visibility: hidden;
}

#page-mod-lesson-view div[role="main"] .text_to_html .box.py-3.generalbox.dc360-ready,
#page-mod-lesson-view .studentanswer table.generaltable tbody tr td.lastcol.dc360-ready {
    visibility: visible;
}


/* ===================== */
/* FORCE VERTICAL STACK */
/* ===================== */
.path-mod-lesson .answeroptiongroup .d-flex.flex-wrap {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ===================== */
/* FIX COLUMN STACKING */
/* ===================== */
#id_pageheadercontainer .answeroption .fitem > .col-md-9,
#id_pageheadercontainer .answeroption .fitem > .col-md-3 {
    display: block !important;
    width: 100%;
}

/* ===================== */
/* MULTICHOICE */
/* ===================== */
.path-mod-lesson .answeroptiongroup label.form-check-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    padding: 12px 14px;
    border-radius: 6px;
    background: #eee;
    box-shadow: 1px 1px 6px #bbb;
    cursor: pointer;
    transition: background 0.2s ease;
}

.path-mod-lesson .answeroptiongroup label.form-check-label:hover {
    background: #e4e4e4;
}

.path-mod-lesson .answeroptiongroup label.form-check-label p {
    display: inline;
    margin: 0;
}

.path-mod-lesson .answeroptiongroup input[type="radio"] {
    margin-top: 3px;
    flex-shrink: 0;
}

/* ===================== */
/* SELECT (IMAGE + DROPDOWN) ANSWERS */
/* ===================== */
.path-mod-lesson .answeroption .row {
    margin: 0;
    display: flex;
    align-items: center;
}

.path-mod-lesson .answeroption .col-md-3 {
    width: 180px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.path-mod-lesson .answeroption img {
    max-width: 100%;
    height: auto;
}

.path-mod-lesson .answeroption .col-md-9 {
    flex: 1;
    width: auto;
    padding-left: 12px;
}

.path-mod-lesson .answeroption select.form-select {
    width: 100%;
    max-width: 300px;
}

.path-mod-lesson .answeroption .felement {
    display: block;
}

/* ===================== */
/* STUDENT ANSWERS */
/* ===================== */
.studentanswer p {
}

.studentanswer .lastrow:hover {
    background-color: none;
}

.studentanswer .lastrow .lastcol {
    padding: 1rem 0;
}

.response {
    border-radius: 0.25rem;
    padding: 1rem;
}

.response.incorrect {
    border: 10px solid #d67968;
}

.response.correct {
    border: 10px solid #669d81;
}

/* ===================== */
/* REVEAL / HIDE */
/* ===================== */
.dc360-reveal-btn {
    background: #2e488c;
    color: #fff;
    border: none;
    border-radius: 5px;
    padding: 6px 14px;
    cursor: pointer;
    font-size: 0.9rem;
    font-family: inherit;
    transition: background 0.2s ease;
}

.dc360-reveal-btn:hover {
    background: #1e3470;
}

td.dc360-revealed {
    cursor: pointer;
    position: relative;
}

td.dc360-revealed::after {
    content: 'Click to hide';
    display: none;
    position: absolute;
    bottom: 4px;
    right: 8px;
    font-size: 0.75rem;
    color: #999;
}

td.dc360-revealed:hover::after {
    display: block;
}

.box.py-3.generalbox.dc360-revealed {
    cursor: pointer;
}

.box.py-3.generalbox:has(.dc360-reveal-btn) {
    padding: 0.5rem 1rem !important;
}

/* ===================== */
/* LESSON ANSWER FORM */
/* ===================== */
#fgroup_id_answerid .w-100 > .d-flex {
    display: grid !important;
}

#fgroup_id_answerid .w-100 > .d-flex > .form-check-inline {
    align-items: baseline;
}

/* ===================== */
/* SIDEBAR */
/* ===================== */
.block_course_summary img.img-responsive {
    max-width: 90%;
}

.block_course_summary ul {
    padding-left: 0;
}

.block_course_summary ul ul {
    padding-left: 20px;
}

.block_course_summary ul ul p {
    margin: 0;
}

/* ===================== */
/* BUTTONS */
/* ===================== */
.btn-primary, .btn-secondary, .mod_quiz-next-nav {
    background-color: #2e488c;
    color: #fff;
    border: 4px solid #2de12d;
}

.btn-primary:hover, .btn-secondary:hover, .mod_quiz-next-nav:hover {
    background-color: #172345;
    color: #fff;
    border-color: #1ea71e;
}

.mod_quiz-next-nav {
    padding: 5px 10px;
    border-radius: 5px;
}

a.lessonbutton.standardbutton.pe-3 {
    background-color: #2e488c;
    color: #fff;
    border: 4px solid #2de12d;
    text-decoration: none;
    padding: 5px 10px !important;
    text-align: centre;
    margin: 0 0.5rem;
    border-radius: 5px;
}

a.lessonbutton.standardbutton.pe-3[href^="https://www.delivercomputing360.com/moodle/grade/index.php"] {
    display: none !important;
}

.lessonbutton.pr-3 {
    background: #2e4886;
    color: #fff !important;
    padding: 10px;
    margin: 0 10px;
    border-radius: 5px;
    border: 4px solid #6bca3c;
}

.lessonbutton.pr-3:hover {
    background: #23527c !important;
}

.button-software {
    background: #7f56cf;
    color: #fff;
    font-weight: bold;
    font-family: monospace;
    text-decoration: none;
    padding: 7px 1rem;
    border-radius: 5px;
    box-shadow: 1px 1px 3px #7f56cf;
    margin-bottom: 10px;
}

.button-software:hover {
    background: #7147c5;
}

/* ===================== */
/* LESSON END / PROGRESS */
/* ===================== */
div[role="main"] h3 + div.generalbox.boxaligncenter,
div[role="main"] h2 + div.generalbox.boxaligncenter {
    display: grid;
    grid-template-columns: 1fr 1fr;
    row-gap: 1rem;
}

div[role="main"] div.generalbox.boxaligncenter > p {
    grid-column: span 2;
    margin: 0;
}

div[role="main"] div.generalbox.boxaligncenter .progress_bar {
    grid-column: span 2;
    padding: 0 !important;
}

div[role="main"] div.generalbox.boxaligncenter .standardbutton,
div[role="main"] div.generalbox.boxaligncenter ~ .standardbutton {
    text-align: center;
    display: inline-block;
}

.box.progress_bar {
    display: none;
}

/* ===================== */
/* NAVIGATION */
/* ===================== */
nav.navbar {
    display: none;
}

.siteadmin nav.navbar {
    display: flex;
}

.path-course .main-inner > .secondary-navigation {
    display: none;
}

.siteadmin.path-course .main-inner > .secondary-navigation {
    display: block;
}

/* ===================== */
/* FOOTER */
/* ===================== */
.activity-navigation {
    display: none;
}

div button.btn-footer-popover {
    display: none !important;
}

/* ===================== */
/* DASHBOARD CLEANUP */
/* ===================== */
.block_myoverview > .card-body > h3,
.block-myoverview > div.my-2 > div > div:last-child,
.block-myoverview > div.my-2 > div > div:nth-last-child(2) {
    display: none !important;
}

.page-mycourses .block_myoverview .block-cards {
    border: none;
    padding: 0;
}

/* ===================== */
/* MODAL / CLICKABLE IMAGES */
/* ===================== */
.clickable-image {
    cursor: pointer;
    border: 3px solid #ddd;
    border-radius: 10px;
    padding: 6px;
    margin: 10px;
    background: #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    transition: all 0.2s ease;
    display: inline-block;
}

.clickable-image:hover {
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 8px 18px rgba(0,0,0,0.25);
    border-color: #ef4540;
}

.clickable-image:active {
    transform: scale(0.97);
    box-shadow: 0 3px 8px rgba(0,0,0,0.2);
}

/* ===================== */
/* LIGHTBOX */
/* ===================== */
img.js-lightbox {
    cursor: zoom-in;
}

#dc360-lightbox {
    display: none;
    position: fixed;
    z-index: 99999;
    inset: 0;
    background: rgba(0,0,0,0.9);
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.dc360-lightbox-content {
    position: relative;
    max-width: 95vw;
    max-height: 95vh;
    text-align: center;
}

#dc360-lightbox img {
    max-width: 100%;
    max-height: 75vh;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    cursor: zoom-out;
    background: #fff;
}

.dc360-lightbox-caption {
    margin-top: 1rem;
    padding: 1rem 1.5rem;
    background: #fff;
    border-radius: 12px;
    color: #333;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 6px 18px rgba(0,0,0,0.25);
}

.dc360-lightbox-caption h3,
.dc360-lightbox-caption h4,
.dc360-lightbox-caption p {
    margin-bottom: 0.5rem;
}

.dc360-lightbox-caption *:last-child {
    margin-bottom: 0;
}

.dc360-lightbox-close {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 48px;
    height: 48px;
    background: #fff;
    color: #333;
    border-radius: 50%;
    font-size: 34px;
    line-height: 44px;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    transition: transform 0.2s ease;
}

.dc360-lightbox-close:hover {
    transform: scale(1.1);
}

/* ===================== */
/* BLOOKET ICONS */
/* ===================== */
.activity-grid[data-title="Host Blooket"] .activityicon,
.activity-grid[data-title="Play Blooket"] .activityicon {
    visibility: hidden;
}

.activity-grid[data-title="Host Blooket"] .activity-icon,
.activity-grid[data-title="Play Blooket"] .activity-icon {
    position: relative;
}

.activity-grid[data-title="Host Blooket"] .activity-icon::after,
.activity-grid[data-title="Play Blooket"] .activity-icon::after {
    content: '';
    position: absolute;
    inset: 0;
}

.activity-grid[data-title="Host Blooket"] .activity-icon::after {
    background: url('/images/Blooket/owl.svg') center/contain no-repeat;
}

.activity-grid[data-title="Play Blooket"] .activity-icon::after {
    background: url('/images/Blooket/chick.svg') center/contain no-repeat;
}

.activity.unclickable[data-title="Host Blooket"] {
    display: none;
}

/* ===================== */
/* MOBILE FIXES */
/* ===================== */
@media only screen and (max-width: 767px) {

    .moodle-dialogue-base .moodle-dialogue.mod_quiz_preflight_popup {
        max-width: 90%;
    }

    .path-mod-lesson .answeroption .row {
        flex-direction: column;
        align-items: flex-start;
    }

    .path-mod-lesson .answeroption .col-md-3 {
        width: 100%;
        margin-bottom: 10px;
    }

    .path-mod-lesson .answeroption .col-md-9 {
        width: 100%;
        padding-left: 0;
    }

    .path-mod-lesson .answeroption select.form-select {
        max-width: 100%;
    }

}


/* ===================== */
/* USER TYPE (body classes set by local_dc360pagekit; was usercheck.php) */
/* ===================== */
body.student .main-inner > .secondary-navigation,
body.teacher .main-inner > .secondary-navigation {
    display: none;
}

/* AI features only for users with an AI role at system level. */
body:not(.ai-enabled) #ai-features,
body:not(.ai-enabled) .course-assist-response {
    display: none !important;
}

/* ===================== */
/* TEXT TO SPEECH (was Additional HTML: When BODY is opened) */
/* ===================== */
.tts-overlay-highlight {
    background: rgba(255, 230, 0, 0.05);
    border: 2px solid rgba(255, 200, 0, 0.5);
    border-radius: 4px;
    pointer-events: none;
}

/* ===================== */
/* ADD NOTE BUTTON (was Additional HTML: Before BODY is closed) */
/* ===================== */
.dc360-add-note-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border: none;
    border-radius: 6px;
    background: #589575;
    color: #fff;
    font-size: 0.95rem;
    cursor: pointer;
}
.dc360-add-note-btn:hover {
    background: #46795e;
}

/* ===================== */
/* WORKBOOK CHAPTER PAGES (lesson.js initWorkbookChapterPage) */
/* ===================== */
/* Keep the page hidden inside DC360 until lesson.js has checked/rebuilt it (it always marks it done). */
html.dc360-framed #page-mod-lesson-view.dc360-wbpages div[role="main"] .box.contents:not(.dc360-wb-done) {
    visibility: hidden;
}

.dc360-workbook-chapter .dc360-workbook-chapter-image img {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.dc360-workbook-chapter .dc360-workbook-chapter-action {
    margin-top: 1.5rem;
    text-align: center;
}

.dc360-add-note-btn.dc360-workbook-chapter-btn {
    padding: 12px 24px;
    font-size: 1.15rem;
    font-weight: 600;
    border-radius: 999px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

