/* ============================================
   KY Consultation — Content Repurposing Pipeline Demo
   Loaded on: content-demo.html only
   Pipeline layout, platform cards, connector, animations
   ============================================ */

/* Source selector */
.source-picker {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.source-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: #1A1A2E;
  border: 1px solid #27273A;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: border-color 200ms ease, background-color 200ms ease, transform 200ms ease;
}

.source-card:hover {
  border-color: rgba(94, 40, 157, 0.4);
  background: #1F1F36;
}

.source-card.is-active {
  border-color: #5E289D;
  background: rgba(94, 40, 157, 0.1);
  transform: scale(1.02);
}

.source-card__icon {
  width: 36px;
  height: 36px;
  border-radius: 0.375rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.source-card__icon--blog { background: rgba(94, 40, 157, 0.15); color: #7B3BC7; }
.source-card__icon--podcast { background: rgba(245, 158, 11, 0.15); color: #F59E0B; }
.source-card__icon--case { background: rgba(16, 185, 129, 0.15); color: #10B981; }
.source-card__icon--video { background: rgba(239, 68, 68, 0.15); color: #EF4444; }
.source-card__icon--webinar { background: rgba(59, 130, 246, 0.15); color: #3B82F6; }

.source-card__label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: #E2E8F0;
  line-height: 1.3;
}

.source-card__type {
  font-size: 0.6875rem;
  color: #64748B;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Pipeline connector (desktop) */
.pipeline-connector {
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0 1rem;
}

@media (min-width: 1024px) {
  .pipeline-connector {
    display: flex;
  }
}

.connector-line {
  width: 60px;
  height: 2px;
  background: #27273A;
  position: relative;
  overflow: hidden;
}

.connector-line::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, #5E289D, transparent);
  transition: transform 600ms ease;
}

.connector-line.is-active::after {
  animation: connector-sweep 1s ease forwards;
}

@keyframes connector-sweep {
  0% { transform: translateX(0); }
  100% { transform: translateX(200%); }
}

.connector-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #27273A;
  transition: background-color 400ms ease, box-shadow 400ms ease;
}

.connector-dot.is-active {
  background: #5E289D;
  box-shadow: 0 0 8px rgba(94, 40, 157, 0.5);
}

/* Output cards grid */
.output-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 640px) {
  .output-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .output-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Platform card base */
.platform-card {
  border-radius: 0.625rem;
  overflow: hidden;
  opacity: 0;
  transform: scale(0.95) translateY(8px);
  transition: opacity 400ms ease, transform 400ms ease;
}

.platform-card.is-visible {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.platform-card__header {
  padding: 0.625rem 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.platform-card__body {
  padding: 0.875rem;
  font-size: 0.8125rem;
  line-height: 1.6;
}

/* Platform-specific styles */

/* X / Twitter */
.platform-card--x {
  background: #16181C;
  border: 1px solid #2F3336;
}

.platform-card--x .platform-card__header {
  background: #1D1F23;
  color: #E7E9EA;
}

.platform-card--x .platform-card__body {
  color: #D6D9DB;
}

.tweet {
  padding: 0.5rem 0;
  border-bottom: 1px solid #2F3336;
  position: relative;
  padding-left: 1.25rem;
}

.tweet:last-child {
  border-bottom: none;
}

.tweet::before {
  content: '';
  position: absolute;
  left: 0.25rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #2F3336;
}

.tweet::after {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #1D9BF0;
}

.tweet:first-child::before {
  top: 50%;
}

.tweet:last-child::before {
  bottom: 50%;
}

.tweet-count {
  font-size: 0.6875rem;
  color: #71767B;
  margin-top: 0.25rem;
}

/* LinkedIn */
.platform-card--linkedin {
  background: #1B2838;
  border: 1px solid #2D4159;
}

.platform-card--linkedin .platform-card__header {
  background: #1A3152;
  color: #FFFFFF;
}

.platform-card--linkedin .platform-card__body {
  color: #C8D6E5;
}

.linkedin-hashtags {
  margin-top: 0.75rem;
  font-size: 0.75rem;
  color: #0A66C2;
}

/* Email Newsletter */
.platform-card--email {
  background: #1A1A2E;
  border: 1px solid rgba(94, 40, 157, 0.3);
}

.platform-card--email .platform-card__header {
  background: rgba(94, 40, 157, 0.15);
  color: #E2E8F0;
}

.platform-card--email .platform-card__body {
  color: #C8D0DC;
}

.email-subject {
  font-weight: 600;
  color: #E2E8F0;
  margin-bottom: 0.25rem;
}

.email-preview {
  font-size: 0.75rem;
  color: #64748B;
  font-style: italic;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #27273A;
}

/* Instagram Carousel */
.platform-card--instagram {
  background: #1A1A2E;
  border: 1px solid transparent;
  background-clip: padding-box;
  position: relative;
}

.platform-card--instagram::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 0.7rem;
  padding: 1px;
  background: linear-gradient(135deg, #F58529, #DD2A7B, #8134AF, #515BD4);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

.platform-card--instagram .platform-card__header {
  background: rgba(221, 42, 123, 0.1);
  color: #E2E8F0;
}

.platform-card--instagram .platform-card__body {
  color: #C8D0DC;
}

.carousel-dots {
  display: flex;
  gap: 4px;
  justify-content: center;
  margin-top: 0.5rem;
}

.carousel-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #64748B;
}

.carousel-dots span:first-child {
  background: #DD2A7B;
}

/* TikTok Script */
.platform-card--tiktok {
  background: #010101;
  border: 1px solid #2F2F2F;
}

.platform-card--tiktok .platform-card__header {
  background: #1A1A1A;
  color: #FFFFFF;
}

.platform-card--tiktok .platform-card__body {
  color: #E1E1E1;
}

.tiktok-hook {
  color: #69C9D0;
  font-weight: 600;
  font-size: 0.8125rem;
  margin-bottom: 0.5rem;
}

.tiktok-section {
  padding: 0.375rem 0;
  border-left: 2px solid #69C9D0;
  padding-left: 0.625rem;
  margin-bottom: 0.375rem;
}

.tiktok-section:last-child {
  border-color: #EE1D52;
}

/* YouTube Short */
.platform-card--yt-short {
  background: #0F0F0F;
  border: 1px solid #2A2A2A;
}

.platform-card--yt-short .platform-card__header {
  background: #1A1A1A;
  color: #FFFFFF;
}

.platform-card--yt-short .platform-card__body {
  color: #DADADA;
}

.yt-timestamp {
  font-size: 0.6875rem;
  color: #FF0000;
  font-weight: 600;
}

/* YouTube Video */
.platform-card--yt-video {
  background: #0F0F0F;
  border: 1px solid #2A2A2A;
}

.platform-card--yt-video .platform-card__header {
  background: #1A1A1A;
  color: #FFFFFF;
}

.platform-card--yt-video .platform-card__body {
  color: #DADADA;
}

.yt-title {
  font-weight: 600;
  color: #FFFFFF;
  margin-bottom: 0.375rem;
}

.yt-description {
  font-size: 0.75rem;
  color: #AAAAAA;
  margin-bottom: 0.5rem;
}

.yt-outline-item {
  padding: 0.25rem 0;
  padding-left: 0.75rem;
  border-left: 2px solid #FF0000;
  margin-bottom: 0.25rem;
  font-size: 0.8125rem;
}

/* Mobile pipeline label */
.pipeline-label-mobile {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 0;
  font-size: 0.75rem;
  color: #94A3B8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.pipeline-label-mobile::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #27273A;
}

@media (min-width: 1024px) {
  .pipeline-label-mobile {
    display: none;
  }
}

/* Pipeline status */
.pipeline-status {
  font-size: 0.75rem;
  color: #94A3B8;
  min-height: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.pipeline-status .spinner {
  width: 12px;
  height: 12px;
  border: 2px solid #27273A;
  border-top-color: #5E289D;
  border-radius: 50%;
  animation: spin 600ms linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
