/* ============================================================================
   68-activity-clips-feed.css — v15.200
   ACTIVITY → GAMING CLIPS pane geometry.

   The CARDS are not styled here. Every class the pane renders
   (.shelfd-friend-clip-post, .shelfd-clips-friend-head, .shelfd-clip-card,
   .shelfd-clip-stage, .shelfd-clip-actions, .shelfd-clip-caption,
   .shelfd-clip-date, .shelfd-clips-empty) is already owned by
   63-gaming-clips.css, unscoped — so this pane inherits the Gaming Clips home
   page's look verbatim and there stays exactly ONE owner for clip-card styling.

   All this file does is give the list the same BOX the Gaming Clips page's
   scroller gives it, so those inherited paddings resolve to the same numbers on
   both surfaces, plus the pane's own loading placeholder.
   ========================================================================== */

/* The inline "What are you watching?" composer belongs to the Friends Feed —
   it posts text and trailers, neither of which lives on this tab. Same
   treatment News (23-news-feed.css) and Shared Watch (08-watch-together.css)
   already get; the header's "+" button is still the way to post a clip. */
#community-view.activity-subtab-clips #feed-composer {
  display: none !important;
}

/* The Gaming Clips page lays its list out inside .shelfd-diary-page-scroll —
   a full-viewport-wide box with a 14px side gutter. The Activity pane instead
   sits inside #community-view > .container.main-content, which carries a 9px
   gutter of its own (04-activity-feed.css v14.322). Left alone, every inherited
   padding would land 9px further in than it does on the clips page and the
   stage's own near-edge bleed would be measured from the wrong box.

   So the LIST — not the pane — is re-anchored to the viewport and given the
   clips page's 14px gutter. `width:auto` with both margins pulled to
   `50% - 50vw` is the same viewport-break the feed's full-bleed clip card
   already uses in this exact container (04-activity-feed.css), which is why it
   holds at every device width without hard-coding the 9px it is cancelling.

   The pill row is deliberately NOT included: it stays in the pane's normal flow
   so Friends Feed · News Feed · Shared Watch · Gaming Clips never shift by a
   pixel as the user moves between them. */
#community-view #activity-tab-view #activity-clips-feed .shelfd-friends-clips-list {
  box-sizing: border-box;
  width: auto;
  max-width: none;
  /* margin-top = breathing room under the pill row (matches the gap the Friends
     Feed leaves before its first card); the side margins are the viewport break. */
  margin: calc(6 * var(--shelfd-px, 1px)) calc(50% - 50vw) 0;
  /* Side padding = the clips page's gutter. Bottom padding keeps the last post
     off the bottom nav. */
  padding: 0 calc(14 * var(--shelfd-px, 1px)) calc(18 * var(--shelfd-px, 1px));
}

/* The identity row (avatar + name/handle) carries its own 14px left padding in
   the shared, unscoped .shelfd-clips-friend-head rule (63-gaming-clips.css) —
   on TOP of the list's own 14px gutter above, so it sat 28px off the screen
   edge before any override.

   Padding alone can't reach 1px from the true screen edge — the list's 14px
   padding is shared infrastructure the stage/actions/caption/date all measure
   from, so it can't be shrunk just for this row. Instead: cancel it with an
   equal negative margin-left (breaks this ONE row out of that padding, same
   viewport-relative trick the list itself uses to break out of its parent),
   then use padding-left for the actual 1px gap. Width is deliberately left
   alone — the row's right edge recedes by the same 14px, which is invisible
   here since the row is just left-aligned avatar+text on a transparent
   background, and it avoids the horizontal-overflow risk of also stretching
   the width to compensate. Scoped to this pane only — the Gaming Clips page's
   own Friends tab is unaffected. */
/* All four text/control rows below the (edge-to-edge) stage — identity,
   caption, date, actions — share ONE left edge. Each carries its own small
   left padding in its shared, unscoped base rule (63-gaming-clips.css:
   friend-head 14px, the other three 2px), on TOP of the list's 14px gutter
   above. Padding alone can't reach a sub-gutter inset like 4.5px — the list's
   14px is shared infrastructure the stage measures its own bleed from too, so
   it can't be shrunk just for these rows. Instead: cancel it per-row with an
   equal negative margin-left (the same viewport-relative escape the list uses
   to break out of ITS parent), then use padding-left for the exact gap. Width
   is deliberately left alone on every row — the right edge recedes by the same
   14px, invisible here since every row is left-aligned content on a
   transparent background (the actions row's own ⋯ button uses its own
   margin-left:auto to reach the right, unaffected by this). Scoped to this
   pane only — the Gaming Clips page's own Friends tab is unaffected. */
#community-view #activity-tab-view #activity-clips-feed .shelfd-clips-friend-head,
#community-view #activity-tab-view #activity-clips-feed .shelfd-clip-caption,
#community-view #activity-tab-view #activity-clips-feed .shelfd-clip-date,
#community-view #activity-tab-view #activity-clips-feed .shelfd-clip-actions {
  margin-left: calc(-14 * var(--shelfd-px, 1px));
  padding-left: calc(4.5 * var(--shelfd-px, 1px));
}

/* ---------------------------------------------------------------------------
   v15.208 — INFINITE-SCROLL LOADER at the foot of the feed, replacing the
   "Load older clips" button. Reaching the bottom shows this ring for 1.8s
   (SHELFD_ACTIVITY_CLIPS_RELEASE_MS in js/68) and then the next six clips
   append below it.

   Rotation only — no width/height/opacity keyframes — so the whole animation
   lives on the compositor and costs nothing while six <video> elements are
   being built on the main thread right behind it.
   ------------------------------------------------------------------------ */
#community-view #activity-tab-view #activity-clips-feed .activity-clips-sentinel {
  display: block;
  width: 100%;
}
.activity-clips-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(26 * var(--shelfd-px, 1px)) 0 calc(30 * var(--shelfd-px, 1px));
}
.activity-clips-spinner svg {
  width: calc(30 * var(--shelfd-px, 1px));
  height: calc(30 * var(--shelfd-px, 1px));
  animation: activity-clips-spin 900ms linear infinite;
}
.activity-clips-spinner circle {
  fill: none;
  stroke-width: 3.4;
  stroke-linecap: round;
}
.activity-clips-spinner-track {
  stroke: rgba(255, 255, 255, 0.10);
}
/* One quarter-turn arc of the 2πr circumference (r=18 → ~113), lavender to
   match the app's single accent. */
.activity-clips-spinner-arc {
  stroke: rgba(167, 139, 250, 0.95);
  stroke-dasharray: 30 84;
}

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

@media (prefers-reduced-motion: reduce) {
  .activity-clips-spinner svg { animation-duration: 2400ms; }
}

/* The empty state keeps the pane's normal gutter (it is text, not media). */
#community-view #activity-tab-view #activity-clips-feed .shelfd-clips-empty {
  padding-top: calc(48 * var(--shelfd-px, 1px));
}

/* ---------------------------------------------------------------------------
   Cold-load placeholder. Clip-shaped rather than the Friends Feed's card
   skeleton, so first paint is already the right height and nothing jumps when
   the real posts land. Shares the post/card/stage classes above, so it is
   automatically the exact size of what replaces it.
   ------------------------------------------------------------------------ */
.activity-clip-skeleton {
  pointer-events: none;
}
.activity-clip-skeleton .shelfd-clip-stage,
.activity-clip-skeleton .shelfd-clips-friend-avatar,
.activity-clip-skeleton .activity-clip-skeleton-line {
  background: linear-gradient(
    100deg,
    rgba(255, 255, 255, 0.045) 28%,
    rgba(255, 255, 255, 0.085) 47%,
    rgba(255, 255, 255, 0.045) 66%
  );
  background-size: 220% 100%;
  animation: activity-clip-skeleton-sweep 1500ms ease-in-out infinite;
}
.activity-clip-skeleton .activity-clip-skeleton-line {
  display: block;
  width: calc(122 * var(--shelfd-px, 1px));
  height: calc(11 * var(--shelfd-px, 1px));
  border-radius: 999px;
}
.activity-clip-skeleton .activity-clip-skeleton-line.is-short {
  width: calc(78 * var(--shelfd-px, 1px));
  height: calc(9 * var(--shelfd-px, 1px));
  margin-top: calc(5 * var(--shelfd-px, 1px));
}

/* Transform/opacity only — background-position is composited off the main
   thread here and the box never reflows, so this stays cheap while a feed is
   loading on a mid-range device. */
@keyframes activity-clip-skeleton-sweep {
  0%   { background-position: 140% 0; }
  100% { background-position: -40% 0; }
}

@media (prefers-reduced-motion: reduce) {
  .activity-clip-skeleton .shelfd-clip-stage,
  .activity-clip-skeleton .shelfd-clips-friend-avatar,
  .activity-clip-skeleton .activity-clip-skeleton-line {
    animation: none;
  }
}
