@use "sass:selector"

@mixin top-nav-is-colored
  @at-root
    .topNavBarColor &, .topNavBarColor#{&}
      @content

.topNav
  position: fixed
  z-index: 4
  left: 0
  right: 0
  top: 0
  height: 60px
  line-height: 60px
  background-color: var(--card-bg-color)
  -webkit-box-shadow: 0px 2px 1px 0px var(--primary-shadow-color)
  display: grid
  grid-template-columns: 1fr auto 1fr
  align-items: center

  @include top-nav-is-colored
    background-color: var(--primary-color)

.menuIcon
  @include top-nav-is-colored
    background-color: var(--primary-color-active)

.navIcon
  font-size: 20px
  padding: 10px
  cursor: pointer
  color: var(--primary-text-color)
  border-radius: 50%
  transition: background 0.2s ease-out
  width: 1em
  height: 1em

  @include top-nav-is-colored
    color: var(--text-with-main-color)

    &:hover
      background-color: var(--primary-color-hover)

  &:hover
    background-color: var(--side-nav-hover-color)
    transition: background 0.2s ease-in

  &:active
    background-color: var(--tertiary-text-color)
    transition: background 0.2s ease-in

.side
  display: flex
  align-items: center

  .navSearchIcon
    @media only screen and (min-width: 681px)
      display: none

  .logo
    display: flex
    align-items: center
    padding: 0px 25px 0px 10px

    .logoIcon
      background-image: var(--logo-icon)
      background-repeat: no-repeat
      background-position: right top
      background-size: 25px
      width: 25px
      height: 25px


    .logoIconBarColor
      background-image: var(--logo-icon-bar-color)


    .logoText
      margin-left: 5px
      position: relative
      top: -3px
      background-image: var(--logo-text)
      background-repeat: no-repeat
      background-position: right top
      background-size: 100px
      width: 100px
      height: 40px

      @media only screen and (max-width: 680px)
        display: none

    .logoTextBarColor
      background-image: var(--logo-text-bar-color)

.middle
  .searchContainer
    display: flex
    align-items: center

    @include top-nav-is-colored
      background-color: var(--primary-color-hover)

    @media only screen and (max-width: 680px)
      position: fixed
      left: 0
      right: 0
      top: 60px
      display: none
      background-color: var(--side-nav-color)

    .searchInput
      width: 420px

      @media only screen and (max-width: 680px)
        flex: 1

  .searchFilters
    position: absolute
    margin: 10px 20px 20px 270px
    transition: margin 150ms ease-in-out

    @media only screen and (max-width: 680px)
      left: 0
      right: 0
      margin: 95px 10px 0px

// ?
.expand
  margin-left: 100px

// unsure where to group this selector instead
@media only screen and (max-width: 680px)
  .menuIcon
    display: none