/* Base styles without underline */
.rm-attach-icon,
.download-link {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

.rm-attach-icon i,
.download-link i {
    transition: color 0.3s ease;
}

/* Hover styles with color and underline */
.rm-attach-icon:hover {
    color: #dc3545;
    text-decoration: underline;
}

.rm-attach-icon:hover i {
    color: #dc3545;
}

.download-link {
    cursor: pointer;
    display: inline-block;
    font-size: 0.85rem;
    z-index: 1;
    position: relative;
}

.download-link:hover {
    color: #0d6efd;
    text-decoration: underline;
}

.download-link:hover i {
    color: #0d6efd;
}

/* Trashcan floating icon style */
.dz-remove-float {
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 9999;
    color: #dc3545;
    /*background: rgba(255, 255, 255, 0.85);*/
    border-radius: 50%;
    padding: 6px;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.3s, color 0.3s;
}

.dz-remove-float:hover {
    background: rgba(70, 70, 70, 1);
    color: #a71d2a;
}

body.dark-mode .dz-remove-float {
    background: rgba(50, 50, 50, 0.85);
}

body.dark-mode .dz-remove-float:hover {
    background: rgba(70, 70, 70, 1);
}

/* Shorten content of dataTable columns */
.dt-left.dt-nowrap {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.dropzone .dz-preview.dz-file-preview .dz-image {
    border-radius: 20px;
    background: #999;
}

.dz-preview {
    position: relative;
}

/* Attachment preview container */
#attdz .dz-filename span {
    /*display: block;*/
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    text-align: left;
    font-size: 0.85rem;
    max-width: 100px;

    display: inline-block;
    height: 7.5em;
    line-height: 1.2;
}

/* Thumbnail image or file icon */
#attdz .dz-preview [data-dz-thumbnail] {
    max-width: 100%;
    height: auto;
    margin-bottom: 0.5rem;
    border-radius: 0.25rem;
}

/* File size */
#attdz .dz-preview .dz-size {
    font-size: 0.75rem;
    color: #6c757d;
    margin-bottom: 0.25rem;
}

/* Download button container */
#attdz .dz-preview .download-link {
    display: inline-block;
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

/* Thumbnail preview styling */
#attdz .dz-preview .dz-image img[data-dz-thumbnail] {
    max-width: 100% !important;
    height: auto !important;
    margin-bottom: 0.5rem !important;
    border-radius: 0.25rem !important;
}

#attdz .dz-preview {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 0.75rem;
    box-sizing: border-box;
    height: auto;
    min-height: 200px;
    max-width: 150px;

    border-radius: 0.5rem;
    background-color: #b9bfc6;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

#attdz.dz-started {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 1rem;
    overflow-x: auto;
    align-items: flex-start;
}

.dropzone .dz-preview .dz-details .dz-filename {
    width: 100%;
    text-align: center;
}

.dropzone .dz-preview .dz-details .dz-filename span {
    background-color: rgba(255, 255, 255, 0.4);
    padding: 0 0.4em;
    border-radius: 3px;
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dropzone .dz-preview.dz-file-preview .dz-image {
    height: 9.5em;
}
