/* Reference-file drag-and-drop control. */

.file-upload-field .label-row {
    margin-bottom: 0;
}

.file-upload-field .label-row label {
    font-size: 1.125rem;
    font-weight: 500;
    line-height: 1.5;
}

.file-upload-field .field-optional {
    font-size: 0.75rem;
    line-height: 1.125rem;
}

.file-upload__hint {
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    line-height: 1.5;
}

.file-upload {
    position: relative;
    display: flex;
    min-height: 6.55rem;
    padding: 2rem;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    border: 0.1rem dashed #c9d0d9;
    transition: border-color 140ms ease, background-color 140ms ease;
}

.file-upload input[type="file"] {
    position: absolute;
    z-index: 2;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 0;
    padding: 0;
    opacity: 0;
    border: 0;
    cursor: pointer;
}

.file-upload__selection {
    display: flex;
    min-width: 0;
    gap: 0.25rem;
    align-items: center;
    font-size: 1.125rem;
    font-weight: 500;
    line-height: 1.5;
}

.file-upload__selection-text {
    min-width: 0;
    overflow-wrap: anywhere;
}

.file-upload__icon {
    width: 1.125rem;
    height: 1.125rem;
    flex: 0 0 auto;
}

.file-upload__button {
    display: inline-flex;
    min-width: 10.565rem;
    padding: 0.5rem 1rem;
    color: var(--color-ink);
    background: #f0f4f7;
    border: 1px solid transparent;
    border-radius: 3px;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.25;
    text-align: center;
    gap: 0.5rem;
    align-items: center;
    justify-content: center;
}

.file-upload__button img {
    width: 1rem;
    height: 1rem;
    flex: 0 0 auto;
}

.file-upload:hover {
    border-color: var(--color-border-strong);
}

.file-upload:focus-within {
    border-color: var(--focus-border);
    outline: none;
    box-shadow: 0 0 0.5rem var(--focus-shadow);
}

.file-upload:has(input[aria-invalid="true"]) {
    background: var(--color-error-soft);
    border-color: var(--color-error);
}

