// --------------------------------------------------
// 共通ファイル読み込み
// --------------------------------------------------
@use "common" as *;

// --------------------------------------------------
// ハンバーガーメニュー固有スタイル
// --------------------------------------------------
.hamburger {
  display: none;

  // SP版
  @include mq() {

    display: block;
    top: 0;
    right: 0;
    position: relative;
    background-color: inherit;
    width: 70px;
    height: 50px;    
    border: 0;

    &__line {
      position: absolute;
      width: 32px;
      height: 1px;
      background-color: #2F2F2F;
      right: 15px;
    }

    &__line::before {
      content: "";
      position: absolute;
      height: 1px;
      background-color: #2F2F2F;
      right: 0px;
      top: -10px;
      width: 32px;

    }

    &__line::after {
      content: "";
      position: absolute;
      height: 1px;
      background-color: #2F2F2F;
      right: 0px;
      top: 10px;

      width: 32px;

    }

    &.open {

      // ×印
      .hamburger__line {
        display: flex;
        flex-direction: column;
        justify-content: center;
        position: relative;
        margin-left: auto;
        background-color: inherit;
        width: 50px;
        height: 50px;
        border: 0px;
        left: 0;



        &::before,
        &::after {
          content: "";
          position: absolute;
          top: 50%;
          left: 50%;
          width: 1px;
          height: 30px;
          background: #2F2F2F;
        }

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

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

    }
  }
}