// SPDX-FileCopyrightText: 2022-2024 Gregor Kleen <gregor.kleen@ifi.lmu.de>,David Mosbach <david.mosbach@uniworx.de>
//
// SPDX-License-Identifier: AGPL-3.0-or-later
// SPDX-License-Identifier: LicenseRef-Fraport-Corporate-Design

@use "../../icons.scss"

.table-hider
  background-color: #fff
  color: var(--color-link)
  padding: 10px
  cursor: pointer
  box-shadow: 0 0 2px 0 rgba(0, 0, 0, 0.6)
  position: absolute
  overflow: hidden
  transition: transform .2s ease
  transform: scaleY(0)
  transform-origin: top
  z-index: 1

  .fas
    filter: var(--filter-primary)

  &:hover
    background-color: var(--color-grey-light)

  .table-hider__label
    display: none

  &.table-hider--visible
    transform: scaleY(0.4)
    transition: none

    // TODO find better way to prevent transition on icons

    .fas
      transform: scaleY(2.5)

    &:hover
      transform: scaleY(1)

      .fas
        transform: scaleY(1)

[table-utils]
  max-width: 85vw
  margin-bottom: 10px
  min-height: 0
  line-height: 1.4

  .table-pill
    background-color: var(--color-dark)
    float: left
    color: #fff
    padding: 10px
    border-radius: 20px / 50%
    margin-right: 20px
    margin-bottom: 10px
    cursor: pointer

    .table-hider__label
      font-size: 16px
      font-weight: bold
      margin-left: 5px

  &:after
    content: ""
    display: block
    clear: both

  &:empty
    margin: 0

  .fas
    @extend .white-ico


.hide-columns--hidden-cell
  display: none
