:root {
    --image-card-fade: linear-gradient(
        to top,
        rgb(9 14 30 / 1) 0%,
        rgb(9 14 30 / .97) 26%,
        rgb(9 14 30 / .82) 48%,
        rgb(9 14 30 / .35) 76%,
        transparent 100%
    );
}

.image-fade-card__media {
    background: rgb(9 14 30);
    isolation: isolate;
    overflow: hidden;
    position: relative;
}

.image-fade-card { border-radius: 14px; }

.image-fade-card__media::after {
    background: var(--image-card-fade);
    content: "";
    inset: 25% 0 0;
    pointer-events: none;
    position: absolute;
    z-index: 1;
}

.image-fade-card__image {
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.image-fade-card__image[hidden] { display: none; }

.image-fade-card__content {
    color: #fff;
    min-width: 0;
    position: absolute;
    inset-inline: 12px;
    bottom: 12px;
    text-shadow: 0 1px 2px rgb(0 0 0 / .5);
    z-index: 2;
}

.image-fade-card__content h4 {
    font-size: 14px;
    margin: 0 0 6px;
    overflow-wrap: anywhere;
}

.image-fade-card__content .image-meta {
    color: rgb(255 255 255 / .82);
    justify-content: flex-start;
    overflow-wrap: anywhere;
}

.image-fade-card__content .tag {
    max-width: 100%;
    overflow-wrap: anywhere;
}

.image-fade-card__footer {
    background: var(--bg-2);
    border-top: 1px solid var(--border, var(--line));
    padding: 12px;
}

.image-fade-card__view {
    position: absolute;
    right: 10px;
    top: 10px;
    z-index: 3;
}

.image-fade-card__view[hidden] { display: none; }

.image-fade-card__unavailable {
    color: rgb(255 255 255 / .72);
    display: none;
    inset: 0;
    place-items: center;
    pointer-events: none;
    position: absolute;
    text-align: center;
    z-index: 2;
}

.image-fade-card__media.is-unavailable .image-fade-card__unavailable { display: grid; }

.image-full-viewer {
    background: rgb(9 14 30 / .96);
    border: 1px solid var(--border, var(--line));
    border-radius: 14px;
    color: #fff;
    height: min(92vh, 900px);
    max-height: 92vh;
    max-width: min(96vw, 1200px);
    padding: 12px;
    width: min(96vw, 1200px);
}

.image-full-viewer::backdrop { background: rgb(0 0 0 / .78); }

.image-full-viewer__head {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-bottom: 8px;
}

.image-full-viewer__head h2 { font-size: 14px; margin: 0; overflow-wrap: anywhere; }

.image-full-viewer img {
    display: block;
    height: calc(100% - 48px);
    margin: auto;
    max-height: calc(92vh - 72px);
    max-width: 100%;
    object-fit: contain;
    width: 100%;
}
