/* =========================================================
   Feed — feed.css
   Roller Coaster Chronicles social feed styles
   ========================================================= */

/* ----------------------------------------------------------
   Feed page layout
   ---------------------------------------------------------- */

.feed-page {
    background: var(--rcc-bg);
    min-height: 100vh;
}

/* Hero */
.feed-hero {
    padding: 3rem 0 2rem;
    text-align: center;
}

.feed-hero-title {
    font-size: 2.6rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    background: linear-gradient(135deg, var(--rcc-navy) 0%, var(--rcc-crimson) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 0.5rem;
}

.feed-hero-subtitle {
    font-size: 1rem;
    color: var(--rcc-text-muted);
    font-weight: 400;
    margin: 0;
}

/* Sticky scope row */
.feed-scope-row {
    position: sticky;
    top: 60px;
    z-index: 100;
    padding: 0.75rem 0;
    background: rgba(244, 246, 249, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--rcc-border);
    margin-bottom: 1.5rem;
}

/* Inner row: filter pills are CENTERED with the CTA pinned to the right.
   We use CSS grid with three tracks — a ghost spacer on the left that
   mirrors the CTA's width so the filter bar stays visually centered. */
.feed-scope-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
}
.feed-scope-inner .filter-bar {
    grid-column: 2;
    justify-content: center;
}
.feed-scope-actions {
    grid-column: 3;
    justify-self: end;
}
.feed-scope-spacer {
    grid-column: 1;
}

/* Write-a-Trip-Report CTA — navy mesh gradient, toned-down glow */
.btn-write-report {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.7rem 1.3rem;
    border-radius: 50px;
    background: linear-gradient(135deg, var(--rcc-navy) 0%, var(--rcc-navy-dark, #a04520) 100%);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1;
    border: 1.5px solid var(--rcc-navy);
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.1);
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
    white-space: nowrap;
}
.btn-write-report i {
    font-size: 1rem;
}
.btn-write-report:hover,
.btn-write-report:focus {
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.15);
}
/* Collapse the label to icon-only on small screens so three filter pills
   and the CTA all fit on one line even on 375px screens */
@media (max-width: 767.98px) {
    .feed-scope-inner {
        grid-template-columns: 1fr auto 1fr;
        gap: 0.6rem;
    }
    .btn-write-report {
        padding: 0.6rem 0.85rem;
    }
    .btn-write-report-label {
        display: none;
    }
}

/* Feed column max-width — 820px. Wider than the 720px reading column
   because feed cards are card-heavy (images, stats, chips), not pure
   flowing prose, and benefit from a bit more breathing room. */
.feed-column {
    max-width: 820px;
    margin-left: auto;
    margin-right: auto;
}

/* ----------------------------------------------------------
   Filter bar (unified pill row — replaces scope/park/type)
   ---------------------------------------------------------- */

.filter-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Pill wrapper — provides positioning context for the dropdown */
.filter-pill-wrap {
    position: relative;
}

/* The pill button itself — bigger, bolder, splash of color */
.filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    background: #fff;
    border: 1.5px solid var(--rcc-border);
    border-radius: 50px;
    padding: 0.7rem 1.3rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--rcc-text);
    cursor: pointer;
    transition: all 0.18s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    white-space: nowrap;
    line-height: 1;
    font-family: inherit;
    letter-spacing: -0.01em;
}

.filter-pill:hover {
    border-color: var(--rcc-navy);
    color: var(--rcc-navy);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(196, 88, 42, 0.12);
}

/* Active state — solid navy background, white text */
.filter-pill--active {
    background: linear-gradient(135deg, var(--rcc-navy) 0%, var(--rcc-navy-dark) 100%);
    border-color: var(--rcc-navy);
    color: #fff;
    box-shadow: 0 4px 14px rgba(196, 88, 42, 0.3);
}
.filter-pill--active:hover {
    color: #fff;
    box-shadow: 0 6px 20px rgba(196, 88, 42, 0.35);
}
.filter-pill--active .filter-pill-chevron {
    color: rgba(255, 255, 255, 0.85);
}

.filter-pill-wrap.open .filter-pill {
    border-color: var(--rcc-navy);
    box-shadow: 0 0 0 4px rgba(196, 88, 42, 0.15);
}

.filter-pill-chevron {
    font-size: 0.72rem;
    color: var(--rcc-text-muted);
    transition: transform 0.2s ease;
    margin-left: 0.15rem;
}

.filter-pill-wrap.open .filter-pill-chevron {
    transform: rotate(180deg);
}

/* Small label above the filter bar ("Showing:") — subtle context cue */
.filter-bar-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--rcc-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-right: 0.25rem;
    align-self: center;
}

/* Dropdown menu — shared across all three pills */
.filter-menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 210px;
    background: #fff;
    border: 1.5px solid var(--rcc-border);
    border-radius: var(--rcc-radius-lg);
    box-shadow: var(--rcc-shadow-lg);
    z-index: 200;
    padding: 0.35rem;
    animation: filter-menu-in 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}

.filter-pill-wrap.open .filter-menu {
    display: block;
}

/* Keep first pill's menu from going off-left edge (open right instead) */
.filter-pill-wrap:first-child .filter-menu {
    right: auto;
    left: 0;
}

@keyframes filter-menu-in {
    from { opacity: 0; transform: translateY(-6px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Park menu scrollable list */
.filter-menu--park {
    min-width: 280px;
    max-width: 340px;
}

.filter-menu-list {
    max-height: 300px;
    overflow-y: auto;
}

/* Search row inside park menu */
.filter-menu-search-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid var(--rcc-border);
}

.filter-menu-search-icon {
    color: var(--rcc-text-muted);
    font-size: 0.8rem;
    flex-shrink: 0;
}

.filter-menu-search {
    flex: 1;
    border: 0;
    outline: none;
    font-size: 0.83rem;
    font-family: inherit;
    background: transparent;
    color: var(--rcc-text);
}

.filter-menu-search::placeholder {
    color: var(--rcc-text-muted);
}

/* Menu items */
.filter-menu-item {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.52rem 0.65rem;
    border-radius: 8px;
    font-size: 0.84rem;
    font-weight: 500;
    color: var(--rcc-text);
    text-decoration: none;
    cursor: pointer;
    transition: background 0.1s;
}

.filter-menu-item:hover {
    background: rgba(196, 88, 42, 0.06);
    color: var(--rcc-navy);
    text-decoration: none;
}

.filter-menu-item.active {
    background: rgba(196, 88, 42, 0.08);
    color: var(--rcc-navy);
    font-weight: 700;
}

.filter-menu-item.hidden {
    display: none;
}

.filter-menu-icon {
    font-size: 0.85rem;
    color: var(--rcc-text-muted);
    width: 1rem;
    text-align: center;
    flex-shrink: 0;
}

.filter-menu-item.active .filter-menu-icon {
    color: var(--rcc-navy);
}

.filter-menu-item > span:not(.filter-menu-live-dot) {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.filter-menu-check {
    font-size: 0.85rem;
    color: var(--rcc-navy);
    opacity: 0;
    flex-shrink: 0;
    margin-left: auto;
}

.filter-menu-item.active .filter-menu-check {
    opacity: 1;
}

/* Live dot inside menu item */
.filter-menu-live-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ef4444;
    flex-shrink: 0;
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5);
    animation: live-pulse 1.6s ease-in-out infinite;
}

/* ----------------------------------------------------------
   Feed cards — shared
   ---------------------------------------------------------- */

.feed-card {
    background: #fff;
    border-radius: var(--rcc-radius-lg);
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    overflow: hidden;
    transition: box-shadow 0.18s ease, transform 0.18s ease;
    position: relative;
    border: 1px solid #d0d7e2;
    margin-bottom: 1.5rem;
    display: block;
    color: inherit;
    cursor: pointer;
}

.feed-card:hover {
    box-shadow: var(--rcc-shadow-md);
    transform: translateY(-2px);
    color: inherit;
}

.feed-card:focus-visible {
    outline: 3px solid var(--rcc-navy);
    outline-offset: 2px;
}

/* Interactive children keep pointer cursor + stop navigation bubbling via JS */
.feed-card .vis-pill,
.feed-card .write-report-cta,
.feed-card .park-pill {
    cursor: pointer;
}

/* Card body */
.feed-card-body {
    padding: 1rem 1.1rem;
}

.feed-card-body--report {
    background: rgba(196, 88, 42, 0.035);
}

/* Legacy — keep for any templates still using the old class */
.feed-card-inner {
    padding: 1rem 1.1rem;
}

/* ----------------------------------------------------------
   Card type chip (replaces left border accent)
   ---------------------------------------------------------- */

.card-type-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    border-radius: 20px;
    padding: 0.18rem 0.6rem;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    white-space: nowrap;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* Inline chip (sits at top of card body) */
.card-type-chip--inline {
    display: inline-flex;
    margin-bottom: 0.6rem;
}

/* Mini inline chip — sits next to @username, smaller */
.card-type-chip--inline-mini {
    display: inline-flex;
    padding: 0.1rem 0.5rem;
    font-size: 0.6rem;
    margin-left: 0.4rem;
}

/* Activity (navy) chip */
.card-type-chip--activity {
    background: rgba(26, 77, 112, 0.1);
    color: var(--rcc-navy);
    border: 1px solid rgba(26, 77, 112, 0.2);
}

/* Trip report (crimson) chip */
.card-type-chip--report {
    background: rgba(140, 31, 51, 0.1);
    color: var(--rcc-crimson);
    border: 1px solid rgba(140, 31, 51, 0.2);
}

/* ----------------------------------------------------------
   Card header (avatar + meta)
   ---------------------------------------------------------- */

.card-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.card-header-left {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
}

.card-header-meta {
    min-width: 0;
}

.card-username {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--rcc-text);
    display: inline-block;
    line-height: 1.2;
}

/* Username + optional badge inline row */
.card-username-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
    line-height: 1.2;
}

.card-time {
    font-size: 0.75rem;
    color: var(--rcc-text-muted);
    display: block;
    margin-top: 1px;
}
.card-time-edited {
    font-size: 0.7rem;
    color: var(--rcc-text-muted);
    font-style: italic;
    margin-left: 0.3rem;
}

.card-header-right {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ----------------------------------------------------------
   Avatar
   ---------------------------------------------------------- */

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

.feed-avatar-initial {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0;
    line-height: 1;
}

/* Deterministic gradient variants — hue set via inline style */
.feed-avatar-initial[data-hue] {
    background: linear-gradient(
        135deg,
        hsl(var(--avatar-hue, 20), 65%, 45%) 0%,
        hsl(calc(var(--avatar-hue, 20) + 30), 55%, 35%) 100%
    );
}

/* Avatar wrapper — provides the live glow ring */
.feed-avatar-wrap {
    position: relative;
    flex-shrink: 0;
    border-radius: 50%;
}
.feed-avatar-wrap.is-live {
    box-shadow: 0 0 0 2.5px #fff, 0 0 0 4.5px #22c55e;
    animation: live-glow 2s ease-in-out infinite;
}
@keyframes live-glow {
    0%, 100% { box-shadow: 0 0 0 2.5px #fff, 0 0 0 4.5px #22c55e, 0 0 8px rgba(34, 197, 94, 0.3); }
    50% { box-shadow: 0 0 0 2.5px #fff, 0 0 0 4.5px #22c55e, 0 0 16px rgba(34, 197, 94, 0.5); }
}

/* Park name — far right of header row, inline with username */
.card-park-name {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--rcc-text-muted);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    white-space: nowrap;
    margin-left: auto;
}
a.card-park-name:hover {
    color: var(--rcc-navy);
}
.card-park-name.is-live {
    color: #16a34a;
    background: rgba(34, 197, 94, 0.08);
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
}

/* Live park label — far right of header row (legacy) */
.card-live-park {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: #16a34a;
    background: rgba(34, 197, 94, 0.08);
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    white-space: nowrap;
}
.card-live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #22c55e;
    animation: live-dot-pulse 1.5s ease-in-out infinite;
}
@keyframes live-dot-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* ----------------------------------------------------------
   Park pill
   ---------------------------------------------------------- */

.park-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: rgba(196, 88, 42, 0.08);
    color: var(--rcc-navy);
    border-radius: 20px;
    padding: 0.2rem 0.65rem;
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s;
    margin-bottom: 0.75rem;
}

.park-pill:hover {
    background: rgba(196, 88, 42, 0.15);
    color: var(--rcc-navy-dark);
    text-decoration: none;
}

.park-pill i {
    font-size: 0.75rem;
}

/* ----------------------------------------------------------
   Stats grid (2x2)
   ---------------------------------------------------------- */

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.stat-cell {
    background: var(--rcc-bg);
    border-radius: 8px;
    padding: 0.6rem 0.7rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stat-icon {
    font-size: 0.95rem;
    color: var(--rcc-navy);
    flex-shrink: 0;
    width: 1.1rem;
    text-align: center;
}

.stat-content {
    min-width: 0;
}

.stat-value {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--rcc-text);
    display: block;
    line-height: 1.2;
}

.stat-label {
    font-size: 0.68rem;
    font-weight: 500;
    color: var(--rcc-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    display: block;
}

/* ----------------------------------------------------------
   Top ride badge
   ---------------------------------------------------------- */

.top-ride-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: linear-gradient(90deg, rgba(196, 88, 42, 0.1), rgba(140, 31, 51, 0.08));
    border: 1px solid rgba(196, 88, 42, 0.2);
    color: var(--rcc-crimson);
    border-radius: 6px;
    padding: 0.3rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 600;
    max-width: 100%;
}

.top-ride-badge i {
    font-size: 0.8rem;
    flex-shrink: 0;
}

.top-ride-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Write report CTA icon */
.write-report-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(196, 88, 42, 0.08);
    color: var(--rcc-navy);
    font-size: 0.85rem;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
    flex-shrink: 0;
}

.write-report-cta:hover {
    background: var(--rcc-navy);
    color: #fff;
    text-decoration: none;
}

/* ----------------------------------------------------------
   Trip report card extras
   ---------------------------------------------------------- */

/* Variant class on the outer <a> — no left border, just rounded corners + overflow */
.feed-card--report {
    /* overflow:hidden already on .feed-card; this is a no-op but documents intent */
}

/* Photo wrapper — 16:9 aspect ratio, full-bleed */
.trip-report-photo-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.trip-report-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    /* No border-radius — card's overflow:hidden clips it */
}

/* Floating chip overlays photo in top-left */
.trip-report-photo-wrap .card-type-chip {
    position: absolute;
    top: 0.65rem;
    left: 0.75rem;
    background: rgba(255, 255, 255, 0.82);
    border-color: rgba(140, 31, 51, 0.25);
}

.trip-report-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--rcc-text);
    margin: 0 0 0.35rem;
    line-height: 1.3;
}

.trip-report-visit-meta {
    font-size: 0.78rem;
    color: var(--rcc-text-muted);
    margin-bottom: 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.trip-report-preview {
    font-size: 0.9rem;
    color: var(--rcc-text);
    line-height: 1.55;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    position: relative;
}

.trip-report-read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--rcc-navy);
    margin-bottom: 0.75rem;
    transition: gap 0.15s;
}

.feed-card:hover .trip-report-read-more {
    gap: 0.5rem;
}

.trip-report-read-more i {
    font-size: 0.82rem;
    transition: transform 0.15s;
}
.feed-card:hover .trip-report-read-more i {
    transform: translateX(2px);
}

.trip-report-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.star-rating {
    font-size: 0.85rem;
    color: var(--rcc-slate-blue);
    letter-spacing: 0.05em;
}

.star-rating .filled {
    color: #f59e0b;
}

.comment-count {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.78rem;
    color: var(--rcc-text-muted);
    font-weight: 500;
}

/* ----------------------------------------------------------
   Sidebar
   ---------------------------------------------------------- */

.feed-sidebar {
    position: sticky;
    top: 130px;
}

.sidebar-card {
    background: #fff;
    border-radius: var(--rcc-radius-lg);
    border: 1px solid var(--rcc-border);
    box-shadow: var(--rcc-shadow-sm);
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.sidebar-card-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--rcc-text-muted);
    margin-bottom: 0.9rem;
}

.sidebar-cta-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--rcc-navy), var(--rcc-crimson));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.sidebar-cta-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--rcc-text);
    margin-bottom: 0.25rem;
}

.sidebar-cta-text {
    font-size: 0.82rem;
    color: var(--rcc-text-muted);
    margin-bottom: 1rem;
    line-height: 1.4;
}

/* ----------------------------------------------------------
   Load more
   ---------------------------------------------------------- */

.load-more-wrap {
    text-align: center;
    padding: 1.5rem 0 2rem;
}

.btn-load-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #fff;
    color: var(--rcc-text);
    border: 1.5px solid var(--rcc-border);
    border-radius: 50px;
    padding: 0.6rem 1.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s ease;
    box-shadow: var(--rcc-shadow-sm);
}

.btn-load-more:hover {
    border-color: var(--rcc-navy);
    color: var(--rcc-navy);
    box-shadow: var(--rcc-shadow-md);
    transform: translateY(-1px);
}

.btn-load-more:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-load-more .spinner {
    display: none;
}

.btn-load-more.loading .spinner {
    display: inline-block;
    animation: spin 0.7s linear infinite;
}

.btn-load-more.loading .load-more-label {
    display: none;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ----------------------------------------------------------
   Skeleton loading
   ---------------------------------------------------------- */

.skeleton-card {
    background: #fff;
    border-radius: var(--rcc-radius-lg);
    border: 1px solid var(--rcc-border);
    padding: 1rem 1.1rem;
    margin-bottom: 1rem;
    overflow: hidden;
}

.skeleton-line {
    background: linear-gradient(90deg, #f0f2f5 25%, #e2e6eb 50%, #f0f2f5 75%);
    background-size: 200% 100%;
    animation: shimmer 1.4s ease-in-out infinite;
    border-radius: 4px;
    height: 12px;
}

.skeleton-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(90deg, #f0f2f5 25%, #e2e6eb 50%, #f0f2f5 75%);
    background-size: 200% 100%;
    animation: shimmer 1.4s ease-in-out infinite;
    flex-shrink: 0;
}

.skeleton-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.skeleton-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.skeleton-stat {
    height: 52px;
    border-radius: 8px;
    background: linear-gradient(90deg, #f0f2f5 25%, #e2e6eb 50%, #f0f2f5 75%);
    background-size: 200% 100%;
    animation: shimmer 1.4s ease-in-out infinite;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ----------------------------------------------------------
   Empty states
   ---------------------------------------------------------- */

.feed-empty {
    text-align: center;
    padding: 3.5rem 1.5rem;
    background: #fff;
    border-radius: var(--rcc-radius-lg);
    border: 1px solid var(--rcc-border);
    box-shadow: var(--rcc-shadow-sm);
}

.feed-empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
    opacity: 0.35;
}

.feed-empty-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--rcc-text);
    margin-bottom: 0.4rem;
}

.feed-empty-text {
    font-size: 0.875rem;
    color: var(--rcc-text-muted);
    margin: 0 auto 1.25rem;
    max-width: 280px;
    line-height: 1.5;
}

/* ----------------------------------------------------------
   Animations — fadeSlideUp
   ---------------------------------------------------------- */

@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.feed-card-anim {
    animation: fadeSlideUp 0.35s ease both;
}

/* Stagger delays for initial page load cards */
.feed-card-anim:nth-child(1)  { animation-delay: 0.00s; }
.feed-card-anim:nth-child(2)  { animation-delay: 0.04s; }
.feed-card-anim:nth-child(3)  { animation-delay: 0.08s; }
.feed-card-anim:nth-child(4)  { animation-delay: 0.12s; }
.feed-card-anim:nth-child(5)  { animation-delay: 0.16s; }
.feed-card-anim:nth-child(6)  { animation-delay: 0.20s; }
.feed-card-anim:nth-child(7)  { animation-delay: 0.24s; }
.feed-card-anim:nth-child(8)  { animation-delay: 0.28s; }
.feed-card-anim:nth-child(9)  { animation-delay: 0.32s; }
.feed-card-anim:nth-child(10) { animation-delay: 0.36s; }

/* Dynamically loaded cards skip the stagger */
.feed-card-anim.no-delay {
    animation-delay: 0s;
}

/* ----------------------------------------------------------
   Responsive adjustments
   ---------------------------------------------------------- */

@media (max-width: 575.98px) {
    .feed-hero {
        padding: 2rem 0 1.25rem;
    }

    .feed-hero-title {
        font-size: 2rem;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.4rem;
    }

    .stat-cell {
        padding: 0.5rem 0.55rem;
    }

    .stat-value {
        font-size: 0.85rem;
    }

    .feed-scope-row {
        top: 56px;
    }

    /* Pills wrap to two per row on narrow screens */
    .filter-bar {
        gap: 0.5rem;
    }

    .filter-pill {
        font-size: 0.85rem;
        padding: 0.55rem 1rem;
    }

    /* On mobile, park menu can get cut off — pin it to viewport edge */
    .filter-menu--park {
        min-width: 260px;
        max-width: calc(100vw - 2rem);
        right: auto;
        left: 0;
    }

    /* For any pill whose menu would clip right edge, flip it */
    .filter-pill-wrap:last-child .filter-menu {
        right: 0;
        left: auto;
    }
}

@media (max-width: 767.98px) {
    .feed-card-inner {
        padding: 0.875rem 0.9rem;
    }

    .trip-report-cover {
        height: 160px;
    }
}

/* (old sidebar padding removed — the feed column now centers within the container) */

/* (old filter stack / park-filter / content-type-filter CSS removed — see .filter-bar above) */

@keyframes live-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5); }
    50% { box-shadow: 0 0 0 5px rgba(239, 68, 68, 0); }
}

/* ----------------------------------------------------------
   Live Now section
   ---------------------------------------------------------- */

.live-section {
    margin-bottom: 1rem;
}

.live-section-header {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 0.75rem;
    padding: 0 0.25rem;
}

.live-section-title {
    font-size: 0.85rem;
    font-weight: 800;
    color: #ef4444;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.live-section-count {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--rcc-text-muted);
    margin-left: auto;
}

.live-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #ef4444;
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5);
    animation: live-pulse 1.6s ease-in-out infinite;
    flex-shrink: 0;
}

.live-card-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Live card */
.live-card {
    border: 1.5px solid rgba(239, 68, 68, 0.35);
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.08);
    cursor: default;
}

.live-card:hover {
    box-shadow: 0 6px 24px rgba(239, 68, 68, 0.15);
    transform: none;
    border-color: rgba(239, 68, 68, 0.5);
}

.feed-card-inner--live {
    border-left-color: #ef4444;
    background: linear-gradient(
        135deg,
        rgba(239, 68, 68, 0.035) 0%,
        rgba(239, 68, 68, 0) 40%
    );
}

.live-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.live-card-user {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
}

.live-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.6rem;
    background: #ef4444;
    color: #fff;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.35);
    flex-shrink: 0;
}

.live-badge .live-dot {
    width: 6px;
    height: 6px;
    background: #fff;
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
}

.live-current-status {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(239, 68, 68, 0.06);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 8px;
    padding: 0.55rem 0.75rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: #b91c1c;
    margin-bottom: 0.75rem;
}

.live-current-wait {
    color: #7f1d1d;
    font-weight: 500;
}

/* ----------------------------------------------------------
   Section divider ("Recent")
   ---------------------------------------------------------- */

.feed-section-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.25rem 0 0.75rem;
    color: var(--rcc-text-muted);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.feed-section-divider::before,
.feed-section-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--rcc-border);
}

/* ----------------------------------------------------------
   Make Public warning modal
   ---------------------------------------------------------- */

.rcc-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 1rem;
    animation: modal-fade-in 0.15s ease;
}

.rcc-modal-backdrop.open {
    display: flex;
}

.rcc-modal {
    background: #fff;
    border-radius: var(--rcc-radius-lg);
    max-width: 440px;
    width: 100%;
    padding: 1.75rem;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
    animation: modal-slide-up 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.rcc-modal-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--rcc-navy), var(--rcc-crimson));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.rcc-modal-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--rcc-text);
    margin-bottom: 0.6rem;
}

.rcc-modal-text {
    font-size: 0.9rem;
    color: var(--rcc-text-muted);
    line-height: 1.55;
    margin-bottom: 1.5rem;
}

.rcc-modal-actions {
    display: flex;
    gap: 0.65rem;
    justify-content: flex-end;
}

.rcc-modal-btn {
    padding: 0.55rem 1.15rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    border: 1.5px solid transparent;
}

.rcc-modal-btn-cancel {
    background: #fff;
    border-color: var(--rcc-border);
    color: var(--rcc-text);
}

.rcc-modal-btn-cancel:hover {
    border-color: #a0aec0;
}

.rcc-modal-btn-confirm {
    background: var(--rcc-navy);
    color: #fff;
    border-color: var(--rcc-navy);
}

.rcc-modal-btn-confirm:hover {
    background: var(--rcc-navy-dark);
    border-color: var(--rcc-navy-dark);
}

@keyframes modal-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modal-slide-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================
   Visibility pill (trigger) + modal
   The pill is just a button on each card. Clicking it opens a
   shared page-level modal (#vis-modal) — no popovers, no
   clipping, no z-index gymnastics.
   ========================================================== */

/* --- Trigger pill on each card --- */
.vis-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.22rem 0.55rem;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: all 0.15s;
    background: #fff;
    font-family: inherit;
}

.vis-pill i {
    font-size: 0.72rem;
}

.vis-chevron {
    font-size: 0.6rem !important;
    opacity: 0.7;
}

.vis-pill--private {
    background: rgba(100, 116, 139, 0.08);
    color: #475569;
    border-color: rgba(100, 116, 139, 0.25);
}

.vis-pill--inner_circle {
    background: rgba(168, 85, 247, 0.08);
    color: #7c3aed;
    border-color: rgba(168, 85, 247, 0.3);
}

.vis-pill--friends {
    background: rgba(196, 88, 42, 0.08);
    color: var(--rcc-navy);
    border-color: rgba(196, 88, 42, 0.25);
}

.vis-pill--public {
    background: rgba(34, 197, 94, 0.08);
    color: #15803d;
    border-color: rgba(34, 197, 94, 0.3);
}

.vis-pill:hover {
    transform: translateY(-1px);
    box-shadow: var(--rcc-shadow-sm);
}

/* --- Shared page-level visibility modal --- */
.vis-modal-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: modal-fade-in 0.15s ease;
}

.vis-modal-backdrop.open {
    display: flex;
}

.vis-modal {
    background: #fff;
    border-radius: var(--rcc-radius-lg);
    max-width: 420px;
    width: 100%;
    padding: 1.25rem 1.25rem 1rem;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
    animation: modal-slide-up 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.vis-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.9rem;
}

.vis-modal-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--rcc-text);
    margin: 0;
    letter-spacing: -0.01em;
}

.vis-modal-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: transparent;
    border: 0;
    border-radius: 50%;
    color: var(--rcc-text-muted);
    cursor: pointer;
    transition: background 0.15s;
    font-size: 0.9rem;
}
.vis-modal-close:hover {
    background: rgba(100, 116, 139, 0.1);
    color: var(--rcc-text);
}

.vis-modal-options {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.vis-modal-option {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    width: 100%;
    padding: 0.85rem 1rem;
    border: 1.5px solid var(--rcc-border);
    background: #fff;
    border-radius: var(--rcc-radius);
    text-align: left;
    cursor: pointer;
    transition: all 0.15s;
    color: var(--rcc-text);
    font-family: inherit;
}

.vis-modal-option:hover {
    border-color: var(--rcc-navy);
    background: rgba(196, 88, 42, 0.03);
    transform: translateY(-1px);
    box-shadow: var(--rcc-shadow-sm);
}

.vis-modal-option.active {
    border-color: var(--rcc-navy);
    background: rgba(196, 88, 42, 0.06);
    box-shadow: 0 0 0 3px rgba(196, 88, 42, 0.1);
}

.vis-modal-icon {
    font-size: 1.25rem;
    width: 28px;
    text-align: center;
    flex-shrink: 0;
}

.vis-modal-text {
    flex: 1;
    min-width: 0;
}

.vis-modal-label {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--rcc-text);
    line-height: 1.2;
}

.vis-modal-desc {
    font-size: 0.76rem;
    color: var(--rcc-text-muted);
    margin-top: 2px;
}

.vis-modal-check {
    font-size: 1.1rem;
    color: var(--rcc-navy);
    opacity: 0;
    flex-shrink: 0;
}

.vis-modal-option.active .vis-modal-check {
    opacity: 1;
}

@media (max-width: 575.98px) {
    .vis-modal {
        /* Bottom sheet on mobile */
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        max-width: none;
        border-radius: var(--rcc-radius-lg) var(--rcc-radius-lg) 0 0;
        animation: modal-slide-up 0.25s ease;
        padding-bottom: 1.5rem;
    }
    .vis-modal-backdrop {
        padding: 0;
        align-items: flex-end;
    }
}
