/**
 * KOS KLIMA KI-Portal – Werkzeug "Artikelerfassung".
 *
 * Nutzt durchgehend die Farb- und Formvariablen des Portals (:root in index.html),
 * damit der geführte Ablauf wie ein Teil des Portals wirkt und Änderungen am
 * Erscheinungsbild an einer Stelle gepflegt werden.
 */

.art-wrap {
  max-width: 820px;
  margin: 0 auto;
  padding: 28px 24px 60px;
}

/* ---------- Kopfzeile des Schritts ---------- */
.art-kopf {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 14px;
}
.art-schritt {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--accent-dark);
}
.art-kopf-info {
  font-size: 13px;
  color: var(--gray-600);
}
.art-auto {
  font-size: 11.5px;
  color: var(--success);
  font-weight: 600;
}

/* ---------- Karte ---------- */
.art-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px 28px;
}
.art-card h2 { font-size: 19px; font-weight: 600; margin-bottom: 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;
}

.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-wrap { padding: 18px 14px 50px; }
  .art-card { padding: 20px 18px; }
  .art-daten th { width: auto; }
}

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