// 1 800 234 3993
@import '../utilities/utilities.scss';

.azui {
    &.azDataTable {
        font-size: 12px;

        &>div.tbody {
            height: 300px;
            box-sizing: border-box;
            overflow-x: hidden;
            overflow-y: auto;
            border-left: 1px solid darken($color: $main-color, $amount: 10%);
            border-right: 1px solid darken($color: $main-color, $amount: 10%);
            // border-left: 1px solid red;
            // border-right: 1px solid red;
            white-space: nowrap;
            box-sizing: border-box;
            outline: none;

            &>div.tr {
                box-sizing: border-box;

                &:nth-child(even) {
                    background-color: $main-color;
                }

                &:hover {
                    background-color: darken($color: $main-color, $amount: 10%);
                }

                &:active {
                    background-color: darken($color: $main-color, $amount: 20%);
                }

                &.selected {
                    background-color: #498DD5;
                    color: $bg-color;
                }

                &>div.td {
                    width: 100px; // min-width: 80px;
                    height: 25px;
                    box-sizing: border-box; // padding: 0 0 0 1px;
                    display: inline-block;

                    & span {
                        padding: 0 0 0 10px;
                        display: inline-block;
                        box-sizing: border-box;
                        text-overflow: ellipsis;
                        overflow: hidden;
                        white-space: nowrap;
                        width: 100%;
                        height: 100%;

                        &::before {
                            content: "";
                            display: inline-block;
                            vertical-align: middle;
                            height: 100%;
                        }
                    }

                    & .azInlineEditorWrapper {
                        // display: inline-block;
                        box-sizing: border-box;
                        width: 100%;
                        height: 100%;
                        overflow: hidden;

                        & input[type=text].azInlineEditorInput {
                            // font-family: 'Roboto', sans-serif;
                            // font-size: 13px;
                            padding: 0 0 2px 10px;
                        }
                    }
                }
            }
        }

        &>div.thead {
            height: 30px;
            background-color: $main-color;
            box-sizing: border-box;
            border: 1px solid darken($color: $main-color, $amount: 10%); // border-right: 1px solid darken($color: $main-color, $amount: 10%);
            // border-top: 1px solid darken($color: $main-color, $amount: 10%);
            // border-bottom: 1px solid silver;
            white-space: nowrap;

            &>div.th {
                height: 100%;
                display: inline-block;
                background-color: $main-color;
                white-space: nowrap;
                box-sizing: border-box;
                padding: 0 0 0 10px;
                cursor: default;
                border-right: solid 1px darken($color: $main-color, $amount: 7%);
                border-left: solid 1px white;
                width: 100px; // min-width: 80px;

                transition: 0.5s;
                transition-property: background-color;

                @extend %hoveractive;

                &.azSortableItem {
                    user-select: none;
                }

                &::before {
                    content: "";
                    display: inline-block;
                    vertical-align: middle;
                    height: 100%;
                }

                &:first-of-type {
                    border-left: none;
                }

                &:last-of-type {
                    border-right: none;
                }

                &.azSortableDropBefore {
                    border-left: 2px solid $allow;
                }

                &.azSortableDropAfter {
                    border-right: 2px solid $allow;
                }

                &.azSortableSelected {
                    opacity: .5;
                }

                &:not(.disabled).azSortableDeny {
                    background-color: $deny;
                }

                &:not(.disabled).azSortableAllow {
                    background-color: $allow;
                }

                & .azThSort {
                    display: none;
                    width: 9px;
                    height: 9px;
                    margin-left: 10px;
                    fill: $gray-text;
                }
            }
        }

        &>div.tfoot {
            display: flex;
            justify-content: space-between;
            align-items: center;
            height: 30px;
            box-sizing: border-box;
            border-left: 1px solid darken($color: $main-color, $amount: 10%);
            border-right: 1px solid darken($color: $main-color, $amount: 10%);
            border-bottom: 1px solid darken($color: $main-color, $amount: 10%);
            background-color: $main-color;
            border-top: 1px solid silver;
            padding: 0 10px;

            & a.azPageIcon {
                position: relative;
                top: 2px;
                margin-right: 15px;
                cursor: pointer;

                &>svg {
                    width: 12px;
                    height: 12px;
                    fill: $gray-text;

                    &:hover {
                        fill: lighten($color: $main-color, $amount: 20%);
                    }

                    &:active {
                        fill: darken($color: $main-color, $amount: 20%);
                    }
                }
            }

            & input[type=number].pageNumber {
                // position: relative;
                // font-family: 'Roboto', sans-serif;
                // font-size: 13px;
                margin-right: 15px;
                width: 50px; // top: -2px;
                -moz-appearance: textfield;

                &::-webkit-outer-spin-button,
                &::-webkit-inner-spin-button {
                    -webkit-appearance: none;
                    margin: 0;
                }
            }

            & div.azPageInfo {
                color: $gray-text;
            }
        }
    }
}