/* =============================================================================
   Boost Union: Admin UI fixes
   Make the SCSS editor textareas in the Boost Union settings taller so they
   are actually usable without constant scrolling.
   ============================================================================= */
#id_s_theme_boost_union_scsspre,
#id_s_theme_boost_union_scss {
    height: 500px !important;
}

/* =============================================================================
   Login page: layout fixes
   The login page uses a centered card layout that breaks when #page has a fixed
   height — reset it so the card can grow naturally.
   ============================================================================= */
#page-login-index #page {
    height: auto;
    background: none;
}

/* =============================================================================
   Grader & Collabora: full-height iframe layout
   Both mod_assign grader and mod_collabora render an iframe that should fill
   the full viewport height. Without height: 100vh the iframe is cut off.
   Background is forced to white because the dynamic background color from the
   plugin settings would show through the transparent iframe container.
   ============================================================================= */
body#page-mod-assign-grader #page {
    height: 100vh;
}

#page-mod-collabora-view #page,
#page-mod-assign-grader #page {
    background-color: #ffffff;
}

#page-mod-assign-grader div[data-region=grading-navigation-panel],
#page-mod-assign-grader div[data-region=grade-actions-panel] {
    background-color: #ffffff;
}

/* =============================================================================
   Footer (#footnote): positioning and spacing
   Moodle's default footer has no sticky behaviour. These rules push it to the
   bottom of the flex column and handle responsive margin/width resets that are
   needed when a background color or box layout is active (dynamic CSS from
   hook_callbacks.php may add further overrides on top of these base rules).
   ============================================================================= */
#footnote {
    margin-top: auto !important;
    margin-bottom: 0 !important;
    padding: 1.5rem .5rem;
}

@media (min-width: 768px) {
    #footnote {
        width: 100%;
        margin-left: auto !important;
        margin-right: auto !important;
    }
    #page-login-index #footnote {
        width: unset;
        margin-left: 3rem !important;
        margin-right: 3rem !important;
    }
}

@media (max-width: 767.98px) {
    #footnote {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}

/* =============================================================================
   Content bank: dropdown height cap
   The file type / mime-type dropdown in the content bank can grow very tall on
   sites with many file types. Cap it so it stays within the viewport.
   ============================================================================= */
#page-contentbank .content-bank-container .dropdown-menu {
    max-height: 300px;
}