/* Suggested/Popular Friends, Suggested/Popular Reels, Sponsored carousels
   interleaved into Feed and Reels. Horizontal scroll-snap, same native
   touch/trackpad swipe behaviour as .instagram-story-strip — no JS drag
   engine needed. */
.sv-reco-carousel {
    margin: 10px 0;
    padding: 12px 0;
    border-top: 1px solid var(--sv-border, #e5e7eb);
    border-bottom: 1px solid var(--sv-border, #e5e7eb);
}
/* .fb-feed is display:flex on mobile and the winning rule (public/app.css,
   @media max-width:760px — NOT the unused /css/app/20-feed.css, which
   isn't even linked in the layout anymore) pins .mobile-feed-tabs=1,
   .instagram-story-strip=2, .insta-composer-card=3, .fb-post-card=4,
   .pagination=99. Our carousels had no order, defaulting to 0 — tying
   with the tabs and landing above the story strip. Match the post-card
   value (4) so Story always stays on top and carousels sort naturally
   among the posts. */
@media (max-width: 760px) {
    .sv-reco-carousel { order: 4 !important; }
}
.sv-reco-heading {
    margin: 0 12px 10px;
    font-size: 15px;
    font-weight: 700;
}
.sv-reco-track {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    padding: 0 12px 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}
.sv-reco-card {
    flex: 0 0 132px;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none;
    color: inherit;
    background: var(--sv-card-bg, #fff);
    border: 1px solid var(--sv-border, #e5e7eb);
    border-radius: 14px;
    padding: 12px 8px;
    gap: 6px;
}

/* Friends */
.sv-reco-friend-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: inherit;
}
.sv-reco-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #d1d5db center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #374151;
}
.sv-reco-name {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    max-width: 116px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.sv-reco-follow-btn {
    width: 100%;
    margin-top: 2px;
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid var(--sv-accent, #2563eb);
    background: var(--sv-accent, #2563eb);
    color: #fff;
    cursor: pointer;
}
.sv-reco-follow-btn.is-active {
    background: transparent;
    color: var(--sv-accent, #2563eb);
}

/* Reels */
.sv-reco-reel-card {
    flex-basis: 108px;
    padding: 0;
    overflow: hidden;
    position: relative;
    aspect-ratio: 9 / 16;
    background: #000;
}
.sv-reco-reel-card video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.sv-reco-reel-play {
    position: absolute;
    top: 8px;
    right: 8px;
    color: #fff;
    font-size: 12px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .6);
}
.sv-reco-reel-views,
.sv-reco-reel-author {
    position: absolute;
    left: 8px;
    right: 8px;
    color: #fff;
    font-size: 11px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .7);
}
.sv-reco-reel-views { bottom: 24px; }
.sv-reco-reel-author { bottom: 6px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Sponsored */
.sv-reco-sponsored-card {
    padding: 0 0 8px;
    overflow: hidden;
}
.sv-reco-sponsored-card img {
    width: 100%;
    height: 90px;
    object-fit: cover;
    border-radius: 14px 14px 0 0;
}
.sv-reco-sponsored-fallback {
    width: 100%;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    color: #6b7280;
    background: #f3f4f6;
    border-radius: 14px 14px 0 0;
}
.sv-reco-sponsored-badge {
    margin-top: 8px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #9ca3af;
    padding: 0 8px;
}
.sv-reco-sponsored-card .sv-reco-name {
    padding: 0 8px;
    max-width: 116px;
}

@media (prefers-color-scheme: dark) {
    .sv-reco-carousel { border-color: #27272a; }
    .sv-reco-card { background: #18181b; border-color: #27272a; }
}
