/**
* DevExtreme (widgets/ios7/lookup.ios7.less)
* Version: 20.1.10
* Build date: Fri Jan 15 2021
*
* Copyright (c) 2012 - 2021 Developer Express Inc. ALL RIGHTS RESERVED
* Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/
*/
@import (once) "./dropDownList.ios7.less";
@import (once) "./popover.ios7.less";
@import (once) "./textBox.ios7.less";

@IOS7_LOOKUP_HEIGHT: 27px;
@IOS7_LOOKUP_SELECTED_ICON_MARGIN: 20px;

@IOS7_LOOKUP_LIST_ITEM_PADDING_AFTER: 20px;
@IOS7_LOOKUP_LIST_ITEM_SELECTED_FONT_SIZE: 24px;
@IOS7_LOOKUP_LIST_ITEM_SELECTED_LINE_HEIGHT: 20px;

@IOS7_LOOKUP_FIELD_PADDING_AFTER: 17px;
@IOS7_LOOKUP_FIELD_PADDING: 4px @IOS7_LOOKUP_FIELD_PADDING_AFTER 4px 0;

.dx-lookup {
    height: @IOS7_LOOKUP_HEIGHT;

    &.dx-state-active {
        background: @IOS7_LOOKUP_FIELD_ACTIVE_BACKGROUND;

        .dx-lookup-field:before {
            border-color: @IOS7_LOOKUP_ARROW_ACTIVE;
        }
    }
}

.dx-lookup-field {
    padding: @IOS7_LOOKUP_FIELD_PADDING;
    color: @IOS7_LOOKUP_FIELD_TEXT;
}

.dx-lookup-arrow {
    .dx-icon(chevronnext);
    .dx-icon-font-centered-sizing(16px);

    font-weight: 600;
    width: @DROPDOWNEDITOR_BUTTON_WIDTH;

    &:before {
        color: @IOS7_INPUT_PLACEHOLDER;
    }
}

.dx-lookup-popover-mode {
    .dx-lookup-field:before {
        display: none;
    }
}

.dx-lookup-empty {
    .dx-lookup-field {
        color: @IOS7_INPUT_PLACEHOLDER;
    }
}

.dx-state-disabled {
    .dx-lookup-field {
        color: @IOS7_TEXTEDITOR_DISABLE;
    }
}

.dx-lookup-popup-wrapper {
    .dx-popup-content {
        padding: 0;
    }

    .dx-list-item-selected {
        .dx-list-item-content {
            padding-right: @IOS7_LOOKUP_LIST_ITEM_PADDING_AFTER;

            &:before {
                color: @IOS7_LINK;
                display: inline-block;
                font-weight: bold;
                content: "\f005";
                font-family: DXIcons; // stylelint-disable-line font-family-no-missing-generic-family-keyword
                font-size: @IOS7_LOOKUP_LIST_ITEM_SELECTED_FONT_SIZE;
                margin-right: @IOS7_LOOKUP_SELECTED_ICON_MARGIN;
                line-height: @IOS7_LOOKUP_LIST_ITEM_SELECTED_LINE_HEIGHT;
                float: right;
            }
        }
    }
}

.dx-lookup-popup-wrapper .dx-list {
    padding-bottom: 8px;
}

.dx-lookup-popup-search .dx-list {
    height: calc(100% - 50px);
}

.dx-lookup-search-wrapper {
    .dx-searchbar;

    border-top: 1px solid #7e7e7e;
    border-bottom: 1px solid #b5b5b5;
}

.dx-invalid.dx-lookup,
.dx-valid.dx-lookup {
    .dx-lookup-field {
        &:after {
            right: @DROPDOWNEDITOR_INVALID_BADGE_OFFSET + 1;
            .dx-invalid-ios7-badge();
        }
    }
}

.dx-rtl {
    .dx-lookup-field {
        padding-right: 0;
        padding-left: @IOS7_LOOKUP_FIELD_PADDING_AFTER;
    }

    .dx-invalid.dx-lookup,
    &.dx-invalid.dx-lookup,
    .dx-valid.dx-lookup,
    &.dx-valid.dx-lookup {
        .dx-lookup-field:after {
            left: @DROPDOWNEDITOR_INVALID_BADGE_OFFSET + 1;
            right: auto;
        }
    }

    .dx-validation-pending.dx-lookup,
    &.dx-validation-pending.dx-lookup {
        .dx-lookup-field-wrapper {
            .dx-pending-indicator {
                left: @DROPDOWNEDITOR_INVALID_BADGE_OFFSET + 1;
                right: auto;
            }
        }
    }
}

.dx-validation-pending.dx-lookup {
    .dx-lookup-field-wrapper {
        .dx-pending-indicator {
            right: @DROPDOWNEDITOR_INVALID_BADGE_OFFSET + 1;
            .pending-indicator-ios7();
        }
    }
}

.dx-lookup-popup-wrapper > .dx-rtl {
    .dx-list-item {
        &:before {
            float: left;
        }

        &.dx-list-item-selected .dx-list-item-content:before {
            float: left;
            margin-left: @IOS7_LOOKUP_SELECTED_ICON_MARGIN;
        }

        .dx-list-item-content {
            padding-right: @IOS7_LIST_ITEM_HORIZONTAL_PADDING;
            padding-left: @IOS7_LOOKUP_LIST_ITEM_PADDING_AFTER;
        }
    }
}
