/* Feed cards shared by explore, profiles, saved, following, challenges and the item page */

/* Masonry (see DD.masonry in js/dom.js): tiny rows, each card spans as many as it needs */
.dd-masonry {
    --dd-gap: 24px;
}
.dd-masonry-on {
    grid-auto-rows: 4px;
    row-gap: 0 !important;
    align-items: start;
}
.dd-masonry-on > * {
    margin-bottom: var(--dd-gap);
}

/* Charts are shown whole: axes, legends and titles must not be cropped.
   Only extremely tall images are cut, from the bottom. */
.card-image {
    display: block;
    width: 100%;
    height: auto;
    max-height: 32rem;
    object-fit: cover;
    object-position: top;
    background-color: #f3f4f6;
}

/* Like and save are 20px icons: a finger needs a bigger target. The layout stays,
   only the clickable area grows */
.like-btn,
.save-btn {
    position: relative;
}
.like-btn::after,
.save-btn::after {
    content: '';
    position: absolute;
    inset: -10px -6px;
}

/* On a phone the feed sits right on the page background: a white panel around
   white cards only took width. The panel reaches the screen edges, so its own
   padding lines the content up with the rest of the page */
@media (max-width: 639px) {
    .dd-feed-panel {
        margin-left: -1rem;
        margin-right: -1rem;
        background-color: transparent;
        box-shadow: none;
        border-radius: 0;
    }
    .dd-feed-panel > .border-t {
        border-top-width: 0;
    }
}
