@import '~react-load-mask/index.css'
@import '~css-utils/index.styl'
@import '~react-virtual-scroller/index.styl'
@import './constants.styl'

.z-unselectable
  touch-callout none
  user-select none

.react-datagrid
  &
  & *
    box-sizing border-box

datagrid-cell()
    display flex
    align-items center
    cursor $datagrid-cell-cursor

    .z-content
        white-space nowrap
        overflow hidden
        text-overflow ellipsis
        padding 0px $datagrid-cell-padding

@import './resize.styl'

.react-datagrid

    .z-row
    .react-datagrid-pagination-toolbar
        user-select none

    .loadmask
        z-index 100
    .z-header-menu-column
        z-index 100

    flex-flow column
    align-items stretch

    & > .z-inner
        flex 1
        overflow hidden
        position relative
        display flex
        flex-flow column

        .z-wrapper
            display flex
            flex-flow column
            flex 1 1 auto
            overflow hidden

    .z-header-wrapper
    .z-footer-wrapper
        width 100%

    .z-table
        display block
        flex 1
        /** 2 RULES FOR SAFARI VERTICAL SCROLLBAR */
        transform translate3d(0px, 0px, 0px)
        position relative
        z-index 10

    .z-header
    .z-summary
    .z-table .z-row
        display flex
        flex-flow row
        z-index 1

    .z-mask-wrapper
        bottom 0px
        width 100%
        position absolute
        display none

    &.z-loading
        .z-mask-wrapper
            display block

.react-datagrid.z-empty
    .z-content-wrapper-fix
        display flex

    .z-table-wrapper
        flex-flow column
        justify-content center
        align-items center

    .z-empty-text
        width 100%
        justify-content center
        align-items center
        display flex
        font-style italic
        color gray

@import './header.styl'
@import './contents.styl'
@import './borders.styl'
@import './summary.styl'