body 

.cmb-row{
    max-width:710px;
    line-height: 1.1 !important;
} 

label {
    margin-bottom: 0px !important;
}

#fmt_rf_booking_ref::placeholder {
    font-size: min(0.85rem, 1.7vw); /* Adjusts based on screen size */
    color: #999; /* Optional: Keeps it readable */
    opacity: 1; /* Ensures visibility */
    white-space: nowrap; /* Prevents text wrapping */
    overflow: hidden; /* Hides overflow text */
    text-overflow: ellipsis; /* Adds "..." if text is too long */
}

#cmb2-metabox-front-end-post-form > div.cmb-row > .cmb-th{
    padding-top: 10px;
    padding-bottom: 10px;
    font-weight:500;

    /* width: 100%; */
    max-width: 230px;
    text-align: end;

    background-color: rgb(240, 242, 247);
}

.cmb-td {
    padding-top: 10px;
    padding-bottom: 10px;
    /* width:100%; */

}

.cmb-wrap-input{
    width:100%;
}

.cmb-type-radio{
    /* width:180px; */
}

#cmb2-metabox-front-end-post-form > div.cmb-row.cmb-type-radio > div.cmb-td > ul{
    display: inline-flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    padding-left: 0;
    gap:0px;
}

#cmb2-metabox-front-end-post-form > div.cmb-row.cmb-type-radio > div.cmb-td > ul > li{
    list-style-type: none;
    padding-left: 10px;
    display: flex;
    flex-direction: row;
    align-content: center;
    justify-content: space-around;
    align-items: baseline;
    flex-wrap: nowrap;
    margin-left: 30px;
}

#cmb2-metabox-front-end-post-form > div.cmb-row.cmb-type-title > div
.cmb2-metabox-title{
    margin:0;
    padding-top:0px;
    padding-right: 35px;
    /* background-color: rgba(240, 255, 255, 0.71); */
    font-size: 18px;
    font-weight: 200;
    display:flex;
    flex-direction: row-reverse;
    border-bottom: 10px solid rgb(240, 242, 247);

}

p.cmb2-metabox-description{
    background-color: rgb(240, 242, 247);
    padding: 10px;
    padding-bottom: 20px;
    font-weight: 200;
    border-bottom-right-radius: 10px;
}

#cmb2-metabox-front-end-post-form > div.cmb-row.cmb-type-title{
    
}

.cmb-td:nth-child(2){
    max-width:480px;
    width:100%;
}

.cmb2-wrap input, #fmt_rf_email,#fmt_rf_medical_conditions,#fmt_rf_medication_carried, .cmb2-wrap textarea{
    max-width:100%;
    width:100%;
}

#cmb2-metabox-front-end-post-form > div.cmb-row.cmb-type-checkbox.cmb2-id-fmt-rf-i-agree-with-the-above-terms--and-the-information-i-have-provided-on-this-form-is-true-to-the-best-of-my-knowledge- > div.cmb-th{
    min-width: 70%;
}

#front-end-post-form{
    max-width:710px;
}

#cmb2-metabox-front-end-post-form > div.cmb-row.cmb-type-checkbox.cmb2-id-fmt-rf-i-agree-with-the-above-terms--and-the-information-i-have-provided-on-this-form-is-true-to-the-best-of-my-knowledge- > div.cmb-td{
    min-width: 20%;
    width:20%;
    border-color: #0056b3;
    border: 5px;
}
.cmb2-checkbox-group input[type="checkbox"],
.cmb-type-checkbox input[type="checkbox"] {
    width: 20px; /* Increase checkbox width */
    height: 20px; /* Increase checkbox height */
    accent-color: #007bff; /* Set a consistent color */
    cursor: pointer;
}

#front-end-post-form > input.button-primary{
    display: block;
    min-width: 150px;
    padding: 10px;
    position:absolute;
    margin-top: -55px !important;
    margin-left: 560px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 15px;
}

#front-end-post-form > input.button-primary:hover {
        background-color: #0056b3;
}

@media screen and (max-width: 768px) {
    /* Keep form rows as flex container */
    #cmb2-metabox-front-end-post-form > div.cmb-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: nowrap; /* Prevent inputs from breaking onto a new row */
        gap: 10px;
        width: 100%;
    }

    /* Ensure metabox titles are full-width and right-aligned */
    #cmb2-metabox-front-end-post-form > div.cmb-row.cmb-type-title {
        display: block; /* Full-width block */
        text-align: right; /* Right-align title text */
        width: 100%;
        padding: 10px 0;
        font-weight: bold;
        font-size: 1rem;
    }

    /* Adjust label (left column) */
    #cmb2-metabox-front-end-post-form > div.cmb-row > .cmb-th {
        font-weight: 400;
        font-size: 0.8rem;
        min-width: 30%;
        text-align: right;
        background-color: rgb(240, 242, 247);
    }

    /* Adjust input (right column) */
    .cmb-td {
        flex-grow: 1;
        min-width: 65%;
        padding: 0px;   
        line-height: 1.1;
    }

    /* Ensure input fields are full width */
    .cmb2-wrap input, 
    #fmt_rf_email, 
    #fmt_rf_medical_conditions, 
    #fmt_rf_medication_carried, 
    .cmb2-wrap textarea {
        width: 100% !important;
        padding: 1px;
        margin-top: 0;
        border: 1px solid #ccc;
        border-radius: 4px;
    }

    /* Ensure radio button container stacks options vertically */
    #cmb2-metabox-front-end-post-form > div.cmb-row.cmb-type-radio > div.cmb-td > ul {
        display: flex;
        flex-direction: column; /* Stack radio options vertically */
        align-items: flex-start; /* Align options to the left */
        padding-left: 10px; /* Add spacing from left */
        gap: 5px; /* Space between options */
    }

    #cmb2-metabox-front-end-post-form > div.cmb-row.cmb-type-radio > div.cmb-td > ul > li{
        margin-left: 0px;
    }

    /* Properly space out each radio option */
    #cmb2-metabox-front-end-post-form > div.cmb-row.cmb-type-radio > div.cmb-td > ul > li {
        list-style-type: none;
        padding-left: 0px;
        display: flex;
        flex-direction: row;
        align-items: center; /* Ensures correct alignment */
        gap: 0px;
        line-height: 1.4;
    }

    /* Adjust radio button size and position */
    .cmb2-radio-list input[type="radio"],
    .cmb-type-radio input[type="radio"] {
        width: 20px !important; /* Larger for better tap area */
        height: 20px !important;
        margin-right: 10px; /* Ensures spacing from label */
        cursor: pointer;
    }

    /* Ensure labels are spaced well */
    .cmb2-radio-list label {
        font-size: 1rem;
        line-height: 1.2;
    }


    /* Style button for mobile */
    #front-end-post-form > input.button-primary{
            display: block;
            width: 100%;
            padding: 10px;
            background-color: #007bff;
            color: white;
            border: none;
            border-radius: 5px;
            cursor: pointer;
            margin-top: 15px !important;
			margin-left: 0px !important;
            position: static !important;
    }

    #cmb2-metabox-front-end-post-form > div.cmb-row.cmb-type-checkbox.cmb2-id-fmt-rf-i-agree-with-the-above-terms--and-the-information-i-have-provided-on-this-form-is-true-to-the-best-of-my-knowledge- > div.cmb-th{
        min-width: 70%;
    }
    #cmb2-metabox-front-end-post-form > div.cmb-row.cmb-type-checkbox.cmb2-id-fmt-rf-i-agree-with-the-above-terms--and-the-information-i-have-provided-on-this-form-is-true-to-the-best-of-my-knowledge- > div.cmb-td{
        min-width: 30%;
        border-color: #0056b3;
        border: 5px;
    }
    .cmb2-checkbox-group input[type="checkbox"],
    .cmb-type-checkbox input[type="checkbox"] {
        width: 20px; /* Increase checkbox width */
        height: 20px; /* Increase checkbox height */
        accent-color: #007bff; /* Set a consistent color */
        cursor: pointer;
    }

    #front-end-post-form > input.button-primary:hover {
            background-color: #0056b3;
    }
}

/* see also: adding jQuery to unselect dropdowns on page load: e.g. $("#myDropdown").prop("selectedIndex", -1); */
