*:focus {
    outline-style: none !important;
    outline-color: transparent !important;
    outline-offset: unset !important;
    box-shadow: none !important;
}
::-webkit-scrollbar {
    width: 7px;
    height: 7px;
}
::-webkit-scrollbar-track {
    background: $gray-100 !important;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb {
    background: $primary !important;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: $primary !important;
}
*:hover {
    //transition: all .5s ease;
}
html {
    scrollbar-width: thin;
}
h1,
.h1,
h2,
.h2,
h3,
.h3,
h4,
.h4,
h5,
.h5,
h6,
.h6 {
    color: $primary !important;
    font-family: $font-family-sans-serif-titles;
    font-weight: 600;
}
body.theme-fresk {
    transition: all .5s ease;
    font-family: $font-family-sans-serif, Sans-Serif;
    background: $backgroundcolor;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    .form-control:focus {
        color: #495057;
        background-color: #fff;
        border-color: $primary;
        outline: 0;
        box-shadow: none;
    }
    .preferences-container {
        max-width: 100%;
        overflow-y: auto;
        margin-bottom: 2em;
    }
    .badge {
        overflow-wrap: break-word;
        white-space: normal;
        line-height: 1.4em;
        font-size: 12px;
    }
    .mform .form-inline {
        .form-control {
            max-width: 100%;
            overflow-y: auto;
        }
    }
    .table-responsive {
        margin-bottom: 1.5em;
    }
    .settingsform {
        fieldset {
            overflow-x: auto;
            max-width: 100%;
            margin-bottom: 1.5em;
            .admintable.generaltable {
                margin-bottom: 1.5em;
            }
            .row {
                margin: 0.5em 0;
                max-width: 100%;
                overflow-x: auto;
            }
        }
    }
    .categorieslist {
        .mt-2 {
            div:not(.row) {
                max-width: 100%;
            }
        }
    }
    [data-component="qbank_columnsortorder"] {
        form.has-validation {
            overflow-x: auto;
            max-width: 100%;
            margin-bottom: 1.5em;
        }
    }
    #participantsform .table-dynamic {
        /* TODO review all dynamic tables */
        .no-overflow {
            max-width: 100%;
        }
    }
    .categoryquestionscontainer {
        width: 100%;
        overflow-x: auto;
    }
    .report-eventlist-data-table {
        overflow-x: auto;
        max-width: 100%;
    }
}
.pagelayout-standard.limitedwidth #page.drawers .main-inner,
body.limitedwidth #page.drawers .main-inner,
body.limitedwidth.path-course #page-header,
body.limitedwidth.path-course #sponsors-container,
body.limitedwidth.path-mod #page-header,
body.limitedwidth.path-mod .main-inner,
body.limitedwidth.pagelayout-incourse #page-header,
body.limitedwidth.path-grade #page-header,
body.limitedwidth.path-filter #page-header,
body.limitedwidth.path-local #page-header,
body.limitedwidth.path-question #page-header/*,
body.path-course .secondary-navigation .navigation .nav-tabs,
body.path-mod .secondary-navigation .navigation .nav-tabs,
body.pagelayout-incourse .secondary-navigation .navigation .nav-tabs,
body.path-grade .secondary-navigation .navigation .nav-tabs,
body.path-local .secondary-navigation .navigation .nav-tabs,
body.path-question .secondary-navigation .navigation .nav-tabs*/ {
    max-width: $limitedwidth;
}
.header-maxwidth,
.path-admin.path-admin-roles:not(.format-site) .header-maxwidth,
.path-admin.path-admin-roles:not(.format-site) .secondary-navigation .navigation .nav-tabs,
.path-admin.path-admin-tool-lp .header-maxwidth,
.path-admin.path-admin-tool-lp .secondary-navigation .navigation .nav-tabs {
    max-width: none;
}

body.limitedwidth#page-course-index-category{
    &.theme-fresk-limitedwidth #page-header.header-maxwidth{
        margin-left: 0;
    }
    #topofscroll{
        max-width: calc(100% - 150px) !important;
    }
}
body#page-course-index-category{
    #topofscroll{
        padding-top: 0 !important;
    }
}

body.path-report.theme-fresk,
body.path-grade-report.theme-fresk {
    &.limitedwidth {
        #page {
            #page-header {
                margin-inline: 0;
                max-width: 100% !important;
            }
        }
    }
}

body.theme-fresk {
    #page-header {
        h1, h2, h3 {
            color: $graytext !important;
        }
    }
    #page-content {
        #region-main {
            h1, h2, h3, h4, h5 {
                color: $graytext !important;
            }
        }
    }
    .description {
        .course-description-item {
            .description-inner {
                width: 100%;
            }
        }
    }
    &#page-enrol-index {
        #page-header {
            h1 {
                display: none;
            }
        }
        #page-content {
            #maincontent + h2 {
                display: none;
            }
            .generalbox.info {
            padding: 15px;
            border: 1px solid #dee2e6;
            box-shadow: none !important;
            border-radius: 8px;
            }
            .generalbox {
                padding: 15px;
                border: 1px solid #dee2e6;
                box-shadow: none !important;
                border-radius: 8px;
                margin-top: 10px;
            }
            .people-info {
                .btn-enrolled-users {
                    box-shadow: none !important;
                }
            }
        }
        .coursebox-content {
            box-shadow: none;
        }
        .progressinfo {
            display: none;
        }
        .mform fieldset {
            margin-bottom: 0.5rem;
            border-bottom: 0px solid !important;
        }
    }
    #wp-site-status-disclaimer {
        display: none;
    }
}

.secondary-navigation .navigation .nav-tabs {
    max-width: none;
}
#topofscroll {
    background-color: transparent !important;
}
#page #topofscroll #page-content {
    margin-top: unset;
}
#region-main {
    border-radius: 8px;
    padding: 14px;
    box-shadow: 0 0 10px rgba(0,0,0,.1);
    background-color: #fff !important;
}
.alert-info {
    background-color: $alert-info;
    color: $alert-infotext;
}
.alert-success {
    background-color: $alert-success;
    color: $alert-successtext;
}
.alert-warning {
    background-color: $alert-warning;
    color: $alert-warningtext;
}
.alert-danger {
    background-color: $alert-danger;
    color: $alert-dangertext;
}
.generaltable {
    .moodle-actionmenu {
        .dropdown {
            .dropdown-toggle {
                background: transparent;
                box-shadow: none;
                color: $secondary;
                &:hover,
                &:active {
                    background: transparent !important;
                }
                i {
                    color: $secondary;
                }
            }
            .dropdown-toggle:active, .dropdown-toggle:hover {

            }
        }
    }
}
body.format-singleactivity .moremenu .dropdown .dropdown-toggle{
    box-shadow: none;
}
body.theme-fresk{
    .dropdown-menu.show[role="listbox"]{
        border-color: $secondary !important;
        .dropdown-item.active, .dropdown-item:active, .dropdown-item:hover, .dropdown-item:focus, .dropdown-item:focus-within{
            color: #fff !important;
            background-color: $secondary !important;
        }
    }
}
body.theme-fresk.pagelayout-admin {
    .dropdown-toggle:not(.btn-primary) {
        color: $primary;
    }
    .dropdown-menu.show[role="listbox"]{
        border-color: $primary !important;
        .dropdown-item.active, .dropdown-item:active, .dropdown-item:hover, .dropdown-item:focus, .dropdown-item:focus-within{
            color: #fff !important;
            background-color: $primary !important;
        }
    }
    .dropdown-toggle.btn-primary {
        color: white;
    }
}
body.theme-fresk {
    .navbar.fixed-top .navbar-brand .logo {
        max-height: calc(71px - 20px - (0.25rem * 2)) !important;
    }
    .text-primary {
        color: $primary !important;
    }
    .text-secondary {
        color: $secondary !important;
    }
    &.path-grade-report-grader.hasstickyfooter {
        .gradeparent tr.lastrow {
            bottom: 0;
        }
    }
}
body.theme-fresk.path-admin-tool-oauth2 {
    #page-content {
        [role="main"] {
            .table-responsive + div {
                display: flex;
                flex-flow: row wrap;
                gap: 8px;
            }
        }
    }
}

body.theme-fresk#page-admin-tool-xmldb-index {
    [role="main"] {
        overflow-x: auto;
        max-width: 100%;
    }
}
body.theme-fresk#page-admin-tool-program-edit .fresk-drawers-content .program-items.program-item-children button[data-toggle="dropdown"] {
    color: white;
}
body.theme-fresk#page-report-outline-user {
    [role="main"] {
        .section {
            .content {
                overflow-x: auto;
                max-width: 100%;
            }
        }
    }
}

body#page-login-forgot_password.theme-fresk,
body#page-message-index.theme-fresk {
    #region-main {
        background: transparent !important;
        box-shadow: none !important;
    }
}
body#page-message-index.theme-fresk {
    #region-main {
        .container-fluid {
            padding-right: 0;
            padding-left: 0;
        }
    }
}

.path-mod .automatic-completion-conditions .badge .icon {
    width: unset !important;
    height: unset !important;
}

body#page-grade-report-grader-index {
    #region-main {
        width: fit-content;
    }
}

body#page-course-view-participants {
    #topofscroll {
        max-width: none !important;
        #page-header {
            max-width: none !important;
        }
    }
    &.theme-fresk.theme-fresk-limitedwidth #page .courseformatheader {
        max-width: none !important;
        padding-inline: 58px !important;
    }
    div.table-responsive:has(#participants),
    div.no-overflow:has(#participants) {
        #participants {
            min-width: 1200px !important;
            background-color: white;
            border-radius: 8px;
        }
    }
}

body.theme-fresk#page-admin-tool-tenant-users,
body.theme-fresk#page-admin-tool-dynamicrule-index {
    .badge.badge-pill.badge-secondary,
    .rounded-pill.bg-secondary {
        width: fit-content;
    }
}

/*Only in WP this lines are not in LMS for page course index*/
body#page-my-index {
    .badge.badge-pill.badge-secondary,
    .badge.rounded-pill.bg-secondary {
        width: fit-content;
    }
}

body#page-grade-report-singleview-index {
    .btn.btn-outline-primary {
        color: $primary !important;
        border-color: $primary !important;
        &:active,
        &:hover,
        &.active {
            background-color: $primary !important;
            color: white !important;
        }
    }
}
.tertiary-navigation.full-width-bottom-border {
    width: 100%;
}
.btn-check:checked+.btn, :not(.btn-check)+.btn:active, .btn:first-child:active, .btn.active, .btn.show {
    background-color: $light-bg;
}
.dropdown-item.active,
.dropdown-item:active {
    background-color: $light-bg;
}

.nav-pills .nav-link.active,
.nav-pills .show>.nav-link {
    background-color: $brand-primary;
}
.btn-check:checked+.btn, :not(.btn-check)+.btn:active, .btn:first-child:active, .btn.active, .btn.show {
    border-color: transparent !important;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:not([tabindex="-1"]):focus-visible,
[role="button"]:focus-visible {
    outline: 2px solid $primary !important;
}
input.form-control:focus,
select.custom-select:focus {
    outline: 0 !important;
    border: 1px solid $primary;
}

// TEMPORARY-CAUTION: Avoid animation in modals

body { 
    transition: none !important; 
}

/* Forces modal overlay to cover the whole window even when scrolling */
.overlay-icon-container {
    position: fixed;
}