@import "elements/navbar.less";
@import "elements/type.less";
@import "elements/panel.less";
@import "elements/record.less";
@import "elements/dropdown.less";
@import "elements/form.less";
@import "elements/table.less";
@import "elements/alert.less";

html {
    height: 100%;
}

.list-container > .list,
.panel,
.dashlet-container,
#main > .calendar-container .calendar,
#main > .calendar-container .timeline,
.well,
.admin-content .table.table-admin-panel,
.admin-content iframe,
.list-group-panel,
.popup-notification {
    box-shadow: var(--default-box-shadow);
}

.dashlet-body .list-container > .list,
.panel-body .list-container > .list,
.dashlet-container > .panel,
.note-editor.panel {
    box-shadow: none;
}

#main > .calendar-container .calendar {
    border: var(--panel-border-width) solid var(--default-border-color);
}

a:focus-visible,
a.btn:focus-visible,
button:focus-visible,
button.btn:focus-visible,
button.btn.active:focus-visible,
.dropdown-toggle:focus:focus-visible,
input[type=radio]:focus-visible,
input[type=checkbox]:focus-visible,
input[type=file]:focus-visible,
label.attach-file-label:focus-visible,
.iti__selected-flag:focus-visible {
    outline: 1px solid var(--input-border-focus-rgba);
    outline-offset: -1px;
}

.no-focus-outline:focus-visible {
    outline: none;
}

input[type=checkbox]:focus-visible,
input[type=radio]:focus-visible{
    outline-offset: 3px;
}

.block-center {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.block-center-sm {
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.block-center-md {
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.container-centering {
    height: calc(100vh - 100px);
    position: relative;
    top: -50px;
    > div {
        position: relative;
        top: 20%;
    }
}

.collapsing {
    -webkit-transition: height .1s ease;
    -o-transition: height .1s ease;
    transition: height .1s ease;
}

img.image-preview {
    border-radius: var(--border-radius-small);
}

.preset {
    text-overflow: ellipsis;
    overflow: hidden !important;
}

.preset > div{
    padding-right: 26px;
}

.form-group.hidden-cell {
    margin-bottom: 0;
}

.hidden-cell div.field {
    display: none !important;
}

.hidden-cell label.control-label {
    display: none !important;
}

.hidden-cell .inline-edit-link {
    display: none !important;
}

.inline-edit-link + .control-label {
    max-width: calc(100% - 15px);
}

.chevron-right {
    &::before {
        content: "\203A";
        display: inline-block;
    }
    padding: 0 0.1em;
}

.middle-dot {
    &::before {
        content: "\00B7";
        display: inline-block;
    }
    padding: 0 0.1em;
}

.page-header {
    margin: 15px 0;
    border-bottom: 0;
    padding-bottom: 0;
    min-height: @input-height-base;

    .header-title,
    > h3 {
        margin-bottom: 7px;
        font-size: 22px;
    }

    @media screen and (max-width: (@screen-sm-min - 1px)) {
    .header-title,
        > h3 {
            font-size: 21px;
        }
    }

    .page-header-row {
        margin-left: ceil((@grid-gutter-width / -2));
        margin-right: floor((@grid-gutter-width / -2));
        &:extend(.clearfix all);
        > div {
            float: left;
            position: relative;
            min-height: 1px;
            padding-left: ceil((@grid-gutter-width / 2));
            padding-right: floor((@grid-gutter-width / 2));
        }

        .page-header-column-1 {
            width: 66.66666667%;
        }
        .page-header-column-2 {
            width: 33.33333333%
        }

        @media screen and (max-width: (@screen-sm-min - 1px)) {
            .page-header-column-1,
            .page-header-column-2 {
                width: 100%;
            }
        }
    }

    @supports (display: grid) {
        .page-header-row {
            display: grid;
            grid-template-columns: auto max-content;

            margin-left: 0;
            margin-right: 0;

            @media screen and (max-width: (@screen-sm-min - 1px)) {
                grid-template-columns: auto;
            }
            &::before,
            &::after {
                display: none !important;
            }
        }

        .page-header-column-1,
        .page-header-column-2 {
            width: unset !important;
            padding-left: unset !important;
            padding-right: unset !important;
            min-height: unset !important;
            position: unset !important;
            float: unset !important;
        }
    }

    h3 {
        margin-top: 0px;
        margin-bottom: 4px;
    }

    .page-header-column-1 {
        overflow: hidden;

        .header-breadcrumbs {
            .breadcrumb-separator {
                padding: 0 0.26em;
            }

            .breadcrumb-item,
            .breadcrumb-separator {
                display: inline-block;
            }
            min-height: 1.2em;
        }

        &.no-break-words {
            .header-breadcrumbs {
                white-space: nowrap;
                overflow: hidden;

                .breadcrumb-item,
                .breadcrumb-separator {
                    display: inline-block;
                }

                margin-right: 30px;
                @media screen and (max-width: (@screen-sm-min - 1px)) {
                    margin-right: 0;
                }
            }

            .header-breadcrumbs.overlapped {
                position : relative;
                &:after {
                    content: " ";
                    position: absolute;
                    right: 0;
                    background: linear-gradient(to right, transparent, @body-bg);
                    height: 30px;
                    width: 80px;
                }
            }
        }
    }
}

.page-header > .row {
    min-height: @input-height-base;
}

.form-group {
    .left-dropdown > .btn.filters-button {
        margin-right: 0;
        z-index: 3;
    }

    .filters-button {
        z-index: 1;

        &:active,
        &:focus {
            z-index: 3;
        }
    }

    .btn.search {
        z-index: 2;
    }
}

div.list-expanded > ul > li > div.expanded-row > .cell {
    padding-left: 5px;
    padding-right: 5px;
}

div.list-expanded > ul > li > div.expanded-row > .cell:first-child {
    padding-left: 0;
    > .fas {
        width: 18px;
    }
}

.list > table.table td > span.list-icon-container.pull-right {
    margin-left: 5px;
}

.list > table.table td > span.list-icon-container.pull-left {
    margin-right: 5px;
}

.cell span + span.list-icon-container {
    margin-left: 3px;
}

.list > ul.list-group > li.list-row .cell > span.glyphicon.pull-right {
    margin-left: 5px;
    margin-top: 4px;
}

.list.scrollable {
    width: auto;
    overflow-y: hidden;
    overflow-x: auto;
}

.list {
    .text-muted {
        .fas.action,
        .far.action {
            &:hover {
                color: var(--text-gray-color);
            }
        }
    }
    .action {
        &.text-muted.fas,
        &.text-muted.far {
            &:hover {
                color: var(--text-gray-color);
            }
        }
    }
}
.cell label,
.filter label {
    color: var(--text-muted-color);
    font-weight: normal;
}

.cell > label,
.filter label {
    margin-bottom: 2px;
}

.cell.highlighted {
    > label {
        color: @state-warning-text;
    }
}

.cell.transition {
    > label {
        -webkit-transition: color .5s ease;
        -o-transition: color .5s ease;
        transition: color .5s ease;
    }
}

.cell .loading-value {
    color: var(--text-muted-color);
    user-select: none;

    &:before {
        content: "–";
        display: inline;
    }
}

.cell .none-value {
    color: var(--text-gray-color);
}

.filter .selectize-input {
    min-height: @input-height-small;
}

.btn.active {
    box-shadow: none;
}

#login {
    .cell label {
        font-weight: 600;
        color: var(--text-color);
        user-select: none;
    }

    .fallback-shown,
    .another-user {
        .cell[data-name="sign-in"] {
            margin-bottom: 12px;
        }
    }
}

#login.panel .panel-heading {
    border-bottom-width: 0;
}

#login .logo-container {
    width: @login-logo-width;
    height: @login-logo-height;
    overflow: hidden;
    border-top-left-radius: var(--panel-border-radius);
}

#login .logo-container img.logo {
    max-height: 100%;
    max-width: 100%;
}

input.global-search-input {
    padding-right: 10px;
}

.global-search-button {
    border: 0;
}

.progress.pre-loading {
    position: fixed;
    top: 0;
    width: 100%;
    height: 2px;
}

.edit form {
    margin: 0;
}

.button-container {
    padding: 0 0 var(--vertical-gap);
}

.margin.list-group-item:first-child {
    margin-top: 0;
}

.stick-sub,
.sticky-head,
.sticked-bar {
    box-shadow: var(--top-bar-box-shadow);
}

.sticky-head {
    background-color: @body-bg;
    z-index: 4;
    overflow: hidden;
    border-bottom-left-radius: var(--border-radius);
    border-bottom-right-radius: var(--border-radius);
}

.list-container .list-buttons-container {
    margin-bottom: @padding-large-vertical;
    min-height: 35px;
}

.list-buttons-container .sticked-bar {
    position: fixed;
    background-color: var(--navbar-bg);
    z-index: 1000;
    padding-top: @padding-small-vertical;
    padding-bottom: @padding-small-vertical;
    padding-right: 15px;
}

.list-buttons-container > .actions {
    min-height: @input-height-base;
}

.list-buttons-container > div.total-count {
    margin-right: 0;
    float: right;
    padding: 7px 0;
    user-select: none;

    > .total-count-span {
        user-select: text;
    }
}

.list-container {
    .settings-container {
        .btn > span.fa-cog.fa-sm {
            position: relative;
            top: -1px;
        }
    }
}

.pagination {
    float: right;
    display: block;
    margin: 0;

    a.pagination-btn {
        min-width: 40px;
        text-align: center;
    }

    a.pagination-btn-middle {
        min-width: 70px;
        text-align: right;
    }

    .dropdown-menu {
        .page-input-group {
            > .input-group-addon:first-child {
                border-left: 0;
                border-top-left-radius: 0;
                border-bottom-left-radius: 0;
                min-width: 70px;

                user-select: none;
            }

            > input:last-child {
                border-right: 0;
                border-top-right-radius: 0;
                border-bottom-right-radius: 0;

                width: 100%;
                min-width: 80px;
            }
        }
    }
}

.list-bottom-bar {
    margin-top: var(--vertical-gap);
}

.radio-container {
    > div {
        > label {
            margin-right: 10px;
            margin-bottom: 0;
            font-weight: normal;
            font-size: 15px;
            height: 20px;
            cursor: pointer;

            input[type="radio"] {
                vertical-align: middle;
                cursor: pointer;
            }
        }

        display: inline-block;
        min-width: var(--btn-s-wide-width);
    }

    margin-bottom: 10px;
    user-select: none;
}

.floated-row > div  {
    float: left;
    margin-right: @panel-padding;
}

.cell > .field {
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.field .row {
    margin-left: -3px !important;
    margin-right: -3px !important;
}

.field .row > div {
    padding-left: 3px !important;
    padding-right: 3px !important;
    float: left;
}

.field .form-control,
.field .btn {
    margin-bottom: 3px;
}

.field .input-group .form-control,
.field .input-group .btn {
    margin-bottom: 0;
}

.field .input-group {
    margin-bottom: 3px;
}

.field .link-container {
    margin-bottom: 0;

    &:not(.no-input) {
        > .list-group-item:last-child {
            border-bottom-width: 0;
        }

        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;

        > .list-group-item:last-child {
            border-bottom-left-radius: 0;
            border-bottom-right-radius: 0;
            border-bottom-width: 0;
        }
    }

    > .list-group-item {
        .text:empty:before {
            content: "\200b";
        }
    }
}

.list-group {
    border-radius: var(--border-radius);

    &.list-group-no-border {
        border-radius: 0;
        border: 0;

        > .list-group-item {
            &:first-child {
                border-top-left-radius: 0;
                border-top-right-radius: 0;
            }

            &:last-child {
                border-bottom-left-radius: 0;
                border-bottom-right-radius: 0;
                border-bottom-width: 0;
            }
        }
    }

    > .list-group-item {
        &:first-child {
            border-top-left-radius: var(--border-radius);
            border-top-right-radius: var(--border-radius);
        }

        &:last-child {
            border-bottom-left-radius: var(--border-radius);
            border-bottom-right-radius: var(--border-radius);
            border-bottom-width: 1px;
        }
    }

    > .list-group-item {
        &.ui-sortable-handle {
            cursor: default;
        }
    }
}

.list-group {
    &.no-side-margin,
    &.no-margin {
        border-radius: 0;

        > .list-group-item {
            &:first-child {
                border-top-left-radius: 0;
                border-top-right-radius: 0;
            }

            &:last-child {
                border-bottom-left-radius: 0;
                border-bottom-right-radius: 0;
            }
        }
    }

    margin-bottom: var(--vertical-gap);
}

.list-group-item {
    margin-bottom: 0;
    border-top-width: 0;
    background-color: transparent;

    &:first-child {
        border-top-width: 1px;
    }

    &.ui-sortable-helper {
        border-top-width: 1px !important;
        border-bottom-width: 1px !important;
        border-left-width: 1px !important;
        border-right-width: 1px !important;
    }
}

.list > .list-group {
    > .list-group-item {
        &:first-child {
            border-top-left-radius: 0;
            border-top-right-radius: 0;
        }

        &:last-child {
            border-bottom-left-radius: 0;
            border-bottom-right-radius: 0;
        }
    }
}

.field {
    .list-group .list-group-item {
        background-color: var(--panel-bg);
    }

    .list-group {
        background-color: var(--default-border-color);
    }
}

.panel-body .field > .link-container > .list-group-item {
    background-color: @panel-bg;
}

.panel-body .list-group-item {
    background-color: @panel-bg;

    &.active {
        background-color: @list-group-hover-bg;
    }
}

.field .link-container .list-group-item > div {
    margin: -6px 0 -6px;
}

.field .link-container .list-group-item > div > div {
    margin: 6px 0;
}

.field .link-container .list-group-item .form-control,
.field .link-container .list-group-item .btn {
    margin-top: 2px;
    margin-bottom: 0;
}

.field .link-container .link-group-item-with-columns > div > .btn-group {
    margin-top: 0;
    margin-bottom: 0;
    .caret {
        border-top-color: @gray-light;
    }
}

.field, .cell {
    .checklist-label {
        color: @text-color;
        margin-bottom: 0;
        padding-left: 7px;
    }

    .checklist-item-container {
        margin-bottom: 2px;
        &:last-child {
            margin-bottom: 0;
        }

        > input[type=checkbox] {
            float: left;
        }

        > input[type=checkbox]:not(:disabled) + label {
            cursor: pointer;
        }

        user-select: none;
    }

    .multi-enum-item-label-container {
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
        padding-bottom: 4px;

        &:last-child {
            padding-bottom: 1px;
        }

        .label-md {
            line-height: 1.5;
        }
    }
}

.field {
    > .label {
        white-space: normal;
    }
}

.filter > .form-group .field {
    .link-container {
        font-size: @font-size-small;
        .fa-times {
            font-size: 12px;
        }
        > .list-group-item {
            padding-top: 4px;
            padding-bottom: 4px;
            line-height: @line-height-small-computed;
        }
    }
    .input-group {
        input {
            font-size: @font-size-small;
            height: @input-height-small;
        }
        button.btn {
            font-size: @font-size-small;
            height: @input-height-small;
        }
    }
}

.link-container {
    > .list-group-item {
        .link-item-column {
            float: right;
            display: inline-block;
            width: 40%;
            > .selectize-control {
                width: 100%;
            }
        }

        > a.pull-right {
            margin-left: 4px;
        }
    }
}

.filter .field .link-container .list-group-item a[role="button"] {
    margin-top: 1px;
    margin-left: 2px;
}

.field .link-container .list-group-item a[role="button"] {
    margin-top: 1px;
    margin-left: 2px;
}

.field .link-container > .list-group-item.link-with-role > a[role="button"],
.field .link-container > .list-group-item.link-with-role > div > a[role="button"] {
    margin-top: 7px;
}

.field .link-container > .list-group-item.link-group-item-with-columns,
.field .link-container > .list-group-item.link-group-item-with-primary {
    > div:nth-child(1) {
        display: inline-block;
        width: calc(~"100% - 23px");
        float: left;
        input.form-control {
            width: 100%;
        }
    }
    > div:nth-child(2) {
        display: inline-block;
        width: 23px;
        float: right;
        vertical-align: top;
    }
}

#main > .list-container {
    > .no-data {
        margin-top: 40px;
    }
}

#main > div > .left-container + .list-container {
    > .no-data {
        margin-top: 15px;
    }
}

#main > div > .list-main-column > .nested-categories-container:not(.hidden) + .list-container {
    > .no-data {
        margin-top: 10px;
    }
}

.no-data {
    color: var(--text-gray-color);
    user-select: none;
}

.list-container.list-container-panel {
    > .no-data {
        padding: @panel-padding;
    }
}

#main > {
    .list-container.list-container-panel {
        > .list {
            border-left-width: var(--panel-border-width);
            border-right-width: var(--panel-border-width);
        }
    }
}

.none-value {
    user-select: none;
}

.panel-body .list-container > .no-data {
    color: var(--text-muted-color);
}

.nav .list-container > .no-data {
    color: var(--text-color);
}

.detail-field-container {
    padding: 7px 0;
}

#login.panel > .panel-heading {
    background-color: @login-panel-heading-bg;
    padding: 0;
}

.list-expanded .list-group > .list-group-item .list-row-buttons button {
    margin-top: 3px;
}

.list-row-buttons {
    .btn {
        .caret {
            border-top-color: var(--text-muted-color);
        }

        &:hover {
            .caret {
                border-top-color: var(--btn-text-color);
            }
        }
    }

    &.open {
        .btn {
            .caret {
                border-top-color: var(--btn-text-color);
            }
        }
    }
}

.list {
    .list-row.ui-draggable {
        .cell {
            user-select: none;
        }
    }
}

.list > table {
    margin-bottom: 0;
}

.list > ul {
    margin-bottom: 0;
}

.list > table td {
    .label-md {
        line-height: 1.4;
    }

    > .label-md {
        max-width: calc(100%);
        display: inline-block;
        white-space: nowrap;
        text-overflow: ellipsis;
        overflow: hidden;
        vertical-align: top;
        // Fix the label making the list row higher.
        margin-top: -1px;
        margin-bottom: -1px;
    }
}

.list > table {
    td, th {
        input.form-checkbox-small[type="checkbox"] {
            margin: 0;
            position: relative;
            top: 3px;
        }
    }

    th {
        .btn-group {
            .btn {
                .caret {
                    border-top-color: var(--text-muted-color);
                }

                &:hover {
                    .caret {
                        border-top-color: var(--btn-text-color);
                    }
                }
            }

            &.open {
                .btn {
                    .caret {
                        border-top-color: var(--btn-text-color);
                    }
                }
            }
        }
    }
}

.list > table th span.caret {
    border-top-color: var(--text-muted-color);
}
.list > table th span.caret-up {
    border-bottom-color: var(--text-muted-color);
}

.filter a.remove-filter {
    display: none;
}
.filter:hover a.remove-filter {
    display: block;
}

optgroup {
    font-weight: 600;
}

.panel-body,
section {
    > p:first-child,
    > h1:first-child,
    > h2:first-child,
    > h3:first-child,
    > h4:first-child,
    > h5:first-child {
        margin-top: 0;
    }

    > p:last-child,
    ul,
    li,
    .table {
        margin-bottom: 0;
    }
}

.panel-body > div > .list-expanded {
    margin-left: -@panel-padding;
    margin-right: -@panel-padding;

    > .list-group-item {
        border-left-width: 0;
        border-right-width: 0;
    }
}
.panel-body > div > .list {
    margin-left: -@panel-padding;
    margin-right: -@panel-padding;
}
.panel-body > div > .list > table td:first-child,
.panel-body > div > .list > table th:first-child {
    padding-left: @panel-padding;
}
.panel-body > div > .list > table td:last-child,
.panel-body > div > .list > table th:last-child {
    padding-right: @panel-padding;
}

.modal-body > div > .list {
    margin-left: -@panel-padding;
    margin-right: -@panel-padding;
}
.modal-body > div > .list > table td:first-child,
.modal-body > div > .list > table th:first-child {
     padding-left: @panel-padding;
}
.modal-body > div > .list > table td:last-child,
.modal-body > div > .list > table th:last-child {
    padding-right: @panel-padding;
}

.modal-body > div > .list-expanded > ul > li {
    border-left-width: 0;
    border-right-width: 0;
}

#main > .list-container > .list {
    margin-left: -@container-padding;
    margin-right: -@container-padding;
}

#main > .list-container,
.modal-body > .list-container,
.modal-body .categories-container + .list-container,
.left-container + .list-container,
.nested-categories-container + .list-container {
    > .list {
        border: var(--panel-border-width) solid var(--default-border-color);
    }

    > .list-expanded {
        > ul > {
            li:last-child {
                border-bottom: 0;
            }
        }
    }
}

.list > {
    table:first-child > tbody:first-child {
        > tr:first-child {
            > td {
                border-top: 0;
            }
        }
    }
}

.list-container > .list {
    > .list-group {
        > li.list-group-item:first-child {
            border-top-color: transparent;
        }
    }
}

.modal-body > .list-container > .list {
    border-left-width: 0;
    border-right-width: 0;
}

#main > .list-container > .list {
    border-left-width: 0;
    border-right-width: 0;
}

#main > .list-container > .list-tree > ul,
.modal-body > .list-container > .list-tree > ul {
    padding-top: @table-cell-padding;
    padding-bottom: @table-cell-padding;
}

.modal-body > ul.no-side-margin > li {
    border-left-width: 0;
    border-right-width: 0;
}

@media screen and (min-width: @screen-sm-min) {
    #main > .list-container > .list {
        > table td:first-child,
        > table th:first-child {
            padding-left: @container-padding;
        }
        > table td:last-child,
        > table th:last-child {
            padding-right: @container-padding;
        }
    }

    .modal-body .categories-container + .list-container,
    .list-categories-column + .list-main-column .list-container,
    .left-container + .list-container {
        .list {
            margin-right: -@container-padding;
            border-top-left-radius: var(--panel-border-radius);
            border-bottom-left-radius: var(--panel-border-radius);

            > table {
                border-top-left-radius: var(--panel-border-radius);
                border-bottom-left-radius: var(--panel-border-radius);

                td:last-child, th:last-child {
                    padding-right: @container-padding;
                }

                td.cell[data-name="buttons"] > .btn-group {
                    margin-right: -11px;
                }
            }

            > .show-more > a {
                border-bottom-left-radius: var(--panel-border-radius);
                border-bottom-right-radius: 0;
            }

            &:not(.has-show-more) {
                > table {
                    > tbody {
                        > tr.active:last-child {
                            > td:first-child {
                                border-bottom-left-radius: var(--panel-border-radius);
                            }
                        }
                    }
                }
            }
        }
    }

    .modal-body .categories-container + .list-container {
        > .list {
            margin-right: -@modal-inner-padding;

            > table {
                td:last-child, th:last-child {
                    padding-right: @modal-inner-padding;
                }
            }
        }
    }

    .list-main-column:first-child > .nested-categories-container:not(.hidden) + .list-container {
        .list {
            margin-right: -@container-padding;
            margin-left: -@container-padding;

            border-left-width: 0;
            border-right-width: 0;

            > table td:first-child,
            > table th:first-child {
                padding-left: @container-padding;
            }
            > table td:last-child,
            > table th:last-child {
                padding-right: @container-padding;
            }
        }
    }
}

.panel > .panel-body > .list-container > .list > .list-group {
    > .list-group-item {
        border-width: 0;
        border-bottom-width: 1px;
    }

    > li.list-group-item:first-child {
        border-top-width: 1px;
        border-top-color: transparent;
    }

    > li.list-group-item:last-child {
        border-bottom-width: 0;
    }
}

.panel.dashlet > .panel-body > .list-container > .list > .list-group {
    > li.list-group-item:last-child {
        border-bottom-width: 1px;
        border-bottom-left-radius: 0 !important;
        border-bottom-right-radius: 0 !important;
    }
}

.field .grid-stack-item-content {
    border: 1px solid var(--default-border-color);
}

.list-expanded > .show-more {
    padding: 0;
    margin-top: -1px;
}

.list-expanded > li.show-more > .btn {
    margin-left: -1px;
    margin-right: -4px;
}

.list-expanded > ul > li .list-row-buttons {
    margin-right: -12px;
    margin-top: -10px;
    margin-bottom: -5px;
}

.show-more > .btn {
    border-radius: 0;
    border-width: 0;
}

.dashlet-container {
    .dashlet {
        overflow: hidden;
        &.has-dropdown-opened {
            overflow: visible;
        }

        .panel-heading .panel-title {
            user-select: none;
        }

        > .dashlet-body {
            .calendar-container > .calendar {
                margin-left: -1px;
                margin-right: -1px;
            }

            .chart-container {
                //overflow: hidden;
            }

            border-bottom-left-radius: var(--panel-border-radius);
            border-bottom-right-radius: var(--panel-border-radius);

            .list-container > .list {
                > .show-more > a.btn {
                    border-bottom-left-radius: 0;
                    border-bottom-right-radius: 0;
                }
            }
        }

        // If hidden, the dropdown can be partially obscured.
        //overflow: hidden;
        border-bottom-left-radius: var(--panel-border-radius);
        border-bottom-right-radius: var(--panel-border-radius);
    }

    border-bottom-left-radius: var(--panel-border-radius);
    border-bottom-right-radius: var(--panel-border-radius);
}

.panel-body > .list-container > .list,
.panel-body.dashlet-body > div > .list,
.list.no-bottom-margin
{
    > div.show-more {
        display: inline-block;
        width: 100%;
    }
}

.panel-body > div:first-child > .list-expanded:first-child {
    margin-top: -@panel-padding;
}
.panel-body > div:last-child > .list-expanded:last-child {
    margin-bottom: -@panel-padding;
}

.panel-body > div:first-child > .list:first-child {
    margin-top: -@panel-padding;
}
.panel-body > div:last-child > .list:last-child {
    margin-bottom: -@panel-padding;
}

.expanded-row {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;

    &:last-child {
        margin-bottom: 0;
    }

    &:empty {
        margin-bottom: -2px;
    }
}

.expanded-row .cell .complex-text {
    white-space: normal;
    overflow: hidden;
}

.expanded-row .cell {
    display: inline;
}

.notification-list .expanded-row > .cell[data-name="data"],
#notifications-panel .expanded-row > .cell[data-name="data"] {
    padding-left: 0;
    padding-right: 0;

    > .right-container {
        width: 7px;
        height: 10px;
    }
}

#notifications-panel .expanded-row {
    white-space: normal;
    overflow: hidden;
}

#notifications-panel .right {
    padding-top: 5px;
}

.caret-up {
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 2px;
    vertical-align: middle;
    border-bottom: 4px solid #000;
    border-right: 4px solid transparent;
    border-top: 0 dotted;
    border-left: 4px solid transparent;
    content: "";
}

.list > table {
    table-layout: fixed;

    > thead > tr > th {
        user-select: none;

        > a[role="button"]:not(.selectable) {
            user-select: text;
        }
    }
}

.list > table td,
.list > table th {
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.list > table td {
    > .link-multiple-item {
        text-overflow: ellipsis;
        overflow: hidden;
    }
}

.list > table td[data-name="r-checkbox"] {
    overflow: visible;
}

.list > table th[data-name="r-checkbox"] {
    overflow: visible;
    white-space: nowrap;
    .select-all-container {
        line-height: @line-height-computed;
        height: @line-height-computed;
        float: left;
    }
}

.list .checkbox-dropdown {
    margin-left: 3px;
    top: -2px;
}

.list .checkbox-dropdown > a {
    padding: 0;
    line-height: 1;
    height: 14px;
}

.list .record-checkbox-container {
    height: @line-height-computed;
    display: block;
}

.list > table td > div.field {
    white-space: normal;
}

.list > table td.cell[data-name="buttons"],
.list > table th.action-cell {
    overflow: visible;
}

.list > table th.action-cell {
    a {
        position: relative;
        right: 9px;
        padding: 4px 3px;

        &:hover {
            color: var(--btn-text-color);
        }
    }
}

#main > .list-container > .list > table th.action-cell {
    a {
        right: 8px;

        @media screen and (max-width: (@screen-sm-min - 1px)) {
            right: 3px;
        }
    }
}

td.cell[data-name="buttons"] > .btn-group {
    margin-top: -8px;
    margin-bottom: -8px;
    margin-right: -8px;
}

#main > .list-container > .list > table {
    td.cell[data-name="buttons"] > .btn-group {
        margin-right: -10px;
    }
}

table.less-padding td.cell[data-name="buttons"] > .btn-group {
    margin-right: -13px;
}

.dashboard-header .dashboard-buttons {
    margin-left: 10px;
}

.panel.dashlet > .panel-heading > .panel-title {
    cursor: default;
}

.panel.dashlet > .panel-heading > .btn-group > .btn + .dropdown-toggle {
    padding-left: @padding-small-horizontal;
    padding-right: @padding-small-horizontal;
}

.panel.dashlet > .panel-heading {
    .dropdown-menu-with-icons a {
        .fas,
        .far,
        .fa {
            font-size: 12px;
        }
    }
}

.dashlets {
    .panel.dashlet {
        height: inherit;
    }

    .dashlet-container {
        overflow-y: hidden;
    }

    margin: -8px;

    @media screen and (max-width: (@screen-sm-min - 1px)) {
        margin-top: 0;
        margin-bottom: 0
    }

    .ui-draggable-dragging {
        cursor: grabbing;

        .panel.dashlet > .panel-heading {
            .panel-title {
                .action {
                    cursor: grabbing;
                }

                cursor: grabbing;
            }
        }
    }

    .panel-title .action {
        cursor: pointer;
    }
}

.dashlets.fallback {
    > div {
        margin-bottom: 20px;

        > .dashlet-container > .panel {
            > .panel-body {
                height: ~"calc(100% - 29px)";
            }
        }
    }
    margin-left: 0;
    margin-right: 0;

    .panel.dashlet > .panel-body {
        overflow-y: hidden;
    }
}

.panel.dashlet > .panel-body {
    overflow-y: auto;
    overflow-x: hidden;
}

.dashlets.grid-stack {
    .panel.dashlet {
        margin-bottom: 0;
    }

    .grid-stack-item {
        .dashlet {
            height: 100%;
            .dashlet-body {
                height: ~"calc(100% - var(--panel-heading-height))";
            }
        }
        .grid-stack-item-content {
            overflow-x: visible;
            overflow-y: visible;
        }
    }

    .ui-resizable-handle:before {
        content: '' !important;
    }
    > .grid-stack-item > .ui-resizable-se,
    > .grid-stack-item > .ui-resizable-sw {
        background-image: none;
    }
}

.grid-stack.grid-stack-4 {
    .grid-stack-item[data-gs-width="4"]  { width: 100% }
    .grid-stack-item[data-gs-width="3"]  { width: 75% }
    .grid-stack-item[data-gs-width="2"]  { width: 50% }
    .grid-stack-item[data-gs-width="1"]  { width: 25% }

    .grid-stack-item[data-gs-x="3"]  { left: 75% }
    .grid-stack-item[data-gs-x="2"]  { left: 50% }
    .grid-stack-item[data-gs-x="1"]  { left: 25% }
}


.list-container + .button-container,
.row-list-container + .button-container {
    margin-top: var(--vertical-gap);
    padding-bottom: 0;
}

.list-expanded > li > .right > .btn-group {
    top: -7px;
    right: -11px;
}



.list > table thead > th {
    border-top-width: 1px !important;
}

.show-more > .btn-block {
    text-align: left;
    padding: 7px 10px 7px @panel-padding;
}

label.attach-file-label {
    overflow: hidden;
    width: 50px;
    cursor: pointer;
    margin-bottom: 0;

    > span.btn {
        cursor: pointer;
        margin-bottom: 0;
    }

    > input.file {
        opacity: 0;
        width: 1px;
    }
}

.attachment-upload {
    > .attachment-control > .dropdown > .btn {
        margin-bottom: 0;
    }

    > .attachments > div:first-child {
        margin-top: 2px;
    }
}

.gray-box {
    background-color: var(--select-item-bg);
    margin: 0 5px 3px 0;
    padding: 2px 3px 2px 5px;

    display: inline-block;
    width: 100%;
    max-width: 300px;

    &.preview {
        a {
            color: @text-color;
        }
    }

    border-radius: var(--border-radius);

    a.remove-attachment {
        > .fas {
            position: relative;
            top: 1px;
            padding-right: 1px;
        }
    }
}

.gray-box .preview {
    overflow: hidden;
    overflow-wrap: break-word;

    a {
        color: @text-color;
    }
}

.attachment-block-container {
    display: grid;
    grid-column-gap: 6px;
    grid-template-columns: repeat(auto-fill, minmax(50px, 256px));
}

.attachment-block-container.attachment-block-container-large {
    grid-template-columns: repeat(auto-fill, minmax(50px, 512px));
}

.attachment-block-container.attachment-block-container-small {
    grid-template-columns: repeat(auto-fill, minmax(50px, 128px));
}

.attachment-preview {
    vertical-align: top;
    margin: 3px 0 3px 0;

    > a[data-action="showImagePreview"] {
        display: inline-block;

        &:focus-visible {
            outline-offset: 1px;
        }
    }
}

.field > .attachment-block-container > .attachment-block > .attachment-preview {
    overflow: hidden;
}

.attachment-block {
    display: block;
    vertical-align: top;
    margin-bottom: 2px;
}

.attachment-block:last-child {
    margin-bottom: 0;
}

.list-row > .cell {
    > .attachment-block-container > .attachment-block > .attachment-preview {
        margin-bottom: -@table-cell-padding + 2px;
        margin-top: -@table-cell-padding + 2px;

        &:not(.no-shrink) {
            max-height: @line-height-computed + @table-cell-padding + @table-cell-padding - 4px;

            img {
                max-height: @line-height-computed + @table-cell-padding + @table-cell-padding - 4px;
                vertical-align: top;
            }
        }
    }
}

.stick-sub {
    position: fixed;
    top: 0;
    margin-right: 0;
    margin-bottom: 0;
    z-index: 5;
}

.stick-sub.button-container {
    background-color: var(--navbar-bg);
    padding: @padding-small-vertical @container-padding @padding-small-vertical @container-padding;
    width: 100%;
}

@media screen and (max-width: (@screen-sm-min - 1px)) {
    .stick-sub {
        margin-top: 0;
    }
}

.notifications-badge-container > .notifications-button > .number-badge {
    position: absolute;
    z-index: 10;
    font-size: 9px;
    padding: 2px 5px;
    display: inline-block;
    top: 7px;
    left: 27px;
    background-color: var(--brand-danger);
    color: @white-color;
}

.danger.glyphicon {
    color: @brand-danger;
}

.warning.glyphicon {
    color: @brand-warning;
}

.icon-rotate-180 {
    -webkit-transform: rotate(180deg);
    -moz-transform: rotate(180deg);
    -ms-transform: rotate(180deg);
    -o-transform: rotate(180deg);
    transform: rotate(180deg);
}

.icon-rotate-90 {
    -webkit-transform: rotate(90deg);
    -moz-transform: rotate(90deg);
    -ms-transform: rotate(90deg);
    -o-transform: rotate(90deg);
    transform: rotate(90deg);
}

.icon-flip-horizontal {
   -moz-transform: scaleX(-1);
    -webkit-transform: scaleX(-1);
    -o-transform: scaleX(-1);
    transform: scaleX(-1);
}

.link-multiple-item {
    .link-multiple-item-icon {
        margin-right: 4px;
    }
}

.link-field-icon {
    margin-right: 4px;
}

.field-row-text-item {
    margin-top: 7px;
    display: inline-block;
}

.post-container > textarea.note,
textarea.auto-height {
    overflow-x: hidden;
}

#global-search-panel {
     > .panel {
        .panel-heading {
            .close-link {
                display: none;
            }
        }
        > .panel-body {
            max-height: @navbar-panel-body-max-height;
            overflow-y: auto;
            overflow-x: hidden;
            padding-bottom: @panel-padding;
        }
    }
}

#notifications-panel {
    > .panel {
        overflow: hidden;
        border-top-right-radius: 0;

        .panel-heading {
            .close-link {
                display: none;
            }
        }

        > .panel-heading {
            background-color: var(--dropdown-bg);
        }

        > .panel-body {
            max-height: @navbar-panel-body-max-height;
            overflow-y: auto;
            overflow-x: hidden;

            background-color: var(--dropdown-bg);

            ul > li.list-group-item {
                background-color: var(--dropdown-bg);
            }

            .show-more a {
                border-bottom-right-radius: 0;

                @media screen and (max-width: (@screen-sm-min - 1px)) {
                    border-bottom-left-radius: 0;
                }
            }
        }

        border-color: var(--dropdown-border);
        border-width: var(--dropdown-border-width);

        > .panel-body {
            background-color: var(--dropdown-bg);
        }
    }
}

.modal-title-text span.color-icon {
    margin-right: 2px;
}

.header-breadcrumbs {
    .color-icon {
        font-size: 50%;
        left: 0;
        margin-right: 2px;
        top: -4px;
        position: relative;
    }

    .breadcrumb-item:after,
    .breadcrumb-separator:after {
        content: "";
        display: block;
    }
}

span.color-icon {
    font-size: 50%;
    top: -2px;
    left: 1px;
    margin-right: 1px;
    display: inline;
    position: relative;
}

.small span.color-icon {
    font-size: 50%;
}

td > span.color-icon {
    left: 0;
    margin-right: 0;
}

#global-search-panel .panel-body .cell > .color-icon {
    margin-right: 5px;
}

@media screen and (max-width: (@screen-sm-min - 1px)) {
    .list {
        width: auto;
        overflow-y: hidden;
        overflow-x: auto;
    }
    .list.list-expanded {
        width: auto;
        overflow-x: unset;
        overflow-y: unset;
    }
    .list > table {
        min-width: @list-table-sm-screen-min-width;
        font-size: 96%;

        & + .show-more {
            min-width: @list-table-sm-screen-min-width;
        }
    }

    #main > .list-container > .list > table {
        td:first-child,
        th:first-child {
            padding-left: 10px;
        }
        td:last-child,
        th:last-child {
            padding-right: 10px;
        }
    }
}

.expanded-row {
    span.label {
        position: relative;
        top: -1px;

        &.label-md {
            padding: .09em 6px .2em;
            font-size: 75%;
            font-weight: 600;
            top: -1px;
        }
    }
}

.stream-head-text-container {
    span.label {
        position: relative;
        top: -1px;
    }

    padding-left: 28px;

    > .icon:first-child {
        margin-right: 1px;
    }
}

.stream-head-container {
    margin-bottom: 4px;
}

.stream-head-container .internal-badge {
    position: absolute;
    top: 35px;
    left: 19px;
}

.stream-head-container .internal-badge > span {
    color: @brand-danger;
}

.stream-head-container > img.avatar {
    display: inline-block;
    margin-top: -3px;
    margin-right: 3px;
    margin-bottom: -2px;
}


.stream-post-container .cell-post {
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.stream-post-container,
.stream-attachments-container,
.stream-details-container,
.stream-subject-container
{
    padding: 2px 0 2px 28px;
    margin-bottom: 2px;
}

.stream-details-container {
    table.audited-summary-table {
        margin-top: 8px;
        background-color: transparent;
        table-layout: fixed;

        td {
            //white-space: nowrap;
            text-overflow: ellipsis;
            overflow: hidden;

            &:first-child {
                padding-left: 0;
            }

            &:last-child {
                padding-right: 0;
            }
        }
    }

    .none-value {
        color: var(--text-gray-color);
    }
}

.stream-details-container > ul {
    padding-left: 0;
    list-style-type: none;


    > li {
        margin-bottom: 4px;
    }

    > li:last-child {
        margin-bottom: 0;
    }
}

.list table td img.image-preview {
    border-radius: var(--border-radius-small);
}

img.avatar {
    border-radius: 50%;
}

img.avatar.avatar-link {
    display: inline-block;
    margin-top: 0;
    margin-right: 3px;
    position: relative;
    vertical-align: top;
    top: 1px;

    &[width="16"] {
        top: 2px;
        vertical-align: baseline;
    }

    &[width="20"] {
        top: 0;
    }
}

div[data-scope="User"],
div[data-scope="PortalUser"],
div[data-scope="ApiUser"] {
    .field[data-name="avatar"] {
        > a > img,
        > img {
            border-radius: 50%;
        }
    }
}

.link-container .list-group-item {
    padding: @padding-base-vertical @padding-base-horizontal;
    line-height: @line-height-computed;
}

.flotr-labels {
    user-select: none;
}

.flotr-mouse-value {
    cursor: default;
    font-size: 13px;
    text-align: center;
    user-select: none;
}

.flotr-grid-label-y {
    min-height: 1.2em;
    line-height: 1.1em;
    max-height: 2.1em;
    overflow: hidden;
    user-select: none;
}

.flotr-grid-label-x {
    min-height: 1.2em;
    max-height: 1.2em;
    line-height: 1.1em;
    overflow: hidden;
    padding: 0 1px 1px;
    user-select: none;
}

.legend-container {
    overflow-x: hidden;
    overflow-y: hidden;
    padding-top: 7px;

    > table {
        margin: 0 auto;
    }

    table td {
        padding: 2px 2px;
        line-height: 1em;
    }

    td.flotr-legend-label {
        white-space: nowrap;
        text-overflow: ellipsis;
        overflow: hidden;
        user-select: none;
    }

    td.flotr-legend-label > span {
        display: block;
        text-overflow: ellipsis;
        overflow: hidden;
        line-height: 1.3em;
        max-height: 15px;
    }

    .flotr-legend-color-box > div {
        position: relative;
        top: 1px;

        > div {
            border-radius: var(--border-radius-small);

            > div {
                position: relative;
                top: -1px;
                left: 0;
                border-radius: var(--border-radius-small);
                margin: -1px;
            }
        }
    }
}

.textcomplete-item a {
    cursor: default;
}

.complex-text-container.cut {
    position: relative;

    overflow: hidden;

    > .complex-text {

        &::before {
            content: " ";
            width: 100%;
            height: 50px;
            position: absolute;
            bottom: 0;
            left: 0;
            background: linear-gradient(to bottom, transparent, var(--panel-bg));
        }
    }
}

.list-group-item.active .complex-text-container.cut {
    > .complex-text {
        &::before {
            background: linear-gradient(to bottom, transparent, var(--default-heading-bg-color));
        }
    }
}

.see-more-container {
    > a {
        &,
        &:focus,
        &:hover,
        &:active {
            text-decoration: none;
        }

        &:hover {
            > .text {
                text-decoration: underline;
            }
        }
    }
}

.complex-text a {
    word-wrap: break-word;
}

table.table td.cell .complex-text,
table.table td.cell .html-container {
    word-wrap: break-word;
    white-space: normal;
}

.complex-text.complex-text-memo {
    h1 {
        font-size: floor(@font-size-base * 1.8);
        font-weight: 500;
        margin-top: (@line-height-computed / 2) * 2;
        margin-bottom: (@line-height-computed / 2) * 1.3;
    }

    h2 {
        font-size: floor(@font-size-base * 1.5);
        font-weight: 500;
        margin-top: (@line-height-computed / 2) * 1.4;
        margin-bottom: (@line-height-computed / 2) * 1.2;
    }

    h3, h4, h5, h6 {
        font-size: floor(@font-size-base * 1.1);
        margin-top: (@line-height-computed / 2) * 1.2;
        margin-bottom: (@line-height-computed / 2);
    }
}

.field > .complex-text-container > .complex-text {
    > h1:first-child,
    > h2:first-child {
        margin-top: 8px !important;
    }
    > h3:first-child {
        margin-top: 4px !important;
    }
}

.complex-text,
.confirm-message,
.alert,
.alert > .message,
.popover-content {
    h1:first-child,
    h2:first-child,
    h3:first-child,
    h4:first-child,
    h5:first-child,
    h6:first-child,
    p:first-child,
    > ul:first-child,
    > ol:first-child,
    pre:first-child,
    blockquote:first-child {
        margin-top: 0 !important;
    }
    h1 {
        font-weight: 600;
        margin-top: @line-height-computed;
        margin-bottom: (@line-height-computed / 2);
    }
    h2, h3 {
        font-weight: 600;
        margin-top: (@line-height-computed / 2) * 1.2;
        margin-bottom: (@line-height-computed / 2);
    }
    h4, h5, h6 {
        font-weight: normal;
        margin-top: (@line-height-computed / 2);
        margin-bottom: (@line-height-computed / 2);
    }
    h1 {
        font-size: floor(@font-size-base * 1.2);
    }
    h2 {
        font-size: floor(@font-size-base * 1.1);
    }
    h3, h4, h5, h6 {
        font-size: floor(@font-size-base);
    }

    p,
    ul,
    ol,
    pre,
    blockquote {
        margin-top: (@line-height-computed / 2);
    }

    p:last-child,
    > ul:last-child,
    > ol:last-child,
    blockquote:last-child,
    pre:last-child {
        margin-bottom: 0;
    }

    ul,
    ol {
        > li {
            ul, ol{
                margin-top: 4px;
                margin-bottom: 4px;
            }
        }
    }

    ul > li {
        list-style-type: disc;
    }

    ul, ol {
        padding-left: 30px;
    }
}

.field > .html-container {
    overflow: hidden;

    h1:first-child,
    h2:first-child,
    h3:first-child,
    h4:first-child,
    h5:first-child,
    h6:first-child,
    > p:first-child,
    > ul:first-child,
    > ol:first-child,
    > pre:first-child,
    > blockquote:first-child {
        margin-top: 0;
    }

    ul,
    ol {
        padding-left: 30px;
        margin-bottom: (@line-height-computed / 2);
    }

    > p:last-child,
    > ul:last-child,
    > ol:last-child,
    > pre:last-child,
    > blockquote:last-child,
    > table:last-child {
        margin-bottom: 0;
    }

    ul > li {
        list-style-type: disc;
    }

    p,
    ul,
    ol,
    pre,
    blockquote {
        margin-top: (@line-height-computed / 2);
    }
}

.list-group-tree {
    border: 0;
}
.list-group-tree > li {
    border: 0;
    padding: 0 0 0 @panel-padding;
}

.list-group-tree > li .cell {
    padding: 3px 0;

    .remove-link {
        margin-left: 4px;
        margin-right: 4px;
    }
}

.categories-container .root-item {
    padding-bottom: 3px;

    a, a:hover, a:active {
        text-decoration: none;
    }
}

.list-group-tree {
    .fa-chevron-down,
    .fa-chevron-right,
    .empty-icon {
        display: inline-block;
        width: 12px;
    }
}

@media screen and (max-width: (@screen-sm-min - 1px)) {
    .folders-container {
        margin-left: -(@container-padding);
        margin-right: -(@container-padding);
    }
}

@media screen and (min-width: @screen-sm-min) {
    .folders-container {
        margin-left: -(@container-padding);
        margin-right: -1px; // Fix 1px shift on sticked.
    }

    .folders-container.sticked {
        position: fixed;
        margin-left: -(@container-padding);

        .list-group-side {
            margin-bottom: 0;
        }

        overflow: hidden;
    }
}

.list-group-side {
    border: 0;

    > li {
        border: 0;
        padding: 5px 4px 5px (@container-padding - 3px);
        border-left: 3px solid transparent;
        border-top-right-radius: var(--border-radius);
        border-bottom-right-radius: var(--border-radius);

        &.selected {
            border-color: var(--brand-danger);

            .cell {
                padding: 2px 0;
            }

            a {
                &.side-link,
                &:hover.side-link,
                &:active.side-link,
                &:visited.side-link,
                &:focus.side-link {
                    color: var(--brand-danger);
                    font-weight: 600;
                }
            }
        }

        &.droppable {
            &.active {
                &:not(.success) {
                    border-left-color: var(--brand-warning);
                }
                background-color: var(--state-warning-bg);
            }
            &.success {
                background-color: transparent;
                transition: 900ms linear background-color;
            }
        }
    }
}

.list-group-side a:hover,
.list-group-side a:focus,
.list-group-tree a:hover,
.list-group-tree a:focus {
    text-decoration: none;
}

.email-address-create-dropdown .btn {
    position: relative;
    top: -2px;
    padding: 0 4px;
    margin: 0;
    margin-bottom: 0;
    border: 0;
    line-height: 1.3;
}

.email-address-create-dropdown + .email-address-line {
    display: block;
    width: ~"calc(100% - 17px)";
}

#main > .calendar-container {
    margin-top: 10px;

    > .button-container {
        user-select: none;
    }

    .calendar-type-button-group {
        margin-left: 6px;
    }

    .calendar {
        border-radius: var(--panel-border-radius);

        /*.fc-view-container {
            .fc-view > table {
                border-collapse: collapse;
                border-style: hidden;
            }
        }*/
    }

    .timeline {
        border: var(--panel-border-width) solid var(--default-border-color);
        border-radius: var(--panel-border-radius);
    }
}

.dashlet-body {
    .fc-daygrid,
    .fc-timegrid {
        border-top: 1px solid var(--calendar-border);

        /*table {
            border-collapse: collapse;
            border-style: hidden;
        }*/
    }
}

#notifications-panel {
    position: absolute;
    width: @notifications-panel-width;
    z-index: 1001;
    right: 0;
    left: auto;
}

#global-search-panel {
    position: absolute;
    width: @global-search-panel-width;
    z-index: 1001;
    right: 0;
    left: auto;

    > .panel {
        overflow: hidden;
        border-color: var(--dropdown-border);
        border-width: var(--dropdown-border-width);

        > .panel-heading {
            background-color: var(--dropdown-bg);
        }

        > .panel-body {
            background-color: var(--dropdown-bg);

            ul > li.list-group-item {
                background-color: var(--dropdown-bg);
            }

            .show-more a {
                border-bottom-right-radius: 0;

                @media screen and (max-width: (@screen-sm-min - 1px)) {
                    border-bottom-left-radius: 0;
                }
            }
        }
    }
}

.post-container {
    .internal-mode-switcher {
        color: var(--text-muted-color);
        margin-left: 10px;
        display: inline-block;
        position: relative;
        top: 2px;
    }

    .internal-mode-switcher.enabled {
        color: @brand-danger;
    }
    .attachments {
        width: 270px;
    }

    .stream-post-preview {
        margin-right: 10px;
    }
}

.post-control .attachments {
    width: 270px;
}


.inline-cancel-link {
    margin-left: 8px;
}

.panel .item-container.ui-sortable-helper {
    background-color: @panel-bg;
}

.dynamic-logic-expression-container {
    div.item-list[data-level="0"] {
        margin-left: 0;
    }

    > div.item-list {
        > div:not(.group-operator) {
            border-top-right-radius: var(--border-radius-small);
            border-bottom-right-radius: var(--border-radius-small);
        }
    }

    div.item-list {
        margin-left: 30px;

        > div {
            margin: 0 0 10px 0;

            &:not(.group-operator) {
                border-top-left-radius: var(--border-radius-small);
                border-bottom-left-radius: var(--border-radius-small);

                a[data-action="remove"] {
                    visibility: hidden;
                }

                &:not(:empty) {
                    outline: var(--default-border-color) 1px solid;
                    outline-offset: 4px;
                }

                &:hover:not(:has(div.item-list > div:hover)) {
                    outline: var(--default-border-color) 1px solid;

                    > .group-head > a[data-action="remove"] {
                        visibility: visible;
                    }

                    > .dynamic-logic-edit-item-row a[data-action="remove"] {
                        visibility: visible;
                    }
                }
            }
        }
    }

    div.group-head {
        line-height: @input-height-base;

        a[data-action="remove"] {
            margin-right: 5px;
            position: relative;
            top: -4px
        }
    }

    .dynamic-logic-edit-item-row {
        > div:first-child,
        > div:last-child {
            padding-top: 7px;
        }

        a[data-action="remove"] {
            margin-right: 5px;
            margin-top: 1px;
        }
    }

    .not-operator,
    .group-operator {
        color: var(--gray-soft);
    }

    .group-operator:last-child {
        display: none;
    }

    .group-bottom[data-level="0"] {
        margin-left: 0;
    }

    .group-bottom {
        margin-left: 30px;
    }
}

.dynamic-logic-options {
    a.remove-option-list,
    a.add-option-list {
        line-height: @input-height-base;
    }
    .option-list-item-header {
        margin-top: -10px;
    }

    .dynamic-logic-options-list-container {
        margin-bottom: 0;
    }
}

.field > a[data-action="copyToClipboard"] {
    margin-left: 6px;
}

.list-container-panel > div {
    background-color: @panel-bg;
    border-radius: var(--panel-border-radius);
    border: var(--panel-border-width) solid var(--panel-default-border);

    > .list-group {
        > .list-group-item {
            border-left-width: 0;
            border-right-width: 0;
            border-top-width: 0;

            &:last-child {
                border-bottom-width: 0;
            }
        }
    }

    > table:first-child,
    > .list-group:first-child,
    > .list-group:first-child > .list-group-item:first-child {
        border-top-left-radius: var(--panel-border-radius);
        border-top-right-radius: var(--panel-border-radius);
    }

    > table,
    > .list-group,
    > .list-group:last-child > .list-group-item:last-child,
    > .show-more > a {
        border-bottom-left-radius: var(--panel-border-radius);
        border-bottom-right-radius: var(--panel-border-radius);
    }

    > .show-more > a {
        border-bottom-left-radius: var(--panel-border-radius);
        border-bottom-right-radius: var(--panel-border-radius);
    }
}

.list-group-panel {
    background-color: @panel-bg;
    &:not(.no-side-margin) {
        border-radius: var(--panel-border-radius);
    }

    border: var(--panel-border-width) solid var(--panel-default-border);

    > .list-group-item {
        border-left: 0;
        border-right: 0;

        &:first-child {
            border-top: 0;
            &:not(.no-side-margin) {
                border-top-left-radius: var(--panel-border-radius);
                border-top-right-radius: var(--panel-border-radius);
            }
        }

        &:last-child {
            border-bottom: 0;
            &:not(.no-side-margin) {
                border-bottom-left-radius: var(--panel-border-radius);
                border-bottom-right-radius: var(--panel-border-radius);
            }
        }
    }
}

.field .array-control-container {
    position: relative;
}

table.table-admin-panel {
    table-layout: fixed;
    border-collapse: separate;

    color: var(--text-gray-color);

    border: var(--panel-border-width) solid var(--default-border-color);

    tr:first-child td {
        border-top: var(--panel-border-width);
    }

    tr > td:first-child {
        width: 230px;

        > div {
            position: relative;

            > .icon {
                position: absolute;
                color: var(--text-muted-color);
                top: 2px;
            }
            > a {
                padding-left: 28px;
                position: static;
                display: inline-block;
            }
        }
    }

    td {
        overflow-wrap: break-word;
        word-wrap: break-word;
    }
}

.admin-tables-container > div {
    margin-bottom: 20px;
    .table-admin-panel {
        margin-bottom: 0;
    }
    > h4 {
        margin-top: 0;
    }
}

.admin-content {
    .notifications-panel-container > .panel {
        overflow: hidden;

        .list-group-item:first-child {
            border-top: 0;
        }
        .list-group-item:last-child {
            border-bottom: 0;
        }
    }

    .table-admin-panel,
    iframe {
        border-radius: var(--panel-border-radius);
    }
}

.list-nested-categories {
    margin-bottom: @padding-base-horizontal;
    .category-item {
        padding: @padding-base-horizontal @padding-base-horizontal @padding-base-horizontal 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        user-select: none;

        .folder-icon {
            margin-right: 3px;
            left: 1px;
            position: relative;
        }

        a {
            &:hover,
            &:focus {
                text-decoration: none;

                .category-item-name {
                    text-decoration: underline;
                    color: @gray-soft;
                }
            }

            user-select: none;

            .category-item-name {
                //user-select: text;
            }
        }
    }
}

.categories-container {
    > .list > .list-group-tree > li {
        padding-left: 0;
    }
}

.left-container > .list-group-side > .list-group-item,
.categories-container div.root-item,
.categories-container .list-group-tree > .list-group-item > .cell {
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    user-select: none;
}

.left-container + .list-container > .list[data-scope="Email"] {
    td.cell[data-name="subject"] {
        user-select: none;
    }
}

.left-container {
    user-select: none;
}

.admin-search-container {
    margin-bottom: 20px;
}

.admin-panel-iframe-container {
    border: var(--panel-border-width) solid var(--default-border-color);

    > h4 {
        padding: @padding-base-vertical @padding-base-horizontal;
        padding-bottom: 7px;
        margin-bottom: 0;
        margin-top: 0;
    }

    > div {
      margin-bottom: 10px;
    }

    > div > .section {
        padding-left: @padding-base-horizontal;
        padding-right: @padding-base-horizontal;
        padding-top: 10px;
        padding-bottom: 10px;
        border-bottom: 1px solid @panel-default-border;

        > p:last-child {
            padding-bottom: 0;
            margin-bottom: 0;
        }
    }

    > div > .section.extension > p:first-child {
        font-size: 16px;
    }

    > div > .section.extension > p:last-child {
        > .btn {
            margin-top: 4px;
        }
        .price {
            margin-top: -3px;
            font-size: 16px;
        }
        > a.text-danger {
            font-weight: 600;
        }
    }

    height: 100%;
}

.sections-container {
    > .section {
        margin-bottom: 30px;
        > h5 {
            margin-top: 0;
        }
    }
    > .section:last-child {
        margin-bottom: 0;
    }
}

.array-add-list-group > li {
    input[type="checkbox"] {
        margin-right: 12px;
        position: relative;
        top: 8px;
        float: left;
    }

    vertical-align: middle;
    line-height: 32px;
}

.search-container {
    margin-bottom: @padding-base-vertical;
}

.search-row {
    .input-group button.search {
        margin-left: -2px;
    }

    ul.filter-list {
        right: 54px;

        li.search-hidden {
            height: 0;
            display: none;
        }
    }

    input.field-filter-quick-search-input {
        border-left: 0;
        border-right: 0;
        padding-left: 20px;
        padding-right: 20px;
    }
}

.advanced-filters-apply-container {
    margin-bottom: 12px;
}

@media screen and (min-width: @screen-md-min) {
    .col-md-12.hidden-cell {
        min-height: 0;
    }
}

@media screen and (min-width: @screen-sm-min) {
    .search-container .view-mode-switcher-buttons-group {
        float: right;
    }
}

@media screen and (max-width: (@screen-sm-min - 1px)) {
    #notifications-panel {
        position: fixed;
        width: 100%;
        top: 0;
        right: 0;
        left: 0;
        margin-right: 0;
        height: 100%;
    }

    #global-search-panel {
        position: fixed;
        width: 100%;
        top: 0;
        right: 0;
        left: 0;
        margin-right: 0;
        height: 100%;
    }

    #global-search-panel {
         > .panel {
            .panel-heading {
                .close-link {
                    display: inline;
                }
            }
            .panel-body {
                max-height: none;
            }
        }
    }

    #notifications-panel {
        > .panel {
            .panel-heading {
                .close-link {
                    display: inline;
                }
            }
            .panel-body {
                max-height: none;
            }
        }
    }

    input.global-search-input {
        width: 100%;
    }

    .search-row .view-mode-switcher-buttons-group {
        float: right;
    }

    .search-row {
        .btn.btn-icon-x-wide {
            width: 54px;
        }
    }

    .categories-container > .list {
        margin: @panel-padding 0;
    }

    .panel-body > div:first-child > .list:first-child {
        //margin-top: 0;
    }

    .list > .table {
        .dropdown-menu {
            position: relative !important;
        }
        .pull-right.open > .btn {
            float: right;
        }
    }

    .list-categories-column + .list-main-column {
        .list-container > .list {
            margin-left: -@container-padding;
            margin-right: -@container-padding;
        }
    }

    .list-main-column {
        > .nested-categories-container + .list-container {
            > .list {
                margin-left: -@container-padding;
                margin-right: -@container-padding;
                border-left: 0;
                border-right: 0;
            }
        }
    }

    .modal-body {
        .categories-container + .list-container {
            .list {
                margin-left: -@modal-inner-padding;
                margin-right: -@modal-inner-padding;
            }
        }
    }

    .left-container + .list-container {
        .list {
            margin-left: -@container-padding;
            margin-right: -@container-padding;
        }
    }

    .calendar-container {
        .button-container > div:first-child{
            margin-bottom: 10px;
        }
        .date-title {
            margin-bottom: 10px;
            margin-top: 6px;
            h4 {
                margin-top: 0;
                font-size: 15px;
            }
            white-space: nowrap;
            overflow: hidden;
        }
    }

    #nav-menu-dropdown {
        width: 39px;
        text-align: center;
    }

    .folders-container > .list-group {
        @supports (display: grid) {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));

            > li {
                padding-right: 10px;
            }
        }
    }

    .page-header {
        margin: 10px 0;
    }
}

a.field-info > span.fa-info-circle {
    font-size: 12px;
    position: relative;
    top: -1px;
}

.fas, .far, .fa {
    font-size: 16px;
}

.fas.fa-sm,
.far.fa-sm,
.btn-sm .fas,
.btn-sm .far,
.small .far,
.small .fas,
.fas.small,
.far.small {
    font-size: 12px;
}

.icon-is-replied {
    -moz-transform: scaleX(-1);
    -webkit-transform: scaleX(-1);
    -o-transform: scaleX(-1);
    transform: scaleX(-1);

    &::before {
        content: "\f064";
    }
}

.btn > .fa-ellipsis-v {
    position: relative;
    top: 1px;
}

.btn-icon > .fa-chevron-left {
    left: -1px;
}

.btn-default > .fa-sm.fa-rss {
    position: relative;
    top: -1px;
    padding-right: 1px;
}

.btn:not(.btn-icon) > .fa-plus.fa-sm:first-child {
    position: relative;
    top: -1px;
    padding-right: 1px;
}

.transform-flip,
.transform-flip-x {
    -webkit-transform: scaleX(-1);
    transform: scaleX(-1);
}

.transform-flip-y {
    -webkit-transform: scaleY(-1);
    transform: scaleY(-1);
}

.transform-rotate-90 {
    -webkit-transform: rotate(90deg);
    -moz-transform: rotate(90deg);
    -o-transform: rotate(90deg);
    -ms-transform: rotate(90deg);
    transform: rotate(90deg);
}

.transform-rotate-180 {
    -webkit-transform: rotate(180deg);
    -moz-transform: rotate(180deg);
    -o-transform: rotate(180deg);
    -ms-transform: rotate(180deg);
    transform: rotate(180deg);
}

.transform-rotate-270 {
    -webkit-transform: rotate(270deg);
    -moz-transform: rotate(270deg);
    -o-transform: rotate(270deg);
    -ms-transform: rotate(270deg);
    transform: rotate(270deg);
}

a.link-gray {
    &,
    &:active {
        color: @gray-soft;
    }
    &:hover,
    &:focus {
        color: @gray;
    }
}

#layout {
    .cell .left {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        float: left;
    }
    .cell .right {
        float: right;

        .fa-times, .fa-minus {
            position: relative;
            top: 1px;
        }
    }
}


#layouts-menu {
    .panel > .panel-heading {
        padding-top: 6px;
        padding-bottom: 6px;
    }
}

.selectize-control.as-list .item {
    display: block;
}

.dd-backdrop {
    opacity: .9;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1040;
    background-color: @body-bg;
    text-align: center;
    padding-top: 80px;
    font-size: 200%;

    .fas,
    .far {
        font-size: 100%;
    }
}

pre {
    background-color: var(--code-bg);
    border-color: var(--code-border-color);
    color: var(--code-color);
}

.label-default {
    background-color: var(--label-default-bg);
}

a.close {
    color: var(--text-muted-color);
    opacity: 1;

    &:hover,
    &:hover:active {
        opacity: 1;
        color: var(--gray-soft);
    }
}

.wysiwyg-iframe-container.fallback {
    border-radius: var(--border-radius);
    overflow: hidden;
    background-color: var(--white-color);
}

@supports not selector(::-webkit-scrollbar) {
    .dashlet > .dashlet-body,
    .list-kanban-container {
        scrollbar-width: thin;
    }

    * {
        scrollbar-width: auto;
        scrollbar-color: var(--scroll-thumb-bg) var(--scroll-bg);
    }
}

*::-webkit-scrollbar {
    height: var(--scroll-width);
    width: var(--scroll-width);
}

*::-webkit-scrollbar-track {
    background: var(--scroll-bg);
}

*::-webkit-scrollbar-thumb {
    background-color: var(--scroll-thumb-bg);
    border-radius: 0;
    border: var(--scroll-border-width) solid var(--scroll-bg);
}

.collapsed-modal-bar {
    position: fixed;
    bottom: 0;
    display: grid;
    grid-gap: 10px;
    width: calc(100% - 100px);
    justify-content: end;

    @media screen and (max-width: (@screen-sm-min - 1px)) {
        width: 100%;
    }

    > .collapsed-modal {
        grid-row: 1;
        width: 200px;
        overflow: hidden;
        z-index: 1009;
        height: 26px;
        padding: 3px 8px;
        border-top-left-radius: var(--border-radius);
        border-top-right-radius: var(--border-radius);

        background-color: var(--collapsed-modal-bg);

        .title-container {
            width: calc(100% - 18px);
            text-overflow: ellipsis;
            overflow: hidden;
            float: left;
            height: 20px;
            white-space: nowrap;
        }

        .close-container {
            float: right;
        }

        a, a:hover, a:active {
            color: var(--collapsed-modal-text-color);
        }

        -webkit-touch-callout: none;
        -webkit-user-select: none;
        -khtml-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
    }
}

.draggable-helper {
    border-radius: var(--border-radius);
    background-color: var(--state-info-bg);
    border: 1px solid var(--state-info-bg-10);
    color: var(--state-info-text);
    padding: @padding-base-vertical 20px;
    font-weight: 600;
    opacity: 1;
    position: absolute;
    z-index: 10002;
}

.reminders-container {
    > .reminder {
        table-layout: fixed;
        width: 100%;

        > .input-group-item:first-child {
            width: 40%;
        }

        > .input-group-btn {
            width: 35px;
        }
    }
}

.input-group-link-parent {
    table-layout: fixed;
    width: 100%;

    > .input-group-item:first-child {
        width: 34%;
    }

    > .input-group-btn {
        width: calc(35px * 2);
    }
}

.phone-number-block-container {
    .input-group.phone-number-block {
        table-layout: fixed;
        width: 100%;

        > .input-group-item:first-child {
            width: 24%;
        }

        > .input-group-btn {
            .btn.phone-property.active {
                z-index: unset;
            }

            width: calc(35px * 2 + 1px);
        }
    }

    &.many {
        .input-group.phone-number-block {
            > .input-group-btn {
                width: calc(35px * 4 + 1px);
            }
        }
    }
}

.input-group-currency {
    display: flex;

    > .input-group-item:first-child {
        flex-grow: 1;
        display: block;
    }

    > .input-group-item:last-child {
        flex-grow: 1;
        display: block;
        min-width: 70px;
        max-width: 80px;
    }

    > .input-group-addon:last-child {
        flex-grow: 1;
        display: block;
        min-width: fit-content;
        max-width: fit-content;
    }
}

body > .autocomplete-suggestions.text-search-suggestions {
    > .autocomplete-suggestion {
        padding-top: 0;
        padding-bottom: 0;

        > span {
            text-overflow: ellipsis;
            overflow: hidden;
            display: inline-block;
            width: ~"calc(100% - 20px)";
            height: 24px;
            padding-top: 4px;
            padding-bottom: 4px;
        }

        > a {
            margin-top: 3px;
        }
    }
}

.popover {
    max-width: 300px;

    .popover-title {
        line-height: 1.5;
    }
}

.input-group-item > .iti {
    top: 3px;
    margin-left: -1px;
    width: ~"calc(100% + 1px)";

    .iti__flag-container {
        user-select: none;

        &,
        &:hover {
            .iti__selected-flag {
                background-color: transparent;

                &[aria-expanded="true"] {
                    background-color: var(--dropdown-link-hover-bg);
                }
            }
        }

        .iti__country-list {
            margin-top: 1px; // To match positioning of other dropdowns.
            z-index: 5;
            max-height: 300px;
            background-color: var(--dropdown-bg);
            border: var(--dropdown-border) solid var(--dropdown-border-width);
            border-radius: var(--dropdown-border-radius);
            box-shadow: var(--dropdown-box-shadow);

            .iti__dial-code {
                color: var(--text-muted-color);
            }

            .iti__country {
                color: var(--dropdown-link-color);
                padding: 4px 10px;

                &.iti__highlight {
                    background-color: var(--dropdown-link-hover-bg);
                }
            }

            .iti__divider {
                border-bottom-color: var(--dropdown-divider-bg);
            }

            padding: 5px 0;
        }
    }

    .iti__selected-flag {
        z-index: 4;
        padding: 0 8px 0 8px;
        color: var(--gray-soft);

        > .iti__arrow {
            visibility: hidden;
            display: none;
        }

        &:after {
            content: " ";
            color: var(--text-muted-color);
            //display: inline-block;
            display: none;
            width: 0;
            height: 0;
            top: 15px;
            right: 8px;
            margin-left: 2px;
            vertical-align: middle;
            border-top: 4px dashed;
            border-right: 4px solid transparent;
            border-left: 4px solid transparent;
            position: absolute;
        }
    }

    > input {
        border-top-right-radius: 0;
        border-bottom-right-radius: 0;
    }
}

@import "misc/kanban.less";
@import "misc/wysiwyg.less";

@import "elements/placement.less";
@import "elements/site.less";
@import "elements/modal.less";
@import "elements/buttons.less";
@import "elements/popup-notification.less";
@import "elements/grid.less";
@import "elements/animation.less";
