@charset "UTF-8";
/*
 * CSS for Side Menu
 *
 * PC: 768px~
 * - Show side menu bar. (Icon list)
 * - Side menu's first item is burger-icon.
 * SP: ~767.98px
 * - Hide side menu bar.
 * - Hide burger-icon of side menu bar.
 * - Show burger-icon on footer.
 */

/* ------------------------
 * Page Structure
 * (既存の画面構造を壊さないよう、bodyに`use-side-bar`が設定されたときにだけ効くようにしています。)
 * (To avoid disrupting the existing screen structure, this setting only works when `use-side-bar` is set to body.)
------------------------- */
body.use-side-bar {
    .page-contents-wrap {
        display: flex;
        min-height: 100vh; /* ビューポートの高さを100%に設定 */
    }
    .page-contents {
        flex: 1;    /* 残りのスペースを占有 */
        margin-left: 0;
    }
    footer {
        /* ページ下端に固定 */
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        z-index: 99; /* 他の要素の上に表示するためのz-indexを設定 */

        transition: bottom 0.3s ease;

        background-color: #f5faff;
        border-top: 1px solid #e9ecef;
    }
}
@media (min-width: 768px) {
    body.use-side-bar {
        .page-contents {
            margin-left: 48px;
        }
        footer {
            display: none;
        }
    }
}
@media (max-width: 767.98px) {
    body.use-side-bar {
        footer {
            bottom: 0;
            box-shadow: 1px 0 4px rgba(0, 0, 0, 0.1);
        }
        .page-contents {
            margin-bottom: 49px;
        }
    }
}

/* ------------------------
    Side menu structure
------------------------- */
.side-bar-area {
    position: fixed;
    top: 0;
    width: 0;
    height: 100%;
    z-index: 50;
    box-shadow: 1px 0 4px rgba(0, 0, 0, 0.1);

    .menu-item {

        .menu-item-contents {
            display: flex;
            align-items: center; /* 上下中央 */
            justify-content: flex-start; /* 左寄せ */
            position: relative;

            .menu-icon {
                z-index: 60;
                width: 48px;
            }
            .menu-label {
                z-index: 55;
                margin-left: 48px;
                width: 250px;
                position: absolute;
            }
        }
    }
    .menu-separator {
        width: auto;
        border: none;
        background-color: #eff0f1;
        margin: 0;
        height: 24px;
    }
}
@media (max-width: 767.98px) {
    .side-bar-area .side-bar-switch-icon {
        display: none;
    }
}

/* ------------------------
    Side menu transform (Open / Close)
------------------------- */

/* Side menu area (PC) */
@media (min-width: 768px) {
    .side-bar-area {
        width: 298px;
        transition: width 0.3s ease;
    }
    .side-bar-area:not(.open) {
        width: 48px;
    }

    .side-bar-area .menu-label {
        transition: transform 0.3s ease;
    }
    .side-bar-area:not(.open) .menu-label {
        position: absolute;
        transform: translateX(-100%);
    }
}
/* Side menu area (SP) */
@media (max-width: 767.98px) {
    .side-bar-area {
        width: 298px;
        transition: transform 0.3s ease;
    }
    .side-bar-area:not(.open) {
        position: absolute;
        transform: translateX(-100%);
        box-shadow: none;
    }
}

/* ------------------------
    Side menu Items
------------------------- */

.side-bar-area .menu-icon,
.side-bar-switch-icon {
    width: 48px !important;
    height: 48px;
    display: flex;
    align-items: center; /* 水平方向に中央揃え */
    justify-content: center; /* 垂直方向に中央揃え */

    cursor: pointer;

    IMG {
        width: 24px;
        height: 24px;
    }
}
.side-bar-switch-icon:hover {
    background-color: #e9ecef;
}

.side-bar-area .menu-label {
    word-wrap: break-word; /* テキストの折り返しを許可 */
    overflow-wrap: break-word; /* テキストの折り返しを許可 */
    line-height: 1.1;

    padding-right: 8px;
    overflow: hidden;
}

/* ------------------------
    Side menu colors
------------------------- */
.side-bar-area {
    background-color: #f5faff;
    border-right: 1px solid #e9ecef;

    .menu-icon {
        background-color: #f5faff;
    }
    .menu-item:hover {
        background-color: #e9ecef;

        .menu-icon {
            background-color: #e9ecef;
        }
    }
}
.side-bar-area.open {
    .menu-item {
        border-bottom: 1px solid #e9ecef;
    }
}
