/* DOCUMENTS: the attachment widget, mounted wherever a file belongs. dk- so
   it cannot collide with the workspace that hosts it. */
.dk { display: flex; flex-direction: column; gap: 8px; }
.dk.is-over { outline: 2px dashed rgba(196,23,23,.6); outline-offset: 4px; border-radius: 12px; }
.dk-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dk-h b { font-size: 13px; font-weight: 800; letter-spacing: -.01em; }
.dk-n { font-size: 11px; font-weight: 800; padding: 1px 8px; border-radius: 100px; background: rgba(255,255,255,.09); color: var(--gray-light, #aeaeb2); }
.dk-hint { font-size: 11.5px; color: var(--gray-light, #aeaeb2); }
.dk-add { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; font-size: 12px; }
.dk-i { width: 14px; height: 14px; flex: 0 0 auto; }
.dk-quiet { font-size: 12.5px; line-height: 1.5; color: var(--gray-light, #aeaeb2); }
.dk-err { font-size: 12.5px; padding: 8px 11px; border-radius: 9px; background: rgba(196,23,23,.12); color: #ff8f8f; }

.dk-drop {
    display: flex; align-items: center; justify-content: center; gap: 8px; text-align: center;
    padding: 20px 16px; border-radius: 12px; cursor: pointer;
    border: 1px dashed rgba(255,255,255,.18); background: rgba(255,255,255,.02);
    font-size: 12.5px; color: var(--gray-light, #aeaeb2);
}
.dk-drop:hover { border-color: rgba(196,23,23,.5); color: var(--white, #fff); }
.dk-drop span { display: inline-flex; align-items: center; gap: 8px; }

.dk-list { display: flex; flex-direction: column; gap: 5px; }
.dk-row {
    display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 10px;
    padding: 8px 10px; border-radius: 10px; border: 1px solid rgba(255,255,255,.07); background: rgba(255,255,255,.02);
}
.dk-row.is-part { border-color: rgba(230,167,0,.4); background: rgba(230,167,0,.06); }
.dk-ext {
    font-family: var(--font-mono); font-size: 9.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
    text-align: center; padding: 5px 0; border-radius: 6px; background: rgba(196,23,23,.14); color: #ff8f8f;
}
.dk-meta { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.dk-meta b { font-size: 12.5px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dk-meta em { font-style: normal; font-size: 11px; color: var(--gray-light, #aeaeb2); }
.dk-acts { display: flex; align-items: center; gap: 4px; }
.dk-ib {
    width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center;
    border-radius: 7px; border: 1px solid transparent; background: transparent; color: var(--gray-light, #aeaeb2);
    cursor: pointer; font: inherit; text-decoration: none;
}
.dk-ib:hover { border-color: rgba(255,255,255,.2); color: var(--white, #fff); }
.dk-ib.is-danger:hover { border-color: rgba(196,23,23,.5); color: #ff8f8f; }
.dk-sel {
    font: inherit; font-size: 11px; padding: 3px 7px; border-radius: 7px;
    background: rgba(255,255,255,.05); border: 1px solid var(--border, rgba(255,255,255,.12)); color: var(--white, #fff);
}

/* an upload in flight */
.dk-jobs { display: flex; flex-direction: column; gap: 5px; }
.dk-job { display: grid; grid-template-columns: minmax(0, 1fr) 120px auto 26px; align-items: center; gap: 10px; font-size: 12px; }
.dk-job.is-err { color: #ff8f8f; }
.dk-job-n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.dk-job-m { color: var(--gray-light, #aeaeb2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.dk-bar { display: block; height: 6px; border-radius: 3px; background: rgba(255,255,255,.1); overflow: hidden; }
.dk-bar i { display: block; height: 100%; background: #37c27a; border-radius: 3px; transition: width .2s ease; }
.dk-job.is-err .dk-bar i { background: #ff5c5c; }

html.light .dk-row, html.light .dk-drop { background: #fff; border-color: rgba(0,0,0,.1); }
html.light .dk-drop { border-style: dashed; border-color: rgba(0,0,0,.18); }
html.light .dk-h b, html.light .dk-meta b { color: #111; }
html.light .dk-hint, html.light .dk-quiet, html.light .dk-meta em, html.light .dk-job-m, html.light .dk-n, html.light .dk-drop { color: #5f5f66; }
html.light .dk-n, html.light .dk-bar { background: rgba(0,0,0,.07); }
html.light .dk-ext { background: rgba(196,23,23,.1); color: #c41717; }
html.light .dk-sel { background: #fff; border-color: rgba(0,0,0,.14); color: #111; }
html.light .dk-ib:hover { border-color: rgba(0,0,0,.2); color: #111; }
html.light .dk-err { background: rgba(196,23,23,.08); color: #c41717; }
html.light .dk-bar i { background: #178a4f; }
html.light .dk-row.is-part { background: rgba(154,106,0,.06); border-color: rgba(154,106,0,.3); }

@media (max-width: 700px) {
    .dk-row { grid-template-columns: 36px minmax(0, 1fr); }
    .dk-acts { grid-column: 1 / -1; justify-content: flex-end; }
    .dk-job { grid-template-columns: minmax(0, 1fr) auto; }
    .dk-bar { grid-column: 1 / -1; }
}
