
.main_wrap{
    width: auto;
    /* margin: 3rem auto; */
}

.product_photo_wrap{
    display: flex
}

.product_photo{
    width: 25%;
    border: solid 1px #212529;
    padding: 1rem;
    margin: 0 1rem;
    display: flex;
}

.product_photo img{
    width: 100%;
}

.form_wrap{
    width: 100%;
    height: 100%;
    height: 100%;
    margin: 2rem auto;
    padding: 0 2rem;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

form{
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
}

.submit-button {
    background-color: #2e63f4; /* Bootstrapの.btn-secondaryの背景色 */
    border-color: #2e63f4; /* Bootstrapの.btn-secondaryのボーダー色 */
    color: white; /* 文字色を白に設定 */
}

.cancel-button {
    background-color: rgb(186, 186, 186) !important;
    border-color: black !important;
    color: black !important;
    margin-left: 3vh;
}

.form-check {
    width: auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 100% !important;
}

.input-contents{
    gap: 2%;
    margin-right: 2%;
}

.input-contents label {
    width: 40% !important; 
}

.output-contents label {
    width: 40% !important;
}

.form_contents_last{
    margin-bottom: 2rem;
    flex-direction: row;
}

.form_contents{
    display: flex;
    flex-direction: row;
    /* font-size: clamp(10px, 1vw, 15px); */
    max-width: 100%;
    width: 100%;
    align-items: center;
}

.form_control{
    width: 100% !important;
}
input, output, select, textarea{
    margin: 0;
}

.form_contents label {
    /* padding: 1vh; */
    flex-shrink: 0;
    margin: 0 0rem 0 0 !important;
    width: 7rem;
}

.form_contents input{
    width: 70%;
}

.form_contents.section{
    margin-top: 2rem;
}

.btn_wrap{
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
    margin-top: 0.5rem;
    gap: 0.5rem;
    width: 100%;
}

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

    .form_wrap{
        margin: 2rem auto;
    }

    .form_contents{
        margin: 0rem 0 1rem 0;
        gap: 1rem;
    }

    .btn_wrap{
        width: 100%;
        text-align: right;
        padding-right: 1rem;
    }
}

.form-check-input {
    width: 2.5vh;
    height: 2.5vh;
    min-width: 2.5vh;
    min-height: 2.5vh;
    border: 1.5px solid #ced4da;
    border: 1.5px solid #ced4da;
    background-color: white;
    cursor: pointer;
}

.form-check-input:checked {
    background-color: #198754 !important;
    border-color: #198754 !important;
}

.checkbox-custom {
    display: flex;
    align-items: center;
    height: 100%;
}

.checkbox-custom .form-check-input {
    transform: scale(1.5);
    margin: 0;
    border-color: #6c757d;
}

.checkbox-custom .form-check-input:checked {
    background-color: #198754;
    border-color: #198754;
}

.confirmation-label{
    width: auto !important;
    margin-right: 1rem;
}

.description-label{
    width: 20%;
}

.form_wrap .label-container {
    display: flex;
    width: 11rem;
}

.form_wrap .input-container, .form_wrap .input-container textarea {
    width:100%;
    max-width: 70%;
}

/* Ensure .row-contents children are exactly 1/3 width */
.row-contents {
    display: flex;
    width: 100%;
    flex-wrap: wrap; /* Allow wrapping if needed (though 3 x 33.33% = 100%) */
}

.row-contents > .form_contents {
    flex: 0 0 33.333%; /* Do not grow, do not shrink, fixed at 1/3 */
    max-width: 33.333%; /* Enforce maximum */
    box-sizing: border-box; /* Include padding/border in width */
    /* padding: 0 0.5rem; Optional: add consistent spacing */
    padding-left: 0;
    padding-right: 1rem;
}

/* Constrain internal input to not overflow its container */
.row-contents .form_contents input,
.row-contents .form_contents label {
    box-sizing: border-box;
}

.row-contents .form_contents label {
    width: auto; /* Let label size naturally or use fixed if needed */
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.row-contents .form_contents input {
    width: calc(100% - 3vh); /* Account for label margin or use flex properly */
    min-width: 0; /* Critical: prevents overflow due to intrinsic sizing */
}

.column-contents{
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* .column-contents .form_contents{
    width: 100%;
    max-width: 100%;
} */
