.memori-media-items--grid {
    display: grid;
    padding: 1rem;
    direction: rtl;
    grid-auto-flow: dense;
    grid-gap: 1rem;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}

.memori-media-item--card {
    margin-bottom: 1rem;
}

.memori-media-item--image .memori-card--content {
    padding: 0;
}

.memori-media-item .memori-card--cover {
    height: auto;
}

.memori-media-item .memori-card--cover audio,
.memori-media-item .memori-card--cover video {
    border-radius: 5px;
}

.memori-media-item--image .memori-card--cover {
    height: auto;
    background: transparent;
}

.memori-media-item--figure {
    display: flex;
    width: 100%;
    height: 100%;
    max-height: 150px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.memori-media-item--rgb-item {
    width: 100%;
    min-height: 100px;
    flex: 1;
}

.memori-media-item--figure img {
    min-width: 100%;
    min-height: 100%;
    object-fit: cover;
    object-position: center;
}

.memori-media-item--figure-caption {
    padding: 0.25rem 1rem;
    margin: 0.25rem 0;
    color: #666;
    font-size: 0.75rem;
    font-style: italic;
    font-weight: 400;
    text-align: center;
    word-break: break-word;
}

a.memori-media-item--link {
    text-decoration: none;
}

.memori-media-item--icon {
    width: 50%;
    height: 50%;
}

.memori-media-item--modal .memori-media-item--figure {
    position: relative;
    z-index: 0;
    width: 100%;
    max-height: 100%;
    flex-direction: row;
}

.memori-media-item--modal .memori-media-item--figure img {
    object-fit: contain;
}

.memori-media-item--modal .memori-card {
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    border-radius: 0;
    margin-bottom: 0;
    box-shadow: none;
}

.memori-media-item--modal .memori-card--content {
    display: none;
}

.memori-media-item--modal .memori-card--cover {
    height: 100%;
    border-radius: 0;
}

.memori-media-item--modal .memori-modal--panel {
    width: 75vw;
    height: 85vh;
    -webkit-backdrop-filter: blur(var(--memori-blur-background, 10px));
    backdrop-filter: blur(var(--memori-blur-background, 10px));
    background: rgba(0, 0, 0, 0.25);
}

.memori-media-item--modal .memori-modal--panel .memori-card {
    background: none;
}

.memori-media-item--modal .memori-modal--panel .memori-spin {
    display: flex;
    height: 100%;
    align-items: center;
    justify-content: center;
}

.memori-media-item--modal a.memori-media-item--link {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
}

.memori-media-item--modal .memori-media-item--figure-caption {
    position: absolute;
    bottom: 0;
    width: 100%;
    -webkit-backdrop-filter: blur(var(--memori-blur-background, 5px));
    backdrop-filter: blur(var(--memori-blur-background, 5px));
    background: rgba(255, 255, 255, 0.5);
    color: #000;
}

.memori-media-item--modal .memori-modal--close button {
    border-color: #fff;
    color: #fff;
}

.memori-media-item-preview--modal {
    z-index: 10000;
    width: 100%;
    max-width: 80%;
    height: 100%;
    max-height: 80%;
    background: #fff;
}