@import '../../../styles/variables';

@keyframes appear {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.wrap {
  height: $header_height;
  z-index: 25;
  position: sticky;
  top: 0;
  width: 100%;
  display: flex;
  align-items: stretch;
  justify-content: center;
  box-sizing: border-box;
  transition: background-color 0.75s;
  animation: appear 500ms forwards;

  @include desktop {
    height: 64px;
    padding: 0;
  }

  &.is_scrolled {
    @include blur;
  }
}

.container {
  @include container;

  display: flex;
  align-items: center;
  justify-content: flex-end;
  font-weight: 500;
  box-sizing: border-box;

  @include tablet {
    padding: 0 $gap;
  }
}

.spacer {
  flex: 1;
}

.plugs {
  display: flex;
  user-select: none;
  text-transform: uppercase;
  align-items: center;
  opacity: 0;
  transition: all 250ms;

  &.active {
    opacity: 1;
  }

  @include tablet {
    flex: 1;
    justify-content: flex-start;
  }
}

.profile {
  padding: 5px 10px;
  box-shadow: white 0 0 0 1px;
  border-radius: 10px;
}

.user_button {
  flex: 0;
  cursor: pointer;
}

.item {
  font: $font_16_medium;
  display: flex;
  align-items: center;
  position: relative;
  padding: $gap $gap * 2;
  cursor: pointer;
  transition: color 0.25s;
  text-decoration: none;
  color: white;
  white-space: nowrap;

  &:hover {
    color: $color_link;
  }

  &::before {
    content: ' ';
    position: absolute;
    bottom: 0;
    height: 3px;
    width: 50%;
    right: 50%;
    background: white;
    transform: translate(50%, 0) scaleX(0);
    opacity: 0;
    border-radius: 3px;
    transition: transform 0.5s, opacity 0.25s;
  }

  &::after {
    content: ' ';
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 4px;
    background: $color_link;
    right: 12px;
    top: 6px;
    transition: opacity 0.5s;
    opacity: 0;

    @include tablet {
      top: -4px;
      right: 14px;
    }
  }

  &.has_dot {
    &::after {
      opacity: 1;
    }
  }

  &.lab::after {
    background: $color_lab;
  }

  &.boris::after {
    background: $color_primary;
  }

  @include tablet {
    padding: 0 $gap * 2 0 0;

    &.notifications {
      flex: 1;
      justify-content: flex-end;
      align-items: center;
      margin-right: $gap;
    }
  }
}

.filler {
  @include tablet {
    display: none;
  }
}

.logo_wrapper {
  @include tablet {
    display: none;
  }
}
