/* ── Grid drop-hover overlay ───────────────────────────────────────────────── */

.doc-grid--drop-hover {
    position: relative !important;
    outline: none;
    transition: outline 0.1s ease, background-color 0.1s ease;
}

/* Semi-transparent tinted background */
.doc-grid--drop-hover::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(51, 122, 183, 0.12);
    border: 2px dashed var(--dx-color-primary, #337ab7);
    border-radius: 3px;
    z-index: 10;
    pointer-events: none;
}


/* ── Empty data area ─────────────────────────────────────────────────────── */

.doc-empty-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 2rem 1rem;
    color: var(--dx-color-text-secondary, #6c757d);
}

.doc-empty-area__icon {
    margin-bottom: 4px;
    color: var(--dx-color-text-secondary, #6c757d);
    opacity: 0.6;
}

.doc-empty-area__caption {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--dx-color-text-secondary, #6c757d);
}

.doc-empty-area__or {
    font-size: 0.85rem;
    color: var(--dx-color-text-secondary, #6c757d);
    opacity: 0.75;
}

/* ── Collapse grid toolbar when upload is not in progress ─────────────────── */
/* dxbl-grid-toolbar-container is the class DX gives the toolbar wrapper div. */

.dxbl-grid-toolbar-container:has(.doc-dz-root--idle) {
    height: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    border: none !important;
}

/* ── Compact toolbar during upload ────────────────────────────────────────── */
/* Strip DX default padding so only the progress bar height sets the size.    */

.dxbl-grid-toolbar-container:has(.doc-dz-root--uploading) {
    padding: 3px !important;
    min-height: 0 !important;
}

/* Drop zone root fills the full toolbar width. */

.doc-dz-root--uploading {
    display: block;
    width: 100%;
}

/* dxbl-progress-bar is a web component — its display is controlled by DX JS  */
/* at runtime so CSS alone is not reliable. Width is also forced via inline    */
/* style in the razor (style="display:block;width:100%").                      */
/* This rule acts as a fallback.                                               */

dxbl-progress-bar {
    display: block !important;
    width: 100% !important;
}
