.upload-quota {
    min-width: 250px;
    padding: 7px;
    overflow: hidden;
    background: #c7d8f2;
    border-top: 1px solid #ffffff;
    border-left: 1px solid #ffffff;
    border-right: 1px solid #404040;
    border-bottom: 1px solid #404040;
    box-shadow: inset -1px -1px 0 #808080, inset 1px 1px 0 #e9f2ff;
    font-size: 12px;
    line-height: 13px;
}

.upload-quota strong {
    display: block;
    margin-bottom: 4px;
    font-size: 13px;
}

.upload-quota.is-quota-warning {
    background: repeating-linear-gradient(45deg, #ffdede 0 5px, #fff2a8 5px 10px);
    border-color: #800000;
    animation: quota-warning-breathe 900ms steps(4, end) infinite;
}

.upload-quota-track,
.upload-overall-track,
.upload-progress {
    display: block;
    min-width: 0;
    overflow: hidden;
    background-color: #ffffff;
    background-image: repeating-linear-gradient(to right, rgba(0,0,0,.05) 0 1px, transparent 1px 18px);
    border-top: 2px solid #808080;
    border-left: 2px solid #808080;
    border-right: 2px solid #ffffff;
    border-bottom: 2px solid #ffffff;
}

.upload-quota-track {
    width: 100%;
    height: 16px;
    margin-top: 6px;
}

.upload-quota-bar,
.upload-overall-bar,
.upload-progress-bar {
    display: block;
    width: 0%;
    max-width: 100%;
    height: 100%;
    background-color: #000078;
    background-image: repeating-linear-gradient(to right, rgba(255,255,255,.12) 0 1px, transparent 1px 18px);
    transform-origin: left center;
    position: relative;
}

.upload-quota-bar.is-over-quota {
    background-image: repeating-linear-gradient(45deg, #800000 0 7px, #ffcc00 7px 14px);
}

.upload-dropzone {
    flex: 0 0 auto;
    min-height: 154px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 18px;
    text-align: center;
    color: #000000;
    background: repeating-linear-gradient(45deg, #dfdfdf 0 4px, #e9e9e9 4px 8px), #dfdfdf;
    border: 1px solid #808080;
    box-shadow: inset 1px 1px 0 #ffffff, inset -1px -1px 0 #808080, inset 2px 2px 0 rgba(0,0,0,.18), 0 1px 0 rgba(255,255,255,.7);
}

.upload-dropzone.is-dragging,
.upload-dropzone:hover {
    background: repeating-linear-gradient(45deg, #c7d8f2 0 4px, #d8e5f8 4px 8px), #c7d8f2;
    outline: 2px dashed #000078;
    outline-offset: -6px;
}

.upload-dropzone.is-current-step {
    animation: dropzone-attention 1500ms steps(5, end) infinite;
}

.upload-dropzone.is-locked {
    opacity: .72;
    cursor: not-allowed;
    filter: grayscale(.3);
}

.upload-icon-img {
    width: 34px;
    height: 34px;
    object-fit: contain;
    image-rendering: pixelated;
}

.upload-primary {
    font-size: 18px;
    line-height: 18px;
    font-weight: bold;
}

.upload-secondary {
    color: #333333;
    font-size: 13px;
    line-height: 15px;
}

.upload-linklike {
    color: #000078;
    text-decoration: underline;
    font-weight: bold;
}

.upload-input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.upload-details {
    display: flex;
    align-items: center;
    min-height: 28px;
    margin-top: 12px;
    padding: 5px 8px;
    background: #ffffff;
    border-top: 1px solid #808080;
    border-left: 1px solid #808080;
    border-right: 1px solid #dfdfdf;
    border-bottom: 1px solid #dfdfdf;
    box-shadow: inset 1px 1px 0 rgba(0,0,0,.16), inset -1px -1px 0 rgba(255,255,255,.75);
    font-size: 13px;
    line-height: 13px;
}

.upload-detail-label {
    flex: 0 0 auto;
    margin-right: 6px;
    font-weight: bold;
}

.upload-file-count {
    margin-left: auto;
}

.upload-file-list {
    flex: 1 1 auto;
    min-height: 0;
    margin-top: 8px;
    overflow-y: auto;
    background: #ffffff;
    border-top: 2px solid #606060;
    border-left: 2px solid #606060;
    border-right: 2px solid #ffffff;
    border-bottom: 2px solid #ffffff;
}

.upload-empty-state {
    margin: 0;
    padding: 10px 8px;
    color: #555555;
    font-size: 13px;
    line-height: 15px;
}

.upload-file-row {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr) 82px 30px;
    grid-template-rows: 20px 8px;
    align-items: center;
    height: 38px;
    padding: 4px 8px;
    border-bottom: 1px solid #dfdfdf;
    font-size: 13px;
    line-height: 13px;
    column-gap: 6px;
}

.upload-file-row:nth-child(odd) { background: rgba(255,255,255,.92); }
.upload-file-row:nth-child(even) { background: rgba(240,244,255,.88); }
.upload-file-row:hover { background: #d8e5f8; }
.upload-file-row.is-working { animation: upload-row-loading 900ms steps(2, end) infinite; }
.upload-file-row.is-failed { background: #ffe2e2 !important; }
.upload-file-row.is-too-large { position: relative; background: #fff0b8 !important; animation: row-warning-breathe 900ms steps(4, end) infinite; }

.upload-file-row.is-too-large::after {
    content: "";
    position: absolute;
    inset: 1px;
    pointer-events: none;
    border: 2px solid transparent;
    border-image: repeating-linear-gradient(90deg, #800000 0 8px, #ffcc00 8px 16px) 1;
}

.upload-file-icon {
    grid-row: 1 / 3;
    width: 18px;
    height: 18px;
    display: grid;
    place-items: center;
    object-fit: contain;
    image-rendering: pixelated;
}

.upload-file-row.has-thumbnail .upload-file-icon {
    width: 20px;
    height: 20px;
    object-fit: cover;
    background: #ffffff;
    border: 1px solid #808080;
}

.upload-file-name,
.upload-file-size {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.upload-file-size {
    text-align: right;
    color: #333333;
}

.upload-file-remove {
    grid-column: 4;
    grid-row: 1 / 3;
    justify-self: end;
    width: 22px;
    min-width: 22px;
    height: 22px;
    padding: 0;
    font-size: 12px;
}

.upload-progress {
    grid-column: 2 / 4;
    grid-row: 2;
    height: 8px;
    width: 100%;
    border-width: 1px;
}

.upload-file-row.is-uploaded .upload-progress-bar { background-color: #008000; }
.upload-file-row.is-failed .upload-progress-bar { width: 100%; background-color: #800000; }

.upload-progress-bar.just-completed,
.upload-overall-bar.just-completed {
    animation: progress-impact-bar 520ms steps(5, end) 1;
}

.upload-progress-bar.just-completed::after,
.upload-overall-bar.just-completed::after {
    content: "";
    position: absolute;
    right: -7px;
    top: 50%;
    width: 12px;
    height: 22px;
    transform: translateY(-50%);
    background: repeating-linear-gradient(45deg, rgba(255,255,255,.95) 0 2px, rgba(0,255,102,.85) 2px 4px, transparent 4px 6px);
    box-shadow: 0 0 0 1px #ffffff, 0 0 8px #00ff66;
    pointer-events: none;
    animation: progress-impact-spark 520ms steps(5, end) 1;
}

.upload-result {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) 72px;
    align-items: center;
    gap: 6px;
    min-height: 36px;
    margin-top: 8px;
    padding: 4px 6px;
    background: #dfdfdf;
    border-top: 1px solid #808080;
    border-left: 1px solid #808080;
    border-right: 1px solid #ffffff;
    border-bottom: 1px solid #ffffff;
    box-shadow: inset 1px 1px 0 rgba(0,0,0,.16), inset -1px -1px 0 rgba(255,255,255,.75);
    font-size: 12px;
    line-height: 12px;
}

.upload-result.is-current-step {
    animation: share-ready-pulse 1100ms steps(4, end) infinite;
}

.upload-result-label { font-weight: bold; }
.upload-result-link { min-width: 0; overflow: hidden; color: #000078; text-overflow: ellipsis; white-space: nowrap; }
.upload-result-link.is-empty { color: #555555; text-decoration: none; pointer-events: none; }
.upload-share-button { min-width: 72px; width: 72px; height: 24px; font-size: 12px; line-height: 12px; }

.upload-overall {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 42px;
    align-items: center;
    gap: 6px;
    height: 28px;
    padding: 0 8px 8px;
    font-size: 12px;
    line-height: 12px;
}

.upload-overall-track {
    height: 18px;
}

.upload-overall-percent {
    min-width: 0;
    text-align: right;
}
