/* VideoForge UI Components — Obsidian Studio Pro Styling */

/* Card Containers */
.studio-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color var(--transition-fast);
}

.studio-card:hover {
  border-color: var(--border-medium);
}

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

.studio-card-title {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Source Information Card (8 Chips) */
.source-chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.source-spec-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  background: var(--bg-card-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  transition: all var(--transition-fast);
}

.source-spec-pill:hover {
  border-color: var(--border-highlight);
  color: #ffffff;
}

.source-spec-pill svg {
  color: var(--accent-fuchsia);
  width: 13px;
  height: 13px;
}

/* Estimated Output Hero Card */
.output-hero-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow-sm);
}

.output-hero-comparison {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 10px;
}

.hero-size-block {
  display: flex;
  flex-direction: column;
}

.hero-size-val {
  font-size: 24px;
  font-weight: 800;
  font-family: var(--font-sans);
  color: #ffffff;
  letter-spacing: -0.02em;
}

.hero-size-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}

.hero-arrow-flow {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  position: relative;
}

.hero-arrow-line {
  width: 100%;
  height: 2px;
  border-top: 2px dotted rgba(255, 255, 255, 0.25);
  position: relative;
}

.hero-arrow-line::after {
  content: '';
  position: absolute;
  right: -2px;
  top: -5px;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 6px solid var(--accent-purple);
}

.hero-savings-badge {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-success);
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.hero-footer-specs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px solid var(--border-subtle);
  font-size: 11.5px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

.quality-high-pill {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-emerald);
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

/* Right Control Deck: Form Controls & Rhythm */
.deck-scroll-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.deck-header {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.deck-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.deck-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 700;
  color: #ffffff;
}

.deck-title-group svg {
  color: var(--accent-purple);
}

.deck-field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.deck-field-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.deck-select, .deck-input {
  width: 100%;
  height: 38px;
  padding: 8px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 500;
  outline: none;
  transition: all var(--transition-fast);
  cursor: pointer;
  box-sizing: border-box;
}

.deck-select:focus, .deck-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 1px var(--border-focus);
}

/* Preset Matrix (8 Tiles: 2 Columns) */
.deck-preset-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.preset-tile {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 10px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: left;
  user-select: none;
  min-height: 52px;
  box-sizing: border-box;
}

.preset-tile:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-medium);
}

.preset-tile.active {
  background: rgba(139, 92, 246, 0.12);
  border-color: var(--accent-purple);
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.25);
}

.preset-tile-icon {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.preset-tile-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.preset-tile-name {
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.preset-check-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
}

.preset-tile-desc {
  font-size: 10px;
  color: var(--text-muted);
  line-height: 1.25;
  margin-top: 2px;
}

/* Target Size Switch & Slider */
.deck-switch {
  position: relative;
  display: inline-block;
  width: 32px;
  height: 18px;
  cursor: pointer;
}

.deck-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.deck-switch-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: var(--bg-input);
  border: 1px solid var(--border-medium);
  transition: all var(--transition-fast);
  border-radius: 18px;
}

.deck-switch-slider:before {
  position: absolute;
  content: "";
  height: 12px;
  width: 12px;
  left: 2px;
  bottom: 2px;
  background-color: #ffffff;
  transition: all var(--transition-fast);
  border-radius: 50%;
}

.deck-switch input:checked + .deck-switch-slider {
  background-color: var(--accent-purple);
  border-color: var(--accent-purple);
}

.deck-switch input:checked + .deck-switch-slider:before {
  transform: translateX(14px);
}

.deck-range-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: var(--radius-full);
  background: var(--border-medium);
  outline: none;
  cursor: pointer;
}

.deck-range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent-purple);
  cursor: pointer;
  box-shadow: 0 0 8px rgba(139, 92, 246, 0.9);
  transition: transform var(--transition-fast);
}

.deck-range-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

/* Collapsible Advanced Settings Panel */
.deck-advanced-container {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-top: 2px;
  transition: border-color var(--transition-fast);
}

.deck-advanced-container:hover {
  border-color: var(--border-medium);
}

.deck-advanced-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: var(--bg-card-elevated);
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 700;
  color: #ffffff;
  user-select: none;
  border-bottom: 1px solid transparent;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.deck-advanced-header:hover {
  background: var(--bg-card-hover);
}

.deck-advanced-header.open {
  border-bottom: 1px solid var(--border-subtle);
}

.advanced-preset-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: rgba(139, 92, 246, 0.15);
  color: var(--accent-purple);
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.deck-advanced-body {
  padding: 16px 14px;
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Buttons Base & Variants */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  user-select: none;
  white-space: nowrap;
}

.btn-subtle {
  background: var(--bg-card-elevated);
  border-color: var(--border-subtle);
  color: var(--text-secondary);
}

.btn-subtle:hover:not(:disabled) {
  background: var(--bg-card-hover);
  border-color: var(--border-medium);
  color: #ffffff;
}

.btn-danger {
  background: rgba(244, 63, 94, 0.12);
  border-color: rgba(244, 63, 94, 0.3);
  color: var(--accent-rose);
}

.btn-danger:hover:not(:disabled) {
  background: rgba(244, 63, 94, 0.2);
  border-color: rgba(244, 63, 94, 0.5);
  color: #ffffff;
}

.btn-sm {
  padding: 4px 9px;
  font-size: 11px;
}

.top-icon-btn {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.top-icon-btn:hover {
  color: #ffffff;
  background: var(--bg-card-elevated);
  border-color: var(--border-subtle);
}

/* Master Start Processing Button */
.btn-start-processing-master {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--grad-primary);
  box-shadow: var(--shadow-purple-btn);
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  user-select: none;
  margin-top: 4px;
}

.btn-start-processing-master:hover:not(:disabled) {
  background: var(--grad-primary-hover);
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.6);
  transform: translateY(-1px);
}

.btn-start-processing-master:active {
  transform: translateY(0);
}

.btn-start-processing-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  background: transparent;
  border: none;
  cursor: pointer;
}

.btn-start-processing-arrow {
  padding: 12px 12px;
  border-left: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: transparent;
  border-top: none;
  border-right: none;
  border-bottom: none;
  cursor: pointer;
}

/* Batch Queue Wrapper & Header */
.batch-view-wrapper {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.batch-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.batch-title {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
}

.batch-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Batch Summary Metrics Cards */
.batch-summary-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin-bottom: 4px;
}

.batch-metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-width: 0;
}

.batch-metric-val {
  font-size: 16px;
  font-weight: 800;
  font-family: var(--font-sans);
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.batch-metric-val.green { color: var(--accent-emerald); }
.batch-metric-val.blue { color: var(--accent-cyan); }
.batch-metric-val.amber { color: var(--accent-amber); }

.batch-metric-label {
  font-size: 9.5px;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap;
}

/* Batch Queue Cards Container */
.batch-cards-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
}

.batch-card-row {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all var(--transition-fast);
  box-sizing: border-box;
  width: 100%;
  cursor: pointer;
}

.batch-card-row:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-medium);
}

.batch-card-row.processing {
  border-color: rgba(6, 182, 212, 0.35);
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.1);
}

.batch-card-row.completed {
  border-color: rgba(16, 185, 129, 0.35);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.1);
}

/* Row 1: Card Top Header */
.batch-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-width: 0;
}

.batch-card-file-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.batch-thumb-wrap {
  width: 48px;
  height: 32px;
  border-radius: 4px;
  background: #000000;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
}

.batch-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.batch-thumb-time {
  position: absolute;
  bottom: 2px;
  right: 2px;
  font-size: 8px;
  font-family: var(--font-mono);
  background: rgba(0, 0, 0, 0.75);
  color: #ffffff;
  padding: 0 3px;
  border-radius: 2px;
}

.batch-file-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.batch-file-title {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.batch-file-sub {
  font-size: 10.5px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.batch-card-action {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/* Row 2: Mid Settings + Status */
.batch-card-mid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  flex-wrap: wrap;
}

.batch-settings-tags {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 0;
}

.batch-format-badge {
  font-size: 11px;
  font-weight: 800;
  color: #ffffff;
}

.batch-res-badge {
  font-size: 10px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.batch-preset-badge {
  font-size: 9.5px;
  color: var(--accent-fuchsia);
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.25);
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 600;
}

.batch-status-wrapper {
  flex-shrink: 0;
}

/* Status Pills */
.batch-status-pill {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-block;
  white-space: nowrap;
}

.batch-status-pill.processing {
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.batch-status-pill.completed {
  color: var(--accent-emerald);
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.batch-status-pill.queued {
  color: var(--accent-amber);
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

/* Row 3: Bottom Progress */
.batch-card-bottom {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.batch-progress-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
}

.batch-progress-labels {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10.5px;
  font-family: var(--font-mono);
  gap: 8px;
}

.batch-pct-val {
  color: var(--accent-purple);
  font-weight: 700;
  flex-shrink: 0;
}

.batch-stage-val {
  color: var(--accent-cyan);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: right;
  min-width: 0;
}

.batch-size-val {
  color: var(--accent-emerald);
  font-weight: 700;
  flex-shrink: 0;
}

.batch-saved-val {
  color: var(--accent-emerald);
  flex-shrink: 0;
}

.batch-queued-text {
  font-size: 10.5px;
  color: var(--text-muted);
}

.btn-batch-dl {
  background: var(--grad-primary) !important;
  color: #ffffff !important;
  border: none !important;
  padding: 5px 10px !important;
  gap: 4px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  box-shadow: 0 0 8px rgba(139, 92, 246, 0.3) !important;
  border-radius: var(--radius-sm) !important;
}

/* Progress Bars */
.progress-bar-wrap {
  width: 100%;
  height: 5px;
  border-radius: 10px;
  background: var(--bg-input);
  overflow: hidden;
  margin-top: 2px;
}

.progress-bar-fill-purple {
  height: 100%;
  background: var(--grad-primary);
  border-radius: 10px;
  transition: width 0.2s ease;
}

.progress-bar-fill-green {
  height: 100%;
  background: var(--accent-emerald);
  border-radius: 10px;
}

/* Drag and Drop Banner */
.batch-drop-banner {
  border: 1px dashed var(--border-medium);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.batch-drop-banner:hover {
  border-color: var(--accent-purple);
  background: rgba(139, 92, 246, 0.05);
}

/* Dropzone Component */
.dropzone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 260px;
  width: 100%;
  padding: 36px 20px;
  border: 2px dashed rgba(139, 92, 246, 0.35);
  border-radius: var(--radius-lg);
  background: radial-gradient(circle at center, rgba(30, 41, 65, 0.4) 0%, rgba(15, 19, 32, 0.8) 100%);
  cursor: pointer;
  transition: all var(--transition-fast);
  box-sizing: border-box;
}

.dropzone:hover, .dropzone.drag-active {
  border-color: var(--accent-purple);
  background: radial-gradient(circle at center, rgba(139, 92, 246, 0.15) 0%, rgba(15, 19, 32, 0.95) 100%);
  box-shadow: 0 0 25px rgba(139, 92, 246, 0.25);
}

/* Hero Brand Header (Placed above dropzone in empty state) */
.hero-brand-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
}

.hero-brand-logo {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2px;
  filter: drop-shadow(0 0 16px rgba(139, 92, 246, 0.55));
}

.hero-brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.hero-brand-title {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
  margin: 0;
}

.hero-brand-tagline {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.01em;
  margin: 0;
}

.dropzone-icon-box {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-fuchsia);
  margin-bottom: 12px;
  transition: transform var(--transition-fast);
}

.dropzone:hover .dropzone-icon-box {
  transform: scale(1.08);
}

.dropzone-title {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 3px;
}

.dropzone-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 14px;
  text-align: center;
}

.dropzone-formats {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: center;
}

.format-tag {
  font-size: 10px;
  font-family: var(--font-mono);
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  background: var(--bg-card-elevated);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

.file-input-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
