.tingle-modal--qd-attachments-modal .tingle-modal-box {
    min-width: 600px;
    max-width: 900px;
}

.file-dropzone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 2px dashed var(--qd-color-gray);
    border-radius: 6px;
    padding: 24px 20px;
    margin-bottom: 10px;
    cursor: pointer;
    background-color: #fafafa;
    transition: background-color 0.15s, border-color 0.15s;
    user-select: none;
}

.file-dropzone:hover,
.file-dropzone--active {
    background-color: #eef3fb;
    border-color: var(--qd-color-dark-blue);
}

.file-dropzone-icon {
    color: var(--qd-color-button);
    flex-shrink: 0;
}

.file-dropzone-label {
    font-size: 12px;
    color: #555;
}

.file-dropzone-default-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 100%;
}

/* Split drop zone */
.file-dropzone--split {
    flex-direction: row;
    padding: 0;
    gap: 0;
    align-items: stretch;
    border-color: var(--qd-color-dark-blue);
}

.file-dropzone--split .file-dropzone-default-content {
    display: none;
}

.file-dropzone-zone {
    display: none;
    pointer-events: none;
}

.file-dropzone--split .file-dropzone-zone {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 8px;
    padding: 24px 12px;
    transition: background-color 0.15s;
}

.file-dropzone--split .file-dropzone-zone + .file-dropzone-zone {
    border-left: 1px dashed var(--qd-color-gray);
}

.file-dropzone-zone--active {
    background-color: #eef3fb;
}

.file-dropzone-zone-icon {
    color: var(--qd-color-button);
}

.file-dropzone-zone-label {
    font-size: 13px;
    font-weight: bold;
    color: #444;
}

.file-dropzone-zone-sublabel {
    font-size: 11px;
    color: #888;
}

.file-dropzone-divider {
    display: flex;
    align-items: center;
    width: 60%;
    gap: 12px;
    color: #999;
    font-size: 11px;
}

.file-dropzone-divider::before,
.file-dropzone-divider::after {
    content: '';
    flex: 1;
    border-top: 1px solid #ccc;
}

.file-dropzone-browse-button {
    cursor: pointer;
}


.file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}


.table-actions {
    text-align: right;
    margin-bottom: 2px;
}

.download_all {
    font-size: 11px;
    color: var(--qd-color-link);
    text-decoration: none;
}

.download_all:hover {
    color: var(--qd-color-link-hover);
    text-decoration: underline;
}

.file-table-container {
    min-height: 40px;
}

.file-table {
    width: 100%;
}

.file-table th {
    font-size: 11px;
    padding: 4px 8px;
    color: #fff;
    text-align: left;
    white-space: nowrap;
}

.file-table td {
    font-size: 11px;
    padding: 4px 8px;
    vertical-align: middle;
}
.file-table tbody tr:nth-child(even) td {
    background-color: #f7f9fc;
}

.file-table tbody tr:hover td {
    background-color: var(--qd-color-table-hover);
}

/* Column widths */
.file-name {
    min-width: 130px;
}

.file-description {
    min-width: 200px;
}

.file-date {
    min-width: 110px;
    white-space: nowrap;
}

.file-user {
    min-width: 80px;
}

.delete-th {
    width: 30px;
}

.delete-td {
    text-align: center;
}

.delete-button {
    color: var(--qd-color-gray);
    transition: color 0.15s;
}

.delete-button:hover {
    color: var(--qd-color-red);
}

.description-cell {
    display: flex;
    align-items: center;
    gap: 5px;
}

.description-cell .description-input {
    flex: 1;
    font-size: 11px;
    width: 100%;
    margin-bottom: 0 !important;
}

.save-description-button {
    color: black;
}

.no-files-message {
    font-size: 11px;
    color: #777;
    margin-top: 10px;
}

.file-name-cell {
    display: flex;
    align-items: center;
    gap: 5px;
}


.file-preview-thumb-link {
    margin-left: 4px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
}

.file-preview-thumb {
    height: 100px;
    max-width: 500px;
    border-radius: 3px;
    border: 1px solid var(--qd-color-gray);
    vertical-align: middle;
    cursor: zoom-in;
    transition: opacity 0.15s;
    object-fit: contain;
}

.file-preview-thumb:hover {
    opacity: 0.8;
}

.file-image-preview-modal {
    text-align: center;
    padding: 10px;
}

.file-image-preview-img {
    max-width: 100%;
    max-height: 75vh;
    border-radius: 4px;
    display: block;
    margin: 0 auto;
}

.file-image-preview-title {
    margin-top: 8px;
    font-size: 11px;
    color: #555;
}

.file-queue-container {
    margin-bottom: 10px;
}

.file-queue-table {
    width: 100%;
    margin-bottom: 6px;
}

.file-queue-table .file-queue-description {
    width: 100%;
    box-sizing: border-box;
}

.file-queue-remove {
    color: #e74c3c;
    padding: 4px;
}

.file-queue-remove:hover {
    color: #c0392b;
}

.file-queue-actions {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
}
