/* =============================================
   TAB: Clips — Cross-Clip Multi-Format-Export
   Stil: Apple / Stripe — clean, ruhig.
   Konsistent mit prerecorded.css / tts.css — keine Surprises.
   ============================================= */

.cc-wrap {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

/* ─── Section-Intro ───────────────────────────────────────────────── */
.cc-intro {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 16px;
  background: rgba(167, 139, 250, 0.06);
  border: 1px solid rgba(167, 139, 250, 0.18);
  border-radius: var(--radius-md);
}
.cc-intro-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #a78bfa, #7c3aed);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}
.cc-intro-icon svg { width: 18px; height: 18px; }
.cc-intro-title {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 2px;
}
.cc-intro-sub {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* ─── Card-Look (eigene Variante, kompatibel mit globaler .card) ──── */
.cc-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg, 16px);
  padding: 20px 22px;
}
.cc-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.cc-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
}
.cc-card-sub {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  margin-top: 2px;
}

/* ─── Source-Tabs ─────────────────────────────────────────────────── */
.cc-source-tabs {
  display: flex;
  gap: 6px;
  background: rgba(255, 255, 255, 0.03);
  padding: 4px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.cc-source-tab {
  flex: 1;
  min-width: 110px;
  padding: 9px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  color: var(--color-text-muted);
  transition: all .15s;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.cc-source-tab:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--color-text);
}
.cc-source-tab.active {
  background: rgba(167, 139, 250, 0.15);
  color: #c4b5fd;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

/* ─── Source-Bodies ───────────────────────────────────────────────── */
.cc-source-body { display: none; }
.cc-source-body.active { display: block; }

.cc-upload-zone {
  position: relative;
  border: 2px dashed rgba(167, 139, 250, 0.25);
  background: rgba(167, 139, 250, 0.03);
  border-radius: 12px;
  padding: 22px 18px;
  text-align: center;
  cursor: pointer;
  transition: all .18s;
}
.cc-upload-zone:hover,
.cc-upload-zone.dragover {
  border-color: rgba(167, 139, 250, 0.55);
  background: rgba(167, 139, 250, 0.08);
}
.cc-upload-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.cc-upload-zone-icon {
  font-size: 28px;
  margin-bottom: 6px;
  opacity: .85;
}
.cc-upload-zone-title {
  font-size: 0.92rem;
  font-weight: 600;
  margin-bottom: 3px;
}
.cc-upload-zone-sub {
  font-size: 0.76rem;
  color: var(--color-text-muted);
}
.cc-upload-zone-file {
  margin-top: 8px;
  font-size: 0.78rem;
  color: #a78bfa;
  font-weight: 600;
  font-family: var(--font-mono, monospace);
}

.cc-select-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cc-select-label {
  font-size: 0.76rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
}
.cc-select {
  width: 100%;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  color: var(--color-text);
  font-family: inherit;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all .15s;
}
.cc-select:hover { border-color: rgba(167, 139, 250, 0.35); }
.cc-select:focus {
  outline: none;
  border-color: rgba(167, 139, 250, 0.55);
  box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.15);
}
.cc-select option {
  background: #0f0f17;
  color: var(--color-text);
}

/* ─── Format-Cards (Multi-Select) ─────────────────────────────────── */
.cc-formats-label {
  font-size: 0.76rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  margin: 16px 0 10px;
}
.cc-formats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
.cc-format-card {
  position: relative;
  padding: 14px 14px 14px 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  cursor: pointer;
  transition: all .18s cubic-bezier(.22,1,.36,1);
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-family: inherit;
  text-align: left;
  color: inherit;
}
.cc-format-card:hover {
  border-color: rgba(167, 139, 250, 0.35);
  background: rgba(167, 139, 250, 0.04);
  transform: translateY(-1px);
}
.cc-format-card.active {
  border-color: rgba(167, 139, 250, 0.55);
  background: rgba(167, 139, 250, 0.10);
  box-shadow: 0 8px 24px -12px rgba(124, 58, 237, 0.45);
}
.cc-format-card-check {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .15s;
  font-size: 12px;
  color: transparent;
}
.cc-format-card.active .cc-format-card-check {
  background: linear-gradient(135deg, #a78bfa, #7c3aed);
  border-color: transparent;
  color: #fff;
}
.cc-format-card-preview {
  background: linear-gradient(135deg, #1e293b, #0f172a);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
  overflow: hidden;
}
.cc-format-card-preview::after {
  content: attr(data-emoji);
  font-size: 18px;
  opacity: .4;
}
.cc-format-card-preview.ratio-16-9 { width: 88px; height: 50px; }
.cc-format-card-preview.ratio-9-16 { width: 36px; height: 64px; }
.cc-format-card-preview.ratio-1-1  { width: 56px; height: 56px; }

.cc-format-card-name {
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.cc-format-card-res {
  font-size: 0.72rem;
  color: var(--color-text-muted);
  font-family: var(--font-mono, monospace);
  margin-top: -4px;
}
.cc-format-card-platforms {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.cc-format-card-platforms span {
  padding: 2px 7px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 100px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* ─── Submit ──────────────────────────────────────────────────────── */
.cc-submit-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  flex-wrap: wrap;
}
.cc-submit-summary {
  flex: 1;
  font-size: 0.78rem;
  color: var(--color-text-muted);
  min-width: 200px;
}
.cc-submit-summary strong { color: var(--color-text); }
.cc-progress {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 100px;
  overflow: hidden;
  margin-top: 10px;
  display: none;
}
.cc-progress.active { display: block; }
.cc-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #a78bfa, #7c3aed);
  width: 0%;
  transition: width .25s ease-out;
}

/* ─── Job-History ─────────────────────────────────────────────────── */
.cc-jobs-empty {
  padding: 28px 16px;
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.85rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(255, 255, 255, 0.08);
  border-radius: 12px;
}
.cc-jobs-empty-icon {
  font-size: 30px;
  margin-bottom: 8px;
  opacity: .6;
}
.cc-jobs-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cc-job {
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color .15s;
}
.cc-job:hover { border-color: rgba(167, 139, 250, 0.25); }
.cc-job-head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.cc-job-title {
  font-size: 0.88rem;
  font-weight: 600;
  flex: 1;
  min-width: 150px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.cc-job-id {
  font-family: var(--font-mono, monospace);
  font-size: 0.7rem;
  padding: 2px 7px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 5px;
  color: var(--color-text-muted);
}
.cc-job-time {
  font-size: 0.72rem;
  color: var(--color-text-muted);
}
.cc-job-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.cc-job-status.queued      { background: rgba(148, 163, 184, 0.15); color: #94a3b8; border: 1px solid rgba(148, 163, 184, 0.3); }
.cc-job-status.processing  { background: rgba(251, 191, 36, 0.12);  color: #fbbf24; border: 1px solid rgba(251, 191, 36, 0.3);  }
.cc-job-status.done        { background: rgba(52, 211, 153, 0.12);  color: #34d399; border: 1px solid rgba(52, 211, 153, 0.3);  }
.cc-job-status.error       { background: rgba(239, 68, 68, 0.12);   color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3);   }
.cc-job-status .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.cc-job-status.processing .dot { animation: ccPulse 1.4s ease-in-out infinite; }
@keyframes ccPulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

.cc-job-formats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.cc-job-fmt {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  font-size: 0.78rem;
  color: var(--color-text-muted);
}
.cc-job-fmt.ready {
  border-color: rgba(52, 211, 153, 0.35);
  background: rgba(52, 211, 153, 0.08);
  color: #34d399;
}
.cc-job-fmt.ready a {
  color: inherit;
  text-decoration: none;
  font-weight: 600;
}
.cc-job-fmt-pending {
  font-size: 0.7rem;
  font-style: italic;
}
.cc-job-error {
  font-size: 0.78rem;
  color: #f87171;
  padding: 8px 10px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 8px;
}

.cc-spinner-mini {
  width: 12px;
  height: 12px;
  border: 2px solid rgba(167, 139, 250, 0.2);
  border-top-color: #a78bfa;
  border-radius: 50%;
  animation: ccSpin .8s linear infinite;
  display: inline-block;
}
@keyframes ccSpin { to { transform: rotate(360deg); } }

@media (max-width: 600px) {
  .cc-formats-grid { grid-template-columns: 1fr; }
  .cc-format-card { flex-direction: row; align-items: center; }
  .cc-format-card-preview { flex-shrink: 0; }
}
