/* ---- Now-playing bar: always visible above the bottom nav while a track is loaded ---- */
#rupiaNowBar {
  position: fixed;
  left: 10px; right: 10px;
  bottom: calc(var(--nav-h, 64px) + 8px);
  z-index: 99990;
  display: none;
  align-items: center;
  gap: 12px;
  height: 62px;
  padding: 0 10px 0 8px;
  border-radius: 31px;
  background: rgba(18,18,18,0.97);
  border: 1.5px solid rgba(255,224,163,0.18);
  box-shadow: 0 6px 22px rgba(0,0,0,0.5);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none; -webkit-user-select: none;
}
#rupiaNowBar.show { display: flex; }
#rupiaNowBar.fp-open { display: none; }
@media (min-width: 768px) {
  #rupiaNowBar { left: 50%; right: auto; width: 520px; transform: translateX(-50%); bottom: 14px; }
}
.rnb-cover {
  width: 46px; height: 46px; flex-shrink: 0;
  border-radius: 8px; overflow: hidden;
  background: linear-gradient(135deg,#1B5E4F,#0F3D34);
  display: flex; align-items: center; justify-content: center;
  color: #FFE0A3;
}
.rnb-cover img { width: 100%; height: 100%; object-fit: cover; display: none; }
.rnb-cover img.show { display: block; }
.rnb-cover img.show + i { display: none; }
.rnb-info { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 2px; }
.rnb-name { font-size: 0.9rem; font-weight: 700; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rnb-artist { font-size: 0.74rem; color: rgba(255,255,255,0.65); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rnb-progress { margin-top: 3px; height: 3px; border-radius: 2px; background: rgba(255,255,255,0.15); position: relative; }
.rnb-progress-fill { height: 100%; width: 0; border-radius: 2px; background: #FFE0A3; }
.rnb-btn {
  flex-shrink: 0; width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: transparent; color: #fff; font-size: 1rem; cursor: pointer;
  border: 1.5px solid rgba(255,255,255,0.28);
  -webkit-tap-highlight-color: transparent;
}
.rnb-btn:active { background: rgba(255,255,255,0.12); }

/* ---- Alerts screen: keep the bottom nav visible above the notifications panel ---- */
@media (max-width: 767px) {
  body.rupia-alerts-open .bottom-nav { z-index: 210 !important; display: flex !important; }
  body.rupia-alerts-open .bottom-nav::after { z-index: 209; }
  body.rupia-alerts-open .notifications-panel { height: auto; max-width: 100%; box-shadow: none; }
}

/* ---- Profile screen: keep the bottom nav visible above the profile page ---- */
@media (max-width: 767px) {
  body.rupia-profile-open .bottom-nav { z-index: 210 !important; display: flex !important; }
  body.rupia-profile-open .bottom-nav::after { z-index: 209; }
}

/* ---- Settings screen: leave room so the last items (Sign Out) scroll clear of the nav + now-playing bar ---- */
.profile-dropdown-scroll {
  padding-bottom: calc(var(--nav-h, 64px) + 90px + env(safe-area-inset-bottom, 0px)) !important;
}

body.rupia-auth-open .bottom-nav { display: none !important; }
body.rupia-auth-open #rupiaNowBar { display: none !important; }

/* ---- Upload type sheet: sit above the bottom nav so the Music / Reel cards are never hidden ---- */
@media (max-width: 767px) {
  .upload-sheet { padding-bottom: calc(var(--nav-h, 64px) + 1.2rem + env(safe-area-inset-bottom, 0px)) !important; }
  body:has(.upload-sheet-overlay.show) .bottom-nav { z-index: 210 !important; }
}

/* ---- Settings features open full-screen, covering the whole page and the bottom nav ---- */
#faceVerifModal,
#socialLinksModal,
#linkedAccountsModal,
#withdrawalModal {
  z-index: 1100 !important;
  align-items: stretch !important;
  justify-content: stretch !important;
  padding: 0 !important;
}
#faceVerifModal > .modal,
#socialLinksModal > .modal,
#linkedAccountsModal > .modal,
#withdrawalModal > .modal {
  width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
  max-height: 100% !important;
  margin: 0 !important;
  border-radius: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  overflow: hidden !important;
}
#linkedAccountsModal > .modal > .modal-body {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch;
}
#graphOverlay {
  max-width: 100% !important;
  width: 100% !important;
  left: 0 !important;
  z-index: 9000 !important;
}

/* ---- Artist sheet: full-screen page (scroll for songs + other artists) ---- */
.artist-sheet {
  top: 0 !important;
  height: 100dvh !important;
  max-height: 100dvh !important;
  border-radius: 0 !important;
  padding-top: env(safe-area-inset-top, 0px);
}
.artist-sheet-handle { display: none !important; }
.artist-sheet-tracks { padding-bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px)) !important; -webkit-overflow-scrolling: touch; }
.artist-other-row { cursor: pointer; }

/* ---- Artist page keeps the bottom nav visible beneath it ---- */
.artist-sheet { bottom: var(--nav-h, 64px) !important; height: auto !important; max-height: none !important; }
body:has(.artist-sheet.show) .bottom-nav { z-index: 9100 !important; display: flex !important; }
body:has(.artist-sheet.show) .bottom-nav::after { z-index: 9099 !important; }
.artist-sheet-backdrop { display: none !important; }
/* Closed state: the sheet is anchored nav-h above the screen bottom, so a plain
   translateY(100%) leaves its top strip (avatar / name / "1 track" / X) sitting
   on top of the bottom nav. Push it fully off-screen and make it inert. */
.artist-sheet:not(.show) {
  transform: translateY(calc(100% + var(--nav-h, 64px) + 40px)) !important;
  visibility: hidden !important;
  pointer-events: none !important;
  box-shadow: none !important;
  transition: transform 0.32s cubic-bezier(0.34, 1.05, 0.64, 1), visibility 0s linear 0.32s;
}
.artist-sheet.show { visibility: visible; }
@media (min-width: 768px) { .artist-sheet { bottom: 0 !important; } .artist-sheet:not(.show) { transform: translateY(calc(100% + 40px)) !important; } }

/* Songs play in the background; the full player only shows when the bar is tapped */
body.rupia-bg-play #musicFullpageOverlay { display: none !important; }

/* ---- Bigger cover photos on the artist page (Spotify-style) ---- */
.artist-sheet-avatar { width: 72px !important; height: 72px !important; font-size: 1.6rem !important; }
.artist-sheet-name { font-size: 1.15rem !important; }
.artist-track-row { gap: 0.9rem !important; padding: 0.55rem 1.1rem !important; }
.artist-track-cover {
  width: 68px !important; height: 68px !important;
  border-radius: 0.5rem !important; font-size: 1.3rem !important;
}
.artist-track-cover img { border-radius: 0.5rem !important; }
.artist-track-title { font-size: 0.95rem !important; }
.artist-track-meta { font-size: 0.72rem !important; margin-top: 0.2rem !important; }
.artist-track-play-btn { width: 38px !important; height: 38px !important; font-size: 0.85rem !important; }
/* Other artists: big round photos like Spotify's "Jump back in" */
.artist-other-row .artist-track-cover { width: 72px !important; height: 72px !important; border-radius: 50% !important; }
.artist-other-row .artist-track-cover img { border-radius: 50% !important; }

/* Other artists: horizontal scrolling row of square cover cards */
.artist-other-strip {
  display: flex; flex-direction: row; gap: 0.8rem;
  overflow-x: auto; overflow-y: hidden;
  padding: 0.3rem 1rem 0.9rem; -webkit-overflow-scrolling: touch;
  scrollbar-width: none; scroll-snap-type: x proximity;
}
.artist-other-strip::-webkit-scrollbar { display: none; }
.artist-other-strip .artist-other-row {
  flex: 0 0 auto; width: 120px; flex-direction: column; align-items: flex-start;
  gap: 0.45rem; padding: 0 !important; background: none !important;
  scroll-snap-align: start;
}
.artist-other-strip .artist-other-row .artist-track-cover {
  width: 120px !important; height: 120px !important; border-radius: 0.7rem !important;
}
.artist-other-strip .artist-other-row .artist-track-cover img { border-radius: 0.7rem !important; }
.artist-other-strip .artist-other-row .artist-track-info { width: 100%; flex: none; }
.artist-other-strip .artist-other-row .artist-track-title { font-size: 0.85rem !important; }
