.qui-panel--media .qui-button > .qui-button-drop {
    position: initial;
}
.qui-media-content {
    float: left;
    height: 100%;
    width: 100%;
    overflow: auto;
    border: 4px dashed transparent;
}

.qui-media-content-list {
    float: left;
    width: 100%;
    border: 4px dashed transparent;
    display: grid;
    gap: 1.25rem;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    overflow: auto;
    padding: 20px;
}

.qui-media-content__with-pagination {
    height: calc(100% - 50px) !important;
}

.qui-media-content-ondragdrop {
    border: 4px dashed #666;
}

.qui-media-sitemap {
    background: #fff;
    border-right: 1px solid #bbb;
    float: left;
    height: 100%;
    overflow: auto;
    position: relative;
    top: 0;
    width: 300px;
    z-index: 100;
}

/** Media item style
 ================================================ */

.qui-media-item {
    --tile-size: 20px;
    --color-main: #ffffff;
    --color-accent: #f8f8f8;
    --half-size: calc(var(--tile-size) / 2);

    cursor: pointer;
    position: relative;
    border: 1px solid #dedede;
    aspect-ratio: 1;
    background-color: var(--color-main);
    background-image:
            linear-gradient(45deg, var(--color-accent) 25%, transparent 25%),
            linear-gradient(-45deg, var(--color-accent) 25%, transparent 25%),
            linear-gradient(45deg, transparent 75%, var(--color-accent) 75%),
            linear-gradient(-45deg, transparent 75%, var(--color-accent) 75%);
    background-size: var(--tile-size) var(--tile-size);
    background-position:
            0 0,
            0 var(--half-size),
            var(--half-size) calc(-1 * var(--half-size)),
            calc(-1 * var(--half-size)) 0px;
}

.qui-media-item-img {
    background-position: center 10px;
    background-repeat: no-repeat;
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none
}

.qui-media-item.selected,
.qui-media-item:hover {
    --color-main: #2F8FC6;
    --color-accent: #4097c8;
}

.qui-media-item-ondragdrop {
    background-color: #CFF09E;
    border: 4px dashed #666;
}

.qui-media-drag {
    background-color: #CFF09E !important;
}

.qui-media-item {
    border-top: 4px solid #77AB13;
}

.qmi-deactive,
.qmi-inactive {
    border-top: 4px solid #AE432E;
}

.qui-media-item > span.title {
    background: rgba(0, 0, 0, 0.5);
    bottom: 0;
    color: #fff;
    height: 30px;
    left: 0;
    overflow: hidden;
    text-align: center;
    padding: 5px;
    position: absolute;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
    z-index: 1;
}

.qui-media-item-badges {
    position: absolute;
    top: -10px;
    right: -10px;
    display: flex;
    gap: 4px;
    z-index: 2;
}

.qui-media-item-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #ffc366;
    color: #392b15;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1;
}

.qui-media-item-hidden__show {
    opacity: 0.4;
}

.qui-media-item-hidden__hide {
    display: none;
}

.qui-media-file-delete ul li {
    clear: both;
}

.qui-media-deleteWindow-preview-icon {
    background-position: center center;
    background-repeat: no-repeat;
    float: left;
    height: 20px;
    margin-right: 5px;
    width: 20px;
}

/** Media grid style
 ================================================ */

.qui-media-content .omnigrid li img {
    margin-top: 6px !important;
}

/** Media upload file
 ================================================ */

.qui-media-upload {
    float: left;
    width: 100%;
}

.qui-media-upload h2 {
    line-height: 22px;
    margin: 0 0 20px;
    padding-bottom: 0;
}

.qui-media-upload h2 .fa-upload,
.qui-media-upload h2 .fa {
    margin-right: 10px;
}

.qui-media-upload p {
    margin: 5px 0 10px 0;
}

.qui-media-upload-fields input {
    float: left;
    clear: both;
    margin: 10px 10px 0 10px;
}

/** Pagination
 ================================================ */
.qui-media-pagination {
    width: 95%;
    /* background-color: red; */
    height: 60px;
    bottom: 0;
    position: absolute;
    /*display: flex;*/
    padding: 10px 0 0 20px;
}

.qui-media-pagination__hidden {
    display: none;
}

.qui-media-pagination-limit {
    float: left;
    height: 32px;
    margin: 0 10px 0 0;
    width: 65px;
}

.quiqqer-sheets-desktop,
.qui-media-pagination .quiqqer-pagination {
    clear: none !important;
    float: left;
    width: calc(100% - 80px) !important;
}

.qui-media-pagination .quiqqer-sheets-sheet {
    width: 30px;
}

.qui-media-pagination .quiqqer-sheets-desktop {
    margin: 0 !important;
}

.qui-media-pagination .quiqqer-sheets-desktop a {
    color: #212527;
}

.qui-media-pagination .quiqqer-sheets-desktop-current {
    color: #efefef !important;
}

.qui-media-pagination .quiqqer-sheets-desktop a:hover {
    color: #a4a4a4;
}
