/* ============================================================
   SIMPLE TOP NAV BAR (NO BANNER)
============================================================ */

.simple-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;

  height: 48px;
  display: flex;
  align-items: center;
  padding: 8px 12px;

  background: rgba(255,255,255,0);
  backdrop-filter: blur(4px);
  z-index: 3000;
}

.rah-nav-toggle {
  font-size: 24px;
  background: none;
  border: none;
  cursor: pointer;
  margin-right: 12px;
  color: #ffffff;
}

.rah-topbar-title {
  flex: 1;
  font-size: 17px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #ffffff;
}

/* Dropdown panel */

.rah-nav-panel {
  position: absolute;
  top: 48px;
  right: 8px;

  background: #ffffff;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 6px 0;

  display: none;
  flex-direction: column;
  width: max-content;
  min-width: 180px;

  box-shadow: 0 2px 10px rgba(0,0,0,0.25);
  z-index: 3001;
}

.rah-nav-panel.open {
  display: flex;
}

.rah-nav-panel a {
  padding: 10px 14px;
  font-size: 14px;
  text-decoration: none;
  color: #333;
  white-space: nowrap;
}

.rah-nav-panel a:hover {
  background: #f5f5f5;
  color: #b30000;
}

.submenu-title {
  padding: 8px 14px 4px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #777;
  margin-top: 4px;
}

/* Scroll inside the menu if it gets tall */
.rah-nav-panel {
  max-height: 70vh;
  overflow-y: auto;
}

/* ============================
   GLOBAL BASE
============================ */

html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  overflow-y: auto;
  font-family: "Open Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top left, #2b4b7d 0%, #1a2335 35%, #0e111a 70%, #050609 100%);
  color: #f5f5f5;
}

#app {
  box-sizing: border-box;
  min-height: 100vh;
}

/* ============================
   OFFLINE BANNER
============================ */

#offlineBanner {
  display: none;
  background: #fff7c2;
  border: 1px solid #cc0000;
  border-radius: 4px;
  padding: 8px 12px;
  margin: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #333;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  text-align: center;
}

/* ============================
   MAIN CONTENT AREA
============================ */

#mainContent {
  padding: 8px;
  padding-top: 110px; /* top bar (48px) + voice header (48px) + spacing */
  padding-bottom: 150px;
  box-sizing: border-box;
}

/* Voice header */

.voice-header {
  position: fixed;
  top: 48px; /* directly beneath hamburger top bar */
  left: 0;
  right: 0;

  display: flex;
  justify-content: space-between;
  align-items: center;

  padding: 8px 12px;
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(6px);

  z-index: 2500;
  margin: 0;
  height: 48px;
}

.voice-title {
  font-family: "Oswald", sans-serif;
  font-size: 20px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #ffffff;
}

.voice-select-wrapper {
  font-size: 14px;
  color: #f0f0f0;
}

.voice-select-wrapper label {
  margin-right: 4px;
}

.voice-select-wrapper select {
  font-size: 14px;
  padding: 4px 6px;
  margin-top: 4px;   /* lower it so top isn't clipped */
  border-radius: 4px;
  border: 1px solid #555;
  background: rgba(0, 0, 0, 0.4);
  color: #f5f5f5;
}

/* Info line above playlist */

.playlist-info {
  margin-bottom: 6px;
  color: #e0e0e0;
  font-size: 14px;
}

/* Playlist container */

.playlist-container {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 6px;
}

/* ============================
   REORDER TOGGLE BUTTON
============================ */

.reorder-toggle-wrapper {
  text-align: center;
  margin: 14px 0 8px;
}

.reorder-toggle-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.4);
  padding: 6px 12px;
  font-size: 14px;
  color: #f5f5f5;
  border-radius: 0;
  cursor: pointer;
}

.reorder-toggle-btn:hover {
  border-color: #ffffff;
}

/* ============================
   REPEAT UI
============================ */

.repeat-bubble {
  display: inline-block;
  margin-left: 8px;
  cursor: pointer;
  border: 1px solid #aaaaaa;
  padding: 0 6px;
  border-radius: 4px;
  font-size: 14px;
  user-select: none;
  background: rgba(0, 0, 0, 0.4);
  color: #f5f5f5;
}

.repeat-flyout {
  position: absolute;
  display: flex;
  align-items: center;
  background: #1f2635;
  border: 1px solid #888;
  border-radius: 6px;
  padding: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
  z-index: 2000;
}

.repeat-flyout button {
  padding: 4px 8px;
  font-size: 16px;
  margin: 0 6px;
  background: #2e3a55;
  color: #f5f5f5;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.repeat-flyout button:hover {
  background: #3a4870;
}

/* ============================
   PLAYLIST / TRACK ROWS
============================ */

.playlist-item {
  position: relative;
  padding: 9px 4px;
  display: flex;
  align-items: center;
  background: transparent;
}

.playlist-item + .playlist-item {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.playlist-item.playing {
  background: rgba(179, 0, 0, 0.12);
  color: #ffcccc;
  font-weight: 600;
  border-left: 3px solid #ff4d4d;
}

.playlist-row {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 6px;
}

/* Play button in each row */

.row-play-btn {
  flex: 0 0 auto;
  padding: 4px 8px;
  font-size: 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.08);
  color: #f5f5f5;
  cursor: pointer;
}

.row-play-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Hide play button while in reorder mode */

.reorder-mode .row-play-btn {
  display: none;
}

/* Checkbox */

.row-select {
  flex: 0 0 auto;
}

/* Title + sheet link */

.row-title {
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-title a {
  color: #ffffff;
  text-decoration: none;
}

.row-title a:hover {
  text-decoration: underline;
}

/* Sheet music icon */

.sheet-icon {
  flex: 0 0 auto;
  font-size: 18px;
  text-decoration: none;
  margin-left: 4px;
  color: #ffd966;
}

/* ============================
   REORDER CONTROLS
============================ */

.reorder-controls {
  position: absolute;
  left: 6px;
  top: 50%;
  transform: translateY(-50%);
  display: none;
  flex-direction: row;
  gap: 6px;
}

.reorder-controls button {
  width: 32px;
  height: 26px;
  padding: 0;
  font-size: 16px;
  line-height: 1;
  border-radius: 4px;
  border: 1px solid #888;
  background: #f5f5f5;
  cursor: pointer;
}

/* When reorder mode is active */

.reorder-mode .playlist-item {
  padding-left: 80px;
}

.reorder-mode .reorder-controls {
  display: flex;
}

/* ============================
   FIXED PLAYER BAR
============================ */

#playerBar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;

  /* Match the frosted top bar */
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(12px);

  border-top: none;               /* remove framing */
  box-shadow: none;

  padding: 6px 8px 10px;
  z-index: 1000;
  box-sizing: border-box;
}

/* === Top area: two-row transport pill === */

.player-controls-row {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 0 !important; /* no gap above audio bar */
}

/* Two-row pill holding all transport, loop, shuffle */

.transport-group {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-auto-rows: 40px;
  border-radius: 999px;
  overflow: hidden;

  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(6px);

  min-width: 100%;
  max-width: 100%;
}

/* Base button styling inside pill */

.transport-btn {
  border: none;
  background: transparent;
  color: #f5f5f5;
  padding: 0;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  width: 100%;
  height: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Soft separators between cells */

.transport-btn {
  border-right: 1px solid rgba(255, 255, 255, 0.25);
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
}

/* No right border on last column cells */

.transport-btn.transport-col-5 {
  border-right: none;
}

/* No bottom border on second row cells */

.transport-btn.transport-row-2 {
  border-bottom: none;
}

.transport-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* Grid placement:
   Row 1: PlayAll | PlaySel | Clear | Loop | Shuffle
   Row 2: Prev    | Pause   | Stop  | Next | (empty)
*/

.transport-playall  { grid-row: 1; grid-column: 1; }
.transport-playsel  { grid-row: 1; grid-column: 2; }
.transport-clear    { grid-row: 1; grid-column: 3; }
.transport-loop     { grid-row: 1; grid-column: 4; }
.transport-shuffle  { grid-row: 1; grid-column: 5; }

.transport-prev     { grid-row: 2; grid-column: 1; }
.transport-pause    { grid-row: 2; grid-column: 2; }
.transport-stop     { grid-row: 2; grid-column: 3; }
.transport-next     { grid-row: 2; grid-column: 4; }

/* Hidden checkboxes wrapper for JS logic only */

.hidden-toggle {
  display: none;
}

.toggle-icons-group {
  display: none; /* visual icons moved into the pill */
}

/* === Bottom area: audio element with now-playing text inside === */

.player-audio-row {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

.audio-shell {
  position: relative;
}

/* Audio element full width, transparent chrome */

#mainAudio {
  width: 100%;
  background: transparent !important;
  opacity: 0.9;
}

#playerBar audio {
  width: 100%;
  background: transparent !important;
  opacity: 0.85; /* soften, remove harsh black */
  filter: invert(1) hue-rotate(180deg) brightness(1.2);
}

/* Track name inside the audio bar */

.audio-now-playing {
  position: absolute;
  left: 12px;
  top: 6px;         /* moved down so it no longer overlaps */
  font-size: 15px;
  color: #ffffff;
  text-shadow: 0 0 6px rgba(0,0,0,0.9);

  z-index: 50;      /* elevated above audio UI */
  pointer-events: none;
  font-weight: 500;
}

/* For small screens, keep controls tidy */

@media (max-width: 600px) {
  .player-controls-row {
    flex-direction: row;
    align-items: center;
    justify-content: center;
  }

  .transport-group {
    max-width: 100%;
    backdrop-filter: blur(8px);
    background: rgba(255,255,255,0.08);
  }
}

/* REMOVE ALL BACKGROUND/FRAMING AROUND CONTROL REGION */
.player-controls-row,
.player-audio-row,
.audio-shell {
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
}

#playerBar,
.player-controls-row,
.player-audio-row,
.audio-shell {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}
