/* large devices and wide screens */
@media only screen and (max-width: 1200px)
{
    .image-max-800
    {
        max-width: 100%;
    }

    .grid
    {
        min-width: 100%;
    }

    td.table-organizations-column
    {
        min-width: auto;
        max-width: auto;
        width: auto;
    }

    table.scalable {
        font-size: .9em;
        line-height: 1.1;
    }

    body
    {
        max-width: 100%;
    }

    #contentcolumn
    {
        max-width: 100%;
        width: 100%;
        background: white;
        margin: 0;
        
        -webkit-border-radius: 0;
        border-radius: 0;
        -webkit-box-shadow: none;
        box-shadow: none;
    }

    #logo
    {
        margin-left: 0;
    }

    #search
    {
        margin-right: 0;

    }

    #search-input
    {
        width: calc(100% - 36px);
    }

    #logindisplay
    {
        float: left;
    }

    #estimatedSachets {
        display: inline;
    }
}
/* smaller desktop viewpoints */
@media only screen and (max-width: 992px)
{
    table.scalable {
        font-size: .75em;
    }

    table.scalable img, .grid.scalable img
    {
        -ms-transform: scale(.8,.8);
        -webkit-transform: scale(.8,.8);
        transform: scale(.8,.8);
    }

    table.scalable .sort-ascending-icon,
    table.scalable .sort-descending-icon,
    table.scalable .sort-not-used-icon
    {
        -ms-transform: scale(.8,.8);
        -webkit-transform: scale(.8,.8);
        transform: scale(.8,.8);
        margin-top: 0;
    }
    table.scalable .stylish-button,
    table.scalable .checkbox
    {
        -ms-transform: scale(.8,.8);
        -webkit-transform: scale(.8,.8);
        transform: scale(.8,.8);
    }
    table.scalable .stylish-button,
    table.scalable .survey-checkbox
    {
        margin: 0 -.3rem;
    }

    .table-responsive-lg table
    {
        table-layout: initial;
        word-wrap: initial;   
    }

    #client-filter-wrapper .lower-filter-row, #device-filter .lower-filter-row
    {
        height: auto;
    }

    #client-edit-buttons, .lower-filter-row
    {
        margin-top: 0;
        float: left;
    }

    .lower-filter-row.user-list-button-row, .lower-filter-row.sso-mass-edit-button-row {
        float: none;
    }

    .clientlist-lower-row .stylish-button, .lower-filter-row .stylish-button {
        margin-top: 16px;
    }

    #client-count-container-index
    {
        margin-top: 1.3em;
    }

    .manual-mode-checkbox-label {
        width: 10.4em
    }

    .manual-mode-label,
    .manual-mode-bottom-checkbox-label,
    .manual-mode-checkbox-label {
        text-align: left
    }

    .dispenser-status-left-icon {
        margin-left: 0;
    }

    #estimatedSachets {
        display: block;
        left: 0;
        padding-top: 10px;
    }

    .manual-mode-commands-right__strip-movement-wrapper {
        height: 60px;
    }
}
/* most tablets */
@media only screen and (max-width: 768px)
{
    table.scalable
    {
        font-size: .45em;
    }
    table.scalable img, .grid.scalable img
    {
        -ms-transform: scale(.5,.5);
        -webkit-transform: scale(.5,.5);
        transform: scale(.5,.5);
        margin: -1em;
    }

    .grid.scalable th, #clients-list th, #users-list th
    {
        padding-bottom: 4px;
    }

    table.scalable .sort-ascending-icon,
    table.scalable .sort-descending-icon,
    table.scalable .sort-not-used-icon
    {
        -ms-transform: scale(.5,.5);
        -webkit-transform: scale(.5,.5);
        transform: scale(.5,.5);
        margin: -.5em 0 0 -.2em;
    }
    table.scalable .stylish-button,
    table.scalable .checkbox
    {
        -ms-transform: scale(.5,.5);
        -webkit-transform: scale(.5,.5);
        transform: scale(.5,.5);
    }
    table.scalable .survey-checkbox
    {
        margin: -.5rem -1.4rem -.5rem -2rem;
    }
    table.scalable .stylish-button
    {
        margin: -.5rem -1.4rem -.5rem -1.5rem;
    }

    #client-filter-wrapper .dispenser-state-button label span,
    .not-selected-ribbon-item, .selected-ribbon-item
    {
        display: inline-block;
        padding: 4px 16px;
        margin-left: 0;
        margin-right: 1em;

        -ms-border-radius: 24px;
        border-radius: 24px;
    }

    #dispenser-image-container,
    #mini-dispenser-image-container
    {
        margin-top: 2em;
        text-align: left;
    }

    #no-dispenser-set-text {
        text-align: left;
        margin-left: 1.4em;
    }

    .ui-accordion .ui-accordion-content
    {
        padding: 1em;
    }

    .manual-mode-checkbox-label,
    .manual-mode-bottom-checkbox-label {
        width: 13.7em;
    }

    .manual-mode-commands-left,
    .manual-mode-commands-right {
        width: 100%;
    }

    .manual-mode-info-left,
    .manual-mode-info-right,
    .manual-mode-display-field {
        width: 100%;
    }

    .col-1 {
        margin-left: 0;
    }

    .col-2 {
        max-width: 35px;
        min-width: 35px;
    }

    .battery-replaced-link {
        margin-left: 0;
    }

    .clients-list-right-buttons {
        float: left;
    }

    .user-list-button-row {
        display: flex;
        flex-direction: column;
    }

    .user-list-button-row__right-side {
        margin-left: 0;
    }

    .user-list-button-row__right-side > *, sso-mass-edit-button-row > * {
        float: none;
    }
}

/* small devices and most phones */
@media only screen and (max-width: 576px)
{
    table.scalable {
        font-size: .3em;
    }

    .grid.scalable th, #clients-list th
    {
        padding-bottom: 2px;
    }

    table.scalable img, .grid.scalable img
    {
        -ms-transform: scale(.3,.3);
        -webkit-transform: scale(.3,.3);
        transform: scale(.3,.3);
        margin: -1.7em;
    }

    table.scalable .sort-ascending-icon,
    table.scalable .sort-descending-icon,
    table.scalable .sort-not-used-icon
    {
        -ms-transform: scale(.3,.3);
        -webkit-transform: scale(.3,.3);
        transform: scale(.3,.3);
        margin: -1.1em 0 0 -.6em;
    }
    table.scalable .stylish-button,
    table.scalable .checkbox
    {
        -ms-transform: scale(.4,.4);
        -webkit-transform: scale(.4,.4);
        transform: scale(.4,.4);
    }
    table.scalable .survey-checkbox
    {
        margin: -.5rem -2rem -.5rem -2.5rem;
    }
    table.scalable .stylish-button
    {
        margin: -.5rem -2rem -.5rem -1.9rem;
    }
    table.scalable .checkbox
    {
        margin: -.3rem -.5rem;
    }

    .corner-button
    {
        width: 100%;
    }

    .corner-button .stylish-button
    {
        width: 100%;
        box-sizing: border-box;
        margin: 8px 0;
    }

    .buttons-grouped-on-top {
        float: none;
    }

    /* Authentication */
    #contentcenter
    {
        padding-left: 1em;
        padding-right: 1em;
    }

    #chooseLoginMethodForm {
        display: block;
        width: 100%;
    }

    #login-form {
        display: block;
        width: 100%;
    }

    .login-block {
        display: block;
    }

    .login-block .editor-field,
    #include-demo-clients-container {
        width: 100%;
        float: left;
    }

    .login-block .editor-field input
    {
        width: 100%;
        max-width: unset;
        margin-left: 0;
        margin-bottom: 8px;
        box-sizing: border-box;
        height: 2.2em;
        border: 1px solid rgba(0,0,0,.37);
    }

    input[type="submit"], input[type="submit"]:hover
    {
        height: auto;
        margin-right: 0;
    }

    #loginheader
    {
        margin-top: 0;   
        margin-bottom: 0;
        width: 100%;
        display: inline-block;
    }

    .language-selection-flags-container
    {
        float: left;
        margin-bottom: 1em;
    }
    .language-selection-flags-container div
    {
        float: left;
    }

    .anna-tabs.ui-tabs .ui-tabs-nav li a
    {
        padding: .5em 1.5em;
    }

    .display-label-new, .editor-label-new
    {
        text-align: left;
    }

    .phonenumber-radio-button {
        margin-left: 0;
        float: left;
        clear: left;
        margin-right: 0.5em;
        margin-bottom: -2px;
    }

    .phonenumber-label-new {
        display: none;
        width: auto;
        text-align: left;
    }

    .deliver-role-to-device input {
        clear: left;
        float: left;
        min-width: 0;
    }

    .deliver-role-to-device-label {
        float: left;
        clear: left;
        width: auto;
        margin-right: 1em;
        margin-bottom: 1em;
        text-align: left;
    }

    .manual-mode-checkbox-label {
        width: 10.6em;
    }

    #unable-to-fix {
        margin-right: 1em;
    }

    .picture-container {
        width: 100%;
        min-height: max-content;
    }

    .sensor-values-text {
        float: left;
        width: 100%;
        margin-bottom: 1em
    }

    .sensor-values-container {
        float: left;
        width: 100%;
    }

    .editor-field-information {
        width: fit-content !important;
        clear: both !important;
    }

    .login-validation-block {
        display: block;
    }
}
/* smaller phone viewpoints */
@media only screen and (max-width: 320px)
{
    table.scalable .stylish-button,
    table.scalable .checkbox
    {
        -ms-transform: scale(.3,.3);
        -webkit-transform: scale(.3,.3);
        transform: scale(.3,.3);
    }
    table.scalable .survey-checkbox
    {
        margin: -.5rem -2rem -.5rem -2.8rem;
    }
    table.scalable .stylish-button
    {
        margin: -.5rem -2rem -.5rem -2.1rem;
    }

    #logo img
    {
        width: 100px;
    }
}