/* ── Premium Content Generator ── */

/* ── Panel ── */
.pc-panel {
  display: none;
  margin-top: 32px;
  padding: 20px;
  background: linear-gradient(135deg, #1a1e23 0%, #2d3436 100%);
  border-radius: 16px;
  border: 1px solid rgba(210, 105, 30, 0.2);
}

.pc-panel.visible {
  display: block;
  animation: pcFadeIn 0.5s ease;
}

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

/* ── Header: title + chip row ── */
.pc-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 8px;
}

.pc-panel-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
}

.pc-task-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* ── Task chips ── */
.pc-task-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.3s;
}

.pc-task-chip.active {
  color: #e07b3a;
  border-color: rgba(210, 105, 30, 0.4);
  background: rgba(210, 105, 30, 0.08);
}

.pc-task-chip.done {
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.06);
}

.pc-task-chip.error {
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.06);
}

.pc-chip-status {
  font-size: 0.65rem;
  opacity: 0.8;
}

/* ── Hero image ── */
.pc-hero-image {
  display: none;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 16px;
}

.pc-hero-image.visible {
  display: block;
  animation: pcFadeIn 0.6s ease;
}

.pc-hero-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
}

/* ── Result Actions (inside panel) ── */
.pc-actions {
  display: none;
  gap: 10px;
  flex-wrap: wrap;
}

.pc-actions.visible {
  display: flex;
}

.pc-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: none;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    transform 0.15s,
    box-shadow 0.2s;
}

.pc-action-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.pc-btn-pdf {
  background: linear-gradient(135deg, #d2691e, #b85a15);
  color: #fff;
}

/* ── Bottom Action Bar ── */
.pc-bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 500;
  background: #1a1e23;
  border-top: 1px solid rgba(210, 105, 30, 0.3);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
  display: none;
  padding: 10px 0;
}

.pc-bottom-bar.visible {
  display: block;
  animation: pcSlideUp 0.4s ease;
}

@keyframes pcSlideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

.pc-bar-inner {
  max-width: 600px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Floating button repositioning is handled by JS in premium-podcast.js (inline styles) */
/* Only body padding is managed via CSS */
body:has(.pc-bottom-bar.visible) {
  padding-bottom: 60px;
}

.pc-bar-play {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.pc-bar-play-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #d2691e, #e07b3a);
  color: #fff;
  font-size: 0.9rem;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s;
}

.pc-bar-play-btn:hover {
  transform: scale(1.08);
}

.pc-bar-play-btn.playing {
  animation: pcPulse 1.5s ease infinite;
}

@keyframes pcPulse {
  0%,
  100% {
    box-shadow: 0 0 8px rgba(210, 105, 30, 0.3);
  }
  50% {
    box-shadow: 0 0 16px rgba(210, 105, 30, 0.6);
  }
}

.pc-bar-audio-info {
  flex: 1;
  min-width: 0;
}

.pc-bar-title {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.7);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.pc-bar-progress {
  height: 3px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 2px;
  cursor: pointer;
  overflow: hidden;
}

.pc-bar-progress-fill {
  height: 100%;
  width: 0;
  background: #e07b3a;
  border-radius: 2px;
  transition: width 0.15s linear;
}

.pc-bar-time {
  display: flex;
  justify-content: space-between;
  font-size: 0.6rem;
  color: rgba(255, 255, 255, 0.35);
  margin-top: 2px;
}

.pc-bar-pdf-btn {
  padding: 8px 14px;
  border: none;
  border-radius: 6px;
  background: linear-gradient(135deg, #d2691e, #b85a15);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}

.pc-bar-pdf-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(210, 105, 30, 0.4);
}

/* ── Toast notification ── */
.pc-toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  z-index: 300;
  background: #1a1e23;
  color: #fff;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 0.85rem;
  border: 1px solid rgba(210, 105, 30, 0.4);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transition: all 0.4s ease;
  pointer-events: none;
}

.pc-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Lightbox ── */
.pc-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.85);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.pc-lightbox.visible {
  display: flex;
}

.pc-lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
}

/* ── RWD ── */
@media (max-width: 768px) {
  .pc-panel-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .pc-panel {
    padding: 16px;
  }

  .pc-bar-inner {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .pc-task-chip {
    font-size: 0.65rem;
    padding: 3px 8px;
  }

  .pc-bar-play-btn {
    width: 32px;
    height: 32px;
    font-size: 0.8rem;
  }

  .pc-bar-pdf-btn {
    padding: 6px 10px;
    font-size: 0.7rem;
  }
}
