/**
* DevExtreme (widgets/common/list.less)
* Version: 19.2.6
* Build date: Thu Jan 30 2020
*
* Copyright (c) 2012 - 2020 Developer Express Inc. ALL RIGHTS RESERVED
* Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/
*/
@import (once) "./badge.less";
@import (once) "./button.less";
@import (once) "./scrollView.less";

@LIST_SEARCHBOX_MARGIN_BOTTOM: 5px;

.dx-list {
    margin: 0;
    min-height: 3em;

    .dx-scrollview-content:focus {
        outline: 0;
    }
}

.dx-wrap-item-text > .dx-list-item > .dx-list-item-content {
    white-space: normal;
}

.dx-empty-collection .dx-list-select-all {
    display: none;
}

.dx-list-group-header {
    &:before {
        width: 0;
        height: 0;
        display: block;
        float: right;
        margin-top: 6px;
        border-style: solid;
        border-color: transparent;
        border-width: 5px 5px 0 5px;
    }

    .dx-list-collapsible-groups & {
        cursor: pointer;

        &:before {
            content: ' ';
        }
    }

    .dx-list-group-collapsed &:before {
        border-width: 0 5px 5px 5px;
    }
}

.dx-list-group-body {
    overflow: hidden;
}

.dx-list-item {
    position: static;
    cursor: pointer;
    display: table;
    width: 100%;
    table-layout: fixed;
    .dx-overflow();
}

.dx-list-item-content {
    .dx-overflow();

    display: table-cell;
    width: 100%;

    &:before {
        content: "_";
        color: transparent;
        display: inline-block;
        width: 0;
        float: left;
    }
}

.dx-list .dx-empty-message {
    .dx-overflow();

    min-height: 3em;
}

.dx-list-item-badge-container {
    display: table-cell;
    width: 20px;
    text-align: right;
    vertical-align: middle;
    padding-right: 10px;
}

.dx-list-item-badge {
    float: right;
    position: relative;
}

.dx-list-item-chevron-container {
    display: table-cell;
    width: 15px;
    vertical-align: middle;
}

.dx-list-item-icon-container {
    display: inline-block;
}

.dx-list-item-chevron {
    height: 8px;
    width: 8px;
    margin-left: -6px;
    transform: rotate(135deg);
    border-width: 2px 0 0 2px;
    border-style: solid;
    opacity: 0.3;

    .dx-rtl & {
        margin-left: auto;
        margin-right: -6px;
        transform: rotate(-45deg);
    }
}


.dx-list-item-response-wait {
    opacity: 0.5;
    transition: opacity 0.2s linear;
}

.dx-list-slide-menu-content {
    display: table;
    width: 100%;
    table-layout: fixed;
}

.dx-list-item-before-bag,
.dx-list-item-after-bag {
    display: table-cell;
    width: 0;
    height: 100%;
    vertical-align: middle;
}

.dx-list-item-before-bag {
    .dx-list-toggle-delete-switch {
        display: block;
        float: left;
        padding: 3px 0;
    }

    .dx-icon-toggle-delete {
        transition: all 0.1s linear;
    }

    .dx-list-select-checkbox {
        float: left;
        transition: all 0.1s linear;
    }
}

.dx-list-select-all {
    white-space: nowrap;
}

.dx-list-select-all-label {
    display: inline-block;
    .dx-overflow;
}

.dx-list-item-after-bag {
    .dx-list-reorder-handle {
        cursor: move;
        background-repeat: no-repeat;
        background-size: 75% 75%;
        background-position: center;
        touch-action: manipulation;

        .dx-state-disabled & {
            cursor: default;
        }
    }
}

.dx-list-switchable-menu-shield-positioning {
    position: relative;
    transform: translateZ(0);

    .dx-device-android-4 & {
        transform: none;
    }
}

.dx-list-switchable-delete-top-shield,
.dx-list-switchable-delete-bottom-shield {
    position: absolute;
    right: 0;
    left: 0;
    cursor: pointer;
}

.dx-list-switchable-delete-top-shield {
    top: 0;
}

.dx-list-switchable-delete-bottom-shield {
    bottom: 0;
}

.dx-list-switchable-delete-item-content-shield {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

.dx-list-switchable-delete-button-container {
    position: absolute;
    top: 0;
    bottom: 0;
    overflow: hidden;
}

.dx-list-switchable-delete-button-wrapper {
    display: table;
    height: 100%;
}

.dx-list-switchable-delete-button-inner-wrapper {
    display: table-cell;
    padding-left: 1px;
    height: 100%;
    vertical-align: middle;
}

.dx-list-switchable-menu-item-shield-positioning {
    position: relative;

    .dx-list-slide-menu-content {
        position: relative;
    }

    .dx-list-item-content {
        position: relative;
    }
}

.dx-list-switchable-delete-ready {
    .dx-icon-toggle-delete {
        transform: rotate(-90deg);
    }
}

.dx-list-slide-menu-buttons-container {
    position: absolute;
    width: 100%;
    top: 0;
    bottom: 0;
    left: 0;
    overflow: hidden;

    .dx-device-ios & {
        -webkit-mask-image: -webkit-radial-gradient(white, black); // stylelint-disable-line property-no-vendor-prefix
    }
}

.dx-list-slide-menu-buttons {
    position: relative;
    top: 0;
    left: 0;
    bottom: 0;
    display: table;
    height: 100%;
}

.dx-list-slide-menu-button {
    display: table-cell;
    padding: 0 10px;
    vertical-align: middle;
}

.dx-list-static-delete-button {
    padding: 0 5px;

    .dx-button-content {
        overflow: visible;
    }
}

.dx-list-next-button {
    padding: 5px;
    text-align: center;

    .dx-button {
        padding: 0 3em;
    }
}

.dx-state-disabled {
    &.dx-list-item,
    .dx-list-item {
        cursor: default;
    }

    .dx-list-toggle-delete-switch,
    .dx-list-switchable-delete-button {
        .dx-button-disabled;
    }
}

.dx-list-context-menuitem {
    cursor: pointer;
}

.dx-list-search {
    margin-bottom: @LIST_SEARCHBOX_MARGIN_BOTTOM;
}

.dx-rtl .dx-list,
.dx-rtl.dx-list {
    .dx-list-item-badge-container {
        padding-left: 10px;
        padding-right: 0;
    }

    .dx-list-item-badge {
        float: left;
    }

    .dx-list-item-before-bag {
        .dx-list-toggle-delete-switch {
            float: right;
        }

        .dx-list-select-checkbox {
            float: right;
        }
    }

    .dx-list-switchable-delete-button-inner-wrapper {
        padding-right: 1px;
        padding-left: 0;
    }

    .dx-list-slide-item-delete-button-container {
        right: 100%;
        left: 0;
    }

    .dx-list-slide-item-delete-button {
        right: auto;
        left: 0;
    }

    .dx-list-group-header:before {
        float: left;
    }
}
