/* ===============================
   Customer Song List — Modern Compact Style
   Matches checkout screen look & feel
   =============================== */
:root {
  --bg: #fafafa;
  --surface: #fff;
  --elev: #f8fafc;
  --text: #0b1220;
  --muted: #5b6576;
  --border: #e5e7eb;
  --accent: #3b82f6;
  --radius: 12px;
  --shadow: 0 4px 12px rgba(2,8,23,0.06), 0 1px 4px rgba(2,8,23,0.03);
  
  color-scheme: light dark;
}

/* Manual dark mode override */
[data-theme="dark"] {
  --bg: #0b0f1a;
  --surface: #0e1422;
  --elev: #0b1220;
  --text: #e6e9ef;
  --muted: #98a2b3;
  --border: #1e293b;
  --accent: #8b5cf6;
}

/* Auto dark mode detection */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0f1a;
    --surface: #0e1422;
    --elev: #0b1220;
    --text: #e6e9ef;
    --muted: #98a2b3;
    --border: #1e293b;
    --accent: #8b5cf6;
  }
}
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  padding: 12px 0;
}
.container {
  max-width: 600px;
  margin: 0 auto;
  padding: 1rem 0.5rem;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* Heading */
.container h1 {
  font-size: 1.5rem;
  text-align: center;
  margin-bottom: 1rem;
}

/* Search bar */
.top-bar {
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.25rem;
  padding: 0.75rem 0 0.75rem 0;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(2,8,23,0.04);
  position: relative;
}
.sticky-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  text-align: center;
  letter-spacing: -0.01em;
}
.title-row {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.5rem;
  min-height: 2rem;
}
.back-link {
  position: absolute;
  top: 0.75rem;
  left: 0.5rem;
  background: none;
  border: none;
  color: var(--accent);
  font-size: 1rem;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
  transition: opacity 0.2s;
  white-space: nowrap;
}
.back-link:hover {
  opacity: 0.7;
}

/* Action buttons row — flexible grid for easy extension */
.action-buttons-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.75rem;
  padding: 0 0.5rem 0.5rem 0.5rem;
  justify-content: center;
}
.action-buttons-row.single-button {
  justify-content: center;
}
.action-btn {
  flex: 1;
  min-width: 0;
  border: none;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: normal;
  word-wrap: break-word;
  line-height: 1.4;
  box-shadow: 0 2px 8px rgba(2,8,23,0.08);
}
.action-btn:hover {
  box-shadow: 0 4px 12px rgba(2,8,23,0.12);
  transform: translateY(-1px);
}
.action-btn:active {
  transform: scale(0.97);
}
.custom-request-btn {
  background: #3b82f6;
  color: #fff;
}
.custom-request-btn:hover {
  background: #2563eb;
}
.tip-btn {
  background: #3b82f6;
  color: #fff;
}
.tip-btn:hover {
  background: #2563eb;
}

.top-bar-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 0.5rem;
}

#searchInput {
  flex: 1;
  margin: 0;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  background: var(--elev);
  color: var(--text);
  transition: border-color .2s, box-shadow .2s, background .2s;
}
#searchInput:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in oklab, var(--accent) 25%, transparent);
}

/* Song list */
.songs {
  list-style: none;
  padding: 0;
  margin: 0;
}
.songs li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(2,8,23,0.03);
  margin-bottom: 8px;
}

/* Song info */
.song-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}
.song-title {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 2px;
}
.song-artist {
  font-size: 0.9rem;
  color: var(--muted);
}

/* Price & button container */
.songs li > div:last-child {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
  white-space: nowrap;
}

/* Price & Pay button */
.song-price {
  font-size: 1rem;
  color: var(--text);
  font-weight: 600;
}
.song-pay {
  background: var(--accent);
  color: white;
  border: none;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  font-size: 0.95rem;
  cursor: pointer;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(2,8,23,0.04);
  transition: background 0.2s, box-shadow 0.2s;
}
.song-pay:hover {
  background: color-mix(in oklab, var(--accent) 80%, white);
  box-shadow: 0 4px 12px rgba(2,8,23,0.08);
}

@media (min-width: 640px) {
  .container { padding: 1.5rem 1rem; }
  .songs li { padding: 1rem 1rem; }
}
@media (min-width: 1024px) {
  .container { padding: 2rem 2rem; }
}
