/**
 * KOS KLIMA KI-Portal – Werkzeug "Artikelerfassung".
 *
 * Rahmen, Schrittleiste und Karte sind die gemeinsamen Werkzeug-Bausteine aus
 * liquiditaet.css (liq-wrap, liq-inner, liq-kopf, liq-schritte, liq-card) – dieselben
 * wie bei Schnellangebot, Liquiditätsmonitor und Halbfertigen Arbeiten. Der liq-wrap
 * ist dabei der Scrollbereich des Hauptinhalts, weil main.content fixiert ist.
 * Hier stehen nur die eigenen Inhaltsbausteine (art-*), durchgehend über die Farb-
 * und Formvariablen des Portals (:root in index.html).
 */

/* Breite der Schrittansichten: die Merkmalsliste braucht Platz für zwei bis drei Spalten */
.art-inner { max-width: 900px; }

/* ---------- Kopfzeile ---------- */
.art-kopf-info {
  font-size: 13px;
  color: var(--gray-600);
}
.art-auto {
  font-size: 11.5px;
  color: var(--success);
  font-weight: 600;
}

.art-kopf-aktionen { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Übersicht der Erfassungen (Startseite) ---------- */
.art-laeufe .liq-label { margin-bottom: 4px; }
.art-laeufe-abschnitt { margin-top: 18px; }
.art-lauf { display: flex; align-items: stretch; gap: 6px; }
.art-lauf .liq-lauf-knopf { flex: 1; min-width: 0; }
.art-lauf-titel { font-weight: 600; overflow-wrap: anywhere; }
.art-lauf-weg {
  flex: none; width: 34px; margin-top: 6px;
  border: 1px solid var(--gray-200); border-radius: var(--radius-sm); background: var(--white);
  color: var(--gray-400); font-size: 14px; line-height: 1;
}
.art-lauf-weg:hover { color: var(--danger); border-color: var(--danger); background: #fdf1f1; }

/* ---------- Inhalt der Karte ---------- */
.art-card h2 { font-size: 19px; font-weight: 600; margin: 4px 0 10px; color: var(--navy); }
.art-card h3 { font-size: 15px; font-weight: 600; margin: 22px 0 8px; color: var(--navy); }
.art-card p  { line-height: 1.55; margin-bottom: 14px; color: var(--gray-600); }
.art-hint    { font-size: 12.5px; color: var(--gray-400); line-height: 1.5; }

.art-busy { opacity: .6; pointer-events: none; }

.art-start { text-align: center; }
.art-start .art-icon { font-size: 40px; margin-bottom: 8px; }
.art-start h2 { margin-bottom: 6px; }
.art-start .btn { margin-top: 10px; }

.art-warten {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--gray-600);
}
.art-spinner {
  width: 18px; height: 18px; flex: none;
  border: 2px solid var(--gray-200);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: art-dreh .8s linear infinite;
}
@keyframes art-dreh { to { transform: rotate(360deg); } }

/* ---------- Eingabefelder ---------- */
.art-feld { margin-bottom: 18px; }
.art-feld label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--gray-600);
  margin-bottom: 6px;
}
.art-feld input[type=text],
.art-feld input[type=url],
.art-feld textarea,
.art-feld select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  background: var(--white);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.art-feld input:focus,
.art-feld textarea:focus,
.art-feld select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}
.art-feld textarea { resize: vertical; line-height: 1.5; }
.art-feld .art-hint { margin-top: 5px; }

/* Mehrspaltige Merkmalseingabe */
.art-felder {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 0 18px;
}

/* Aus dem Material vorbelegte Felder: erkennbar, aber wie jedes andere Feld änderbar */
.art-vorbelegt input[type=text] { border-color: var(--accent); background: var(--accent-light); }
.art-vorbelegt input[type=text]:focus { background: var(--white); }
.art-herkunft {
  display: inline-block;
  margin-left: 6px;
  padding: 0 7px;
  border-radius: 999px;
  font-size: 10px;
  letter-spacing: .3px;
  background: var(--accent-light);
  color: var(--accent-dark);
  vertical-align: 1px;
}

.art-herkunft-recherche { background: #eefaf5; color: #12654a; }
.art-herkunft-offen     { background: #fdf6ec; color: #7a4d0b; }

/* Offene Felder: für den Bearbeiter markiert (Vorgabe: offen lassen und kennzeichnen) */
.art-offen input[type=text] { border-color: var(--warning); border-style: dashed; }
.art-offen input[type=text]:focus { border-style: solid; }
.art-fund { color: #7a4d0b; }

/* Rückfrage-Block (Systemzuordnung): deutlich abgesetzt, weil hier eine Entscheidung ansteht */
.art-rueckfrage {
  border: 1px solid var(--warning);
  border-left-width: 3px;
  border-radius: var(--radius-sm);
  background: #fdf6ec;
  padding: 14px 16px;
  margin-bottom: 16px;
  font-size: 13.5px;
  line-height: 1.55;
  color: #5b3a07;
}
.art-rueckfrage-titel {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: #7a4d0b;
  margin-bottom: 6px;
}
.art-rueckfrage > div { margin-bottom: 4px; }
.art-rueckfrage .art-hint { margin-top: 8px; }
.art-check-offen { color: var(--gray-600); }
.art-info .btn, .art-warn .btn { margin-left: 8px; vertical-align: middle; }

.art-checks { display: flex; flex-wrap: wrap; gap: 14px; }
.art-check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13.5px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: var(--gray-800);
  cursor: pointer;
}

/* ---------- Auswahl und Aktionen ---------- */
.art-wahl { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 4px; }
.art-aktionen { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- Hinweise ---------- */
.art-warn, .art-info, .art-erfolg {
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  margin-bottom: 16px;
  font-size: 13.5px;
  line-height: 1.5;
  border-left: 3px solid;
}
.art-warn   { background: #fdf6ec; border-color: var(--warning); color: #7a4d0b; }
.art-info   { background: var(--accent-light); border-color: var(--accent); color: var(--accent-dark); }
.art-erfolg { background: #eefaf5; border-color: var(--success); color: #12654a; font-size: 15px; }

/* ---------- Empfehlung (Zeitkonstante, Herstellerkürzel) ----------
   Ein Vorschlag muss sich vom bestätigten Wert unterscheiden: Der Bearbeiter soll
   auf den ersten Blick sehen, dass hier noch etwas zu entscheiden ist. */
.art-empfehlung {
  border: 1px solid var(--accent);
  border-left-width: 3px;
  border-radius: var(--radius-sm);
  background: var(--accent-light);
  padding: 14px 16px;
  margin-bottom: 18px;
}
.art-empfehlung-marke {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--accent-dark);
  margin-bottom: 4px;
}
.art-empfehlung-wert {
  font-size: 26px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--navy);
}
.art-empfehlung-wert .art-einheit { font-size: 15px; font-weight: 500; }
.art-empfehlung-wert .art-empfehlung-um {
  font-size: 14px;
  font-weight: 400;
  color: var(--gray-600);
  margin-left: 4px;
}
.art-empfehlung-quelle {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--gray-600);
  margin: 6px 0 0;
}
.art-empfehlung .art-wahl { margin-top: 12px; margin-bottom: 0; }

/* Eigener Wert: erscheint erst auf Wunsch und setzt sich vom Vorschlag ab. */
.art-eigenwert {
  border-top: 1px solid var(--gray-200);
  margin-top: 22px;
  padding-top: 18px;
}
.art-eigenwert .art-feld { margin-bottom: 0; }
.art-eigenwert .art-aktionen { margin-top: 16px; }

/* ---------- Status der Artikelnummer ---------- */
.art-status { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.art-pill {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
  background: var(--gray-100);
  color: var(--gray-600);
}
.art-pill-direkt     { background: #eefaf5; color: #12654a; }
.art-pill-vorschlag  { background: var(--accent-light); color: var(--accent-dark); }
.art-pill-ungeprueft { background: #fdf6ec; color: #7a4d0b; }

/* ---------- Tabellen ---------- */
.art-tabelle {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  margin-bottom: 16px;
}
.art-tabelle th, .art-tabelle td {
  text-align: left;
  padding: 7px 10px;
  border-bottom: 1px solid var(--gray-100);
  vertical-align: top;
}
.art-daten th { width: 190px; color: var(--gray-600); font-weight: 600; }
.art-beispiele { margin-bottom: 18px; }
.art-beispiele .art-tabelle { margin-top: 6px; }
.art-beispiele .art-tabelle + .art-hint { margin-top: 14px; }
.art-kuerzel td:first-child { width: 56px; }
.art-zahl { text-align: right; white-space: nowrap; }

/* ---------- Textblöcke mit Kopierfunktion ---------- */
.art-textblock { margin-bottom: 18px; }
.art-textblock-kopf {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}
.art-textblock-kopf h3 { margin: 0; }
.art-textblock pre {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-family: inherit;
  font-size: 13.5px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Überschrift des Merkmalsabschnitts im Langtext. Nur Darstellung – der Text selbst
   enthält keine Auszeichnung, damit das Kopieren den reinen Artikeltext liefert. */
.art-td-titel {
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 600;
  color: var(--navy);
}

/* ---------- Material (Upload) ---------- */
.art-material { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.art-datei {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--gray-100);
  border-radius: var(--radius-sm);
  padding: 5px 10px;
  font-size: 12.5px;
}
.art-datei-weg {
  border: none;
  background: transparent;
  color: var(--gray-400);
  font-size: 13px;
  line-height: 1;
}
.art-datei-weg:hover { color: var(--danger); }

.art-stueckliste {
  border-top: 1px solid var(--gray-200);
  padding-top: 18px;
  margin-top: 22px;
}
.art-stueckliste .art-check { margin-bottom: 12px; }

@media (max-width: 720px) {
  .art-daten th { width: auto; }
  .art-felder { grid-template-columns: 1fr; }
}

/* Gesperrte Felder im Agenten-Dialog (Werkzeug-Agenten) */
.art-gesperrt { opacity: .5; }
.art-gesperrt input, .art-gesperrt textarea { background: var(--gray-100); }
