.cg-tab-wall-setup {
    display: inline-block;
    position: relative;
    width: 100%;
    height: 100%;
}

#cg-wall-headbuf {
    display: inline-block;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 0;
    overflow: hidden;
}

#cg-wall-bodybuf {
    display: inline-block;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

#cg-wall-bodybuf > hr {
    opacity: 0;
}

#cg-wall-tailbuf {
    display: inline-block;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 0;
    overflow: hidden;
}

.cg-wall-frame {
    display: inline-block;
    width: 100%;
    height: 10rem;
    max-width: 10rem;
    vertical-align: middle;
}

@media only screen and (min-width: 32rem) {
    .cg-wall-frame {
        height: 15rem;
        max-width: 15rem;
    }
}

.cg-debug .cg-wall-frame {
    border: 1px solid;
}

.cg-debug .cg-wall-frame-empty {
    border: 1px solid grey;
}

.cg-wall-graffiti {
    position: relative;
    display: inline-block;
    width: 100%;
    height: 100%;
}

.cg-wall-graffiti-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.cg-wall-graffiti-bg > img {
    width: 50%;
    height: 100%;
    object-fit: contain;
    opacity: 0.125;
}

.cg-debug .cg-wall-graffiti {
    border: 1px solid red;
}

.cg-debug .cg-wall-frame-visible {
    background-color: blue;
}

.cg-debug .cg-wall-graffiti-loading {
    background-color: black;
}

.cg-debug .cg-wall-graffiti-decoding {
    background-color: orange;
}

.cg-debug .cg-wall-frame-origin {
    background-color: yellow;
}

.cg-wall-media {
    width: 100%;
    height: 100%;
}

.cg-wall-media > span:nth-child(1) {
    width: 0;
    height: 100%;
    vertical-align: middle;
    display: inline-block;
}

.cg-wall-media > a {
    width: 100%;
    height: 100%;
}

.cg-wall-media img {
    min-width: 2rem;
    min-height: 2rem;
    max-width: calc(100% - 0.5rem);
    max-height: calc(100% - 0.5rem);
    object-fit: contain;
    filter: drop-shadow(0.125rem 0.25rem 0.5rem black);
    vertical-align: middle;
}

.cg-state-wall-selecting .cg-wall-media img {
    filter: drop-shadow(0.125rem 0.25rem 0.5rem black) invert(100%);
}

.cg-state-wall-selecting .cg-wall-media img:hover {
    filter: drop-shadow(0.125rem 0.25rem 0.5rem white) invert(100%);
}

#cg:not(.cg-admin) .cg-wall-graffiti-reported .cg-wall-media img {
    filter: blur(0.5rem) drop-shadow(0.125rem 0.25rem 0.5rem black);
}

#cg.cg-admin .cg-wall-graffiti-moderated .cg-wall-media img {
    opacity: 0.25;
}

.cg-state-wall-selecting .cg-wall-media > a {
    cursor: crosshair;
}
