/* Grande Vista: two floating cards. The 9:16 hole is transparent so Exo
   (or #videoA) can sit on it; HTML on the Spotify card stays visible. */

.reels-view {
  position: fixed;
  inset: 0;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(48px, 5vw, 96px);
  padding: clamp(28px, 5.2vh, 56px) clamp(32px, 2.9vw, 56px);
  background: #080808;
}

.reels-view[hidden] {
  display: none !important;
}

body.is-reels,
body.is-reels.is-native-player,
html:has(body.is-reels),
html:has(body.is-reels.is-native-player) {
  background: #080808 !important;
}

body.is-reels #stage {
  background: transparent;
  pointer-events: none;
  z-index: 20;
}

body.is-reels #playerStatus:not([hidden]) {
  pointer-events: auto;
}

.reels-column {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: auto;
}

.reels-feed {
  position: relative;
  height: min(880px, calc(100vh - 12vh));
  width: auto;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border-radius: 20px;
  background: #1a1a1a;
}

.reels-feed.is-focused {
  box-shadow: 0 0 0 3px var(--tm-orange);
}

.reels-track {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 300%;
  display: flex;
  flex-direction: column;
  transform: translateY(-33.333%);
  will-change: transform;
  z-index: 1;
}

.reels-slide {
  position: relative;
  flex: 0 0 33.333%;
  width: 100%;
  height: 33.333%;
  overflow: hidden;
  background: #101010;
}

.reels-stage {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: transparent;
  pointer-events: none;
}

body.is-reels.is-native-player .reels-chrome {
  visibility: hidden;
}

.reels-chrome {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 3;
  height: 72px;
  padding: 8px 14px 12px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 6px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.82), transparent);
  pointer-events: none;
}

.reels-progress {
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.22);
  overflow: hidden;
}

.reels-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: #fff;
}

.reels-caption-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.reels-count {
  flex: 0 0 auto;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-60);
}

.reels-paused {
  position: absolute;
  right: 14px;
  top: -44px;
  min-width: 72px;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
}

.reels-paused[hidden] {
  display: none !important;
}

.reels-poster {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.reels-poster[hidden] {
  display: none !important;
}

.reels-poster-empty {
  width: 100%;
  height: 100%;
  background: #141414;
}

.reels-caption {
  min-width: 0;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reels-spotify {
  flex: 0 0 auto;
  width: min(560px, 36vw);
  height: min(640px, 70vh);
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 28px;
  background: #141414;
  border-radius: 28px;
  overflow: hidden;
}

.reels-now {
  flex: 1 1 auto;
  min-height: 160px;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 22px;
  border-radius: 18px;
  background: #1c1c1c;
  border: 2px solid transparent;
}

.reels-now.is-focused {
  border-color: var(--tm-orange);
  background: #24180f;
}

.reels-now-art,
.reels-now-art-empty {
  width: 120px;
  height: 120px;
  border-radius: 16px;
  flex: 0 0 auto;
  object-fit: cover;
}

.reels-now-art[hidden] {
  display: none !important;
}

.reels-now-art-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #3a2208, #140e08);
  color: var(--text-60);
  font-size: 16px;
  font-weight: 700;
}

.reels-now.has-art .reels-now-art-empty {
  display: none;
}

.reels-now-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.reels-now-kicker {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-35);
}

.reels-now-title {
  font-family: Inter, sans-serif;
  font-weight: 700;
  font-size: 26px;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reels-now-artist {
  font-size: 18px;
  font-weight: 500;
  color: var(--text-60);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reels-transport {
  flex: 0 0 auto;
  display: flex;
  justify-content: center;
  gap: 20px;
}

.reels-transport-btn {
  min-width: 140px;
  min-height: 64px;
  padding: 0 28px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  background: #1c1c1c;
  border: 2px solid transparent;
  color: var(--text-100);
}

.reels-transport-btn.is-focused {
  border-color: var(--tm-orange);
  background: #24180f;
}

.reels-tiles {
  flex: 0 0 88px;
  display: flex;
  gap: 14px;
  min-height: 0;
}

.reels-tiles[hidden] {
  display: none !important;
}

.reels-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: #1c1c1c;
  border: 2px solid transparent;
  font-size: 20px;
  font-weight: 700;
}

.reels-tile.is-radios {
  flex: 0 0 38%;
}

.reels-tile.is-playlists {
  flex: 1 1 auto;
}

.reels-tile.is-focused {
  border-color: var(--tm-orange);
  background: #24180f;
}

.reels-list {
  flex: 0 0 88px;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  scrollbar-width: none;
}

.reels-list[hidden] {
  display: none !important;
}

.reels-list::-webkit-scrollbar {
  display: none;
}

.reels-list.is-wide {
  flex: 1 1 180px;
  max-height: 220px;
}

.reels-pick,
.reels-list .spotify-track {
  flex: 0 0 auto;
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 12px;
  background: #1c1c1c;
  border: 2px solid transparent;
}

.reels-pick.is-focused,
.reels-list .spotify-track.is-focused {
  border-color: var(--tm-orange);
  background: #24180f;
}

.reels-pick img,
.reels-pick-art {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  flex: 0 0 auto;
  background: #2a2a2a;
}

.reels-pick-title,
.reels-list .spotify-track-title {
  font-size: 18px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reels-pick-sub,
.reels-list .spotify-track-artist {
  font-size: 14px;
  color: var(--text-60);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reels-list .picker-item {
  min-height: 64px;
  font-size: 18px;
  padding: 12px;
}

#reelsSpotifyLoading {
  flex: 0 0 auto;
  min-height: 48px;
}

.feed-video.is-reels-video {
  z-index: 6;
  object-fit: cover;
  background: #000;
  border-radius: 20px;
}

body.is-reels #nowPlaying,
body.is-reels #tileLayer,
body.is-reels #overlayLayer,
body.is-reels #tileFocus,
body.is-reels #clipTransition {
  display: none !important;
}

body.is-pointer .reels-now,
body.is-pointer .reels-transport-btn,
body.is-pointer .reels-tile,
body.is-pointer .reels-pick,
body.is-pointer .reels-list .spotify-track,
body.is-pointer .reels-feed {
  cursor: pointer;
}
