/* assets/css/feed.css
   Colors/tokens come from assets/css/base.css, loaded before this file. */

.feed-page {
    /* Matches .site-header-inner (base.css) so the cards line up with the
       nav above them. */
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.feed-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.feed-card {
    background: var(--color-surface);
    padding: 1.25rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.feed-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* Fixed aspect ratio so the map has real dimensions to render into before
   MapLibre initializes (and so the page doesn't jump once it does). */
.feed-map {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.feed-map--empty {
    background: #eee;
}

/* MapLibre's default scale control is sized for a full map -- shrink it to
   fit a card-sized thumbnail. */
.feed-map .maplibregl-ctrl-scale {
    font-size: 0.65rem;
    padding: 0 4px;
}

.feed-card-body {
    padding-top: 1rem;
}

.feed-card-heading {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.feed-card-avatar {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    flex-shrink: 0;
}

.feed-card-avatar--fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-accent);
    color: #fff;
    font-weight: 700;
    text-transform: uppercase;
}

.feed-card-title {
    margin: 0;
    font-size: 1.4rem;
}

.feed-card-meta {
    margin: 0.5rem 0 0;
    color: var(--color-text-muted);
}

@media (max-width: 40rem) {
    .feed-page {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .feed-card {
        padding: 0.625rem;
    }
}
