/* Shared upload control for the private PRE Core interface. */
input.upload-native[type="file"] {
    position: absolute !important;
    inset: auto !important;
    width: 1px !important;
    min-width: 0 !important;
    height: 1px !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    opacity: 0 !important;
    overflow: hidden !important;
    clip-path: inset(50%) !important;
    pointer-events: none !important;
}

.upload-dropzone {
    box-sizing: border-box;
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 8px;
    width: 100%;
    min-width: 0;
    min-height: 174px;
    padding: 22px 18px;
    border: 2px dashed #a7b8bf;
    border-radius: 14px;
    background: #fbfdfd;
    color: #647983;
    cursor: pointer;
    text-align: center;
    white-space: normal;
    font-size: 13px;
    line-height: 1.45;
    font-weight: 450;
    text-transform: none;
    letter-spacing: normal;
    transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease;
}

.upload-dropzone[hidden] { display: none !important; }
.upload-dropzone:hover,
.upload-dropzone:focus-visible {
    border-color: #398b96;
    background: #f2faf9;
}
.upload-dropzone:focus-visible {
    outline: 3px solid #91cbd0;
    outline-offset: 3px;
}
.upload-dropzone.is-dragging {
    border-color: #18975c;
    background: #e6f6ec;
    box-shadow: inset 0 0 0 1px #18975c;
}
.upload-dropzone.is-invalid {
    border-color: #b85659;
    background: #fff8f8;
}
.upload-dropzone[aria-disabled="true"] {
    opacity: .55;
    cursor: not-allowed;
}

.upload-dropzone__icon {
    display: block;
    width: 39px;
    height: 39px;
    margin-bottom: 1px;
    color: #78959b;
    pointer-events: none;
}
.upload-dropzone.is-dragging .upload-dropzone__icon { color: #218755; }
.upload-dropzone__prompt {
    color: #3c5966;
    font-size: 15px;
    font-weight: 650;
}
.upload-dropzone__or { color: #73858c; font-size: 12px; }
.upload-dropzone__browse {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 6px 15px;
    border: 1px solid #358b9d;
    border-radius: 7px;
    background: #fff;
    color: #23788b;
    font-size: 13px;
    font-weight: 750;
    line-height: 1.25;
    pointer-events: none;
}
.upload-dropzone:hover .upload-dropzone__browse,
.upload-dropzone:focus-visible .upload-dropzone__browse {
    background: #e8f6f7;
}
.upload-dropzone__status,
.upload-dropzone__hint,
.upload-dropzone__error {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-wrap: anywhere;
    font-size: 12px;
    font-weight: 600;
}
.upload-dropzone__status { color: #2f7457; }
.upload-dropzone__hint { color: #637780; font-weight: 450; }
.upload-dropzone__error { color: #a33e47; }
.upload-dropzone__status[hidden],
.upload-dropzone__error[hidden] { display: none !important; }

/* Existing illustrated labels keep their text and input listeners, but use one visual control. */
.ticket-upload-zone.upload-field,
.project-progress-upload.upload-field {
    display: block;
    min-height: 0;
    padding: 0;
    border: 0;
    background: transparent;
}
.ticket-upload-zone.upload-field > .icon,
.ticket-upload-zone.upload-field > span:not(.upload-dropzone),
.project-progress-upload.upload-field > .icon,
.project-progress-upload.upload-field > span:not(.upload-dropzone),
.upload-field > .file-input-shell { display: none !important; }
.account-photo-control.upload-field {
    display: block;
    min-height: 0;
    padding: 0;
    border: 0;
    background: transparent;
}
.account-photo-control.upload-field > strong,
.account-photo-control.upload-field > small { display: block; margin-bottom: 5px; }
.account-photo-control.upload-field > .upload-dropzone { margin-top: 8px; }

/* Budget import belongs below its action bar and follows the original permission state. */
.budget-import-button.upload-field {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    min-height: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    overflow: hidden !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
}
.budget-import-button.upload-field[hidden] { display: none !important; }
.budget-editor-actions.has-upload-dropzone { flex-wrap: wrap; }
.budget-editor-actions > .upload-dropzone--budget {
    flex: 0 0 100%;
    order: 3;
    margin-top: 3px;
}

@media (max-width: 600px) {
    .upload-dropzone { min-height: 154px; padding: 18px 12px; }
    .upload-dropzone__prompt { font-size: 14px; }
}
