// В этом файле должны быть стили для БЭМ-блока page-header, его элементов,
// модификаторов, псевдоселекторов, псевдоэлементов, @media-условий...
// Очередность: http://nicothin.github.io/idiomatic-pre-CSS/#priority

.page-header {
  $block-name: &;

  &__first {
    @media (min-width: $screen-xl) {
      padding: 15px 0;
      background-color: var(--m-color-1);
      color: #fff;
    }

    @media (max-width: ($screen-xl - 1)) {
      display: none;
    }
  }

  &__f-inner {
    @media (min-width: $screen-xl) {
      display: flex;
      justify-content: space-between;
      align-items: center;
    }
  }

  &__f-left {
    @media (min-width: $screen-xl) {
      display: flex;
      align-items: center;
      gap: 15px 30px;
    }
  }

  &__f-right {
  }

  &__second {
    @media (min-width: $screen-xl) {
      margin-top: 10px;
    }

    @media (max-width: ($screen-xl - 1)) {
      padding-top: 10px;
      padding-bottom: 10px;
    }
  }

  &__s-inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;

    .burger {
      @media (min-width: $screen-xl) {
        display: none;
      }

      @media (max-width: ($screen-xl - 1)) {
        transform: translateY(-3px);
      }
    }
  }

  &__s-first {
    line-height: 0;

    .logo {
      img {
        @media (max-width: ($screen-xl - 1)) {
          width: 92px;
        }
      }
    }
  }

  &__s-second {
    @media (min-width: $screen-xl) {
      display: flex;
      align-items: center;
      gap: 10px;
    }

    @media (max-width: ($screen-xl - 1)) {
      display: none;
    }

    .btn.btn--ico {
      @media (min-width: $screen-xl) {
        padding-top: 13px;
        padding-bottom: 13px;
      }
    }

    .search__form-field .field-text__input {
      @media (min-width: $screen-xl) {
        padding-top: 11px;
        padding-bottom: 11px;
      }
    }
  }

  &__s-third {
    .buttons-list__item:not(.buttons-list__item--basket) {
      @media (max-width: ($screen-xl - 1)) {
        display: none;
      }
    }

    .buttons-list__item--basket .buttons-list__i-link {
      @media (max-width: ($screen-xl - 1)) {
        font-size: 0;
        color: transparent;
      }

      svg {
        @media (max-width: ($screen-xl - 1)) {
          margin-bottom: 0;
        }
      }
    }
  }
}

/* ----- .hidden-menu ----- */

.hidden-menu {
  $block-name: &;

  position: fixed;
  left: 0;
  top: 0;
  z-index: 200;
  width: 100%;
  height: 100vh;
  overflow-y: auto;
  background-color: #fff;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.55s, visibility 0.55s;

  &.active {
    opacity: 1;
    visibility: visible;
  }

  &__inner {
    @media (max-width: ($screen-xl - 1)) {
      display: flex;
      flex-direction: column;
      padding-top: 25px;
      opacity: 0;
      transform: translateY(-15px);
      transition: opacity 0.55s, transform 0.55s;

      @at-root .hidden-menu.active & {
        opacity: 1;
        transform: translateY(0);
        transition: opacity 0.55s 0.55s, transform 0.55s 0.55s;
      }
    }
  }

  &__first {
    @media (max-width: ($screen-xl - 1)) {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 23px;
    }
  }

  &__second {
    margin-bottom: 30px;
  }

  &__third {
    margin-bottom: 30px;
  }

  &__t-first {
  }

  &__four {
    @media (max-width: ($screen-xl - 1)) {
      background-color: var(--m-color-1);
      margin-top: auto;
      padding-top: 25px;
      padding-bottom: 25px;
    }
  }

  &__four-inner {
    .feedback__list {
      @media (max-width: ($screen-xl - 1)) {
        gap: 8px;
      }
    }

    .link {
      @media (max-width: ($screen-xl - 1)) {
        margin-top: 10px;
      }
    }
  }
}

.close-hidden-menu {
  position: relative;
  padding: 0;
  width: 20px;
  height: 20px;
  border: unset;
  background-color: unset;
  color: transparent;
  font-size: 0;
  line-height: 0;
  cursor: pointer;

  &:hover {
    &::before,
    &::after {
      background-color: #494f54;
    }
  }

  &::before,
  &::after {
    content: "";
    position: absolute;
    right: 0;
    top: 50%;
    width: 20px;
    height: 2px;
    background-color: #494f54;
    transition: background-color $transition-time;
  }

  &::before {
    transform: translateY(-50%) rotate(45deg);
  }

  &::after {
    transform: translateY(-50%) rotate(-45deg);
  }
}
