@charset "utf-8";

// メニュークローズ時
[data-drawer="closed"] {

    .p-drawer {
        visibility: hidden;
        opacity: 0;
        pointer-events: none;
    }
}
// メニューオープン時
[data-drawer="opened"] {

    body {
        // ( iOSでスクロールできてしまうことはひとまず無視 )
        @include sp {
            // height: 100%;
            overflow-y: hidden;
            touch-action: none;
        }
    }

}

//メニュー
.p-drawer {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    padding-top: var(--ark-header_height);
    transition: opacity .5s, visibility .5s;
    pointer-events: none; // .p-drawerUnderlayer をクリックできるように。

    [data-loaded="false"] & {
        display: none;
    }

    a {
        color: inherit;
    }

    .admin-bar & {
        top: 32px;
    }
}

.p-drawer__inner {
    position: relative;
    // top: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;

}


.p-drawer__body {
    position: relative;
    max-width: 560px;
    // height: 100%;
    margin: 0 auto;
    padding: 4vw 6vw;
    pointer-events: auto;

    @include pc {
        padding: 2em;
    }

}

.c-drawerNav {
    display: block;
    text-align: left;
    border-top: 1px solid rgba(255, 255, 255, .1);

    .menu-item {
        position: relative;
    }

    & > .menu-item:first-child > a {
        border-top: none;
    }

    a {
        position: relative;
        display: block;
        padding: 1em .5em;
        text-decoration: none;
        border-bottom: 1px solid rgba(255, 255, 255, .1);
        outline-offset: -3px;
        transition: background-color .25s;

        @include pc {

            &:hover {
                background-color: rgba(255, 255, 255, .1);
            }
        }
    }

    .__subText {
        margin-left: 1em;
        font-size: .75em;
        opacity: .6;
    }
}

// menuアイコンだけを見せたい
[data-drawer-move="fade"] {


    .p-drawer {
        z-index: 1;
        color: #fff;
        background: rgba(#000, .92);
    }

    &[data-drawer="opened"] {

        .l-header__menuBtn {
            color: #fff;
        }
    }
}
