/* =====================================================
   Build Submission Forms
===================================================== */

.page-build .build-submission-section {
    width: 100%;
    padding: 40px 24px 60px;
    box-sizing: border-box;
}

.page-build .build-submission-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.page-build .build-form {
    display: flex;
    flex-direction: column;
    gap: 28px;
    max-width: 980px;
    margin: 0 auto;
}

.page-build .build-form-section {
    margin: 0;
    padding: 34px 36px 38px;
    border: none;
    border-radius: 14px;
    background: #fdfdfd;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    box-sizing: border-box;
}

.page-build .build-form-heading {
    margin: 0 0 26px;
    font-size: 32px;
    line-height: 1.2;
    font-weight: 750;
    color: #1a3f74;
}

.page-build #comments {
    min-height: 170px;
}


/* =====================================================
   Toggle Groups
===================================================== */

.page-build .toggle-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.page-build .toggle-group input[type="radio"],
.page-build .toggle-group input[type="checkbox"] {
    display: none;
}

.page-build .toggle-group label {
    margin: 0;
    padding: 10px 16px;
    border: 1px solid #cfcfcf;
    border-radius: 999px;
    background: #fff;
    color: #1f2937;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.page-build .toggle-group input[type="radio"]:checked + label,
.page-build .toggle-group input[type="checkbox"]:checked + label {
    border-color: #1a3f74;
    background-color: #1a3f74;
    color: #ffffff;
}


/* =====================================================
   General Questions Layout
===================================================== */

.page-build .general-questions .question-row .form-group {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.page-build .general-questions .question-row .form-group > label {
    flex: 1;
    margin: 0;
}

.page-build .general-questions .question-row .toggle-group {
    flex-shrink: 0;
    flex-wrap: nowrap;
    margin-top: 0;
}

/* Spacing between question rows */
.page-build .general-questions .question-row + .question-row {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}


/* =====================================================
   Media Queries
===================================================== */

@media (max-width: 899px) {

    /* ---- Section Padding ---- */
    .page-build .build-submission-section {
        padding: 28px 16px 40px;
    }

    .page-build .build-form-section {
        padding: 24px 20px 26px;
        border-radius: 12px;
    }

    /* ---- Heading ---- */
    .page-build .build-form-heading {
        font-size: 26px;
        margin-bottom: 20px;
    }

    /* ---- General Question Rows ---- */
    .page-build .general-questions .question-row .form-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    /* ---- Question Row Spacing ---- */
    .page-build .general-questions .question-row + .question-row {
        margin-top: 24px;
        padding-top: 20px;
    }

    .page-build .general-questions .question-row .toggle-group {
        width: 100%;
        flex-wrap: wrap;
    }

    /* ---- Toggle Buttons ---- */
    .page-build .toggle-group label {
        flex: 1 1 auto;
        text-align: center;
        padding: 10px 12px;
    }
}


/* =====================================================
   Hover / Focus
===================================================== */

@media (hover: hover) and (pointer: fine) {
    .page-build .toggle-group label:hover {
        border-color: #1a3f74;
        color: #1a3f74;
    }

    .page-build .toggle-group input[type="radio"]:checked + label:hover,
    .page-build .toggle-group input[type="checkbox"]:checked + label:hover {
        color: #ffffff;
    }

    .page-build .build-form .btn-primary:hover {
        background-color: #218838;
    }

    .page-build .btn-secondary:hover {
        background-color: #5a616d;
    }
}
