a.attachments-invoke {
    margin-top:5px;
    margin-bottom:4px;
}

.attachments-attachment {
    position:relative;
    padding:5px 0 25px;
    border-bottom:1px solid #e7e7e7;
    min-height:125px;
    overflow:hidden;
}

.attachments-attachment:before,
.attachments-attachment:after {
    content: " "; /* 1 */
    display: table; /* 2 */
}

.attachments-attachment:after {
    clear: both;
}

.attachments-attachment {
    *zoom: 1;
}

.attachments-attachment:first-of-type {
    padding-top:0;
}

.attachments-attachment:last-of-type {
    border-bottom:0;
    margin-bottom:30px;
    padding-bottom:0;
}

.attachments-note {
    padding-bottom:8px;
}

.attachments-note:not(:empty) + .attachments-container > .attachments-attachment:first-of-type {
    margin-top:-20px;
}

.attachments-container {
    padding-bottom:34px;
}

.attachments-invoke-wrapper {
    position:absolute;
    bottom:0;
    left:0;
    width:100%;
    height:36px;
    padding-top:12px;
    background:#fcfcfc;
    margin-bottom:-8px;
    border-bottom-left-radius:3px;
    border-bottom-right-radius:3px;
    text-align:center;
    border-top:1px solid #dfdfdf;
}

.attachments-prepend {
    padding-top:34px;
}

.attachments-prepend .attachments-container {
    padding-bottom:0;
}

.attachments-prepend .attachments-container .attachments-attachment:first-of-type {
    margin-top:20px;
}

.attachments-prepend .attachments-invoke-wrapper {
    bottom:auto;
    top:-6px;
    margin-bottom:0;
    border-bottom-left-radius:0;
    border-bottom-right-radius:0;
    border-top:0;
    border-bottom:1px solid #dfdfdf;
}

.attachments-container .ui-sortable-helper {
    background:#F9F9F9;
}

.attachments-attachment-highlight {
    min-height:125px;
    background:#f1f1f1;
    border:1px solid #cecece;
    border-radius:2px;
}

.attachments-attachment .attachment-meta {
    /* Reset some WP defaults */
    bottom:auto;
    border:0;

    /* Our styles */
    position:absolute;
    right:0;
    top:0;
    margin-top:36px;
    width:225px;
    padding:5px;
    background:#fdfdfd;
    border:1px solid #DFDFDF;
    border:1px solid rgba(223,223,223,0.8);
    border-radius:2px;
}

.attachments-attachment .attachment-meta:before,
.attachments-attachment .attachment-meta:after {
    content: " "; /* 1 */
    display: table; /* 2 */
}

.attachments-attachment .attachment-meta:after {
    clear: both;
}

.attachments-attachment {
    *zoom: 1;
}

.attachments-attachment:first-of-type .attachment-meta {
    margin-top:32px;
}

.attachments-attachment .attachment-meta .attachment-info {
    /* Reset some WP defaults */
    min-height:1px;
    margin-bottom:0;
    border-bottom:0;
    box-shadow:none;
    padding-bottom:0;
}

.attachments-attachment .attachment-meta .attachment-details {
    width:135px;
    float:right;
    margin:0;
    padding:0;
}

.attachments-attachment .attachment-meta .attachment-info .filename {
    white-space:nowrap;
    width:100%;
    overflow:hidden;
    text-overflow:ellipsis;
}

.attachments-attachment .attachment-meta .attachment-thumbnail {
    width:80px;
    float:left;
}

.attachments-attachment .attachment-meta .attachment-thumbnail img {
    display:block;
    max-width:100%;
    height:auto !important;
    max-height:80px;
    border-radius:2px;
    margin:0 auto;
}

.attachments-attachment .attachment-meta .attachment-actions {
    width:130px;
    float:right;
}

.attachments-fields {
    margin-right:250px;
    margin-left:40px;
    padding-top:10px;
}

.attachments-fields .attachments-attachment-field {
    padding:8px 0;
}

.attachments-fields .attachments-attachment-field:before,
.attachments-fields .attachments-attachment-field:after {
    content: " "; /* 1 */
    display: table; /* 2 */
}

.attachments-fields .attachments-attachment-field:after {
    clear: both;
}

.attachments-fields label {
    display:block;
    margin-bottom:3px;
}


/* Text field styling */
.attachments-attachment-field-text input {
    display:block;
    width:100%;
}

.attachments-attachment-field-textarea textarea {
    display:block;
    width:100%;
    height:150px;
    resize:vertical;
}

/* Select styling */
.attachments-attachment-field-select select {
    display:block;
    width:100%;
}

.attachments-attachment-field-select select[multiple] {
    height:100px;
}

.attachments-handle {
    position:absolute;
    left:0;
    top:20px;
    opacity:0.5;
}

.attachments-attachment:first-of-type .attachments-handle {
    top:17px;
}

.attachments-handle img {
    display:block;
    cursor:pointer;
}

.attachments-attachment-fields-toggle {
    display:none;
}

/* Side styles */

#post-body.columns-2 #side-sortables .attachments-parent-container {
    padding-bottom: 41px;
}

#post-body.columns-2 #side-sortables .attachments-container {
    padding-bottom: 0;
}

#post-body.columns-2 #side-sortables .attachments-attachment {
    min-height: 0;
    padding-bottom:15px;
}

#post-body.columns-2 #side-sortables .attachments-attachment .attachment-meta {
    position: static;
    margin: 15px 0 0 30px;
    box-sizing: border-box;
    width:88%;
}

#post-body.columns-2 #side-sortables .attachments-attachment .attachments-handle {
    top:15px;
}

#post-body.columns-2 #side-sortables .attachments-attachment-fields-toggle {
    display:block;
    margin-top:7px;
    margin-bottom:0;
}

#post-body.columns-2 #side-sortables .attachments-attachment:after:hover {
    color:#d54e21;
}

#post-body.columns-2 #side-sortables .attachments-attachment .attachment-meta .attachment-details {
    width:120px;
}

#post-body.columns-2 #side-sortables .attachments-attachment:last-of-type {
    padding-top: 0;
    padding-bottom: 15px;
    margin-bottom: 0px;
}

#post-body.columns-2 #side-sortables .attachments-fields {
    margin-right: 0;
    margin-left: 30px;
    display:none;
}

.attachment-details .edit-attachment-asset {
    float:left;
}

.attachment-details .delete-attachment {
    float:right;
}

.attachments-container {
    position: relative;
}

.attachments-toggler {
    display: block;
    position: absolute;
    top: 0;
    right: 0;
    cursor: pointer;
}

.attachments-toggler:only-child {
    display: none;
}
