.form_wrap{
    width: auto;
    height: 100%;
    margin: 2rem auto;
    padding: 0 2rem;
    box-sizing: border-box;
}
form{
    margin: 0 auto;
}
.form_contents{
    display: flex;
    align-items: center;
    width: 100%;
}
.form_contents label {
    display: inline-block;
    width: 110px;
    margin-left: 10px;
}
.control-width0{
    flex-basis: 80px;
}
.control-width1{
    flex-basis: 150px;
}
.control-width2{
    flex-basis: 200px;
}
.control-width3{
    flex-basis: 250px;
}
.control-width4{
    flex-basis: 400px;
}
.control-width6{
    flex-basis: 550px;
}
.control-width-price{
    flex-basis: 100px;
    text-align: right;
}
input[name="family_name"] {
    margin-left: 20px;
}
input[name="is_same"] {
    margin-left: 20px;
}
input[type=radio] {
    margin-left: 5px;
    margin-right: 5px;
}
input[name="death_place"] {
    margin-left: 20px;
}
.form_total_amount {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    padding-top: 20px;
}
.form_total_amount label {
    width: auto;
}
.form_total_amount button {
    margin-left: 20px;
    color: #fff;
    min-width: 120px;
}
button[name="history_button_notexist"] {
    color: #bccddb !important;
}

.btn_wrap{
    margin-top: 2rem;
    text-align: right;
}

.contain-border{
    padding: 0.3em;
    margin-bottom: 20px;
    width: 95%;
}
.contain-border-tab{
    padding: 0.3em;
    margin-bottom: 5px;
    width: 100%;
}

/* タブ */
.tab-btn {
    display: flex;
    flex-wrap: wrap;
    margin-top: 10px;
}
.btn {
    flex-basis: 15%;
    text-align: center;
}
.btn a {
    display: block;
    position: relative;
    font-size: 16px;
    padding: 8px;
    border: solid 1px gray;
    text-decoration: none;
    line-height: 1.2;
    color: #ffffff;
    background-color: gray;
    box-shadow: 0 0 5px gray;
    cursor: pointer;
}
.btn a.is-active {
    border: solid 1px #434da2;
    background-color: #434da2;
}

.tab-contents-item {
    display: none;
    width: 90%;
    height: auto;
}
.tab-contents-item.is-active {
    display: flex;
    justify-content: flex-start; 
    background-color: #ececec;
}
.tab-contents-item.is-active>p {
    animation:  fadeinAnime 2s forwards;
}
@keyframes fadeinAnime{
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}
.label-title{
    font-size: 16pt;
    font-weight: bold;
    color: #434da2;
}
.label-hidden{
    visibility: hidden;
}
.row_margin{
    margin-bottom: 50px;
}
.row-tab > .row.mb-2 {
    margin-top: 32px; /* 例: 32pxに調整（お好みで変更可） */
}

@media screen and (min-width: 768px){
    .form{
        display: flex;
        flex-wrap: wrap;
    }

    .form_wrap{
        margin: 2rem auto;
    }

    .form_contents{
        margin: 0.2rem;
    }

    .btn_wrap{
        width: 80%;
        text-align: right;
    }
}

.table_wrap {
    margin-top: 5px; /* 余白を狭くする（例: 5px） */
}
/* １行おきに異なる背景色を入れたデザイン */
.table8 {
    width: 100%;
    text-align: center;
    border-collapse: collapse;
    border-spacing: 0;
    background: #f8f4e6;
}
.table8 tr:nth-child(2n+1) {
    background: #fffff9;
}
.table8 th {
    border: solid 1px #ffffff;
    background: #434da2;
    color: #ffffff;
    font-size: 14px;
    height: 30px;
}
.table8 td {
    padding: 5px;
    border: solid 1px #ffffff;
    text-align: left;
    font-size: 14px;
    height: 30px;
}
.td-right {
    text-align: right;
}
.table8 tr:first-child {
    background: #bccddb ;
    font-weight: bold;
}

