﻿
#navArea {
    display: block;
    position: fixed;
    top: 0;
    left: -300px;
    bottom: 0;
    width: 300px;
    margin-top: 70px;
    background: #232F5F;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transition: all .5s;
    z-index: 999;
    opacity: 0;
}

.open #navArea {
    left: 0;
    opacity: 1;
}
#navArea .inner table {
    position: absolute;
    z-index: 999;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
}

@media screen and (max-width: 767px) {
    #navArea {
        left: -300px;
        width: 300px;
    }
}

/*============
  .toggle_btn
  MENUがCLOSEに
============*/
.toggle_btn {
    position: relative;
    z-index: 999; /*ボタンを最前面に*/
    background: #232F5F;
    cursor: pointer;
    width: 50px;
    height: 50px;
    margin-right: 10px;
    /*枠線*/
    border-color: #ffffff;
    border-width: 1px;
/*    border-style: solid;*/
}

/*ボタン内側*/
.toggle_btn span {
    display: inline-block;
    transition: all .4s; /*アニメーションの設定*/
    position: absolute;
    left: 14px;
    height: 2px;
    border-radius: 5px;
    background: #fff;
    width: 45%;
}

.toggle_btn span:nth-of-type(1) {
    top: 13px;
}

.toggle_btn span:nth-of-type(2) {
    top: 19px;
}

.toggle_btn span:nth-of-type(3) {
    top: 25px;
}

.toggle_btn span:nth-of-type(3)::after {
    content: "Menu"; /*3つ目の要素のafterにMenu表示を指定*/
    position: absolute;
    top: 5px;
    left: -3.5px;
    color: #fff;
    font-size: 0.6rem;
    text-transform: uppercase;
}

/*activeクラスが付与されると線が回転して×になり、Menu⇒Closeに変更*/
.toggle_btn.active span:nth-of-type(1) {
    top: 14px;
    left: 18px;
    transform: translateY(6px) rotate(-45deg);
    width: 30%;
}

.toggle_btn.active span:nth-of-type(2) {
    opacity: 0;
}

.toggle_btn.active span:nth-of-type(3) {
    top: 26px;
    left: 18px;
    transform: translateY(-6px) rotate(45deg);
    width: 30%;
}

.toggle_btn.active span:nth-of-type(3)::after {
    content: "Close"; /*3つ目の要素のafterにClose表示を指定*/
    transform: translateY(0) rotate(-45deg);
    top: 5px;
    left: 3px;
}

/*============
#mask
=============*/
#mask {
    display: none;
    transition: all .5s;
}

.open #mask {
    display: block;
    position: fixed;
    left: 300px;
    width: 100%;
    height: 100%;
    background: #000;
    opacity: .8;
    z-index: 2;
    cursor: pointer;
}
