@import '../bootstrap'
@import '../bootstrap'
@import '../theme'

/* Theme */
datatable($material)
  thead
    th.vf-column.vf-sortable
      i
        color: rgba($material.fg-color, $material.disabledORhints-text-percent)

      &:hover
        color: rgba($material.fg-color, $material.primary-text-percent)

      &.vf-active
        color: rgba($material.fg-color, $material.primary-text-percent)

        i
          color: rgba($material.fg-color, $material.primary-text-percent)

  .vf-datatable__actions
    color: rgba($material.fg-color, $material.secondary-text-percent)

    &__select
      .vf-input-group--select
        .vf-input-group__selections__comma
          color: rgba($material.fg-color, $material.secondary-text-percent) !important

        .vf-input-group__append-icon
          color: rgba($material.fg-color, $material.secondary-text-percent) !important

theme(datatable, "vf-datatable")

.vf-datatable
  thead
    th.vf-column.vf-sortable
      cursor: pointer

      i
        font-size: 16px
        vertical-align: sub
        display: inline-block
        opacity: 0
        transition: .3s $transition.swing

      &:hover
        i
          opacity: .6

      &.vf-active
        transform: none

        i
          opacity: 1

        &.vf-desc
          i
            transform: rotate(-180deg)

/** Actions */
.vf-datatable__actions
  display: flex
  justify-content: flex-end
  align-items: center
  font-size: 12px

  .vf-btn
    color: inherit

    &:last-of-type
      margin-left: 18px

  &__pagination
    text-align: center
    margin: 0 26px 0 32px

  &__select
    display: flex
    align-items: center
    justify-content: center

    .vf-input-group--select
      margin: 13px 0 13px 34px
      padding: 0
      position: initial

      .vf-input-group__selections__comma
        font-size: 12px

.vf-datatable__progress
  height: auto !important

  tr, td, th
    height: auto !important

  th
    padding: 0 !important

    .vf-progress-linear
      top: -2px
      margin: 0 0 -2px

.vf-datatable__expand
  &-row
    border: none !important

  &-col
    padding: 0 !important
    height: 0px !important

    &--expanded
      border-bottom: 1px solid rgba(0,0,0,0.12)

  &-content
    transition: height $primary-transition

    > .vf-card
      border-radius: 0
      box-shadow: none
