/*
 * Diaspora Flows — Banjo Web Player
 */

/* ── Persistent bottom bar ─────────────────────────── */
.banjo-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 72px;
  background: var(--theme-bg-2);
  border-top: 1px solid var(--theme-border);
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 1.5rem;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1000;
}
.banjo-bar[data-active="true"] {
  transform: translateY(0);
}

.banjo-bar-info { flex: 0 0 auto; min-width: 120px; max-width: 200px; }
.banjo-bar-title { font-family: var(--df-font-sans); font-size: 0.82rem; font-weight: 700; color: var(--theme-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.banjo-bar-artist { font-size: 0.72rem; color: var(--theme-text-mid); }

/* ── Controls ──────────────────────────────────────── */
.banjo-bar-controls { display: flex; align-items: center; gap: 0.5rem; }
.banjo-btn {
  background: none; border: none; color: var(--theme-text);
  cursor: pointer; padding: 0.4rem; font-size: 1rem;
  transition: color 0.15s;
}
.banjo-btn:hover { color: var(--df-gold); }
.banjo-play { font-size: 1.25rem; }
.banjo-play[data-playing="true"]::after { content: "❚❚"; font-size: 0.9rem; }

/* ── Progress bar — always gold ────────────────────── */
.banjo-bar-progress { flex: 1; min-width: 100px; }
.banjo-progress-rail {
  height: 4px;
  background: var(--theme-border-s);
  cursor: pointer;
  position: relative;
  border-radius: 2px;
}
.banjo-progress-fill {
  height: 100%;
  background: var(--df-gold);
  border-radius: 2px;
  transition: width 0.25s linear;
  width: 0;
}
.banjo-time-row {
  display: flex; justify-content: space-between;
  font-family: var(--df-font-mono); font-size: 0.62rem;
  color: var(--theme-text-low); margin-top: 0.25rem;
}

/* ── Moment tag button ─────────────────────────────── */
.banjo-bar-tag { position: relative; }
.banjo-tag-btn {
  background: none; border: 1px solid var(--theme-border);
  color: var(--theme-text-mid); cursor: pointer;
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; transition: border-color 0.2s, color 0.2s;
}
.banjo-tag-btn:hover { border-color: var(--df-gold); color: var(--df-gold); }

/* ── Reaction picker ───────────────────────────────── */
.banjo-reaction-picker {
  display: none;
  position: absolute; bottom: 48px; right: -20px;
  background: var(--theme-bg-2); border: 1px solid var(--theme-border);
  padding: 0.5rem; gap: 0.35rem;
  z-index: 1001;
}
.banjo-reaction-picker[data-open="true"] {
  display: flex;
  animation: reactionPickerIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.reaction-option {
  background: none; border: none; cursor: pointer;
  font-size: 1.25rem; padding: 0.35rem;
  transition: transform 0.1s;
}
.reaction-option:hover { transform: scale(1.2); }
.reaction-option:active { transform: scale(0.95); }

@keyframes reactionPickerIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Voice recording indicator ─────────────────────── */
.banjo-voice-indicator { display: none; align-items: center; gap: 0.4rem; }
.banjo-voice-indicator[data-recording="true"] { display: flex; }
.voice-recording-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--df-red); animation: voicePulse 1s ease-in-out infinite;
}
.voice-recording-label { font-family: var(--df-font-mono); font-size: 0.62rem; color: var(--df-red); letter-spacing: 0.08em; text-transform: uppercase; }

@keyframes voicePulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.3; }
}

/* ── Earning mark ──────────────────────────────────── */
.banjo-earning-mark {
  opacity: 0; transition: opacity 0.5s ease;
  flex-shrink: 0;
}
.banjo-earning-mark.earning-mark--visible { opacity: 0.7; }

/* ── Volume ────────────────────────────────────────── */
.banjo-bar-volume { flex: 0 0 80px; }
.banjo-bar-volume input[type="range"] {
  width: 100%; accent-color: var(--df-gold);
}

/* ── First Believer celebration ────────────────────── */
.fb-celebration {
  position: fixed; inset: 0;
  background: var(--theme-bg);
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  z-index: 2000;
  opacity: 0; pointer-events: none;
  transition: opacity 0.4s ease;
}
.fb-celebration--visible { opacity: 1; pointer-events: all; }
.fb-celebration-inner { max-width: 400px; padding: 2rem; }
.fb-celebration-title {
  font-family: var(--df-font-serif); font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 300; font-style: italic; color: var(--df-cream);
  margin: 2rem 0 0.5rem;
}
.fb-celebration-position {
  font-family: var(--df-font-mono); font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 400; color: var(--df-gold); line-height: 1;
  margin-bottom: 1rem;
}
.fb-celebration-sub {
  font-size: 0.9rem; color: var(--theme-text-mid); line-height: 1.7;
  margin-bottom: 2rem;
}

/* ── Responsive ────────────────────────────────────── */
@media (max-width: 768px) {
  .banjo-bar { height: 56px; padding: 0 1rem; gap: 0.5rem; }
  .banjo-bar-info { display: none; }
  .banjo-bar-volume { display: none; }
  .banjo-earning-mark { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .banjo-bar { transition: none; }
  .banjo-progress-fill { transition: none; }
  .voice-recording-dot { animation: none; }
  .fb-celebration { transition: none; }
}
