/*

【 メニュー(ctrl+d) 】
・bootstrap
・共通
・横並び設定
・フォームコンテンツ
・トップページ
・ヘッダー
・フッター
・メイン

【 z-indexのスタッキングコンテキスト 】
.header-wrapper：3
.main-wrapper  ：1
.footer-wrapper：2

*/

/* ----------------------- */
/*  jquery multiple select */
/* ----------------------- */

.ms-parent{
    margin-left: 1em;
}
.ms-parent .placeholder{
    color: gray;
    background-color: transparent;
}
.ms-parent .ms-choice{
    top: 2px;
    height: 30px;
    font-size: var(--font-size-form-item);
    border: 1px solid rgb(128 128 128 /0.3);
}
.ms-parent .ms-choice > span{
    top: 2px;
}

/* ----------- */
/*  bootstrap  */
/* ----------- */

/* モーダル */
.bs-modal .modal-dialog{
    max-width: fit-content;
    margin: 15px auto 0 auto;
}
.bs-modal .modal-content{
    background-color: #f0f3f5;
}
.bs-modal .modal-header{
    padding: .5rem 1rem;
}
.bs-modal .modal-footer{
    padding: .5rem .75rem;
    flex-wrap: nowrap;
    white-space: nowrap;
}
.bs-modal .btn-secondary,
.bs-modal .btn-primary,
.bs-modal .btn-danger,
.bs-modal .btn-success{
    padding: 2px 12px;
}
.bs-modal .modal-body{
    max-height: 83dvh;
    overflow-x: scroll;
    overflow-y: scroll;
}

/* ツールチップ */
.bs-tooltip-text{
    border: none;
    background-color: transparent;
    padding: 0;
    margin: 0;
    max-width: 15rem;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}
.tooltip-inner{
    text-align: left;
    background-color: gray;
    color: white;
    opacity: 1;
    width: fit-content;
    max-width: 400px;
    opacity: 1;
}
.tooltip.show{
    opacity: 1;
}
.bs-tooltip-auto[data-popper-placement^=top] .tooltip-arrow::before,
.bs-tooltip-top .tooltip-arrow::before {
    border-top-color: gray;
}
.bs-tooltip-auto[data-popper-placement^=right] .tooltip-arrow::before,
.bs-tooltip-end .tooltip-arrow::before {
    border-right-color: gray;
}
.bs-tooltip-auto[data-popper-placement^=bottom] .tooltip-arrow::before,
.bs-tooltip-bottom .tooltip-arrow::before {
    border-bottom-color: gray;
}
.bs-tooltip-auto[data-popper-placement^=left] .tooltip-arrow::before,
.bs-tooltip-start .tooltip-arrow::before {
    border-left-color: gray;
}

/* fontawesome の調整 */
button > .fa-solid{
    margin-right: .5ch;
}

/* ーーーーーーーー */
/* 　　　共通　　　 */
/* ーーーーーーーー */

body{
    font-family: '游明朝','Yu Mincho',YuMincho,'Hiragino Mincho Pro',serif !important;
    background-color: var(--base-bg-color);
    overscroll-behavior: none;
}
p{
    font-size: var(--font-size-normal);
    margin-bottom: 0;
}
/* スピナー */
input[type="number"]{
    -moz-appearance: textfield; /* Firefox */
    -webkit-appearance: none;  /* Chrome, Safari, Edge */
    appearance: none;          /* 他のブラウザ */
}
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button{
    -webkit-appearance: none;
    margin: 0;
}

/* ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー */

/* loadまで操作不可にするウィンドウブロック */
#screen-lock{
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 0;
    left: 0;
    background-color: rgba(128, 128, 128, 0.3);
    width: 100dvw;
    height: 100dvh;
    text-align: center;
}
#screen-lock > svg{
    width: 10%;
    animation: 3s linear infinite screen-lock;
}
@keyframes screen-lock{
    0%{ transform:rotate(0);}
    100%{ transform:rotate(360deg); }
}

/* ヘッダー,フッター領域で利用されるボタン */
.app-btn{
    height: 30px;
    min-width: 100px;
    font-weight: bold;
    flex-shrink: 0;
    color: var(--main-color);
    font-size: var(--font-size-small);
    background-color: var(--base-bg-color);
    box-shadow: 3px 3px 0 0 var(--main-shadow-color);
    border: none;
    border-radius: 5px;
    text-align: center;
}
.app-btn:not(:nth-last-of-type(1)){
    margin-right: 7px;
}
.app-btn:active{
    box-shadow: none;
}
.app-btn.active{
    background-color: var(--main-color);
    border: 1px solid white;
    color: white;
    box-shadow: none;
    pointer-events: none;
}
/* ノーマルボタン */
.main-btn{
    border: none;
    color: white;
    background-color: #8080FF;
    font-size: var(--font-size-form-item);
    padding: 2px 5px;
    border-radius: 5px;
    box-shadow: 2px 2px 5px 0px rgb(0 0 0 /0.3);
    white-space: nowrap;
}
.main-btn:active{
    box-shadow: none;
}
.main-btn:hover{
    color: white;
}
.main-btn:disabled{
    background-color: silver;
    box-shadow: none;
}
.main-btn.change-red{
    background-color: #FA514B;
}
.main-btn.change-green{
    background-color: green;
}
.main-btn > i{
    margin-right: .5ch;
}
/* リストボタン */
[class^="list-btn"]{
    background-color: white;
    border-radius: 5px;
    box-shadow: 1px 1px 2px gray;
}
[class^="list-btn"] > i{
    margin: 0;
    padding: 0;
}
[class^="list-btn"]:active{
    box-shadow: none;
}
.list-btn-edit{
    color: green;
    border: 1px solid green;
}
.list-btn-delete{
    color: crimson;
    border: 1px solid crimson;
}
/* テキスト型ボタン */
.no-style-btn{
    border: none;
    background-color: transparent;
    padding: 0;
    margin: 0;
}
/* 必須バッジ */
.required-badge{
    color: white;
    background-color: crimson;
    font-size: var(--font-size-min);
    margin-left: 1ch;
    padding: 0 3px;
    border-radius: 5px;
}
/* 基本テーブルレイアウト */
.simple-table{
    margin-top: 10px;
}
.simple-table thead tr th{
    border-bottom: 1px solid gray;
    padding: 0 10px;
}
.simple-table tbody tr td{
    border-bottom: 1px dashed gray;
    padding: 10px;
}
.simple-table .noedit-content{
    margin: 0;
    padding: 0;
}
/* テーブルの折り返し禁止 */
.nowrap-table th,
.nowrap-table td{
    white-space: nowrap;
}

/* ーーーーーーーーー */
/* 　　横並び設定　　 */
/* ーーーーーーーーー */

[ data-row ]{
    display: flex;
    flex-direction: row;
}
[ data-row *= "y-start" ]{
    align-items: start;
}
[ data-row *= "y-center" ]{
    align-items: center;
}
[ data-row *= "y-end" ]{
    align-items: end;
}
[ data-row *= "x-start" ]{
    justify-content: start;
}
[ data-row *= "x-center" ]{
    justify-content: center;
}
[ data-row *= "x-end" ]{
    justify-content: end;
}
[ data-row *= "x-between" ]{
    justify-content: space-between;
}
[ data-row *= "xy-start" ]{
    align-items: start;
    justify-content: start;
}
[ data-row *= "xy-center" ]{
    align-items: center;
    justify-content: center;
}
[ data-row *= "xy-end" ]{
    align-items: end;
    justify-content: end;
}

/* ーーーーーーーーー */
/* フォームコンテンツ */
/* ーーーーーーーーー */

[class^="form-item"]{
    background-color: white;
    font-size: var(--font-size-form-item);
    border: 1px solid rgb(128 128 128 /0.3);
    border-radius: 5px;
    padding: 1px 5px;
    min-width: 150px;
    height: 30px;
}
/* テキストボックス */
textarea.form-item-textarea{
    width: 20rem;
    height: 8em;
}
/* 住所関連 */
input.form-item-postal-code{
    min-width: inherit;
    width: calc(8ch + 10px);
}
.address-block{
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    margin-left: 1rem;
}
.address-block > div{
    margin-right: 5px;
}
.address-block > div > p{
    color: gray;
    font-size: var(--font-size-small);
}
.address-block > div > input{
    min-width: 150px;
    margin-bottom: 5px;
}
/* チェックボックス */
label.form-item-checkbox{
    gap: 0 .5em;
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 0 10px;
    margin-right: 15px;
    position: relative;
    width: fit-content;
    height: 30px;
    min-width: fit-content;
    border-radius: 10px;
    white-space: nowrap;
    border: 1px solid #2589d0;
    background-color: #2589d026;
}
label.form-item-checkbox:has(:checked){
    color: #fff;
    background-color: #2589d0;
}
label.form-item-checkbox::before{
    content: "";
    width: 14px;
    height: 14px;
    border-radius: 1px;
    background-color: #fff;
}
label.form-item-checkbox:has(:checked)::after{
    content: "";
    position: absolute;
    top: 10px;
    left: 15px;
    width: 4px;
    height: 8px;
    transform: rotate(45deg);
    border: solid #2589d0;
    border-width: 0 2px 2px 0;
}
label.form-item-checkbox input[type="checkbox"]{
    display: none;
}
/* 数値 */
input.form-item-num{
    width: 100px;
    min-width: unset;
    text-align: right;
}
/* 金額 */
input.form-item-amount{
    width: 100px;
    min-width: unset;
    text-align: right;
}
/* 電話番号 */
.form-tel-block{
    display: flex;
    flex-direction: row;
    align-items: center;
    margin-left: 1rem;
}
.form-tel-block > input{
    min-width: 3rem;
    text-align: center;
}
.form-tel-block > span{
    padding: 0 1px;
}
/* form-item-dateのリセットボタン */
.clear-date{
    display: none;
    border: none;
    margin-left: 0;
    padding-left: 0;
    color: #0d6efd;
    font-size: calc( var(--font-size-min) + 2px );
    text-decoration: underline #0d6efd;
    background-color: transparent;
}
/* .form-item-textのwidth取得用 */
#dummy-text{
    width: fit-content;
    padding: 0;
    margin: 0;
    opacity: 0;
    pointer-events: none;
}
/* データの編集フォーム用レイアウト */
.edit-form-wrapper{
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
}
.form-block-wrapper{
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: start;
    width: fit-content;
    position: relative;
    margin-top: 20px;
    margin-right: 20px;
    padding: 25px 10px 10px 10px;
    border-top: 2px solid var(--main-color);
}
.form-block-title{
    position: absolute;
    left: 50px;
    top: -15px;
    color: white;
    min-width: 150px;
    padding: 1px 20px;
    border-radius: 5px;
    text-align: center;
    white-space: nowrap;
    background-color: var(--main-color);
}
.form-block-title::before,
.form-block-title::after{
    content: "";
    position: absolute;
    top: 0;
    width: 5px;
    height: 100%;
    background-color: var(--base-bg-color);
}
.form-block-title::before{
    left: -5px;
}
.form-block-title::after{
    right: -5px;
}
.form-block{
    position: relative;
    margin-bottom: 20px;
}
.form-block:not(:last-child){
    padding-right: 15px;
    margin-right: 15px;
}
.form-block:not(.no-after):not(:last-child)::after{
    content: "";
    position: absolute;
    right: -5px;
    top: 1rem;
    width: 1px;
    height: 40px;
    background-color: var(--main-color);
}
.form-block > [class^="form-item"],
.form-block > .noedit-content{
    margin-left: 1rem;
}
.form-block > .noedit-content{
    margin-top: 10px;
}
.form-block-name{
    display: flex;
    flex-direction: row;
    align-items: center;
    margin-bottom: 5px;
}
.form-block-name > i{
    color: gray;
    margin-left: .5ch;
}
@media screen and (max-width: 560px){
    .form-block-wrapper{
        width: fit-content;
        min-width: 100%;
        flex-direction: column;
    }
    .form-block{
        width: 100%;
        border-bottom: 1px dashed gray;
        padding-bottom: 10px;
        margin-bottom: 10px;
    }
    .form-block::after{
        display: none;
    }
}

/* ーーーーーーーーーー */
/* 　　トップページ　　 */
/* ーーーーーーーーーー */

.top-menu-list{
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
}
.top-menu-block{
    color: white;
    margin: 6px;
    padding: 10px 0 0 10px;
    width: 130px;
    height: 130px;
    position: relative;
    border-radius: 10px;
    text-decoration: none;
    background-color: var(--main-color);
    box-shadow: 6px 6px 10px 0px rgb(0 0 0 /0.3);
}
.top-menu-block:hover{
    opacity: 0.9;
}
.top-menu-block:active{
    box-shadow: none;
}
.top-menu-block.disabled{
    box-shadow: none;
    pointer-events: none;
    background-color: silver;
}
.top-menu-icon{
    display: flex;
    align-items: center;
    position: absolute;
    bottom: 10px;
    right: 10px;
    font-size: 50px;
}
@media screen and (max-width: 480px){
    .top-menu-block{
        width: 100%;
        height: 70px;
    }
}

/* ーーーーーーーー */
/* 　　ヘッダー　　 */
/* ーーーーーーーー */

:root{
    --header-height: 100px;
}
.header-wrapper{
    z-index: 3;
    width: 100%;
    height: var(--header-height);
    position: fixed;
    top: 0;
    background-color: var(--base-bg-color);
}
.header-spacer{
    height: var(--header-height);
}
/* 上部 */
.header-top-block{
    height: 50%;
    border-bottom: 1px solid gray;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}
.header-top-left-block{
    height: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
}
.header-top-right-block{
    height: 100%;
    display: flex;
    align-items: center;
}
.header-offcanvas-btn{
    height: 100%;
    aspect-ratio: 1 / 1;
    border: none;
    color: dimgray;
    background-color: white;
    border-right: 1px solid gray;
}
.header-offcanvas-btn .fa-bars{
    font-size: 30px !important;
    color: var(--main-color);
    font-size: large;
    margin-right: 0;
}
.header-title{
    margin-left: 1rem;
    white-space: nowrap;
    font-size: var(--font-size-large);
}
.header-logo{
    height: 80%;
    width: 100px;
    margin-right: 1rem;
    background-color: gray;
    /* テスト用 */
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
}
/* 下部 */
.header-btm-block{
    height: 50%;
    display: flex;
    flex-direction: row;
    align-items: center;
    padding-left: 20px;
    border-bottom: 1px solid gray;
    background-color: var(--main-color);
    overflow: scroll;
}
/* オフキャンバス */
#header-offcanvas{
    width: 300px;
}
#header-offcanvas .logout-link{
    text-decoration: none;
}
#header-offcanvas .top-menu-table{
    width: 100%;
}
#header-offcanvas .top-menu-table tr td{
    padding: 5px 0;
    border-top: 1px dashed gray;
    border-bottom: 1px dashed gray;
}
#header-offcanvas .top-menu-table tr td:first-child{
    width: 3rem;
    color: gray;
    text-align: center;
}
#header-offcanvas .top-menu-table tr td:last-child a{
    text-decoration: none;
}

/* ーーーーーーー */
/* 　　メイン　　 */
/* ーーーーーーー */

.main-wrapper{
    z-index: 1;
    margin: 40px 20px 0 20px;
    min-height: 80dvh;
}

/* ーーーーーーーー */
/* 　　フッター　　 */
/* ーーーーーーーー */

:root{
    --footer-height: 50px;
}
.footer-wrapper{
    z-index: 2;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: var(--footer-height);
    position: fixed;
    bottom: 0;
    background-color: var(--main-color);
    border-top: 1px solid gray;
}
.footer-spacer{
    margin-top: 20px;
    height: var(--footer-height);
}

/* ーーーーーーーーーーー */
/* 　データ一覧テーブル　 */
/* ーーーーーーーーーーー */

.main-table-wrapper{
    overflow: scroll;
    border-radius: 10px;
    border: 1px solid gray;
    max-width: fit-content;
    max-height: calc( 90dvh - 140px );
}
.main-table{
    width: fit-content;
    table-layout: auto;
}
.main-table > tbody > tr > td{
    width: 1px;
}
.main-table > thead > tr > th:first-child,
.main-table > tbody > tr > td:first-child{
    padding-left: 15px;
}
.main-table > thead > tr > th{
    padding: 2px 12px;
    color: white;
    white-space: nowrap;
    background-color: var(--main-color);
}
.main-table > thead{
    position: sticky;
    top: 0;
}
.main-table > tbody > tr > td{
    padding: 5px 12px;
    white-space: nowrap;
}
.main-table > tbody > tr:nth-child(2n) > td{
    background-color: whitesmoke;
}
.main-table > tbody > tr:nth-child(2n+1) > td{
    background-color: var(--main-list-color);
}
.main-table > tbody > tr > td:first-child a{
    text-decoration: none;
}

/* ーーーーーーーーーーー */
/* 　データ検索モーダル　 */
/* ーーーーーーーーーーー */

.search-block{
    padding-bottom: 10px;
    margin-bottom: 10px;
    border-bottom: 1px dashed gray;
}
.search-block > p{
    margin-bottom: 5px;
    display: flex;
    flex-direction: row;
    align-items: center;
}
.search-block > div{
    display: flex;
    flex-direction: row;
    margin-left: 1em;
}
.search-block .main-btn{
    padding: 0 5px;
    font-size: var(--font-size-small);
}
.search-type,
.search-value{
    height: 30px;
    font-size: var(--font-size-form-item);
    border: 1px solid silver;
}
.search-type{
    border-right: none;
    border-radius: 5px 0 0 5px;
}
.search-value{
    width: 170px;
    border-radius: 5px;
}
.search-value[type="datetime-local"]{
    width: 150px;
}
.search-value:not(select):not([type="datetime-local"]){
    border-radius: 0 5px 5px 0;
}
/* ページ送りボタン */
.page-btn-block{
    margin-top: 15px;
}
.page-btn-block > a{
    text-decoration: none;
    color: #0d6efd;
    border-radius: 5px;
    border: 1px solid transparent;
    padding: 1px 6px;
}
.page-btn-block > a:hover{
    border-color: #0d6efd;
}
.page-btn-block .now-page{
    pointer-events: none;
    color: white;
    border-radius: 5px;
    background-color: var(--main-color);
}