:root {
    --nav-page-width: 268px;
    --contextual-header-border: #C7C7C7;
}

.ch-title {
    z-index: 5;
}

.ch-title-visible .ch-title.js-title {
    will-change: transform;
    transform: unset;
    top: 0;
    margin-bottom: unset;
    transition: transform 200ms linear, margin-bottom 200ms linear;
}


.ch-content {
    padding-top: var(--page-header-height);
    transition: padding-top 200ms linear;
}
.ch-title-hidden {
    padding-top: 0;
}
.ch-title-hidden .ch-title.js-title {
    top: 0;
    transform: translateY(-100%);
    transition: transform 200ms linear;
}

.ch-nav-menu {
    left: -215px;
    top: 50px;
    width: 16rem;
}

.ch-nav-inner-compact {
    width: 100%;
    max-height: 70vh;
}

.ch-nav-drawer-inner {
    height: 100vh;
    left: 0;
    top: 0;
}

.ch-page-header {
    align-items: center;
    position: relative;
}

.ch-page-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.ch-page-header > div, nav {
    height: unset;
    z-index: 2;
}

.ch-title-navigation {
    display: flex;
    z-index: 2;
    height: fit-content;
    flex-direction: row !important;
    align-items: center;
    padding: 0 1rem;
    margin-top: 1rem;
    border-radius: var(--component-radius);
}

.ch-nav-icon-btn svg.ch-menu-icon {
    fill: white;
}
.ch-list-group-indicator svg.ch-menu-icon {
    fill: unset;
}

.ch-nav-icon-btn:focus-visible {
    box-shadow: 0 0 0 var(--input-borderless-focus-size) lightblue;
}

.ch-title-user {
    margin: 0 0.5rem;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 1rem;
    color: white;
    width: fit-content;
}

.ch-title-user-name {
    font-size: 14px;
    font-weight: 500;
    margin: 0 0 0 0.5rem;
}

.ch-nav-menu-arrow {
    width: 20px;
    left: unset;
    right: -10px;
    top: -9px;
    height: 10px;
}

.ch-nav-arrow-inner {
    margin: 0 0 0 3px;
    top: unset;
    bottom: -13px;
}

.ch-base {
    grid-template-columns: var(--nav-page-width) auto;
}

.compressed {
    grid-template-columns: var(--nav-ribbon-width) auto !important;
}

.ch-nav-contextual {
    z-index: 4;
}

.ch-nav-contextual-head {
    border: 2px var(--contextual-header-border) solid;
    border-radius: 5px;
    margin: 0.5rem;
    flex-direction: column;
    padding: 0.5rem 1rem;
}

.ch-nav-contextual-head.compressed {
    height: unset;
    border: unset;
    border-bottom: 1px var(--contextual-header-border) solid;
    border-radius: unset;
    transform: translateX(calc(var(--spacing-unit) * -0.5));
    margin-bottom: 0;
}

.ch-series-nav-head {
    z-index: 3;
}

.ch-series-select.ch-btn {
    text-transform: unset;
}

.ch-series-select-header {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 0.5rem;
    position: relative;
}

.ch-series-select-header svg {
    position: absolute;
    top: -5px;
    right: -5px;
}

.ch-series-select-header .ch-loader {
    position: absolute;
    top: 5px;
    right: 30px;
}

.ch-nav-contextual-head button {
    border: 1.5px solid black !important;
}

.ch-nav-contextual-head.compressed button {
    border: unset !important;
    padding: unset;
}

.ch-nav-contextual-head.compressed svg {
    width: 40px;
    height: 40px;
}

.ch-series-select-content p {
    padding: 0;
}

.ch-series-select-title {
    width: 100%;
    font-style: normal;
    font-weight: 700;
    color: black;
    font-size: 0.9rem;
}

.ch-series-select-title.small {
    font-weight: 600;
    letter-spacing: -0.75px;
    font-size: 13px;
}

.ch-nav-lesson {
    width: 250px;
    flex-shrink: 0;
    height: fit-content;
    position: sticky;
    top: 60px;
    border: 2px solid var(--contextual-header-border);
    margin: 1rem 0 0 0.5rem;
    border-radius: 9px;
    padding: 1rem;
    background-color: white;
}
.ch-nav-lesson.ch-nav-lesson-loader {
    border: none;
}

.ch-nav-lesson p, .ch-nav-lesson-title {
    font-weight: 800;
    font-size: 1.5rem;
}

.ch-nav-lesson .ch-list-group-head {
    border-bottom: 2px solid #000000;
    border-radius: 3px 3px 0 0;
    margin-bottom: 0.5rem;
    text-decoration: none;
}

.ch-nav-lesson .ch-sub-list {
    border-radius: 0 0 4px 4px;
}

.ch-nav-lesson .ch-list-item-icon {
    display: none;
}

.ch-nav-lesson .ch-list-item-icon + .ch-list-item-text {
    margin-left: 0;
}

.ch-list-item-text {
    font-weight: 500;
}

.reactNav .cont-body {
    padding-left: 16px;
}

.reactNav .cont-body.ch-non-lesson-body {
    padding-left: 32px;
}

.cont-body.ch-cms-wrap.ch-non-lesson-body {
    flex-direction: row !important;
}

.ch-tab-scroller-two-panel .ch-tab-scroller-content {
    flex-basis: unset;
}

.ch-tab-scroller-two-panel:not(.ch-tab-scroller-content) {
    margin-right: 266px;
}

.ch-lesson-wrapper {
    display: flex;
    justify-content: center;
}

.ch-lesson-width {
    width: 920px;
    position: relative;
}

.ch-lesson-width:has(.ch-lesson-content-two-panel){
    width: unset;
}

.cont-template-html .ch-lesson-width, .ch-lesson-wrapper.ch-lesson-center-content .ch-lesson-width {
    width: unset !important;
    max-width: unset !important;
    flex-basis: 820px;
}

.cont-template-html .ch-lesson-wrapper {
    justify-content: center;
}

.cont-template-html .reactNav .ch-content .lesson-content {
    width: unset !important;
    max-width: unset !important;
}

.ch-lesson-navigation-wrapper {
    width: 100%;
    margin: 1.5rem 0;
}

.ch-lesson-navigation {
    display: flex;
    align-items: center;
    width: 90%;
    margin: 0 auto;
    justify-content: space-between;
    border-top: 1px solid #efefef;
    padding: 1rem 0 0 0;
}

.ch-content-walkthrough-questions-wrapper {
    display: flex;
    flex-wrap: wrap;
}

.ch-lesson-content-two-panel {
    box-sizing: border-box;
    flex-grow: 1;
    min-width: 400px;
    margin: unset;
    padding-right: 0.5rem;
}

@media screen and (max-width: 1024px){
    .ch-series-drawer {
        z-index: 5;
    }
}

.ant-float-btn-content {
    width: 50px;
}

.ant-float-btn-icon {
    width: 100% !important;
    font-size: 1.8rem !important;
}

.ant-float-btn-icon > svg {
    margin-top: 3px;
}

.ch-fab-scroll-to-top {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.ch-fab-scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.ch-account-settings-page {
    margin: 0 auto;
}

.ch-account-settings-page > div {
    flex: 1 1 auto;
    width: 100%;
    max-width: 90ch;
    box-sizing: border-box;
    margin-bottom: 2rem;
}

.ch-account-settings-page .ant-form-item {
    margin-bottom: 0.75rem;
}

.ch-account-settings-form .ch-account-settings-checkbox {
    margin-bottom: 0;
}

.ch-account-settings-page h2 {
    font-size: 1.5rem;
}

.ch-account-settings-page h2, .ch-account-settings-page h3 {
    margin: 0 0 1rem 0;
}

.ch-account-settings-disclaimer {
    margin: 1rem 0;
}

@media (max-width: 768px) {
    .ch-series-drawer-content {
        width: 90vw;
    }

    .ch-series-menu-topics, .ch-series-menu-concepts {
        width: 100%;
        display: none;
    }

    .ch-series-menu-topics.ch-series-menu-visible, .ch-series-menu-concepts.ch-series-menu-visible {
        display: flex;
    }

    .ch-list-item-header {
        border-bottom: 1px solid lightgrey;
        margin: 0.4rem 0;
    }

    .ch-list-item-header span {
        font-size: 1.25rem;
        font-weight: 700;
        padding-left: 0.2rem;
    }
}

.ch-accessibility-skip {
    width: 100%;
    height: 4rem;
    background-color: #212A37;
    align-items: center;
    padding-left: 1rem;
    display: flex;

    .ch-btn-outline {
        border-color: whitesmoke;
        color: whitesmoke;
    }

    .ch-btn-outline:focus-visible {
        box-shadow: 0 0 0 var(--input-borderless-focus-size) lightblue;
    }
}

.ch-no-overflow {
    overflow: hidden;
}

.ch-base {
    transition: transform 0.3s ease;
}

#root:has(.ch-accessibility-skip:focus-within) .ch-base {
    transform: translateY(4rem);
}

.ch-lesson-style-guide-wrapper {
    justify-content: center;
}

.ch-lesson-style-guide-wrapper .cont-base {
    max-width: 800px;
    margin: unset;
}


/* Temporary Zendesk Override. Change in generalScripts when Navigation is permanently set up for Cambridge */
#webWidget {
    left: unset !important;
    right: 0;
}

/* Small Screen Navigation */
.ch-ribbon-header {
    width: 100%;
    height: 6.5rem;
    flex-direction: column;
    visibility: visible;
}

.ch-ribbon-header.hidden {
    visibility: hidden;
}

.ch-header {
    width: 100%;
    height: 3.25rem;
    position: sticky;
    top: 0;
    left: 0;
    background-color: rgba(0, 0, 0, 0.6);
}

.ch-header-content {
    justify-content: center;
}

.ch-header-menu-icon {
    fill: whitesmoke;
    width: 40px;
    height: 40px;
}

.ch-header-menu-icon svg {
    width: 28px;
    height: 28px;
}

.ch-header a {
    color: whitesmoke;
    text-decoration: none;
    user-select: none;
    width: 40px;
    height: 40px;
    text-align: center;
    font-size: 25px;
    margin: 0 var(--small-spacing-unit);
}

.ch-header button:focus-visible, .ch-lesson-nav-button:focus-visible {
    outline: 2px solid white;
}

.ch-header a.disabled {
    opacity: 0.25;
}

.ch-header-title, .ch-page-header-lesson-title {
    color: whitesmoke !important;
    text-align: center;
    max-width: 80vw;
    font-size: 0.9rem;
}

.ch-header .ch-concept-info {
    color: whitesmoke !important;
}

.ch-nav-mobile {
    display: none;
}

.ch-nav-mobile.visible {
    display: block;
}

.ch-header-mobile-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.3rem;
}

.ch-nav.ch-nav-msm {
    background-color: whitesmoke;
    width: 100vw;
}

.ch-nav-msm .ch-nav-columns {
    flex-direction: column;
}

.ch-nav-msm nav {
    width: 100%;
}

.ch-nav-msm .ch-nav-drawer {
    height: 0;
}

.ch-nav-tab-bar {
    width: 100%;
    display: flex;
    align-items: stretch;
}

.ch-nav-mobile-wrapper {
    padding: 0.5rem;
    overflow: auto;
    height: 90vh;
}

.ch-nav-mobile-wrapper::-webkit-scrollbar {
    display: none;
}

.ch-nav-mobile-button {
    flex-grow: 1;
    background-color: var(--primary-colour);
    height: 50px;
    border: unset;
    border-right: 1px solid whitesmoke;
    position: relative;
    transition: background-color .2s ease-out;
}

.ch-nav-mobile-button:hover {
    cursor: pointer;
    background-color: var(--secondary-colour);
}

.ch-nav-mobile-button svg {
    fill: whitesmoke;
}

.ch-nav-mobile-button.selected {
    background-color: whitesmoke;
}

.ch-nav-mobile-button.selected svg {
    fill: #2a2a2a;
}

.ch-nav-mobile-button .ch-badge {
    top: 1px;
    right: 1px;
}

.ch-nav-mobile-button:focus-visible {
    outline: var(--input-focus-size) solid white;
    outline-offset: -5px;
}

.ch-nav-mobile-button.selected:focus-visible {
    outline: var(--input-focus-size) solid var(--focus-on-surface);
    outline-offset: -4px;
}

.ch-nav-component {
    display: none;
}

.ch-nav-component.visible {
    display: block;
}

.ch-nav-settings-list {
    list-style-type: none;
    margin: 0;
    padding: 0;
}

.ch-nav-settings-button {
    width: 100%;
    background: none;
    border: none;
    border-bottom: 1px solid lightgrey;
    height: 3.5rem;
    text-align: left;
    cursor: pointer;
    font-weight: 500;
    font-size: 1rem;
    color: #2a2a2a;
    display: flex;
    align-items: center;
}

.ch-nav-settings-button:hover {
    background-color: lightgrey;
}

.ch-nav-settings-button:focus-visible {
    outline: var(--input-focus-size) solid var(--focus-on-surface);
}

.ch-nav-settings-icon {
    max-width: 36px;
    display: flex;
}

.ch-nav-settings-button svg {
    margin: 0 0.75rem 0 0;
}

.ch-nav-settings-button span {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
}

.ch-nav-settings-heading {
    margin: 0.5rem 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.ch-content-panel {
    overflow: auto;
}

@media (max-width: 1024px) {
    .ch-content.ch-header-visible {
        max-height: calc(100vh - 6.5rem);
    }

    .ch-content.ch-header-hidden {
        max-height: 100vh;
    }

    .ch-content, .ch-content-body {
        max-width: 100vw;
    }

    .ui-dialog {
        max-width: 90vw;
    }

    .ch-page-header-title--main {
        color: whitesmoke;
        margin: 0;
        font-size: 1rem;
    }

    .ch-tab-bar {
        top: 0;
        /* Below is for tab bar */
        left: 0;
        max-width: 100vw;
    }

    /* All of below for small screen nav bar */
    .ant-tabs-nav {
        max-width: 100vw;
        position: sticky !important;
        top: 0;
        left: 0;
        z-index: 2;
        background: white;
    }

    .reactNav .ch-small-screen .cont-body, .reactNav .cont-body, .cont-body {
        padding-left: 0;
        padding-right: 0;
    }

    .cont-non-template-html .reactNav .ch-content .lesson-content {
        margin-left: 0.8rem;
    }

    /* For 'right nav' */
    .ant-tabs-content-holder {
        padding-left: 0.5rem;
    }

    .ch-buttons-group {
        flex-wrap: unset;
    }

    .ch-nav-lesson {
        border: unset;
        margin: unset;
        width: 100vw;
        height: 100vh;
    }

    .ch-nav-lesson p {
        font-size: 1rem;
        font-weight: 500;
    }

    .ch-nav-inner-compact {
        max-height: 100%;
    }

    .ch-nav-lesson-title-wrapper {
        display: flex;
        justify-content: space-between;
    }

    .ch-nav-lesson-title-wrapper button {
        margin-left: auto;
    }

    /* For the 'right hand menu' FAB.  */
    .ch-right-nav-mobile-button {
        z-index: 4;
        background: var(--secondary-colour);
        width: 50px;
        height: 40px;
        position: absolute;
        top: 0;
        right: 0;
        border-radius: 4px 0 0 4px;
        border-left: 1px solid lightgrey;
        box-shadow: -11px 2px 10px -3px rgba(255,255,255,1);
        -webkit-box-shadow: -11px 2px 10px -3px rgba(255,255,255,1);
        -moz-box-shadow: -11px 2px 10px -3px rgba(255,255,255,1);
    }

    .ch-right-nav-mobile-button svg {
        fill: whitesmoke;
    }

    .ch-tab-scroller-content {
        position: relative;
    }

    .ch-buttons-group.ch-tab-right-area {
        margin-right: 50px;
    }

    .ch-right-nav-mobile-button div {
        border-radius: 4px 0 0 4px;
        background: var(--secondary-colour);
    }

    .ch-lesson-style-guide-wrapper .ch-right-nav-mobile-button {
        position: fixed;
        top: 110px;
    }

}

:root {
    --warning-colour: #806C00;
    --error-colour: #DC3835;
    --success-colour: #0b860f;
    --disabled-alpha: 0.7;
    --link-colour: #0073dd;
    --danger-colour: #dd3400;
    --placeholder-colour: #767676;
}

.ant-form-item .ant-form-item-explain-error {
    color: var(--error-colour);
}

/* Default Styled Secondary Any buttons */
.ant.ant-btn {
    --ant-button-default-hover-color: var(--secondary-colour) !important;
    --ant-button-default-hover-border-color: var(--secondary-colour) !important;
}

/* Note, remove below 'importants', only for when in this file */
.ant-select-selection-placeholder {
    color: var(--placeholder-colour) !important;
}

.pagingBtnBlk >.pagingBtn {
    border: 1px solid var(--primary-colour) !important;
}

.pagingBtnBlk > .pagingBtn.selected{
    background-color: var(--primary-colour) !important;
}

.pagingBtnBlk >.pagingBtn:last-child {
    border-right: 1px solid var(--primary-colour) !important;
}

.material-icons.icon-red {
    color: var(--danger-colour) !important;
}

/* Fixes for assessments */
.q-incorrect {
    color: var(--error-colour);
}

.q-correct {
    color: var(--success-colour);
}

.ant-tag.ant-tag-green {
    color: var(--success-colour) !important;
}

.ch-incorrect-bg {
    background-color: var(--error-colour) !important;
}

.ch-correct-bg {
    background-color: var(--success-colour) !important;
}

/* Additional Changes */

.rulebox + h2,
.rulebox + h3,
.rulebox + p {
    margin-top: 1rem;
}