/* r17-r10: final visual polish for shared upload items.
   Actions move below progress/content so they never compete with the progress bar. */

/* Reflow each upload row: icon | content | status; action sits below content/status. */
.dq-storage-upload-float-list article,
.dq-storage-upload-float-list article.finalizing{
  grid-template-columns:26px minmax(0,1fr) auto;
  align-items:start;
  column-gap:8px;
  row-gap:5px;
}

.dq-storage-upload-float-list article>i{
  grid-column:1;
  grid-row:1;
}

.dq-storage-upload-float-list article>div{
  grid-column:2;
  grid-row:1;
  min-width:0;
}

.dq-storage-upload-float-list article>span{
  grid-column:3;
  grid-row:1;
  justify-self:end;
  align-self:start;
  white-space:nowrap;
}

/* Item actions live on their own lower row, aligned right and outside the progress width. */
.dq-storage-upload-float-list article>button,
.dq-storage-upload-float-list article button.dq-storage-upload-item-cancel{
  grid-column:2/4;
  grid-row:2;
  justify-self:end;
  align-self:center;
  margin:0;
  max-width:100%;
}

/* Errors keep retry below the message using the same alignment contract. */
.dq-storage-upload-float-list article.error>button{
  grid-column:2/4;
  grid-row:2;
  justify-self:start;
  margin-top:0;
}

/* Active rows gain just enough breathing room for the dedicated action row. */
.dq-storage-upload-float-list article.uploading,
.dq-storage-upload-float-list article.finalizing{
  padding-top:9px;
  padding-bottom:8px;
}

/* Pending rows stay compact while keeping "Remover da fila" below the filename/status. */
.dq-storage-upload-float-list article.pending{
  row-gap:4px;
  padding-top:8px;
  padding-bottom:8px;
}

/* Progress keeps the full width of the content column. */
.dq-storage-upload-item-progress,
.dq-storage-upload-bytes,
.dq-storage-upload-stage{
  width:100%;
  max-width:100%;
}

@media(max-width:560px){
  .dq-storage-upload-float-list article,
  .dq-storage-upload-float-list article.finalizing{
    grid-template-columns:24px minmax(0,1fr) auto;
  }
  .dq-storage-upload-float-list article>button,
  .dq-storage-upload-float-list article button.dq-storage-upload-item-cancel{
    grid-column:2/4;
    grid-row:2;
    justify-self:end;
  }
  .dq-storage-upload-float-list article.error>button{
    justify-self:start;
  }
}
