.upload-feedback-global {
    display: grid;
    gap: 8px;
    padding: 14px 16px;
    border: 1px solid rgba(88, 166, 255, 0.42);
    border-radius: 10px;
    color: #edf5ff;
    background: rgba(38, 135, 255, 0.12);
}

.upload-feedback-global[hidden],
.upload-feedback-progress[hidden] {
    display: none;
}

.upload-feedback-global strong {
    font-size: 0.98rem;
}

.upload-feedback-global span {
    color: #aebfda;
    font-weight: 800;
}

.upload-feedback-progress {
    position: relative;
    display: block;
    width: 100%;
    height: 9px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
}

.upload-feedback-progress > span {
    display: block;
    width: 0%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #2687ff, #55d6ff);
    transition: width 160ms ease;
}

[data-upload-dropzone] {
    position: relative;
    cursor: pointer;
    --upload-progress: 0%;
}

[data-upload-dropzone] + input[type="file"] {
    position: absolute;
    width: 1px !important;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.profile-upload-dropzone {
    display: grid;
    place-items: center;
    width: min(100%, 240px);
    aspect-ratio: 1;
    overflow: hidden;
    border: 2px dashed rgba(154, 163, 178, 0.9);
    border-radius: 8px;
    color: #9aa3b2;
    background: rgba(255, 255, 255, 0.03);
    font-size: 2.4rem;
    font-weight: 900;
}

[data-upload-dropzone] img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

[data-upload-dropzone]::after {
    content: "";
    position: absolute;
    inset: 0;
    width: var(--upload-progress);
    background: linear-gradient(90deg, rgba(38, 135, 255, 0.34), rgba(85, 214, 255, 0.22));
    opacity: 0;
    pointer-events: none;
    transition: width 160ms ease, opacity 140ms ease;
}

[data-upload-dropzone].is-uploading::after {
    opacity: 1;
}

[data-upload-dropzone] .upload-feedback-progress {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 34px;
    width: auto;
}

[data-upload-status] {
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 10px;
    overflow: hidden;
    color: #dcecff;
    font-size: 0.72rem;
    font-weight: 900;
    line-height: 1.1;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.55);
}

[data-upload-dropzone].has-upload-value:not(.is-uploading) [data-upload-status] {
    display: none;
}

.upload-clear-button {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    margin: auto;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(12, 14, 22, 0.78);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
    opacity: 0;
    cursor: pointer;
    transition: opacity 150ms ease, transform 150ms ease, background 150ms ease;
}

.upload-clear-button[hidden] {
    display: none;
}

[data-upload-dropzone]:hover .upload-clear-button,
[data-upload-dropzone]:focus-within .upload-clear-button {
    opacity: 1;
}

.upload-clear-button:hover,
.upload-clear-button:focus-visible {
    opacity: 1;
    transform: scale(1.04);
    background: rgba(238, 57, 80, 0.9);
    outline: none;
}

.upload-clear-button svg {
    width: 23px;
    height: 23px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.dashboard-shell.dashboard-light .upload-feedback-global,
body.public-mode.color-mode-light .upload-feedback-global {
    color: #162033;
    background: #edf6ff;
    border-color: #b8d6ff;
}

.dashboard-shell.dashboard-light .upload-feedback-global span,
body.public-mode.color-mode-light .upload-feedback-global span {
    color: #51637c;
}
