/* module-key = 'com.atlassian.confluence.plugins.confluence-frontend:attachments', location = '/includes/css/attachments.css' */
form[name='listattachmentfilter'] div {
    margin-right: 10px;
    margin-bottom: 10px;
    display: inline-block;
    width: 250px;
}

table.attachments th.sortHover a,
table.attachments th span.sortedby {
    position: relative;
}

table.attachments th.sortHover a {
    text-decoration: none;
}

table.attachments th.sortHover a:hover::after,
table.attachments th .sortedby::after {
    position: absolute;
    right: -15px;
    bottom: 5px;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid var(--ds-border-focused, #7a869a);
    content: '';
}

table.attachments > tbody > tr > td:first-child > a:last-child {
    word-break: break-all;
}

table.attachments > tbody > tr > td.attachment-actions {
    text-align: right;
    white-space: normal;
}

table.attachments-bulk > tbody > tr > td.attachment-bulk-actions-right {
    float:right;
}

table.attachments-bulk > tbody > tr > td.attachment-bulk-actions-left {
    float:left;
}

table.attachments > tbody > tr > td.creator {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
}

table.attachments > tbody > tr > td.labels .aui-label {
    width: auto;
    overflow: hidden;
    word-break: break-all;
    white-space: normal;
}

table.attachments tr.attachment-highlight {
    background: var(--ds-background-input, #ebf2f9);
}

table.attachments .attachment-history {
    width: 16px;
    padding-right: 0;
}

table.attachments .attachment-history > a.aui-icon {
    color: var(--ds-text, #676768);
}

table.attachments .attachment-history,
table.attachments .filename-column{
    padding-left: 0;
}

table.attachments .filename-column {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

table.attachments .filename-column .filename {
    word-break: break-all;
    white-space: normal;
}

table.attachments-bulk .checkbox-column{
    padding-left: 0;
}

@media screen and (min-width: 1600px) {
    table.attachments-bulk th.checkbox-column {
        width: 20px;
    }

    table.attachments th.filesize-column {
        width: 80px;
    }

    table.attachments th.filedate-column {
        width: 180px;
    }

    table.attachments th.filecreator-column {
        width: 180px;
    }

    table.attachments th.comment {
        width: 200px;
    }

    table.attachments th.labels {
        width: 150px;
    }

    table.attachments th.actions-column {
        width: 230px;
    }
}

/* version history*/
table.attachments .historicalAttachmentRow td.filename-column {
    padding-left: 20px;
}

table.attachments .historicalAttachmentRow td {
    padding-top: 0;
}

table.attachments td.attachment-actions ul {
    margin: 0;
    padding-left: 0;
}

table.attachments td.attachment-actions ul li {
    list-style: none;
    display: inline;
    border-left: 1px solid var(--ds-border, #707070);
    padding-right: 0.25em;
    padding-left: 0.5em;
}

table.attachments td.attachment-actions ul li.first {
    border: none;
}

table.attachments td.attachment-actions ul .companion-edit-button-placeholder:hover {
    cursor: pointer;
}

#menu-attachment-bulk-action {
    width:100%;
    display:flex;
    justify-content: space-between;
}

#menu-attachment-bulk-action-left-children {
    display:none;
    justify-content: flex-start;
    flex-direction: row;
}

#menu-attachment-bulk-action-right {
    display:flex;
    justify-content: flex-end;
    flex-direction: row;
}

#confirm-attachment-dialog-body {
    color: #666666;
    width: 70%;
}

/*For vertical alignment*/
#bulk-action-selected-count-wrapper {
    display: flex;
    align-items: center;
    margin-right: 10px;
}

#viewAttachmentsDiv table.attachments {
    border-bottom: 1px solid var(--ds-border, #ccc);
    table-layout: fixed;
}

#viewAttachmentsDiv table.attachments-bulk {
    margin: 2px 0 0;
}

#viewAttachmentsDiv table.aui > tbody > tr {
    border-bottom: 0;
    border-top: 1px solid var(--ds-border, #ccc);
}

#viewAttachmentsDiv table.aui > tbody > tr:first-child,
#viewAttachmentsDiv table.aui > tbody > tr > th,
#viewAttachmentsDiv table.aui > tbody > tr.historicalAttachmentRow {
    border-top: 0;
}

#download-all-link {
    display: block;
    background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAFVBMVEX///9wcHBwcHBwcHBwcHBwcHBwcHA3RenHAAAAB3RSTlMAEYi7zN3/VyoyVQAAAD1JREFUeNqNyNEKACAIQ9Fmc///ySVUUkF08cGd8p37AdILjAgAbQBVIYHigHjVjygpvdgpc6ds+0yrG35qltUBSh0GXHoAAAAASUVORK5CYII=) no-repeat left center;
    margin-top: 10px;
    padding-left: 20px;
}

#viewAttachmentsDiv .attachment-section {
    padding-top: 20px;
}

#viewAttachmentsDiv .attachment-section-bulk {
    padding-top: 0;
}

#upload-attachments {
    display: table;
    table-layout: fixed;
    width: 100%;
}

#upload-files,
#extension-container {
    display: table-cell;
    vertical-align: top;
    width: 50%;
}

#upload-files ol {
    padding-left: 0;
    list-style: none;
    display: block;
}

#upload-files ol li {
    padding-top: 5px;
}

#upload-files ol li:first-child {
    padding-top: 0;
}

.submit-button-and-more-link-container a {
    padding: 5px 0 5px 145px;
}

#extension-container .attachments-drop-zone {
    margin: 0 20px;
    float: right;
}

@media screen and (max-width: 1225px) {
    #upload-files,
    #extension-container {
        display: inline-table;
        vertical-align: top;
        width: 50%;
    }
    #extension-container {
        margin: 20px 0 0 124px;
    }
}
