/* The vertical Shorts feed (/shorts). --shorts-height is set by shorts.js
   from measured layout (topnav/tabbar height + .app-main's padding), not a
   flat 100vh guess — see wireViewportHeight()'s docblock there. The
   fallback here only matters for an instant before that JS runs once on
   load. */

.shorts-page {
  height: var(--shorts-height, 80vh);
  display: flex;
  justify-content: center;
}

.shorts-feed {
  height: 100%;
  width: min(420px, 100%);
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
  outline: none;
}

.shorts-feed::-webkit-scrollbar {
  display: none;
}

.shorts-slide {
  position: relative;
  height: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  background: #000;
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.shorts-slide + .shorts-slide {
  margin-top: var(--space-3);
}

.shorts-video {
  width: 100%;
  height: 100%;
  /* `contain` rather than `cover` — a landscape upload showing up in the
     Shorts feed (nothing enforces portrait orientation, see the
     duration-only classification decision) letterboxes instead of
     cropping into an unwatchable close-up. */
  object-fit: contain;
  background: #000;
}

.shorts-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: var(--space-3);
  padding: var(--space-4);
  background: linear-gradient(to bottom, transparent 55%, rgba(0, 0, 0, 0.75));
  /* The video itself should still receive taps/clicks (native controls are
     deliberately NOT shown on this page — play/pause isn't exposed the
     same way as the long-form watch page; scrolling past a Short is the
     primary interaction) — only the overlay's own children opt back in. */
  pointer-events: none;
}

.shorts-overlay > * {
  pointer-events: auto;
}

.shorts-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  color: #fff;
  min-width: 0;
}

.shorts-owner {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
  color: #fff;
  font-weight: 600;
  width: fit-content;
}

.shorts-title {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.9);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.shorts-mute-toggle {
  align-self: flex-end;
}

@media (max-width: 640px) {
  .shorts-feed {
    width: 100%;
  }

  .shorts-slide {
    border-radius: 0;
  }
}
