/* ========================================================
   VIRAL VIDEO STUDIO PUBLISHER WORKFLOW
   ======================================================== */
.workflow-banner {
  background: linear-gradient(135deg, rgba(20, 24, 36, 0.95), rgba(30, 27, 75, 0.75));
  border: 1px solid rgba(99, 102, 241, 0.4);
  border-radius: var(--radius-lg);
  padding: 18px 22px;
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.workflow-banner-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.workflow-sparkle {
  font-size: 24px;
}

.workflow-title-text {
  font-size: 16px;
  font-weight: 800;
  color: white;
  letter-spacing: -0.01em;
}

.workflow-desc-text {
  font-size: 13px;
  color: var(--text-muted);
}

.workflow-status-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.status-pill {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.status-pill.ok {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.3);
  color: #34d399;
}


.flow-card {
  position: relative;
  transition: var(--transition);
}

.flow-card:hover {
  border-color: rgba(99, 102, 241, 0.35);
}

.step-badge-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  color: white;
  font-weight: 800;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px var(--primary-glow);
}

.step-status-tag {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
}

.step-status-tag.ok {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.35);
  color: #34d399;
}

/* Media Tabs */
.media-tabs-nav {
  display: flex;
  background: #0d1017;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 4px;
  gap: 4px;
  margin-bottom: 14px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.media-tabs-nav::-webkit-scrollbar {
  display: none;
}

.media-tab-btn {
  flex: 1 0 auto;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  white-space: nowrap;
  touch-action: manipulation;
}

.media-tab-btn.active {
  background: var(--bg-card-elevated);
  color: white;
  border: 1px solid rgba(99, 102, 241, 0.3);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* Dropzone */
.dropzone {
  border: 2px dashed rgba(99, 102, 241, 0.35);
  border-radius: var(--radius-md);
  padding: 24px 16px;
  text-align: center;
  background: rgba(18, 22, 34, 0.6);
  cursor: pointer;
  transition: var(--transition);
}

.dropzone:hover, .dropzone.dragover {
  border-color: #818cf8;
  background: rgba(99, 102, 241, 0.08);
}

.dropzone-icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.dropzone-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
}

.dropzone-title .browse-link {
  color: #818cf8;
  text-decoration: underline;
}

.dropzone-hint {
  font-size: 12px;
  color: var(--text-faint);
  margin-top: 4px;
}

.preview-row {
  display: flex;
  gap: 14px;
  background: #0d1017;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px;
  align-items: center;
}

.media-thumb {
  width: 60px;
  height: 90px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.preview-meta {
  flex: 1;
  min-width: 0;
}

.preview-filename {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  word-break: break-all;
}

.preview-info {
  font-size: 12px;
  color: var(--text-muted);
}

/* Video player preview */
.video-preview-card {
  background: #0a0c10;
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: var(--radius-md);
  padding: 10px;
  position: relative;
}

.preview-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
  padding: 2px 7px;
  border-radius: 999px;
  z-index: 10;
}

.video-preview-card video {
  width: 100%;
  max-height: 260px;
  background: black;
  border-radius: var(--radius-sm);
  display: block;
}

.video-details-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 12px;
  gap: 10px;
}

.video-path-text {
  font-family: "JetBrains Mono", monospace;
  color: var(--text-muted);
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 70%;
}

/* Multi-Image Carousel Styles */
.carousel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(115px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.carousel-item-card {
  position: relative;
  background: #0d1017;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.carousel-item-card:hover {
  transform: translateY(-2px);
  border-color: rgba(99, 102, 241, 0.5);
}

.carousel-item-card img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  display: block;
}

.carousel-index-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  background: rgba(13, 16, 23, 0.85);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  gap: 3px;
}

.carousel-remove-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(239, 68, 68, 0.88);
  color: white;
  border: none;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  line-height: 1;
  transition: background 0.15s;
}

.carousel-remove-btn:hover {
  background: #ef4444;
}

.carousel-item-info {
  padding: 4px 6px;
  font-size: 10px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  background: #090c12;
}

.carousel-summary-box {
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
}

/* Viral metric card */
.viral-metric-card {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.12), rgba(139, 92, 246, 0.12));
  border: 1px solid rgba(236, 72, 153, 0.35);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.viral-metric-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.viral-score-number {
  font-size: 26px;
  font-weight: 800;
  color: #f43f5e;
  line-height: 1;
}

.viral-metric-title {
  font-size: 13px;
  font-weight: 700;
  color: white;
}

.viral-metric-sub {
  font-size: 11px;
  font-weight: 600;
  color: #c084fc;
  text-transform: uppercase;
}

.viral-metric-right {
  font-size: 12px;
  color: var(--text-muted);
  max-width: 320px;
  line-height: 1.4;
}

.caption-card-wrap, .hashtag-section-wrap {
  background: #0d1017;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 12px;
}

.caption-card-header, .hashtag-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 6px;
}

/* Hand-written caption & hashtags */
.post-copy-editor { margin-top: 16px; }
.caption-editor.hashtag-editor { min-height: 60px; color: #38bdf8; font-weight: 600; }
.copy-counter { font-size: 12px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.copy-counter.over { color: #f87171; font-weight: 700; }
.copy-problem { margin-top: 8px; font-size: 12.5px; color: #f87171; }
.copy-problem[hidden] { display: none; }
.hashtag-chip.selected { background: rgba(6, 182, 212, 0.4); border-color: #38bdf8; color: white; }
.hashtag-chip.selected::before { content: "✓ "; }

.tag-category-block {
  margin-top: 8px;
}

.tag-cat-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 6px;
}

/* ========================================================
   STUDIO SCHEDULING & SCHEDULED POSTS QUEUE
   ======================================================== */
.publish-mode-selector {
  display: flex;
  background: #090c14;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 4px;
  gap: 4px;
  margin-bottom: 14px;
}

.publish-mode-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.publish-mode-btn.active {
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.4);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.publish-mode-btn:hover:not(.active) {
  color: #f1f5f9;
  background: rgba(255, 255, 255, 0.04);
}

.schedule-box {
  background: #0d111a;
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.schedule-presets {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.schedule-presets-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.schedule-preset-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.schedule-preset-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.schedule-preset-chip:hover {
  background: rgba(99, 102, 241, 0.2);
  border-color: rgba(99, 102, 241, 0.5);
  color: #ffffff;
}

.schedule-input-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.schedule-label {
  font-size: 12px;
  font-weight: 600;
  color: #cbd5e1;
}

.schedule-datetime-input {
  background: #090c14;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: #ffffff;
  padding: 10px 14px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.schedule-datetime-input:focus {
  border-color: var(--accent-indigo);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.btn-schedule {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #ffffff;
  border: none;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
  transition: all 0.2s ease;
}
.btn-schedule:hover:not(:disabled) {
  filter: brightness(1.1);
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.45);
}
.btn-schedule:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

.schedule-note {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
}

/* Scheduled Queue Section */
.scheduled-queue-container {
  margin-top: 24px;
  background: #0a0d15;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
}

.scheduled-queue-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.scheduled-queue-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.scheduled-queue-title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
}

.scheduled-queue-badge {
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.3);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
}

.scheduled-queue-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.scheduled-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #111522;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  transition: border-color 0.2s ease;
}
.scheduled-item:hover {
  border-color: rgba(99, 102, 241, 0.35);
}

.scheduled-item-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.scheduled-item-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.scheduled-item-type {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
}

.scheduled-item-time {
  font-size: 12.5px;
  font-weight: 600;
  color: #38bdf8;
}

.scheduled-item-caption {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.scheduled-item-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.scheduled-status-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
}
.scheduled-status-badge.scheduled {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}
.scheduled-status-badge.publishing {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
}
.scheduled-status-badge.published {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.scheduled-status-badge.failed {
  background: rgba(244, 63, 94, 0.15);
  color: #f43f5e;
  border: 1px solid rgba(244, 63, 94, 0.3);
}

.scheduled-empty {
  text-align: center;
  font-size: 12.5px;
  color: var(--text-muted);
  padding: 20px;
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-md);
}


/* Which platforms a post goes to */
.platform-picker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  padding: 0;
  border: none;
}
.platform-picker legend { float: left; margin-right: 4px; padding: 0; }
.platform-option {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  width: auto;
  margin: 0;
  white-space: nowrap;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: #090c14;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
}
.platform-option:has(input:checked) { color: #a5b4fc; border-color: rgba(99, 102, 241, 0.5); background: rgba(99, 102, 241, 0.15); }
.platform-option:has(input:disabled) { opacity: 0.55; cursor: not-allowed; }
.platform-option input { width: auto; margin: 0; padding: 0; flex: none; accent-color: #6366f1; }
.platform-hint { max-width: 160px; overflow: hidden; text-overflow: ellipsis; font-size: 11px; font-weight: 500; color: var(--text-faint); }
.platform-hint:empty { display: none; }
.scheduled-item-platforms { font-size: 11px; color: var(--text-muted); }
