@use "@/mixins"
@use "@/colors"

component
  display: grid
  grid-template-rows: 2rem 1fr
  grid-template-columns: auto 0.75rem
  width: min-content
  height: 100%
  overflow: hidden

  @include mixins.dragging

  &:not(.enabled)
    filter: brightness(0.5) grayscale(1.0)

  &.minimized
    > header
      grid-row: 1 / -1
      padding-top: 0.75em
      width: 2em
      align-items: start
      grid-template-rows: 1.5rem 1fr
      grid-template-columns: auto

      > h1
        justify-self: center
        writing-mode: vertical-rl
        text-orientation: mixed
        min-width: 1.5em
        @include mixins.height-available

      > div.icon > svg
        top: 1px
        position: relative

  > header
    display: grid
    grid-template-columns: auto 1fr
    line-height: 2rem
    align-items: center
    column-gap: 0.5rem
    padding: 0 0.25rem
    font-size: 0.625em
    overflow: hidden
    color: var(--color-blue)

    > div.icon
      display: flex

      > svg
        font-size: 1.5em

    > h1
      white-space: nowrap
      font-weight: normal
      overflow: hidden
      text-overflow: ellipsis
      font-size: inherit
      letter-spacing: 0.04em
      min-height: 2em

  // for the implementations
  h5
    width: fit-content
    height: 1.5em
    line-height: 1.5em
    font-size: 0.5em
    font-weight: normal
    text-transform: capitalize
    letter-spacing: 0.08em
    white-space: nowrap
    color: var(--color-cream)