/* Generate — FAB, mode toggle, voice prompt, create tabs, activity indicator
 * Split from app.css for maintainability
 */

/* ============================================
   FAB — Floating Action Button
   ============================================ */

.fab {
  position: fixed;
  bottom: calc(var(--tabs-h) + var(--player-h) + 24px);
  right: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--gradient-primary);
  box-shadow: 0 4px 12px rgba(0, 58, 112, 0.4);
  border: none;
  color: white;
  cursor: pointer;
  z-index: var(--z-fab);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s, box-shadow 0.15s;
}

.fab:active {
  transform: scale(0.92);
  box-shadow: 0 2px 8px rgba(var(--rgb-purple), 0.3);
}

/* ============================================
   MODE TOGGLE — Chat / Voice
   ============================================ */

.mode-toggle {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--pearl);
  border-radius: 12px;
  margin-bottom: 12px;
}

.mode-chip {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 0;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--warm-gray);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

.mode-chip--active {
  background: rgba(var(--rgb-purple), 0.15);
  color: var(--purple);
}

/* ============================================
   VOICE PROMPT — in generate modal
   ============================================ */

.voice-prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 32px 16px;
}

.voice-prompt__icon {
  opacity: 0.7;
}

.voice-prompt__text {
  color: var(--warm-gray);
  font-size: 14px;
  margin: 0;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}


/* Log Section */
.log-section {
  padding: 12px 16px;
  border-top: 0.5px solid rgba(var(--rgb-white), 0.05);
}

.log-toggle {
  background: transparent;
  border: none;
  color: rgba(var(--rgb-white), 0.6);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  padding: 8px 0;
  width: 100%;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color 0.2s;
}

.log-toggle:hover {
  color: rgba(var(--rgb-white), 0.9);
}

/* Log Chevron - CSS triangle instead of emoji */
.log-chevron {
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 5px solid currentColor;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  transition: transform 0.2s ease;
}

.log-chevron.expanded {
  transform: rotate(90deg);
}

.log-content {
  margin-top: 8px;
}

.log-output {
  width: 100%;
  height: 200px;
  font-family: var(--font-mono);
  font-size: 11px;
  background: rgba(var(--rgb-black), 0.3);
  border: 1px solid rgba(var(--rgb-white), 0.1);
  border-radius: 8px;
  padding: 12px;
  line-height: 1.4;
  white-space: pre-wrap;
  word-wrap: break-word;
  outline: none;
}

.log-output:focus {
  border-color: rgba(var(--rgb-primary), 0.4);
}

.log-output::selection {
  background: rgba(var(--rgb-primary), 0.3);
  color: white;
}

.podcast-cover {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(var(--rgb-black), 0.3);
}

/* ============================================

/* ── Explore Onboarding (never-empty state) ─────────────────────────── */
.explore-onboard {
  padding: 20px 16px;
}

.explore-onboard__hero {
  text-align: center;
  padding: 40px 20px 32px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  margin-bottom: 24px;
}

.explore-onboard__title {
  font-size: var(--text-xl);
  font-weight: var(--font-weight-semibold);
  color: var(--navy);
  margin: 16px 0 8px;
}

.explore-onboard__sub {
  font-size: var(--text-sm);
  color: var(--text-muted);
  max-width: 320px;
  margin: 0 auto 20px;
  line-height: 1.5;
}

.explore-onboard__cta {
  display: inline-block;
  padding: 12px 28px;
  background: var(--gradient-primary);
  color: var(--white);
  border: none;
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-semibold);
  cursor: pointer;
  box-shadow: var(--shadow-fab);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.explore-onboard__cta:hover {
  transform: var(--hover-lift-sm);
  box-shadow: var(--shadow-lg);
}

/* Episode Detail — Next Prompt Card */

.next-prompt-card {
  margin-top: 24px;
  background: rgba(var(--rgb-white), 0.06);
  border: 1px solid rgba(var(--rgb-white), 0.12);
  border-radius: 12px;
  padding: 16px;
}

.next-prompt-label {
  font-size: 13px;
  color: rgba(var(--rgb-white), 0.5);
  margin-bottom: 8px;
}

.next-prompt-textarea {
  width: 100%;
  min-height: 60px;
  font-family: inherit;
  font-size: 14px;
  background: rgba(var(--rgb-black), 0.3);
  border: 1px solid rgba(var(--rgb-white), 0.15);
  border-radius: 8px;
  padding: 10px;
  color: rgba(var(--rgb-white), 0.9);
  resize: vertical;
}

.next-prompt-btn {
  margin-top: 10px;
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 24px;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: white;
  border: none;
  cursor: pointer;
  width: 100%;
}

.progress-fill--generating {
  width: 50%;
}

/* ── Create mode tabs (Auto-Generate / Voice Studio) ─────────── */
.create-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.create-tab {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid rgba(var(--rgb-white), 0.12);
  border-radius: 12px;
  background: rgba(var(--rgb-white), 0.04);
  color: rgba(var(--rgb-white), 0.55);
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.create-tab:hover {
  background: rgba(var(--rgb-white), 0.08);
  color: rgba(var(--rgb-white), 0.8);
}

.create-tab--active {
  background: var(--gradient-primary);
  border-color: transparent;
  color: var(--white);
  box-shadow: 0 2px 12px rgba(var(--rgb-primary), 0.3);
}

/* ── Voice Studio teaser panel ───────────────────────────────── */
.voice-teaser {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 24px 16px 8px;
  text-align: center;
}

.voice-teaser__icon {
  font-size: 2.5rem;
  line-height: 1;
  filter: drop-shadow(0 0 16px rgba(var(--rgb-primary), 0.5));
}

.voice-teaser__title {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.voice-teaser__desc {
  font-size: 0.85rem;
  color: rgba(var(--rgb-white), 0.55);
  line-height: 1.55;
  max-width: 280px;
}

.voice-teaser__btn {
  margin-top: 4px;
  width: 100%;
  text-align: center;
  text-decoration: none;
  display: block;
}

/* ── Activity Indicator (pulsing dot + task panel) ── */
.top-nav__activity {
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.activity-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  animation: activityPulse 1.5s ease-in-out infinite;
}
@keyframes activityPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(var(--rgb-primary), 0.5); }
  50% { box-shadow: 0 0 0 6px rgba(var(--rgb-primary), 0); }
}
.activity-panel {
  position: absolute;
  top: 48px;
  right: 12px;
  width: 280px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  box-shadow: var(--shadow-xl);
  z-index: var(--z-panel);
  overflow: hidden;
}
.activity-panel__header {
  padding: 12px 16px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
}
.activity-panel__list {
  max-height: 240px;
  overflow-y: auto;
}
.activity-task {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-subtle);
}
.activity-task:last-child { border-bottom: none; }
.activity-task__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  animation: activityPulse 1.5s ease-in-out infinite;
}
.activity-task__info {
  flex: 1;
  min-width: 0;
}
.activity-task__label {
  font-size: 0.8rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.activity-task__elapsed {
  font-size: 0.7rem;
  color: var(--text-dim);
}