/* ============================================================
   TXT in PDF – Tool-spezifische Ergänzungen
   Baut auf invoice-generator.css auf (invgen-* Klassen).
   ============================================================ */

/* Ablagefeld */
.txt-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 38px 20px;
  border: 2px dashed var(--border-color, #e5e7eb);
  border-radius: 14px;
  background: var(--bg-secondary, #f8f9fb);
  cursor: pointer;
  text-align: center;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.txt-drop:hover,
.txt-drop.is-over {
  border-color: var(--color-primary);
  background: rgba(229, 9, 20, 0.04);
}

.txt-drop-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: #fff;
  color: var(--color-primary);
  box-shadow: 0 2px 8px rgba(15, 18, 25, 0.08);
}

.txt-drop b {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.txt-drop span {
  font-size: 0.85rem;
  color: var(--text-secondary, #6b7280);
}

.txt-drop-types {
  margin-top: 8px;
  font-size: 0.72rem !important;
  letter-spacing: 0.06em;
  color: var(--text-tertiary, #9aa1ae) !important;
}

/* Gewählte Datei */
.txt-fileinfo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 15px;
  border-radius: 12px;
  background: #f0fdf4;
  border: 1px solid rgba(21, 128, 61, 0.16);
}

.txt-fileinfo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: #dcfce7;
  color: #15803d;
  flex: none;
}

.txt-fileinfo-text {
  min-width: 0;
  flex: 1;
}

.txt-fileinfo-text b {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.txt-fileinfo-text small {
  display: block;
  font-size: 0.76rem;
  color: var(--text-secondary, #6b7280);
}

/* Zeichenkodierung */
.txt-encoding {
  margin-top: 16px;
}

.txt-hint {
  margin-top: 6px;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--text-secondary, #6b7280);
}

/* Vorschau */
.txt-preview-card {
  padding: 18px;
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 12px;
  background: #fff;
}

.txt-preview-card h3 {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 12px;
  font-size: 0.95rem;
  font-weight: 700;
}

.txt-preview-meta {
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--text-secondary, #6b7280);
}

.txt-preview {
  max-height: 460px;
  overflow: auto;
  margin: 0;
  padding: 16px;
  border-radius: 8px;
  background: #fcfcfd;
  border: 1px solid var(--border-color, #e5e7eb);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.74rem;
  line-height: 1.6;
  color: #1f2937;
  white-space: pre;
  tab-size: 4;
}

@media (max-width: 640px) {
  .txt-preview {
    max-height: 300px;
    font-size: 0.68rem;
  }

  .txt-drop {
    padding: 28px 16px;
  }
}
