/* ═══════════════════════════════════════════════════════════
   RIS - Rezept Index System
   Modul A - Rezept-Indexierung (Spezifische Styles)
   ═══════════════════════════════════════════════════════════ */

/* Upload Queue */
.upload-queue {
  background: var(--bg-surface);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  margin-top: var(--space-2xl);
}

.upload-queue-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--bg-border);
}

.upload-queue-title {
  font-size: var(--font-lg);
  font-weight: var(--font-weight-semibold);
  color: var(--text-primary);
}

.upload-queue-count {
  font-size: var(--font-sm);
  color: var(--text-secondary);
}

/* Upload Queue Item */
.upload-item {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  padding: var(--space-lg);
  background: var(--bg-elevated);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
  transition: all var(--transition-base);
}

.upload-item:last-child {
  margin-bottom: 0;
}

.upload-item-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
  color: var(--accent);
  font-size: var(--font-xl);
  flex-shrink: 0;
}

.upload-item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  min-width: 0;
}

.upload-item-name {
  font-size: var(--font-base);
  font-weight: var(--font-weight-medium);
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.upload-item-size {
  font-size: var(--font-sm);
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
}

.upload-item-status {
  flex-shrink: 0;
}

.upload-item-remove {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.upload-item-remove:hover {
  background: var(--bg-base);
  color: var(--status-error);
}

/* Vorschau Karte */
.preview-card {
  background: var(--bg-surface);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  margin-top: var(--space-2xl);
  animation: slideInUp 0.3s ease;
}

.preview-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-2xl);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--bg-border);
}

.preview-card-title {
  font-size: var(--font-xl);
  font-weight: var(--font-weight-semibold);
  color: var(--text-primary);
}

/* Vorschau Grid (zweispaltig) */
.preview-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-xl);
  margin-bottom: var(--space-2xl);
}

.preview-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.preview-field-label {
  font-size: var(--font-sm);
  font-weight: var(--font-weight-medium);
  color: var(--text-secondary);
}

.preview-field-label.required::after {
  content: '*';
  color: var(--status-error);
  margin-left: var(--space-xs);
}

.preview-field-input {
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-elevated);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: var(--font-base);
  transition: all var(--transition-base);
}

.preview-field-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.preview-field-input[contenteditable="true"] {
  cursor: text;
  min-height: 40px;
}

.preview-field-input.editable {
  border-color: var(--accent);
  background: var(--bg-base);
}

/* Checkbox-Gruppe */
.checkbox-group {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--bg-elevated);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-md);
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background var(--transition-base);
  user-select: none;
}

.checkbox-label:hover {
  background: var(--bg-hover);
}

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

.checkbox-label span {
  font-size: var(--font-sm);
  color: var(--text-primary);
}

/* Zutatenliste (full-width) */
.preview-zutaten {
  grid-column: 1 / -1;
}

.preview-zutaten textarea {
  width: 100%;
  min-height: 120px;
  padding: var(--space-lg);
  background: var(--bg-elevated);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: var(--font-base);
  font-family: inherit;
  resize: vertical;
  transition: all var(--transition-base);
}

.preview-zutaten textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* Vorschau Actions */
.preview-actions {
  display: flex;
  gap: var(--space-md);
  justify-content: flex-end;
  padding-top: var(--space-xl);
  border-top: 1px solid var(--bg-border);
}

/* Success State */
.preview-card.success {
  border-color: var(--status-ok);
  background: rgba(34, 197, 94, 0.05);
}

.preview-success-message {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-lg);
  padding: var(--space-3xl);
  text-align: center;
}

.preview-success-icon {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--status-ok);
  color: #000;
  border-radius: 50%;
  font-size: var(--font-3xl);
  animation: bounce 0.6s ease;
}

.preview-success-title {
  font-size: var(--font-xl);
  font-weight: var(--font-weight-semibold);
  color: var(--status-ok);
}

.preview-success-subtitle {
  font-size: var(--font-base);
  color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 768px) {
  .preview-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }
  
  .upload-item {
    flex-wrap: wrap;
  }
  
  .upload-item-status {
    order: -1;
    width: 100%;
  }
}
