* {
    font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Symbol", "Noto Color Emoji";
}

/* Styles for search navigation */

.search-row {
    height: 2.5rem;
}

.search-form {
    max-width: 440px;
}

.form-control {
    height: 38px;
}

/* Disable html input clear button as it is not a standard and is not supported by all browsers*/

input[type=search]::-webkit-search-cancel-button {
    -webkit-appearance: none;
}

input[type=reset] {
    border: 1px solid #ced4da;
    border-radius: 5px;
    background-color: #fff;
    width: 40px;
    color: #2c3e97;
    font-size: 15px;
    font-weight: 600;
}

input[type=reset]:hover {
    background-color: #f5f5f5;
    border-width: 3px;
}

.selected-level {
    color: #2c3e97;
    font-weight: 600;
    font-size: 16px;
}

.level {
    color: #2c3e97;
}

#search-results {
    width: 375px;
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: 5px;
    margin-top: -0.5rem;
    margin-left: 1.4rem;
    position: absolute;
    z-index: 1001;
}

#search-results ul {
    list-style-type: none;
    padding-left: 5px;
    margin-bottom: 0;
}

#search-results li {
    padding: 1px 5px;
    border-radius: 5px;
    cursor: pointer;
}

#search-results li:focus {
    outline: none;
}

#search-results a {
    text-decoration: none;
    color: inherit;
}

#search-results .not-found {
    margin-left: 1rem;
    font-size: 14px;
    font-weight: 600;
}

.match {
    background-color: #d3d9fc;
}

.highlight {
    background-color: #eef1ff;
}

/* Styles for both toggle buttons */

.button-toggle {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 5px;
    border: none;
    outline: none!important;
}

.button-toggle-icon {
    font-size: 1.2rem;
    line-height: 0;
}

/* Styles for toggle button on small screen */

#button-toggle-org-nav {
    background-color: #fff;
}

#button-toggle-org-nav:hover {
    background-color: #eef1ff;
}

/* Styles for Main Area */

/* We use CSS Grid for the left sidebar to overlay over the data display area */

.wrapper {
    display: grid;
}

#left-sidebar,
#main-content-area {
    grid-area: 1 / 1;
}

/* Left Sidebar */

#left-sidebar {
    background-color: #F5F5F5;
    border-right: 1px solid #ced4da;
    max-width: 425px;
    min-height: calc(100vh - 158px);
    max-height: 80vh;
    overflow-y: auto;
    z-index: 1000;
    transition-duration: 0.2s;
    font-size: 16px;
}

/* Styles for toggle button on big screen */

#button-toggle-sidebar {
    float: right;
    background-color: #F5F5F5;
}

#button-toggle-sidebar:hover {
    background-color: #e4e7fa;
}

.sidebar-collapsed {
    max-width: 50px !important;
}

/* Org Navigation Widget */

#nav-container .selected-level {
    white-space: nowrap;
    margin-top: -2rem;
}

#org-nav ul {
    padding-left: 1.5rem;
}

#org-nav li {
    overflow: hidden;
    white-space: nowrap;
    margin-top: 0.2rem;
}

#org-nav a {
    text-decoration: none;
    white-space: nowrap;
    color: inherit;
    padding: 1px 5px;
    border-radius: 5px;
}

#org-nav ul:first-child {
    margin-left: -2rem;
}

#org-nav li:first-child {
    margin-top: 0.5rem;
}

#org-nav li:last-child {
    margin-bottom: 0.5rem;
}

#org-nav .button-caret {
    cursor: pointer;
    font-size: 0.8rem;
    color: #2c3e97;
    border: none;
    padding: 1px 5px;
    border-radius: 5px;
    background-color: #F5F5F5;
    outline: none;
}

#org-nav .button-caret::before {
    content: "\25B6";
    display: inline-block;
}

#org-nav .button-caret-down::before {
    transform: rotate(90deg);
}

#org-nav .button-caret:hover,
#org-nav a:hover {
    background-color: #e4e7fa;
}

#org-nav .nested,
.hidden {
    display: none;
}

#org-nav .active {
    display: block;
}

.selected {
    font-weight: 600;
    background-color: #ccd4fd;
}

/* Styles for main content area, we need margin-left so that the collapsed left sidebar does not block data */

#main-content-area {
    margin-left: 55px;
}

/* Adjusting org nav to smaller screens */

@media only screen and (max-width: 767px) {
    #main-content-area {
        margin-left: 1.5rem;
    }

    #search-results {
        max-width: 270px;
    }

    #left-sidebar {
        max-width: 100vw;
        min-height: fit-content;
        max-height: fit-content;
        border-bottom: 1px solid #ced4da;
    }

    #main-content-area {
        grid-area: 2 / 1;
    }

    #nav-container .selected-level {
        margin-top: 0.5rem;
    }

    #button-toggle-sidebar {
        display: none;
    }

    .sidebar-collapsed {
        display: none;
    }

    #search-results li,
    #org-nav li {
        line-height: 1.8;
    }

    #org-nav .button-caret {
        font-size: 1rem;
    }
}