@media only screen and (max-width: 850px) {
    #content {
        padding: 10px 5px;
    }

    #content h1 {
        font-weight: 500;
    }

    #content h1, 
    #content h2 {
        margin-left: 8px;
    }

    .welcome-dashboard, 
    .content .item {
        margin-left: 5px;
    }

    .dashboard #content {
        margin-left: 10px;
    }

    h2 {
        margin: 1em 0 1.2em 0;
    }

    #header {
        flex-direction: row;
        justify-content: flex-start;
    }

    #user-tools {
        display: flex;
        flex-direction: row-reverse;
        font-weight: 400;
        line-height: 1.85;
        text-align: left;
        font-size: 0.625rem;
        margin-right: -2%;
        align-content: flex-end;
    }

    #content-related {
        margin-top: 15px;
    }

    .container {
        display: block;
        margin-top: 20px;
    }

    .item {
        margin-bottom: 3rem;
    }

    .inline-related.tabular fieldset.module table {
        display: table;
    }

    .object-tools {
        float: none;
        margin-top: unset;
    }

    .object-tools li {
        float: none;
        height: 20px;
    }

    .object-tools a:link, 
    .object-tools a:visited {
        font-size: 0.625rem;
        line-height: 1.5;
    }

    #toolbar #searchbar {
        width: 64%;
    }

    #changelist {
        display: block;
    }

    #changelist-filter {
        margin: 15px 0 0 0;
    }

    #changelist .actions {
        padding: 0;
        width: auto;
    }

    #changelist .actions select {
        margin-left: 5px;
        width: 75%;
    }

    #changelist .actions label {
        width: 80%;
        margin-right: -6%;
    }

    #changelist .actions .button {
        margin: 5px;
    }

    #changelist .actions span.action-counter,
    #changelist .actions span.clear,
    #changelist .actions span.question {
        display: block;
        margin: 0 0;
    }

    .vTextField, 
    .vUUIDField {
        width: 18em;
    }

    .vURLField {
        width: 18em;
    }

    #content .djn-fieldset.module h2,
    #content .djn-fieldset.module h1,
    #content #recent-actions-module h2,
    #content .selector-available h2,
    #content .selector-chosen h2,
    #content #changelist-filter h2 {
        margin-left: 0;
    }
}

@media only screen and (max-width: 1130px) {
    #content-related {
        position: relative;
        float: unset;
        margin-top: 20px;
    }
}

@media only screen and (max-width: 1030px) {
    #container #nav-sidebar,
    #toggle-nav-sidebar {
        display: none;
    }

    div.breadcrumbs {
        display: block;
        padding: 10px 15px;
    }

    #changelist .actions {
        width: auto;
    }

    .main>.content,
    .main.shifted>.content {
        max-width: 100%;
    }
}

@media only screen and (max-width: 667px) {
    .submit-row {
        display: flex;
        flex-direction: column;
    }

    .submit-row input.default {
        margin: 0 0 12px 0;
        font-weight: 700;
    }

    .submit-row input {
        margin: 0 0 10px 0;
    }

    .submit-row a.deletelink {
        margin: 0 0 10px 0;
        text-align: center;
    }

    .login .submit-row {
        display: block;
        flex-direction: none;
        margin: 0 0 0 0;
    }

    .login .submit-row input {
        margin: 0 0 0 0;
    }

    .stacked {
        margin-top: 5px;
    }
}

/* Filter_horizontal widgets */
@media only screen and (max-width: 913px) {
    .field-allowed_scans {
        overflow: scroll;  
    }

    .field-allowed_scans .related-widget-wrapper {
        display: flex;
        -ms-flex-direction: row-reverse;
        flex-direction: row-reverse;
    }

    .field-allowed_benchmarks {
        overflow: scroll;
    }
}

/* Login container for screens smaller than 425px */
@media only screen and (max-width: 425px) {
    .login #container {
        width: 22em;
    }

    .login .logo {
        width: 16rem;
    }
}

/* Language switch button for screens smaller than 368px */
@media only screen and (max-width: 368px) {

    .switch-language>* {
        font-size: 0.6rem;
    }

    .material-icons.language-icon {
        font-size: 0.8rem;
    }

    .language-button {
        font-size: 0.6rem;
    }
}