/* --- Heatmap Table (Standardized Grey Headers) --- */
.daisi-table-wrapper {
    width: 100%;           
    margin: 20px 0;        
    border: 1px solid var(--color-border);
    background: white;
    overflow-x: auto;      
}

.daisi-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed; 
}

/* ALL Headers set to Grey Background / Black Text */
.daisi-table th {
    background: #f3f3f3 !important; 
    color: #0b0c0c !important;
    padding: 12px 2px;
    border: 1px solid #dee0e2;
    text-align: center;
    vertical-align: middle;
    font-size: 0.9rem;
    border-bottom: 2px solid #0b0c0c !important;
}

.daisi-table td {
    padding: 12px 2px;
    border: 1px solid #dee0e2;
    text-align: center;
    vertical-align: middle;
    font-size: 0.9rem;     
}

/* Column Widths - Narrower Name Column */
.col-name    { width: 160px; text-align: left !important; padding-left: 15px !important; }
.col-speed   { width: 85px; }
.col-tests   { width: 65px; }
.col-mode    { width: 100px; }
.col-mastery { width: auto; } 
.col-action  { width: 140px; }

/* Sticky Pupil Name - White Cell for Rows */
.sticky-col {
    position: sticky;
    left: 0;
    z-index: 10;
    background: #ffffff !important; 
    color: #0b0c0c !important;      
    border-right: 2px solid var(--color-border) !important;
}

/* Sticky Header for Pupil Name - Match other Grey headers */
th.sticky-col {
    background: #f3f3f3 !important; 
    color: #0b0c0c !important;
}

.cell-green { background-color: #28a745; color: white; }
.cell-amber { background-color: #ffc107; color: #0b0c0c; }
.cell-red   { background-color: #dc3545; color: white; }
.cell-grey  { background-color: #e9ecef; color: #adb5bd; }

.badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}
.badge-stage4 { background-color: #6f42c1; color: white; }
.badge-dfe    { background-color: var(--color-brand); color: white; }

/* --- GDS Radio Buttons & Checkboxes --- */
.gds-form-group {
    margin-bottom: var(--space-5);
}

.gds-fieldset {
    border: none;
    margin: 0;
    padding: 0;
}

.gds-fieldset__legend {
    font-size: var(--font-size-m);
    font-weight: 700;
    margin-bottom: var(--space-3);
    color: var(--color-text);
}

.gds-radios {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.gds-radios__item {
    position: relative;
    padding-left: 50px; /* Space for the big radio circle */
}

/* Hide native input visually but keep it for screen readers/focus */
.gds-radios__input {
    position: absolute;
    z-index: 1;
    top: 0;
    left: 0;
    width: 40px;
    height: 40px;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.gds-radios__label {
    display: block;
    font-weight: 700;
    cursor: pointer;
    padding-top: 5px;
    margin-bottom: 5px;
    font-size: 1.2rem;
}

.gds-radios__hint {
    display: block;
    color: var(--color-text-secondary);
    font-size: 1rem;
    font-weight: 400;
}

/* The visible radio circle */
.gds-radios__label::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 36px;
    height: 36px;
    border: 2px solid var(--color-text);
    border-radius: 50%;
    background: transparent;
    box-sizing: border-box;
}

/* The dot inside when checked */
.gds-radios__label::after {
    content: "";
    position: absolute;
    top: 9px;
    left: 9px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--color-text);
    opacity: 0;
}

/* Checked State */
.gds-radios__input:checked + .gds-radios__label::after {
    opacity: 1;
}

/* Focus State */
.gds-radios__input:focus + .gds-radios__label::before {
    outline: 3px solid var(--color-focus);
    outline-offset: 3px;
    box-shadow: inset 0 0 0 2px var(--color-text);
}

/* Conditional Reveal (Slides down when parent is checked) */
.gds-radios__conditional {
    margin-top: var(--space-3);
    margin-bottom: var(--space-3);
    margin-left: 18px;
    padding-left: 30px;
    border-left: 4px solid var(--color-border);
    display: none;
}
.gds-radios__conditional--active {
    display: block;
}
