/* Dark colour layer for Moodle 4.2 + theme_moove. */
html.local-moovedark-dark {
    color-scheme: dark;
    --md-bg: #111418;
    --md-bg-alt: #171b20;
    --md-surface: #1c2127;
    --md-surface-2: #242a31;
    --md-surface-3: #2c333c;
    --md-text: #edf0f3;
    --md-muted: #adb5bf;
    --md-border: #3a424d;
    --md-link: #8ab4f8;
    --md-link-hover: #b6d2ff;
    --md-primary: #77aaf7;
    --md-focus: #a8c7fa;
    --md-shadow: rgba(0, 0, 0, .42);
}

html.local-moovedark-dark,
html.local-moovedark-dark body,
html.local-moovedark-dark #page,
html.local-moovedark-dark #page-wrapper,
html.local-moovedark-dark #page-content,
html.local-moovedark-dark #region-main,
html.local-moovedark-dark .main-inner,
html.local-moovedark-dark .main-content,
html.local-moovedark-dark .content-wrapper,
html.local-moovedark-dark .dashboard-card-deck,
html.local-moovedark-dark .course-content {
    background-color: var(--md-bg) !important;
    color: var(--md-text) !important;
}

html.local-moovedark-dark body,
html.local-moovedark-dark p,
html.local-moovedark-dark li,
html.local-moovedark-dark dt,
html.local-moovedark-dark dd,
html.local-moovedark-dark label,
html.local-moovedark-dark legend,
html.local-moovedark-dark h1,
html.local-moovedark-dark h2,
html.local-moovedark-dark h3,
html.local-moovedark-dark h4,
html.local-moovedark-dark h5,
html.local-moovedark-dark h6,
html.local-moovedark-dark .text-dark,
html.local-moovedark-dark .text-body {
    color: var(--md-text) !important;
}

html.local-moovedark-dark .text-muted,
html.local-moovedark-dark .dimmed,
html.local-moovedark-dark .dimmed_text,
html.local-moovedark-dark small,
html.local-moovedark-dark .small,
html.local-moovedark-dark .secondary-navigation .moremenu .nav-link {
    color: var(--md-muted) !important;
}

html.local-moovedark-dark a:not(.btn):not(.badge),
html.local-moovedark-dark .nav-link:not(.active) {
    color: var(--md-link);
}

html.local-moovedark-dark a:not(.btn):not(.badge):hover,
html.local-moovedark-dark a:not(.btn):not(.badge):focus {
    color: var(--md-link-hover);
}

/* Moove and Boost navigation. */
html.local-moovedark-dark nav.navbar,
html.local-moovedark-dark .navbar.fixed-top,
html.local-moovedark-dark .navbar-light,
html.local-moovedark-dark .navbar-bootswatch,
html.local-moovedark-dark #page-header,
html.local-moovedark-dark .secondary-navigation,
html.local-moovedark-dark .moremenu.navigation,
html.local-moovedark-dark .primary-navigation {
    background-color: var(--md-bg-alt) !important;
    border-color: var(--md-border) !important;
    color: var(--md-text) !important;
}

html.local-moovedark-dark nav.navbar .nav-link,
html.local-moovedark-dark nav.navbar .navbar-brand,
html.local-moovedark-dark nav.navbar .icon,
html.local-moovedark-dark .navbar-light .navbar-nav .nav-link,
html.local-moovedark-dark .navbar-light .navbar-brand {
    color: var(--md-text) !important;
}

html.local-moovedark-dark .navbar-light .navbar-toggler,
html.local-moovedark-dark .navbar-toggler {
    border-color: var(--md-border) !important;
    background-color: var(--md-surface-2) !important;
}

html.local-moovedark-dark .navbar-light .navbar-toggler-icon {
    filter: invert(1) grayscale(1) brightness(1.7);
}

/* Drawers, course index, blocks, cards and sections. */
html.local-moovedark-dark #nav-drawer,
html.local-moovedark-dark .drawer,
html.local-moovedark-dark .drawercontent,
html.local-moovedark-dark .drawer-left,
html.local-moovedark-dark .drawer-right,
html.local-moovedark-dark #theme_boost-drawers-courseindex,
html.local-moovedark-dark .courseindex,
html.local-moovedark-dark .block,
html.local-moovedark-dark .card,
html.local-moovedark-dark .card-body,
html.local-moovedark-dark .card-header,
html.local-moovedark-dark .card-footer,
html.local-moovedark-dark .dashboard-card,
html.local-moovedark-dark .course-card,
html.local-moovedark-dark .activity-item,
html.local-moovedark-dark .course-section,
html.local-moovedark-dark .course-content .section,
html.local-moovedark-dark .generalbox,
html.local-moovedark-dark .well,
html.local-moovedark-dark .box,
html.local-moovedark-dark .que,
html.local-moovedark-dark .formulation,
html.local-moovedark-dark .outcome,
html.local-moovedark-dark .comment-area,
html.local-moovedark-dark .path-mod-forum .forum-post-container {
    background-color: var(--md-surface) !important;
    border-color: var(--md-border) !important;
    color: var(--md-text) !important;
    box-shadow: none !important;
}

html.local-moovedark-dark .card-header,
html.local-moovedark-dark .card-footer,
html.local-moovedark-dark .block .card-title,
html.local-moovedark-dark .activity-header,
html.local-moovedark-dark .sectionname,
html.local-moovedark-dark .course-section-header {
    background-color: var(--md-surface-2) !important;
    border-color: var(--md-border) !important;
}

html.local-moovedark-dark .list-group-item,
html.local-moovedark-dark .list-group-item-action,
html.local-moovedark-dark .courseindex-item,
html.local-moovedark-dark .activity-information,
html.local-moovedark-dark .activity-description,
html.local-moovedark-dark .submissionstatussubmitted,
html.local-moovedark-dark .gradingtable .cell {
    background-color: var(--md-surface) !important;
    border-color: var(--md-border) !important;
    color: var(--md-text) !important;
}

html.local-moovedark-dark .list-group-item-action:hover,
html.local-moovedark-dark .list-group-item-action:focus,
html.local-moovedark-dark .courseindex-item:hover,
html.local-moovedark-dark .courseindex-item.pageitem,
html.local-moovedark-dark .dropdown-item:hover,
html.local-moovedark-dark .dropdown-item:focus {
    background-color: var(--md-surface-3) !important;
    color: var(--md-text) !important;
}

/* Menus, popovers, dialogs, notifications. */
html.local-moovedark-dark .dropdown-menu,
html.local-moovedark-dark .popover,
html.local-moovedark-dark .popover-body,
html.local-moovedark-dark .popover-header,
html.local-moovedark-dark .modal-content,
html.local-moovedark-dark .modal-header,
html.local-moovedark-dark .modal-body,
html.local-moovedark-dark .modal-footer,
html.local-moovedark-dark .toast,
html.local-moovedark-dark .toast-header,
html.local-moovedark-dark .notification-area,
html.local-moovedark-dark .message-app,
html.local-moovedark-dark .message-app .container-fluid,
html.local-moovedark-dark .popover-region-container,
html.local-moovedark-dark .popover-region-footer-container,
html.local-moovedark-dark .popover-region-header-container {
    background-color: var(--md-surface) !important;
    border-color: var(--md-border) !important;
    color: var(--md-text) !important;
}

html.local-moovedark-dark .dropdown-item,
html.local-moovedark-dark .dropdown-header,
html.local-moovedark-dark .modal-title,
html.local-moovedark-dark .close {
    color: var(--md-text) !important;
}

html.local-moovedark-dark .close {
    text-shadow: none !important;
    opacity: .85;
}

/* Forms and editors. */
html.local-moovedark-dark input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
html.local-moovedark-dark textarea,
html.local-moovedark-dark select,
html.local-moovedark-dark .form-control,
html.local-moovedark-dark .custom-select,
html.local-moovedark-dark .input-group-text,
html.local-moovedark-dark .form-file-text,
html.local-moovedark-dark .form-file-button,
html.local-moovedark-dark .editor_atto_content,
html.local-moovedark-dark .editor_atto_toolbar,
html.local-moovedark-dark .tox .tox-toolbar,
html.local-moovedark-dark .tox .tox-toolbar__primary,
html.local-moovedark-dark .tox .tox-edit-area__iframe,
html.local-moovedark-dark .filemanager,
html.local-moovedark-dark .filepicker-filelist {
    background-color: var(--md-surface-2) !important;
    border-color: var(--md-border) !important;
    color: var(--md-text) !important;
}

html.local-moovedark-dark input::placeholder,
html.local-moovedark-dark textarea::placeholder {
    color: var(--md-muted) !important;
    opacity: 1;
}

html.local-moovedark-dark input:focus,
html.local-moovedark-dark textarea:focus,
html.local-moovedark-dark select:focus,
html.local-moovedark-dark .form-control:focus,
html.local-moovedark-dark button:focus,
html.local-moovedark-dark a:focus {
    border-color: var(--md-focus) !important;
    box-shadow: 0 0 0 .2rem rgba(168, 199, 250, .25) !important;
    outline: none;
}

html.local-moovedark-dark input[disabled],
html.local-moovedark-dark textarea[disabled],
html.local-moovedark-dark select[disabled],
html.local-moovedark-dark .form-control:disabled,
html.local-moovedark-dark .form-control[readonly] {
    background-color: #20252b !important;
    color: #8f98a3 !important;
}

/* Tables. */
html.local-moovedark-dark table,
html.local-moovedark-dark .table,
html.local-moovedark-dark .generaltable,
html.local-moovedark-dark .flexible {
    color: var(--md-text) !important;
    background-color: var(--md-surface) !important;
}

html.local-moovedark-dark .table th,
html.local-moovedark-dark .table td,
html.local-moovedark-dark .generaltable th,
html.local-moovedark-dark .generaltable td,
html.local-moovedark-dark .flexible th,
html.local-moovedark-dark .flexible td {
    border-color: var(--md-border) !important;
}

html.local-moovedark-dark .table thead th,
html.local-moovedark-dark .generaltable thead th,
html.local-moovedark-dark .flexible thead th {
    background-color: var(--md-surface-2) !important;
    color: var(--md-text) !important;
}

html.local-moovedark-dark .table-striped tbody tr:nth-of-type(odd),
html.local-moovedark-dark .generaltable tbody tr:nth-of-type(odd) {
    background-color: rgba(255, 255, 255, .025) !important;
}

html.local-moovedark-dark .table-hover tbody tr:hover,
html.local-moovedark-dark .generaltable tbody tr:hover {
    background-color: var(--md-surface-3) !important;
}

/* Buttons: preserve semantic colours, adapt neutral buttons. */
html.local-moovedark-dark .btn-secondary,
html.local-moovedark-dark .btn-default,
html.local-moovedark-dark .btn-light,
html.local-moovedark-dark .btn-outline-secondary {
    background-color: var(--md-surface-2) !important;
    border-color: var(--md-border) !important;
    color: var(--md-text) !important;
}

html.local-moovedark-dark .btn-secondary:hover,
html.local-moovedark-dark .btn-default:hover,
html.local-moovedark-dark .btn-light:hover,
html.local-moovedark-dark .btn-outline-secondary:hover {
    background-color: var(--md-surface-3) !important;
}

/* Code, calendar, grading, quiz and messaging. */
html.local-moovedark-dark pre,
html.local-moovedark-dark code,
html.local-moovedark-dark .codehilite,
html.local-moovedark-dark .hljs {
    background-color: #0d1014 !important;
    color: #d7dde5 !important;
    border-color: var(--md-border) !important;
}

html.local-moovedark-dark .calendarwrapper,
html.local-moovedark-dark .calendar_event_course,
html.local-moovedark-dark .calendar_event_site,
html.local-moovedark-dark .calendar_event_user,
html.local-moovedark-dark .path-calendar .maincalendar .calendar-controls,
html.local-moovedark-dark .path-calendar .maincalendar .calendarmonth td {
    background-color: var(--md-surface) !important;
    border-color: var(--md-border) !important;
    color: var(--md-text) !important;
}

html.local-moovedark-dark .message-app .list-group-item,
html.local-moovedark-dark .message-app .view-conversation,
html.local-moovedark-dark .message-app .message,
html.local-moovedark-dark .message-app .conversationcontainer,
html.local-moovedark-dark .path-mod-chat #messages-list,
html.local-moovedark-dark .path-mod-chat .chat-message {
    background-color: var(--md-surface) !important;
    color: var(--md-text) !important;
    border-color: var(--md-border) !important;
}

html.local-moovedark-dark .que .info,
html.local-moovedark-dark .que .content,
html.local-moovedark-dark .que .formulation,
html.local-moovedark-dark .que .outcome,
html.local-moovedark-dark .que .comment {
    background-color: var(--md-surface) !important;
    color: var(--md-text) !important;
    border-color: var(--md-border) !important;
}

/* Footer and login. */
html.local-moovedark-dark footer,
html.local-moovedark-dark #page-footer,
html.local-moovedark-dark .footer-mainsection-wrapper,
html.local-moovedark-dark .login-container,
html.local-moovedark-dark .loginform,
html.local-moovedark-dark .login-wrapper {
    background-color: var(--md-bg-alt) !important;
    color: var(--md-text) !important;
    border-color: var(--md-border) !important;
}

/* Do not alter visual teaching content. */
html.local-moovedark-dark img,
html.local-moovedark-dark video,
html.local-moovedark-dark canvas,
html.local-moovedark-dark iframe,
html.local-moovedark-dark .activityicon,
html.local-moovedark-dark .courseimage,
html.local-moovedark-dark .dashboard-card-img {
    filter: none !important;
}

/* Toggle button. */
.local-moovedark-toggle-wrap {
    position: fixed;
    right: 1rem;
    top: 4.5rem;
    z-index: 1055;
    display: flex;
    align-items: center;
    margin: 0 .25rem;
}

.local-moovedark-toggle-wrap.local-moovedark-in-navbar {
    position: static;
    z-index: auto;
    align-self: center;
}

.local-moovedark-toggle {
    width: 2.5rem;
    height: 2.5rem;
    padding: .45rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(127, 127, 127, .35);
    border-radius: 50%;
    background: rgba(255, 255, 255, .92);
    color: #30343a;
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease, transform .15s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .14);
}

.local-moovedark-toggle:hover {
    transform: translateY(-1px);
}

html.local-moovedark-dark .local-moovedark-toggle {
    background: var(--md-surface-2);
    color: var(--md-text);
    border-color: var(--md-border);
    box-shadow: 0 2px 8px var(--md-shadow);
}

.local-moovedark-icon,
.local-moovedark-icon svg {
    width: 1.25rem;
    height: 1.25rem;
    display: block;
}

.local-moovedark-icon svg {
    fill: currentColor;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
}

.local-moovedark-icon-sun,
html.local-moovedark-dark .local-moovedark-icon-moon {
    display: none;
}

html.local-moovedark-dark .local-moovedark-icon-sun {
    display: block;
}

/* Keep Moodle semantic feedback recognisable. */
html.local-moovedark-dark .alert,
html.local-moovedark-dark .badge,
html.local-moovedark-dark .btn-primary,
html.local-moovedark-dark .btn-success,
html.local-moovedark-dark .btn-danger,
html.local-moovedark-dark .btn-warning,
html.local-moovedark-dark .btn-info {
    color: inherit;
}

html.local-moovedark-dark ::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

html.local-moovedark-dark ::-webkit-scrollbar-track {
    background: var(--md-bg-alt);
}

html.local-moovedark-dark ::-webkit-scrollbar-thumb {
    background: #4b5562;
    border: 3px solid var(--md-bg-alt);
    border-radius: 8px;
}

@media (prefers-reduced-motion: reduce) {
    .local-moovedark-toggle {
        transition: none;
    }
}

@media print {
    html.local-moovedark-dark,
    html.local-moovedark-dark body,
    html.local-moovedark-dark #page,
    html.local-moovedark-dark #page-wrapper,
    html.local-moovedark-dark #region-main {
        background: #fff !important;
        color: #000 !important;
    }
    .local-moovedark-toggle-wrap {
        display: none !important;
    }
}
