.screen-content {
    margin: 0 auto;
}
.light-panel {
    margin-top: 1rem;
    min-height: 30em;
}
@media(min-width: 800px)
{
    .screen-content {
        margin: 0 2em;
    }
}
@media(min-width: 1200px)
{
    .screen-content {
        margin: 0 2em;
    }
    .light-panel {
        padding: 2em 5em;
    }
}
@media(min-width: 1600px)
{
    .screen-content {
        max-width: 100em;
        margin: 0 auto;
    }
}

#roll-ctn {
    margin: 5em auto;
    text-align: center;
    max-width: 40em;
    border: none;
}
#roll-ctn > p:first-child {
    color: #82a7df;
    font-size: 1.5em;
}
#roll-ctn > p {
    text-align: justify;
}
#roll-ctn > p:first-child {
    color: #82a7df;
    font-size: 1.1em;
}
#roll-ctn > p#please-no {
    font-style: italic;
    text-align: center;
    margin-bottom: 3em;
    color: #888;
}
#roll-number {
    display: block;
    text-align: center;
}
#roll-ctn .label-text {
    display: block;
    padding-bottom: 0.5em;
}
#roll-ctn .label-text {
    display: block;
    padding-bottom: 0.5em;
    font-size: 1.25em;
    color: var(--red-highlight);
    font-weight: bold;
}
#submit-roll-number {
    font-size: 1.25em;
    margin-top: 0.25em;
}

#action-selection-popup .popup-content,
#authentication-popup .popup-content {
    text-align: left;
}
#action-selection-popup label {
    display: flex;
    border: 1px solid #ccc;
    padding: 1em;
    margin: 0 0 2px;
    border-radius: 3px;
    align-items: center;
    justify-content: flex-start;
    cursor: pointer;
}
#action-selection-popup .label-text {
    margin-left: 1em;
    line-height: 1.2em;
}
#action-selection-popup .icon-input-ctn {
    font-size: 0.8em;
    width: 2em;
}


#form-ctn {
    display: none;
}
#form-ctn label {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center;
    margin: 0 0 2px -1em;
}
#form-ctn label > * {
    margin: 0 0 0 1em;
}
#form-ctn .label-text {
    flex-basis: 22em;
    line-height: 1.1em;
    text-align: right;
    font-weight: bold;
    min-width: 14em;
}
#code-of-conduct-accepted .label-text {
    flex-grow: 1;
    max-width: 50%;
}
#support-details .textarea-label .label-text {
    flex-basis: 50%;
}
.form-element input[type="text"] {
    flex-grow: 1;
    max-width: 100%;
    width: auto;
    border-bottom: solid var(--blue-outline);
    border-width: 0 0 2px;
    border-radius: 0;
    min-width: 14em;
}
.form-element textarea {
    width: auto;
    flex-grow: 1;
    min-width: 14em;
}

textarea {
    display: block;
    width: 100%;
    max-width: 100%;
    height: 4em;
    resize: vertical;
    color: inherit;
    font-size: inherit;
    margin-top: 2px;
}
h3 {
    font-size: 2em;
    color: var(--blue-rich);
    margin: 0 0 1rem;
}
h4 {
    font-family: "Signika Negative", sans-serif;
    font-size: 1.25em;
    margin: 0 0 0.5rem;
}
.label-warning {
    display: none;
    color: red;
}
.missing-value .label-warning {
    display: inline-block;
}
.sub-section {
    border: 2px solid var(--blue-outline);
    padding: 0.5em;
    border-radius: 3px;
    margin: 0.5em 0;
    background: var(--blue-bg);
}

[data-mandatory="1"] > .label-text::after {
    content: "*";
}

#school-letterhead {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    margin: 0 0 -1em -1em;
    align-items: stretch;
}
#school-letterhead > * {
    margin: 0 0 1em 1em;
}
#school-crest {
    width: 100%;
    vertical-align: top;
}
#school-crest-ctn {
    max-width: 5em;
}
#school-details {
    flex-grow: 1;
}
#school-name {
    margin: 0;
    color: var(--purple-bg);
    line-height: 1.1em;
    font-size: 3em;
}
#school-address {
    margin: 0;
}
#school-contact {
    margin: 0;
}

#application-header {
    text-align: center;
}
#academic-year-ctn {
    margin: 0;
    font-size: 1.5em;
}
#cob-ctn {
    margin: 0;
}
#form-ctn label#super-group {
    display: block;
}
#super-group .label-text {
    display: block;
    line-height: 1.5em;
    text-align: center;
}
#super-group select {
    width: 13em;
}

#mandatory-notice {
    margin: 2em 0 -1.5em;
    font-style: italic;
}
.section {
    margin-top: 2em;
    border: 2px solid var(--green-teal);
    border-radius: 3px;
    padding: 0.5em;
}

#support-checkboxes-wrap .label-text {
    flex-basis: 20em;
}

#county {
    margin-bottom: 1em;
}
#postcode input {
    flex-basis: 5em;
}
#show-county .label-text {
    flex-basis: 13em;
}
#address-display-ctn {
    margin-top: 1em;
}
#address-display-ctn .label-text {
    flex-basis: 100%;
}
#address-display-ctn .label-value {
    background: var(--blue-bg);
    min-height: 2em;
    flex-basis: 100%;
    padding: 0.5em;
}

#guardian-details > p {
    margin: -1em 0 1em;
    font-style: italic;
    color: #888;
}
#other-guardian-status {
    margin-bottom: 1em;
}
#legal-custody select {
    max-width: 100%;
    width: auto;
}

#support-checkboxes-wrap > p {
    margin: 0 0 0.5em;
    font-size: 1.2em;
}

#consents {
    border: 1px solid #ccc;
    padding: 1em;
}
#consents-preamble {
    margin: -1em 0 1em;
    background: var(--green-teal-text);
    padding: 0.5em;
    color: #fff;
}
#form-ctn label.consent {
    margin: 0 0 1em;
    flex-wrap: nowrap;
    gap: 1em;
    align-items: flex-start;
    cursor: pointer;
}
#form-ctn label.consent > * {
    margin: 0;
}
#form-ctn label.consent .consent-details {
    flex-basis: calc(100% - 3em);
    order: 2;
}
#form-ctn .consent .label-text {
    color: var(--red-highlight);
    font-weight: bold;
    text-align: left;
    display: block;
    font-size: 1.2em;
}
.consent-details .label-value {
    text-align: justify;
    display: block;
}
.consent select {
    width: 10em;
}

#categories-wrap {
    margin-top: 2em;
}
#categories > label {
    border-top: 2px dashed var(--blue-outline);
    padding: 0.5em 0;
    cursor: pointer;
}
#categories .label-text {
    flex-basis: calc(100% - 4em);
    text-align: left;
}
.category-ctn {
    margin: 0 0 1em;
    border-top: 2px dashed var(--blue-outline);
    padding-top: 1em;
}
.category > .label-text {
    font-weight: bold;
}
.category > .icon-input-ctn {
    display: none;
}
.criteria-list {
    flex-basis: 100%;
}
.criteria-list {
    flex-basis: 100%;
    padding: 0.5em 3em 0;
}
.criteria {
    cursor: pointer;
}
.criteria-ctn:hover {
    background: var(--blue-bg);
}
.criteria-ctn input {
    width: 100%;
    max-width: 100%;
    margin-bottom: 0.5em;
}


#submission {
    border: none;
    background: var(--blue-bg);
    margin: 2em 0;
    padding: 1em;
}
#submission > p {
    margin: 0 0 1em;
}
#submission > p:first-child {
    font-weight: bold;
}


#medical-contact-wrap .label-text {
    display: none;
}
#medical-contact-details-instruction .label-value {
    font-weight: bold;
    max-width: 50em;
}
#medical-conditions-raw .label-text,
#medical-conditions-instruction .label-text,
#medical-conditions-normalised > .label-text {
    display: none;
}
#medical-conditions-instruction .label-value {
    font-weight: bold;
    max-width: 50em;
}
#medical-conditions-normalised .ds-multi-select-list .label-text {
    font-weight: normal;
    font-size: inherit;
    text-align: left;
    display: inline-block;
    line-height: inherit;
    width: auto;
    min-width: auto;
}

#medical-conditions-normalised {
    max-width: 16rem;
}

#default-guardian-occupation .label-text {
    display: none;
}
#default-occupation-instruction .label-value {
    font-weight: bold;
    max-width: 50em;
}

#other-guardian-occupation .label-text {
    display: none;
}
#other-occupation-instruction .label-value {
    font-weight: bold;
    max-width: 50em;
}

#home-languages-wrap .label-text {
    display: none;
}
#home-languages-instruction .label-value {
    font-weight: bold;
    max-width: 50em;
}
#home-languages-raw .label-text,
#home-languages-instruction .label-text,
#home-languages-normalised > .label-text {
    display: none;
}
#home-languages-instruction .label-value {
    font-weight: bold;
    max-width: 50em;
}
#home-languages-normalised .ds-multi-select-list .label-text {
    font-weight: normal;
    font-size: inherit;
    text-align: left;
    display: inline-block;
    line-height: inherit;
    width: auto;
    min-width: auto;
}

#home-languages-normalised {
    max-width: 16rem;
}

#educational-details .icon-input-label .label-text {
    flex-grow: 1;
    order: 2;
    text-align: left;
}
#educational-details textarea {
    flex-basis: 100%;
}
#educational-details .textarea-label .label-text {
    flex-grow: 1;
    text-align: left;
    display: block;
    margin-bottom: 3px;
}

#support-hse-assessed .label-text, #service-assessed .label-text, #agency-supported .label-text, #aim-supported .label-text {
    flex-grow: 1;
    text-align: left;
    order: 2;
}
#support-details .textarea-label .label-text {
    flex-basis: 100%;
    text-align: left;
    margin-top: 0.5em;
    padding-bottom: 2px;
}

.input-warning {
    background: var(--green-teal-text);
    margin: 1em 0 0.5em;
    padding: 0.5em;
    color: #fff;
}
.input-warning u {
    font-weight: bold;
    text-decoration: underline;
}
.input-warning > *:first-child {
    margin-top: 0;
}
.input-warning > *:last-child {
    margin-bottom: 0;
}

/* ============================================================================ File Upload Section */

#file-upload-section {
    margin-top: 2em;
    border: 2px solid var(--green-teal);
    border-radius: 3px;
    padding: 1em;
    background: var(--blue-bg);
    display: none;
}
#file-upload-section h3 {
    margin-top: 0;
}
#upload-preamble {
    margin: 0 0 0.5em;
    padding: 0.5em;
    background: var(--green-teal-text);
    line-height: 1.2em;
    color: #fff;
}
#upload-preamble p {
    margin: 0;
}
#upload-preamble:empty {
    display: none;
}

/* Upload Controls */

#upload-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1em;
    margin-bottom: 1.5em;
    background: #fff;
    padding: 0.5em;
    border: 2px dashed var(--blue-outline);
}
#file-input-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75em;
    flex-grow: 1;
}
#file-input {
    display: none;
}
#file-input-wrapper label[for="file-input"] {
    margin: 0;
    white-space: nowrap;
    background: var(--regular);
    color: #fff;
    height: 2em;
    line-height: 2em;
    padding: 0 0.5em;
    border-radius: 3px;
    cursor: pointer;
}
#file-count-display {
    color: #888;
    font-style: italic;
    font-size: 0.95em;
}

/* Progress Indicator */

#upload-progress {
    margin: 1em 0;
    padding: 1em;
    background: #fff;
    border: 1px solid var(--blue-outline);
    border-radius: 3px;
}
.progress-bar {
    width: 100%;
    height: 1.5em;
    background: var(--blue-mid-bg);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}
.progress-fill {
    height: 100%;
    background: var(--positive);
    width: 0%;
    transition: width 0.3s ease;
}
.progress-message {
    margin: 0.5em 0 0;
    text-align: center;
    color: var(--regular);
    font-weight: bold;
}

/* Uploaded Files Section */

#uploaded-files-section {
    margin-top: 1.5em;
    display: none;
}
#uploaded-files-section h4 {
    margin-top: 0;
    color: var(--blue-rich);
}
#uploaded-files-list {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 3px;
    overflow: hidden;
}
#uploaded-files-list thead {
    background: var(--blue-mid-bg);
}
#uploaded-files-list th {
    padding: 0.75em 0.5em;
    text-align: left;
    font-weight: bold;
    color: var(--regular);
    border-bottom: 2px solid var(--blue-outline);
}
#uploaded-files-list td {
    padding: 0.75em 0.5em;
    border-bottom: 1px solid var(--blue-outline);
    vertical-align: middle;
}
#uploaded-files-list tbody tr:last-child td {
    border-bottom: none;
}
#uploaded-files-list tbody tr:hover {
    background: var(--green-bg);
}
#uploaded-files-list .file-name {
    font-weight: 500;
    color: #333;
    word-break: break-word;
}
#uploaded-files-list .file-size {
    color: #666;
    white-space: nowrap;
}
#uploaded-files-list .file-uploaded {
    color: #888;
    font-size: 0.9em;
    white-space: nowrap;
}
#uploaded-files-list .file-action {
    text-align: center;
    width: 5em;
}
#uploaded-files-list .delete-file-btn {
    padding: 0.4em 0.75em;
    font-size: 0.9em;
    min-height: auto;
}
#no-files-message {
    text-align: center;
    color: #888;
    font-style: italic;
    padding: 2em;
    background: #fff;
    border: 1px solid var(--blue-outline);
    border-radius: 3px;
    margin: 0;
}
#uploaded-files-list th.action, td.action {
    text-align: right;
}


@media(max-width: 799px)
{
    #upload-controls {
        flex-direction: column;
        align-items: stretch;
    }
    #file-input-wrapper {
        flex-direction: column;
        align-items: stretch;
    }
    #file-input-wrapper label[for="file-input"] {
        text-align: center;
    }
    #file-count-display {
        text-align: center;
    }
    #uploaded-files-list {
        font-size: 0.9em;
    }
    #uploaded-files-list th,
    #uploaded-files-list td {
        padding: 0.5em 0.25em;
    }
    #uploaded-files-list .file-uploaded {
        display: none;
    }
}