/* Custom styles to make radio buttons larger and easier to click on mobile/desktop */
input[type="radio"] {
    width: 24px;
    height: 24px;
    cursor: pointer;
    vertical-align: middle;
    margin-top: -2px !important;
    margin-right: 0px !important;
    position: static !important;
    /* Overrides Bootstrap's absolute positioning */
    flex-shrink: 0;
    /* Prevents button from shrinking if label is very long */
}

/* Adjust the label alignment so the text aligns vertically with the larger radio button */
.radio label,
.form-check-label {
    display: inline-flex !important;
    align-items: center;
    cursor: pointer;
    font-size: 1.1em;
    gap: 12px;
    line-height: 1.4;
    padding-top: 5px;
    padding-bottom: 5px;
    padding-left: 0 !important;
    /* Overrides Bootstrap's default left padding */
}

/* Force proper text wrapping on the comparison table to prevent overflow */
.comparison-table td,
.comparison-table th {
    white-space: normal !important;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* Specific styling for the table matrix radio buttons to keep them centered */
table .form-check-input[type="radio"] {
    margin-right: 0 !important;
}

/* Force specific comparison table to fit on small mobile screens without scrolling horizontally */
@media (max-width: 768px) {

    /* Only scale down the main comparison table */
    .comparison-table {
        font-size: 13px !important;
        table-layout: fixed;
        width: 100%;
    }

    /* Minimize padding in the comparison table to maximize space */
    .comparison-table>tbody>tr>td,
    .comparison-table>tbody>tr>th,
    .comparison-table>thead>tr>td,
    .comparison-table>thead>tr>th {
        padding: 5px 3px !important;
        vertical-align: top;
    }

    /* Remove horizontal scrolling ONLY for the specific comparison tables so they show side-by-side */
    .side-by-side-wrapper {
        overflow-x: hidden !important;
        border: none !important;
    }

    /* Make h4 tags inside tables slightly smaller */
    table h4 {
        font-size: 14px !important;
        margin: 0 !important;
    }

    /* Add padding to the standalone question text so it aligns with tables and doesn't touch the edge */
    .question-padding {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    /* Make labels inside tables fit */
    table .radio label,
    table .form-check-label {
        font-size: 1.0em !important;
    }
}