/* Scholar upload */
.upload-page__title { text-align: center; font-size: clamp(1.5rem, 4vw, 1.75rem); }
.upload-card { width: 100%; margin: 0 0 1.25rem; }
.upload-form { width: 100%; max-width: 34rem; margin: 0 auto; }
.upload-term { color: var(--ul-muted); font-size: 0.9rem; }

.upload-guide {
    margin: 0.75rem 0 1.25rem;
    padding: 0.85rem 1rem;
    border: 1px solid var(--ul-border);
    border-radius: var(--radius-control);
    background: var(--ul-bg);
}
.upload-guide__title {
    margin: 0 0 0.4rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--ul-text);
}
.upload-guide ul {
    margin: 0;
    padding-left: 1.15rem;
    color: var(--ul-muted);
    font-size: 0.9rem;
}
.upload-guide li + li { margin-top: 0.25rem; }

.dropzone {
    position: relative; text-align: center; padding: 1.5rem 1rem;
    border: 2px dashed var(--ul-border-input); border-radius: var(--radius-card); background: var(--ul-bg);
    transition: border-color 0.15s ease, background-color 0.15s ease;
}
.dropzone__prompt small { display: block; margin-top: 0.25rem; color: var(--ul-muted); }
.dropzone__prompt > .icon-label { justify-content: center; }
/* The real file input covers the zone, so click, tap, keyboard and native drop all work even without the script. */
.dropzone__input { position: absolute; top: 0; left: 0; width: 100%; height: 100%; padding: 0; border: 0; opacity: 0; cursor: pointer; }
.dropzone:hover { border-style: solid; border-color: var(--ul-maroon); background: var(--ul-surface); }
.dropzone:focus-within { border-color: var(--ul-maroon); outline: 2px solid var(--ul-maroon); outline-offset: 2px; }
.dropzone.is-dragover { border-style: solid; border-color: var(--ul-maroon); background: var(--ul-surface); }
@media (hover: none) { .dropzone__drag-hint { display: none; } }

.file-chip { display: flex; align-items: center; gap: 0.75rem; margin-top: 0.75rem; padding: 0.5rem 0.75rem; border: 1px solid var(--ul-border); border-radius: var(--radius-control); background: var(--ul-surface); }
.file-chip[hidden], #file-error[hidden] { display: none; }
.file-chip__type { flex: none; padding: 0.125rem 0.375rem; border: 1px solid var(--ul-border-input); border-radius: 4px; font-size: 0.75rem; font-weight: 500; }
.file-chip__name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.file-chip__size { flex: none; color: var(--ul-muted); font-size: 0.85rem; }
.file-chip__remove { flex: none; width: 2.5rem; height: 2.5rem; border: 1px solid transparent; border-radius: 4px; background: none; color: var(--ul-text); font-size: 1.5rem; line-height: 1; cursor: pointer; }
.file-chip__remove:hover { background: var(--ul-bg); border-color: var(--ul-border-input); }
#file-error { margin-top: 0.75rem; }

.upload-actions { display: flex; flex-direction: column; gap: 0.75rem; margin-top: 1.5rem; }
.upload-actions button, .upload-actions .btn { margin-top: 0; width: 100%; }
/* Button roles: primary = solid maroon (the default), secondary = outlined neutral, danger = outlined red */
.btn.btn--secondary, button[type="submit"].btn--secondary {
    background: var(--ul-surface); color: var(--ul-text); border: 1px solid var(--ul-border-input);
}
.btn.btn--secondary:hover, button[type="submit"].btn--secondary:hover { background: var(--ul-bg); }
.btn.btn--danger, button[type="submit"].btn--danger {
    background: var(--ul-surface); color: var(--color-fail); border: 1px solid var(--color-fail);
}
.btn.btn--danger:hover, button[type="submit"].btn--danger:hover { background: #FBEAE4; }
@media (min-width: 600px) {
    .upload-actions { flex-direction: row-reverse; justify-content: flex-start; }
    .upload-actions button, .upload-actions .btn { width: auto; min-width: 7rem; }
}

@media (max-width: 480px) {
    .upload-card { padding: 1rem; }
    .dropzone { padding: 1.25rem 0.75rem; }
}
