/* ============================================
   SGIA EXAM REGISTRATION
   AS/A LEVEL SUBJECT LAYOUT FIX
   ============================================ */

/* Main subject row */
.subjects .subject.alevel-subject {
    display: grid !important;
    grid-template-columns: 200px minmax(0, 1fr) !important;
    align-items: center !important;
    column-gap: 24px !important;
    row-gap: 12px;
    width: 100%;
    min-width: 0;
    height: auto;
    box-sizing: border-box;
    padding: 16px;
    position: relative;
}

/* Subject information */
.subjects .alevel-subject .subject-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: static;
    width: auto;
    min-width: 0;
    max-width: 100%;
    margin: 0;
    padding: 0;
    overflow-wrap: break-word;
}

/* Subject title */
.subjects .alevel-subject .subject-info b {
    display: block;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.5;
    white-space: normal;
}

/* Subject code */
.subjects .alevel-subject .subject-info small {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    line-height: 1.5;
}

/* Radio selection group */
.subjects .alevel-subject fieldset.level-choices {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    position: static;
    float: none;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    box-sizing: border-box;
}

/* Choose level heading */
.subjects .alevel-subject .level-choices legend {
    display: block;
    width: auto;
    max-width: 100%;
    margin: 0;
    padding: 0 4px 6px 0;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
}

/* Radio option cards */
.subjects .alevel-subject .level-choice {
    display: flex !important;
    flex-direction: row;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 8px;
    position: static;
    float: none;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    min-height: 62px;
    margin: 0;
    padding: 12px;
    box-sizing: border-box;
    cursor: pointer;
}

/* Radio input */
.subjects .alevel-subject
.level-choice input[type="radio"] {
    display: block;
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    min-width: 16px;
    margin: 2px 0 0;
    padding: 0;
    position: static;
    cursor: pointer;
}

/* Radio label text */
.subjects .alevel-subject .level-choice span {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
    width: auto;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

/* Option name */
.subjects .alevel-subject .level-choice b {
    display: block;
    font-size: 13px;
    line-height: 1.4;
    white-space: normal;
}

/* Option fee */
.subjects .alevel-subject .level-choice small {
    display: block;
    font-size: 12px;
    line-height: 1.4;
    white-space: normal;
}

/* ============================================
   TABLET RESPONSIVE
   ============================================ */

@media (max-width: 900px) {

    .subjects .subject.alevel-subject {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 16px !important;
    }

    .subjects .alevel-subject .subject-info {
        width: 100%;
    }

    .subjects .alevel-subject fieldset.level-choices {
        width: 100%;
    }
}

/* ============================================
   MOBILE RESPONSIVE
   ============================================ */

@media (max-width: 600px) {

    .subjects .subject.alevel-subject {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        padding: 14px;
        gap: 12px !important;
    }

    .subjects .alevel-subject fieldset.level-choices {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
    }

    .subjects .alevel-subject .level-choice {
        width: 100%;
        min-height: 54px;
        padding: 12px;
    }

    .subjects .alevel-subject .subject-info b {
        font-size: 15px;
    }
}