.media-menu-item {
    border: 1px solid transparent;
}
.media-menu-item.active {
    margin-bottom: -1px;
    background: #fff;
    border: 1px solid #ddd;
    border-bottom: none;
}
.media-frame-content {
    overflow-y: auto;
}
.attachment {
    position: relative;
    float: left;
    padding: 8px;
    margin: 0;
    color: #444;
    cursor: pointer;
    list-style: none;
    text-align: center;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    width: 25%;
    box-sizing: border-box;
}
@media only screen and (max-width: 720px) {
    .attachment-browser .attachment {
        width: calc(100% / 2);
    }
}
@media only screen and (min-width: 720px) {
    .attachment-browser .attachment {
        width: calc(100% / 3);
    }
}
@media only screen and (min-width: 820px) {
    .attachment-browser .attachment {
        width: calc(100% / 4);
    }
}
@media only screen and (min-width: 920px) {
    .attachment-browser .attachment {
        width: calc(100% / 5);
    }
}
@media only screen and (min-width: 1080px) {
    .attachment-browser .attachment {
        width: calc(100% / 6);
    }
}
@media only screen and (min-width: 1280px) {
    .attachment-browser .attachment {
        width: calc(100% / 7);
    }
}
@media only screen and (min-width: 1500px) {
    .attachment-browser .attachment {
        width: calc(100% / 8);
    }
}
@media only screen and (min-width: 1800px) {
    .attachment-browser .attachment {
        width: calc(100% / 9);
    }
}
@media only screen and (min-width: 1920px) {
    .attachment-browser .attachment {
        width: calc(100% / 10);
    }
}
.attachment.selected {
    box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 7px #0073aa;
    outline: 2px solid transparent;
    outline-offset: -6px;
}

.attachment-preview {
    position: relative;
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.1), inset 0 0 0 1px rgba(0, 0, 0, 0.05);
    background: #eee;
    cursor: pointer;
}
.attachment-preview:before {
    content: '';
    display: block;
    padding-top: 100%;
}
.attachment .thumbnail {
    overflow: hidden;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    opacity: 1;
    transition: opacity 0.1s;
}
.attachment .thumbnail:after {
    content: '';
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}
.attachment .thumbnail .centered {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: translate(50%, 50%);
}
.attachment .thumbnail .centered img {
    transform: translate(-50%, -50%);
}
.attachment .thumbnail img {
    max-height: 100%;
    position: absolute;
}
.attachment .thumbnail img {
    top: 0;
    left: 0;
}
.attachment .attachment-check {
    display: block;
    height: 24px;
    width: 24px;
    padding: 0;
    border: 0;
    position: absolute;
    z-index: 10;
    top: 0;
    right: 0;
    outline: 0;
    background: #eee;
    cursor: pointer;
    background-color: #0073aa;
    box-shadow: 0 0 0 1px #fff, 0 0 0 2px #0073aa;
}
.media-button-select {
    color: #888888;
    background-color: #f8f8f8;
}
.media-button-select.active {
    color: #fff;
    background-color: #007cba;
    border-color: #007cba;
}
