/* Use a Moodle-style side column and reserve real space for the page content. */
html.local-iomadsidebar-page #page.drawers {
    width: calc(100% - 18rem);
    margin-left: 18rem;
}

.local-iomadsidebar {
    position: fixed;
    z-index: 1020;
    top: 72px;
    bottom: 0;
    left: 0;
    width: 18rem;
}

.local-iomadsidebar__panel {
    position: absolute;
    inset: 0;
    width: 100%;
    overflow-y: auto;
    padding: 1rem 1rem 2rem .75rem;
    scrollbar-gutter: stable;
    color: #263238;
    background: #f3f7f6;
    border-right: 1px solid #e2e9e8;
}

.local-iomadsidebar__header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: .75rem;
    margin: 0 0 .75rem;
    padding: .85rem .8rem;
    background: #fff;
    border: 1px solid #dce5e3;
    border-radius: .75rem;
}

.local-iomadsidebar__title {
    margin: 0;
    color: #263238;
    font-size: 1.15rem;
    font-weight: 700;
}

.local-iomadsidebar__dashboard {
    color: #087f88;
    font-size: .85rem;
    white-space: nowrap;
}

.local-iomadsidebar__sectiondetails {
    margin: 0 0 .65rem;
    padding: .2rem .45rem;
    background: #fff;
    border: 1px solid #dce5e3;
    border-radius: .75rem;
}

.local-iomadsidebar__sectiontitle {
    flex: 1;
    color: #53666a;
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: .045em;
    text-transform: uppercase;
}

.local-iomadsidebar__sectiontoggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    width: 100%;
    min-height: 2.5rem;
    padding: .55rem .75rem .55rem .45rem;
    color: #53666a;
    border-radius: .35rem;
    cursor: pointer;
    list-style: none;
}

.local-iomadsidebar__sectiontoggle:hover,
.local-iomadsidebar__sectiontoggle:focus-visible {
    background: #f3f7f6;
}

.local-iomadsidebar__sectiontoggle:hover .local-iomadsidebar__sectiontitle,
.local-iomadsidebar__sectiontoggle:focus-visible .local-iomadsidebar__sectiontitle {
    color: #006d76;
}

.local-iomadsidebar__sectiontoggle::-webkit-details-marker {
    display: none;
}

.local-iomadsidebar__sectiontoggle::marker {
    content: '';
}

.local-iomadsidebar__chevron {
    width: .55rem;
    height: .55rem;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    transition: transform .15s ease;
}

.local-iomadsidebar__sectiondetails[open] > .local-iomadsidebar__sectiontoggle .local-iomadsidebar__chevron {
    transform: rotate(225deg) translate(-2px, -1px);
}

.local-iomadsidebar__sectiondetails > nav {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: .25rem 0 .5rem;
    text-align: left;
}

.local-iomadsidebar__link {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: .7rem;
    width: 100%;
    min-height: 2.65rem;
    margin: .1rem 0;
    padding: .55rem .65rem;
    color: #35464a;
    border-radius: .45rem;
    text-decoration: none;
}

.local-iomadsidebar__link:hover,
.local-iomadsidebar__link:focus-visible {
    color: #006d76;
    background: #edf5f4;
    text-decoration: none;
}

.local-iomadsidebar__link.is-current {
    color: #006d76;
    background: #e6f2f1;
    font-weight: 600;
}

.local-iomadsidebar__link > .fa {
    width: 1.2rem;
    color: #07858e;
    font-size: 1rem;
    text-align: center;
}

@media (max-width: 767.98px) {
    html.local-iomadsidebar-page #page.drawers {
        width: 100%;
        margin-left: 0;
    }

    .local-iomadsidebar {
        position: relative;
        top: auto;
        bottom: auto;
        left: auto;
        width: 100%;
        max-height: 45vh;
    }

    .local-iomadsidebar__panel {
        position: relative;
        inset: auto;
        max-height: 45vh;
        box-shadow: none;
        border-bottom: 1px solid #e2e9e8;
    }
}
