/* ══════════════════════════════════════════════════════════════════════════════
   CLIPPER GENERATOR STYLES
   Styles for Clipper Generator route
   ══════════════════════════════════════════════════════════════════════════════ */

/* ── CONTAINER & LAYOUT ──────────────────────────────────────────────────────── */
.clipper-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 24px;
  width: 100%;
}

.clipper-header {
  margin-bottom: 24px;
  padding-bottom: 0;
}

.clipper-header .section-title {
  margin: 0;
  padding: 0;
}

/* ── SECTIONS ────────────────────────────────────────────────────────────────── */
.clipper-section {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.clipper-section:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(108, 99, 255, 0.1);
}

.clipper-section.hidden {
  display: none;
}

.section-header {
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.section-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 4px 0;
}

.section-desc {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin: 0;
}

/* ── TABS ────────────────────────────────────────────────────────────────────── */
.clipper-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  border-bottom: 2px solid var(--border);
  padding-bottom: 0;
}

.clipper-tab-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 10px 12px;
  font-size: 0.85rem;
  font-weight: 500;
  border-bottom: 3px solid transparent;
  transition: all 0.2s ease;
  position: relative;
  margin-bottom: -2px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tab-icon {
  font-size: 0.95rem;
}

.tab-label {
  display: inline;
}

.clipper-tab-btn:hover {
  color: var(--text);
  background: rgba(108, 99, 255, 0.05);
}

.clipper-tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.clipper-tab-content {
  display: none;
  animation: slideDown 0.3s ease-out;
  padding: 20px;
  background: var(--bg3);
  border-radius: 8px;
  margin-bottom: 16px;
}

.clipper-tab-content.active {
  display: block;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── MODE SELECTION ──────────────────────────────────────────────────────────── */
.clipper-mode-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.mode-card {
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  background: var(--bg3);
}

.mode-card:hover {
  border-color: var(--accent);
  background: rgba(108, 99, 255, 0.05);
  box-shadow: 0 4px 12px rgba(108, 99, 255, 0.1);
}

.mode-radio input[type="radio"] {
  display: none;
}

.mode-radio input[type="radio"]:checked + .mode-content {
  color: var(--accent);
}

.mode-radio input[type="radio"]:checked ~ .mode-content .mode-title {
  color: var(--accent);
}

.mode-card:has(input[type="radio"]:checked) {
  border-color: var(--accent);
  background: rgba(108, 99, 255, 0.1);
  box-shadow: 0 4px 16px rgba(108, 99, 255, 0.2);
}

.mode-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.2s ease;
}

.mode-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

.mode-desc {
  font-size: 0.8rem;
  color: var(--text-dim);
  display: block;
  margin: 4px 0;
}

.mode-features {
  list-style: none;
  padding: 6px 0 0 0;
  margin: 0;
  font-size: 0.75rem;
  color: var(--text-dim);
  border-top: 1px solid var(--border);
  padding-top: 6px;
}

.mode-features li {
  padding: 3px 0 3px 16px;
  position: relative;
}

.mode-features li:before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: bold;
}

/* ── INPUT & FORM ELEMENTS ───────────────────────────────────────────────────── */
.input-group {
  margin-bottom: 16px;
  padding: 16px;
  background: var(--bg3);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.input-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--text);
  font-size: 0.95rem;
}

.clipper-input {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 0.9rem;
  margin-bottom: 8px;
  transition: all 0.2s ease;
}

.clipper-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.1);
}

.input-hint {
  font-size: 0.85rem;
  color: var(--green);
  margin: 8px 0;
}

/* ── FILE UPLOAD ─────────────────────────────────────────────────────────────── */
.file-upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 48px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  background: rgba(108, 99, 255, 0.02);
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.file-upload-area:hover {
  border-color: var(--accent);
  background: rgba(108, 99, 255, 0.08);
}

.file-upload-area.dragover {
  border-color: var(--accent);
  background: rgba(108, 99, 255, 0.12);
  box-shadow: 0 0 0 2px rgba(108, 99, 255, 0.2);
}

.upload-icon {
  font-size: 2.8rem;
  margin-bottom: 12px;
}

.upload-text {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 8px;
  color: var(--text);
}

.upload-or {
  color: var(--text-dim);
  margin: 12px 0;
  font-size: 0.9rem;
}

.btn-upload {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  border: none;
  padding: 10px 24px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(108, 99, 255, 0.3);
  margin-top: 8px;
}

.btn-upload:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(108, 99, 255, 0.4);
}

.btn-upload:active {
  transform: translateY(0);
}

/* ── CONFIGURATION ───────────────────────────────────────────────────────────── */
.config-group {
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(108, 99, 255, 0.1);
}

.config-group:last-child {
  border-bottom: none;
}

.config-group > label {
  display: block;
  margin-bottom: 12px;
  font-weight: 600;
  color: var(--text);
  font-size: 0.95rem;
}

.radio-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.radio-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  padding: 10px 12px;
  border-radius: 8px;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.radio-label:hover {
  background: rgba(108, 99, 255, 0.08);
  border-color: rgba(108, 99, 255, 0.2);
}

.radio-label input[type="radio"] {
  cursor: pointer;
  margin-top: 4px;
  accent-color: var(--accent);
}

.radio-label .label-content {
  flex: 1;
}

.radio-label > span,
.radio-label .label-text {
  font-weight: 500;
  color: var(--text);
}

.radio-label small {
  display: block;
  color: var(--text-dim);
  font-size: 0.8rem;
  margin-top: 4px;
}

.config-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.config-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.config-col label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
}

.config-col input[type="text"],
.config-col input[type="number"],
.config-col select {
  width: 100%;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 10px 12px;
  font-size: 0.9rem;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
}

.config-col input[type="text"]:focus,
.config-col input[type="number"]:focus,
.config-col select:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 2px rgba(108, 99, 255, 0.1);
}

/* ── CONFIGURATION GRID ──────────────────────────────────────────────────────── */
.config-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.config-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.config-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--text);
  font-size: 0.85rem;
}

.config-icon {
  font-size: 1rem;
}

.config-select {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
}

.config-select:hover {
  border-color: var(--accent);
}

.config-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.1);
}

/* ── ADVANCED OPTIONS ────────────────────────────────────────────────────────── */
.config-advanced {
  padding: 12px;
  background: var(--bg3);
  border-radius: 8px;
  border-left: 4px solid var(--accent);
  margin-bottom: 16px;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-weight: 400;
  color: var(--text);
  font-size: 0.85rem;
}

.checkbox-label input[type="checkbox"] {
  margin-top: 4px;
  cursor: pointer;
  accent-color: var(--accent);
  width: 18px;
  height: 18px;
}

.checkbox-hint {
  display: block;
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 2px;
  margin-left: 24px;
}

/* ── BUTTONS ─────────────────────────────────────────────────────────────────── */
.clipper-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.result-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.clipper-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.clipper-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(108, 99, 255, 0.08);
}

.clipper-btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  border: none;
  box-shadow: 0 4px 12px rgba(108, 99, 255, 0.3);
  flex: 1;
}

.clipper-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(108, 99, 255, 0.4);
  color: #fff;
  border: none;
}

.clipper-btn-primary:active {
  transform: translateY(0);
}

.clipper-btn-secondary {
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text);
}

.clipper-btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-icon {
  font-size: 1.1rem;
}

.btn-text {
  display: inline;
}

/* ── TRANSCRIPT ──────────────────────────────────────────────────────────────── */
.transcript-container {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  max-height: 500px;
  overflow-y: auto;
  font-size: 0.9rem;
  line-height: 1.6;
}

.transcript-container::-webkit-scrollbar {
  width: 8px;
}

.transcript-container::-webkit-scrollbar-track {
  background: var(--bg3);
  border-radius: 8px;
}

.transcript-container::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 8px;
}

.transcript-container::-webkit-scrollbar-thumb:hover {
  background: var(--text-dim);
}

.transcript-segment {
  margin-bottom: 12px;
  padding: 12px;
  background: var(--bg3);
  border-left: 4px solid var(--accent);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.transcript-segment:last-child {
  margin-bottom: 0;
}

.transcript-segment:hover {
  background: rgba(108, 99, 255, 0.1);
  transform: translateX(4px);
}

.transcript-time {
  color: var(--accent);
  font-weight: 700;
  font-size: 0.8rem;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.transcript-text {
  color: var(--text);
  font-size: 0.9rem;
}

/* ── CLIPS ───────────────────────────────────────────────────────────────────── */
.clips-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.clip-item {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  transition: all 0.2s ease;
}

.clip-item:hover {
  border-color: var(--accent);
  background: rgba(108, 99, 255, 0.05);
  box-shadow: 0 4px 12px rgba(108, 99, 255, 0.15);
}

.clip-item.selected {
  background: rgba(108, 99, 255, 0.1);
  border-color: var(--accent);
}

.clip-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.clip-checkbox {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: var(--accent);
}

.clip-info {
  flex: 1;
  min-width: 200px;
}

.clip-time {
  font-weight: 700;
  color: var(--accent);
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.clip-duration {
  color: var(--text-dim);
  font-size: 0.85rem;
}

.clip-preview-btn {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(108, 99, 255, 0.2);
}

.clip-preview-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(108, 99, 255, 0.3);
}

.clip-preview-btn:active {
  transform: translateY(0);
}

.clip-transcript {
  color: var(--text-dim);
  font-size: 0.85rem;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  line-height: 1.6;
}

/* ── ACTION BUTTONS ──────────────────────────────────────────────────────────── */
.clipper-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.clipper-btn {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(108, 99, 255, 0.3);
}

.clipper-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(108, 99, 255, 0.4);
}

.clipper-btn:active {
  transform: translateY(0);
}

.clipper-btn.secondary {
  background: var(--bg3);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: none;
}

.clipper-btn.secondary:hover {
  border-color: var(--accent);
  background: rgba(108, 99, 255, 0.1);
}

/* ── LOADING & EMPTY STATES ──────────────────────────────────────────────────── */
.loading {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-dim);
  font-size: 0.95rem;
}

.loading::after {
  content: '';
  animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
  0%, 20% { content: ''; }
  40% { content: '.'; }
  60% { content: '..'; }
  80%, 100% { content: '...'; }
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  background: rgba(108, 99, 255, 0.05);
  border: 1px dashed var(--border);
  border-radius: 8px;
  color: var(--text-dim);
}

.empty-state-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.empty-state-text {
  font-size: 0.95rem;
  margin-bottom: 4px;
}

/* ── RESPONSIVE ──────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .clipper-container {
    padding: 16px;
  }

  .clipper-section {
    padding: 16px;
    margin-bottom: 16px;
  }

  .section-header {
    margin-bottom: 14px;
    padding-bottom: 10px;
  }

  .section-title {
    font-size: 0.95rem;
    margin-bottom: 4px;
  }

  .section-desc {
    font-size: 0.8rem;
  }

  .clipper-tabs {
    gap: 4px;
  }

  .clipper-tab-btn {
    padding: 10px 10px;
    font-size: 0.8rem;
  }

  .tab-icon {
    font-size: 0.95rem;
  }

  .clipper-tab-content {
    padding: 14px;
  }

  .input-label {
    font-size: 0.85rem;
    margin-bottom: 6px;
  }

  .clipper-input {
    font-size: 0.85rem;
    padding: 8px 10px;
  }

  .input-hint {
    font-size: 0.75rem;
  }

  .clipper-mode-section {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .mode-card {
    padding: 12px;
  }

  .mode-title {
    font-size: 0.9rem;
  }

  .mode-desc {
    font-size: 0.78rem;
  }

  .mode-features {
    font-size: 0.72rem;
    padding-top: 6px;
  }

  .mode-features li {
    padding: 3px 0 3px 18px;
  }

  .config-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .config-item {
    gap: 6px;
  }

  .config-label {
    font-size: 0.85rem;
  }

  .config-icon {
    font-size: 1rem;
  }

  .config-select {
    font-size: 0.85rem;
    padding: 8px 10px;
  }

  .config-advanced {
    padding: 12px;
    border-left-width: 3px;
  }

  .checkbox-label {
    font-size: 0.85rem;
  }

  .checkbox-hint {
    font-size: 0.75rem;
    margin-left: 26px;
  }

  .config-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .clip-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .clip-preview-btn {
    width: 100%;
  }

  .clipper-actions {
    flex-direction: column;
  }

  .clipper-btn {
    width: 100%;
    font-size: 0.9rem;
    padding: 10px 16px;
  }

  .btn-icon {
    font-size: 0.95rem;
  }

  .transcript-segment {
    padding: 10px;
    margin-bottom: 8px;
  }

  .transcript-time {
    font-size: 0.8rem;
  }

  .clip-item {
    padding: 10px;
  }

  .clip-title {
    font-size: 0.85rem;
  }

  .clip-duration {
    font-size: 0.8rem;
  }

  .clip-preview {
    font-size: 0.75rem;
  }
}

@media (max-width: 480px) {
  .clipper-container {
    padding: 12px;
  }

  .clipper-section {
    padding: 12px;
    margin-bottom: 12px;
  }

  .section-header {
    margin-bottom: 12px;
    padding-bottom: 8px;
  }

  .section-title {
    font-size: 0.8rem;
    margin-bottom: 2px;
  }

  .section-desc {
    font-size: 0.7rem;
    display: none;
  }

  .file-upload-area {
    padding: 24px 12px;
    min-height: 100px;
  }

  .upload-icon {
    font-size: 2rem;
  }

  .upload-text {
    font-size: 0.85rem;
  }

  .upload-or {
    font-size: 0.75rem;
  }

  .btn-upload {
    font-size: 0.8rem;
    padding: 8px 16px;
  }

  .clipper-tab-btn {
    padding: 8px 6px;
    font-size: 0.7rem;
  }

  .tab-icon {
    font-size: 0.85rem;
  }

  .tab-label {
    display: none;
  }

  .clipper-tab-content {
    padding: 12px;
  }

  .input-label {
    font-size: 0.75rem;
    margin-bottom: 4px;
  }

  .clipper-input {
    font-size: 0.8rem;
    padding: 7px 8px;
  }

  .input-hint {
    font-size: 0.7rem;
  }

  .clipper-mode-section {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .mode-card {
    padding: 10px;
  }

  .mode-radio {
    display: flex;
  }

  .mode-content {
    gap: 4px;
  }

  .mode-title {
    font-size: 0.8rem;
  }

  .mode-desc {
    font-size: 0.7rem;
  }

  .mode-features {
    font-size: 0.65rem;
    padding-top: 4px;
  }

  .mode-features li {
    padding: 2px 0 2px 16px;
  }

  .config-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .config-item {
    gap: 4px;
  }

  .config-label {
    font-size: 0.75rem;
    gap: 4px;
  }

  .config-icon {
    font-size: 0.9rem;
  }

  .config-select {
    font-size: 0.8rem;
    padding: 6px 8px;
  }

  .config-advanced {
    padding: 10px;
    border-left-width: 2px;
  }

  .checkbox-label {
    font-size: 0.75rem;
    gap: 8px;
  }

  .checkbox-label input {
    width: 16px;
    height: 16px;
  }

  .checkbox-hint {
    font-size: 0.65rem;
    margin-left: 24px;
    margin-top: 2px;
  }

  .clip-header {
    gap: 8px;
  }

  .radio-label {
    padding: 8px;
    gap: 10px;
  }

  .clipper-actions {
    flex-direction: column;
    gap: 8px;
  }

  .clipper-btn {
    width: 100%;
    font-size: 0.8rem;
    padding: 8px 12px;
  }

  .btn-icon {
    font-size: 0.85rem;
  }

  .btn-text {
    font-size: 0.8rem;
  }

  .transcript-container {
    max-height: 300px;
  }

  .transcript-segment {
    padding: 8px;
    margin-bottom: 6px;
  }

  .transcript-time {
    font-size: 0.7rem;
  }

  .clip-item {
    padding: 8px;
  }

  .clip-checkbox-label {
    font-size: 0.75rem;
  }

  .clip-title {
    font-size: 0.75rem;
  }

  .clip-duration {
    font-size: 0.7rem;
  }

  .clip-preview {
    font-size: 0.65rem;
  }

  .result-actions {
    flex-direction: column;
    gap: 8px;
  }
}

/* ── FLOW DIAGRAM ────────────────────────────────────────────────────────────── */
.clipper-flow-diagram {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 16px 0;
}

.flow-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 80px;
}

.flow-icon {
  font-size: 2rem;
  line-height: 1;
}

.flow-label {
  font-size: 0.75rem;
  text-align: center;
  color: var(--text-dim);
  font-weight: 500;
  line-height: 1.3;
}

.flow-arrow {
  color: var(--accent);
  font-size: 1.2rem;
  font-weight: bold;
  margin: 0 4px;
}

/* Mobile: Stack flow vertically */
@media (max-width: 768px) {
  .clipper-flow-diagram {
    flex-direction: column;
    gap: 8px;
  }

  .flow-arrow {
    transform: rotate(90deg);
  }
}

/* ══════════════════════════════════════════════════════════════════════════════
   CLIP ACTION BUTTONS & PROCESSING
   ══════════════════════════════════════════════════════════════════════════════ */

.clip-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.clip-btn {
  padding: 6px 12px;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text-normal);
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.clip-btn:hover {
  background: var(--bg);
  border-color: var(--accent);
  color: var(--accent);
}

.clip-btn:active {
  transform: scale(0.98);
}

.clip-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.clip-accept {
  color: var(--success);
  border-color: var(--success);
}

.clip-accept:hover {
  background: var(--success);
  color: white;
}

.clip-reject {
  color: var(--warning);
  border-color: var(--warning);
}

.clip-reject:hover {
  background: var(--warning);
  color: white;
}

.clip-combine {
  color: var(--accent);
  border-color: var(--accent);
}

.clip-combine:hover {
  background: var(--accent);
  color: white;
}

.clip-edit {
  color: var(--primary);
  border-color: var(--primary);
}

.clip-edit:hover {
  background: var(--primary);
  color: white;
}

/* Processing Progress */
.clip-processing-progress {
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.progress-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.progress-label {
  font-size: 0.85rem;
  font-weight: 500;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-normal);
}

.progress-bar {
  height: 6px;
  background: var(--bg);
  border-radius: 3px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--primary));
  transition: width 0.1s ease;
  border-radius: 3px;
}

.progress-text {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-align: right;
}

/* ── CLIPPER PROGRESS ENHANCEMENTS ────────────────────────────────────────────── */
.clipper-progress-area {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px;
}

.progress-header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 1;
}

.progress-percent {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--bg-secondary);
  padding: 4px 12px;
  border-radius: 4px;
  min-width: 50px;
  text-align: right;
}

/* Step Items */
.progress-steps {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}

.progress-step-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 6px;
  transition: all 0.3s ease;
  background: var(--bg-secondary);
  border-left: 3px solid var(--border);
}

.progress-step-item.active {
  background: rgba(108, 99, 255, 0.08);
  border-left-color: var(--accent);
}

.progress-step-item.done {
  background: rgba(76, 175, 80, 0.08);
  border-left-color: var(--green);
}

.progress-step-item.error {
  background: rgba(244, 67, 54, 0.08);
  border-left-color: var(--red);
}

.step-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--border);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-dim);
  transition: all 0.3s ease;
  margin-top: 2px;
}

.progress-step-item.active .step-dot {
  background: var(--accent);
  color: white;
  animation: pulse 1s infinite;
  font-size: 0.65rem;
}

.progress-step-item.done .step-dot {
  background: var(--green);
  color: white;
  font-size: 0.8rem;
}

.progress-step-item.error .step-dot {
  background: var(--red);
  color: white;
  font-size: 0.8rem;
}

.progress-step-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-width: 0;
}

.progress-step-item span:first-of-type {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
}

.progress-step-item.active span:first-of-type {
  color: var(--accent);
  font-weight: 600;
}

.progress-step-item.done span:first-of-type {
  color: var(--green);
}

.progress-step-item.error span:first-of-type {
  color: var(--red);
}

.progress-step-sub {
  font-size: 0.75rem;
  color: var(--text-dim);
  line-height: 1.3;
}

.progress-step-item.done .progress-step-sub {
  color: var(--green);
}

.progress-step-item.error .progress-step-sub {
  color: var(--red);
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(108, 99, 255, 0.7); }
  70% { box-shadow: 0 0 0 6px rgba(108, 99, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(108, 99, 255, 0); }
}
